tldm-universe/Ardent/UV/gcidir/include/PFILE.h
2024-09-09 17:51:08 -04:00

184 lines
5.4 KiB
C
Executable File

#ifndef h_PFILE
#define h_PFILE
/******************************************************************************
*
* Definition of Printer File descriptor
*
* Module %M% Version %I% Date %H%
*
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
* This is unpublished proprietary source code of Ardent Software Inc.
* The copyright notice above does not evidence any actual or intented
* publication of such source code.
*
*******************************************************************************
*
* Maintenence log - insert most recent change descriptions at top
*
* Date.... GTAR# WHO Description.........................................
* 06/21/99 25138 DTM Added USEROPTS functionality
* 10/14/98 23801 SAP Change copyrights.
* 08/30/96 19156 AGM Replace job_handle by printer_handle and printer_DC
* 12/21/95 17804 GMM Changed global cr to UVcr
* 07/13/95 16881 PGW Include variables required for Windows NT spooling.
* 08/01/95 17030 JC Added suppmap map for suppressing NLS mapping.
* 07/11/95 16713 AGM Remove Pmask global variable
* 05/18/95 13842 SPR Integrate 7.3.3.3 Sequoia changes into 8.3.3.1.
* 02/22/95 15740 JC Increased sixe of printer memory.
* 01/16/95 15740 EAP Added opmap to pblock structure.
* 11/24/94 15740 JC Added mapname to pblock structure.
* 05/16/94 13551 JC Added FOOT_B for FOOTING with 'B' option.
* 04/20/94 12871 WLG Added istape flag to pblock struct.
* 04/07/94 12866 WLG Increase spg and epg to int from short.
* 03/09/94 12307 EAP Added Rprint() and Rpad() for RAW.OUTPUT
* 08/02/93 10978 SHK Port to DEC AXP
* 11/12/91 8840 TMC change getmsg to uvgetmsg for PTX
* 02/11/90 6819 JWT change DATA stack management to work in memory
* 01/31/90 6811 JWT change spool file name generation
* 08/23/89 6024 DTW add whitespace to the pblock structure
* 07/25/88 - - Maintenence log purged at 5.2.1, see release 5.1.10.
*
*****************************************************************************/
#define Pmaxopen 16
#ifdef MSWIN
#define Pmemsize 6400
#else
#if COMPUTER == DEC_ALPHA || COMPUTER == SEQUOIA
#define Pmemsize 20480
#else
#define Pmemsize 5120
#endif
#endif
#include "NLS.h"
struct pblock
{
BITMAP inuse:1, /* Channel has been set up */
active:1, /* Channel is currently open */
hold:1, /* Do NOT close the output channel */
nobuffer:1, /* Output is NOT buffered */
started:1, /* Some output has occured */
format:1, /* Page headings and/or footings */
keepform:1, /* user chosen value for format */
primed:1, /* Print heading before next output */
wait:1, /* Wait for user input at bottom of page*/
spool:1, /* Send file to spooler */
hp:1, /* REQUEUE option of spooler */
ihold:1, /* Place job into "hold" state */
nohead:1, /* Don't print spooler banner page */
eject:1, /* Eject a page at end of report */
inform:1, /* Inform user of spooler entry number */
ftn:1, /* Fortran filter */
lnum:1, /* Line number filter */
next:1, /* Next available hold file */
left:1, /* Cursor is at left margin */
whitespace:1, /* true if the last line printed was for whitespace */
istape:1, /* This channel is a tape device requiring buffering */
suppmap:1, /* Suppress NLS mapping flag for channel */
/* Windows NT-specific things: */
gdi:1, /* user requested GDI mode */
raw:1, /* user requested raw mode */
fontbold:1, /* user asked for BOLD printing */
fontitalic:1, /* user asked for italic printing */
use_gdi:1, /* true if currently printing in GDI mode */
use_font:1; /* true if using a non-default font */
short chan,
copies;
int spg,
epg;
short width,
depth,
top_mar,
bot_mar,
lc,
flc,
hlc,
lpp,
mode,
priority,
level;
long defer;
int page,
#ifndef MSWIN
sp_job_id,
#endif
fchan,
dchan;
uchar *head,
*foot;
char *filename,
*banner,
*form,
*lptr,
*useropts;
STRING cr,
ff,
mapname;
CMAP *opmap; /* NLS Mapping table for WRITE */
#ifdef MSWIN
double linespace; /* Line spacing ratio */
char *fontname; /* Font name specified by user */
int fontsize; /* Size of font specified by user */
int tabsize; /* Spacing for tab expansion */
DWORD sp_job_id; /* Spooler job number */
HDC printer_DC; /* GDI mode: printer Device Context */
HANDLE printer_handle; /* Raw mode: printer handle */
pid_t job_process_id; /* Process owning the Device Context or */
/* printer handle */
int char_height; /* Character height defined by font */
int nt_page; /* Page count (used for range checking) */
int nt_lc; /* Line count (used for LNUM option) */
int nt_charpos; /* Current character position in line */
int nt_newline; /* True if last action was end of line */
#endif
};
struct pfile
{
Pblock *p;
MFILE *f;
};
EXTERN PFILE Pctrl[];
EXTERN STRING HEAD_B,HEAD_F,HEAD_I,FOOT_B;
EXTERN TERMSET *term;
EXTERN STRING crlf,
UVcr,
ff,
clrs;
EXTERN char Phost[];
EXTERN void
#if COMPUTER != CCI
Pprint(),
Ppad(),
Rprint(),
Rpad(),
#endif
Pcrlf(),
Peject(),
Popen(),
Phfset(),
Pinit();
EXTERN void Pnextpage(),
Phfprint(),
Pmake(),
Pnewpage();
EXTERN void Pstartjob();
EXTERN int Pendjob();
EXTERN int Tandchk();
EXTERN STRING uvgetmsg();
EXTERN char *Pmalloc();
EXTERN void Pfree(),
Pfork(),
Punfork(),
Prelease(),
Pflush();
EXTERN Pblock *Pget();
EXTERN char *Phold();
#endif /* end of PFILE.h */