⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 globals.h

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 H
📖 第 1 页 / 共 4 页
字号:
#ifndef lintstatic char *sccsid_h = "@(#)globals.h	4.6      ULTRIX 	3/13/91";#endif/************************************************************************ *									* *			Copyright (c) 1989 by				* *		Digital Equipment Corporation, Maynard, MA		* *			All rights reserved.				* *									* *   This software is furnished under a license and may be used and	* *   copied  only  in accordance with the terms of such license and	* *   with the  inclusion  of  the  above  copyright  notice.   This	* *   software  or  any  other copies thereof may not be provided or	* *   otherwise made available to any other person.  No title to and	* *   ownership of the software is hereby transferred.			* *									* *   The information in this software is subject to change  without	* *   notice  and should not be construed as a commitment by Digital	* *   Equipment Corporation.						* *									* *   Digital assumes no responsibility for the use  or  reliability	* *   of its software on equipment which is not supplied by Digital.	* *									*n ************************************************************************//************************************************************************    MODIFICATION HISTORY** 03-Mar-91 - Adrian Thoms*	Got rid of harmless (but untidy) extra : in printserver template*	Put printserver help back in synch with template*	TO BE DONE: get the templates into printcap format and avoid*	the duplication in the help messages!!!!** 25-Feb-91	Adrian Thoms*	Fixed numerous spelling errors and corrected trademark usage.** 04-Oct-90 - Adrian Thoms (thoms@wessex)*	printserver template fix: added pp field for lpr -p support** 13 Nov 89	Adrian Thoms (for Daren Seymour)*	Changed default value for uv*	*    07-Jan-89  David Gray (gray)*    Modified help message for "sd", "af", and "lf" to reflect changes*    made to the way the files are created.*    Modified to "xs" help message, bits to set are represented in octal*    instead of hex. Since all other references are made in octal, this*    makes much more sense.**    November 11, 1988*    by David J. Gray**    Changed default entries for la75 and ln03r     **    July 13, 1988*    by: David J. Gray**    Changed the wording of some of the help messages. There were*    problems due to references to non-existent documents.**    Added the LA120 to the printers available list, and the LP29*    to the same list.**    May 21, 1988*    by: David J. Gray**    Changed some of the default values for printers so that the*    printers will work with factory settings.*    ie., 8bit no parity and either 4800 or 9600 baud.**    December 7, 1987  (Pearl Harbor Day - 12/7/41)**    By: David J. Gray*    Modified help messages to provide more verbose explanations to *    hopefully provide more useful information.*    -> better explanation on printcap parameters*    -> short description on each printer*    -> more detailed information on use**  8-Jul-88 Dave Maxwell (EUEG)*    Added entries/help info for new postscript capabilities:*	ct - connection typ*	ps - postscript/non postscript mode*	uv - Ultrix version*	Da - Data type*	Dl - Device Control Module file*	It - Input tray*	Lf - Layup to postscript translator*	Lu - layup Definition file*	Ml - Message log*	Nu - Number up*	Or - Orientation*	Ot - Output tray*	Ps - Page size*	Sd - Sheet Size default*	Si - Sides*	Ss - Sheet size*	Ul - Upper page limit*	Xf - translator dispatch program*    *   Added lps40 template to printer list*    *  20-Jul-88 Dave Maxwell (EUEG)*	changed lps40 to printserver**************************************************************************//****************************************  global variables for lprsetup program***************************************/char    progname[] = "lprsetup";/* name of program 			*/char    pnum[LEN];		/* printer number we are working on	*/char    pname[LEN];		/* printer name		 		*/char	longname[LEN];		/* printer name and synonyms		*/char    ptype[LEN];		/* printer type		 		*/char    symbolname[LEN];	/* symbol just read in; this needs to be*/				/* large since is also used to hold the	*/				/* value of the new symbol. 		*/char    printertype[LEN];       /* name of printer type to get help on  */	/* was char bp[1024]; */char	jhp[1024];char    *bp = jhp;			 /* return from tgetent	 		*/char	oldfilter[LEN];			 /* print filter before modify		*/char    printercomments[LINES][COLUMNS];  /* to store comments for printcap file  */int     numcomments;		     /* actual number of comments	    *//* * This structure holds symbols from the PRINTCAP file. * The used flag indicates whether the symbol is in * use or not, if so, it changes from NO to YES. */struct table    tab[] ={    "af", "/usr/adm/lpacct", STR, NO, 0, 0,    "br", "none", INT, NO, 0, 0,    "cf", "none", STR, NO, 0, 0,    "ct", "none", STR, NO, 0, 0,    "df", "none", STR, NO, 0, 0,    "dn", "/usr/lib/lpd", STR, NO, 0, 0,    "du", "0", INT, NO, 0, 0,    "fc", "none", INT, NO, 0, 0,    "ff", "\\f", STR, NO, 0, 0,    "fo", "off", BOOL, NO, 0, 0,    "fs", "none", INT, NO, 0, 0,    "gf", "none", STR, NO, 0, 0,    "ic", "off", BOOL, NO, 0, 0,    "if", "none", STR, NO, 0, 0,    "lf", "/usr/adm/lperrs", STR, NO, 0, 0,    "lo", "lock", STR, NO, 0, 0,    "lp", "/dev/lp", STR, NO, 0, 0,    "mc", "20", INT, NO, 0, 0,    "mx", "1000", INT, NO, 0, 0,    "nc", "off", BOOL, NO, 0, 0,    "nf", "none", STR, NO, 0, 0,    "of", "none",  STR, NO, 0, 0,    "op", "none", STR, NO, 0, 0,    "os", "none", STR, NO, 0, 0,    "pl", "66", INT, NO, 0, 0,    "pp", "usr/lib/lpdfilters/ln01pp", STR, NO, 0, 0,    "ps", "non_PS", STR, NO, 0, 0,    "pw", "132", INT, NO, 0, 0,    "px", "none", INT, NO, 0, 0,    "py", "none", INT, NO, 0, 0,    "rf", "none", STR, NO, 0, 0,    "rm", "none", STR, NO, 0, 0,    "rp", "none", STR, NO, 0, 0,    "rs", "off", BOOL, NO, 0, 0,    "rw", "off", BOOL, NO, 0, 0,    "sb", "off", BOOL, NO, 0, 0,    "sc", "off", BOOL, NO, 0, 0,    "sd", "/usr/spool/lpd", STR, NO, 0, 0,    "sf", "off", BOOL, NO, 0, 0,    "sh", "off", BOOL, NO, 0, 0,    "st", "none", STR, NO, 0, 0,    "tf", "none", STR, NO, 0, 0,    "tr", "none", STR, NO, 0, 0,    "ts", "none", STR, NO, 0, 0,    "uv", "4.0", STR, NO, 0, 0,    "vf", "none", STR, NO, 0, 0,    "xc", "none", INT, NO, 0, 0,    "xf", "none", STR, NO, 0, 0,    "xs", "none", INT, NO, 0, 0,    "Da", "none", STR, NO, 0, 0,    "Dl", "/usr/lib/lpdfilters/dcl.a", STR, NO, 0, 0,    "It", "none", STR, NO, 0, 0,    "Lf", "/usr/lib/lpdfilters/layup", STR, NO, 0, 0,    "Lu", "none", STR, NO, 0, 0,    "Ml", "none", STR, NO, 0, 0,    "Nu", "none", INT, NO, 0, 0,    "Or", "portrait", STR, NO, 0, 0,    "Ot", "none", STR, NO, 0, 0,    "Ps", "none", STR, NO, 0, 0,    "Sd", "none", STR, NO, 0, 0,    "Si", "none", STR, NO, 0, 0,    "Ss", "none", STR, NO, 0, 0,    "Ul", "none", INT, NO, 0, 0,    "Xf", "xlator_call", STR, NO, 0, 0,    0, 0, 0, 0, 0, 0};char h_af[] ={"\n\The 'af' parameter is the name of the accounting file used to		\n\keep track of the number of pages printed by each user for each		\n\printer.  The name of the accounting file should be unique for		\n\each printer on your system. The information stored in the		\n\accounting file is used by the pac(8) program. Note this file		\n\must be owned by `daemon'. It should be if it was created using		\n\this script. The `af' parameter is not applicable for remote 		\n\printer entries.							\n\\n\When the accounting file is created, intermediate directories  \n\will be created as neccessary. \n\"};char h_br[] ={"\n\The 'br' parameter specifies the baud rate for the printer.		\n\The baud rate is dependent upon the printer hardware.			\n\Consult your printer hardware manual for the correct baud rate.		\n\The 'br' parameter is only applicable for tty devices, ie. serial.      \n\This parameter has no effect on printers connected to the console       \n\port or to printers connected on a parallel port.		       \n\"};char h_cf[] ={"\n\The 'cf' parameter specifies the output filter for the		   \n\cifplot data filter.						     \n\\n\Printer filter entries can either be an executable program	      \n\or a single line which is interpreted by the shell.		    \n\"};char h_ct[] ={"\n\The 'ct' parameter specifies the type of connection to the printer.       \n\Choices are dev, lat, remote, and network. 				\n\"};char h_df[] ={"\n\The 'df' parameter specifies the output filter for the TeX data 	\n\filter (DVI format).						    \n\\n\Printer filter entries can either be an executable program	      \n\or a single line which is interpreted by the shell.		    \n\"};char h_dn[] ={"\n\The 'dn' parameter specifies the name of the daemon program to		\n\invoke each time a print request is made to the printer.  The		\n\default daemon name is '/usr/lib/lpd', and should not be		\n\changed.  The 'dn' parameter is available here so that the		\n\system may support multiple line printer daemons.			\n\"};char h_du[] ={"\n\The 'du' parameter specifies the daemon UID used by the printer 	\n\spooler programs.  The default value, (0) should not be changed.	\n\The 'du' parameter is available here so that printer daemons,	   \n\other than /usr/lib/lpd, may be used.				   \n\"};char h_fc[] ={"\n\The 'fc' parameter specifies which terminal flag bits to clear		\n\when initializing the printer line.  Normally, all of the bits		\n\should be cleared (fc=0177777 octal) before calling 'fs'.  Refer	\n\to the discussion of 'sg_flags' in tty(4) of the Ultrix Reference	\n\Pages, or see help message for the 'fs' parameter. \n\"};char h_ff[] ={"\n\The 'ff' parameter is the string to send as a form feed to the		\n\printer.  The default value for this parameter is '\\f'.		\n\"};char h_fo[] ={"\n\The boolean parameter 'fo' specifies whether a form feed will		\n\be printed when the device is first opened.  This is in addition	\n\to the normal form feed which is printed by the driver when the		\n\device is opened.  To suppress ALL printer induced form feeds,		\n\use the 'sf' flag, in addition to the 'fo' flag.			\n\"};char h_fs[] ={"\n\The 'fs' parameter specifies which terminal flag bits to set		\n\when initializing the printer line.  Normally, all of the bits		\n\should be cleared (using fc=0177777 octal) and then 'fs' should be	\n\used to set the specified bits.  Refer to the discussion of		\n\'sg_flags' in tty(4) of the Ultrix Reference Pages.		\n\A short discussion on each bit is listed below:	      	        \n\									\n\ALLDELAY     0177400    Delay algorithm selection		       \n\BSDELAY      0100000    Select Backspace delays (not implemented)       \n\BS0	     0							  \n\BS1	     0100000						    \n\VTDELAY      0040000    Select form-feed and vertical tab delays	\n\FF0	     0							  \n\FF1	     0100000						    \n\CRDELAY      0030000    Select carriage-return delay		    \n\CR0	     0							  \n\CR1	     0010000						    \n\CR2	     0020000						    \n\CR3	     0030000						    \n\TBDELAY      0060000    Select tab delays			       \n\TAB0	     0							  \n\TAB1	     0002000						    \n\TAB2	     0004000						    \n\XTABS	     0006000						    \n\NLDELAY      0001400    Select new-lines delay			  \n\NL0	     0							  \n\NL1	     0000400						    \n\NL2	     0001000						    \n\NL3	     0001400						    \n\EVENP	     0000200    Even parity allowed on input (most terminals)   \n\ODDP	     0000100    Odd parity allowed on input		     \n\RAW	     0000040    Raw mode: wake up on all characters; 8bit interface\n\CRMOD	     0000020    Map CR into LF; echo LF or CR as CR-LF	  \n\ECHO	     0000010    Echo (full duplex)			      \n\LCASE	     0000004    Map upper case to lower on input		\n\CBREAK       0000002    Return each character as soon as it is typed    \n\TANDEM       0000001    Automatic flow control			  \n\"};char h_gf[] ={"\n\The 'gf' parameter specifies the graph data filter (plot(3X) format). 	\n\\n\Printer filter entries can either be an executable program	      \n\or a single line which is interpreted by the shell.		    \n\"};char h_ic[] ={"\n\The 'ic' parameter is the driver that supports (nonstandard)	    \n\ioctl to an independent printout.				       \n\"};char h_if[] ={"\n\The 'if' parameter is the name of a filter which does 			\n\accounting.  Filters which can be used for if include:			\n\\n\	Filter name:	  		Description:			\n\	------------	  		------------			\n\	/usr/lib/lpdfilters/lpf	  	line printer filter 		\n\					   (LP25, LP26, LP27, LP29)	\n\					   (LG01, LA210, LQP02, LQP03)	\n\	/usr/lib/lpdfilters/lqf	  	letter quality filter 		\n\					   (LQP02, LQP03)		\n\	/usr/lib/lpdfilters/ln01of   	LN01 Laser Printer filter 	\n\	/usr/lib/lpdfilters/ln03of   	LN03 Laser Printer filter 	\n\	/usr/lib/lpdfilters/ln03of   	LN03S Laser Printer filter 	\n\	/usr/lib/lpdfilters/lcg01of   	LCG01 Color Printer		\n\	/usr/lib/lpdfilters/lj250of   	LJ250 DEColorwriter filter 	\n\\n\If an accounting file is specified with the 'af' parameter then this    \n\filter is used instead of the one specified by the 'of' parameter       \n\to process the print job.					       \n\\n\Printer filter entries can either be an executable program	      \n\or a single line which is interpreted by the shell.		    \n\"};char h_lf[] ={"\n\The 'lf' parameter is the logfile where errors are reported.		\n\The default logfile, if one is not specified, is '/dev/console'.	\n\If you have more than one printer on your system, you should give 	\n\each logfile a unique name.						\n\\n\When the error log file is created, intermediate directories  \n\will be created as neccessary. \n\"};char h_lo[] ={"\n\The 'lo' parameter is the name of the lock file used by the		\n\printer daemon to control printing the jobs in each spooling		\n\directory.  The default value, 'lock', should not be changed.		\n\This parameter is available for use by 'other' printer daemons.	 \n\"};char h_lp[] ={"\n\The 'lp' parameter is the name of the special file to open for   	\n\output.  The default value is '/dev/lp', which is for a parallel	\n\printer. Additional parallel printers should have names like: lp1,      \n\lp2, lp3, ..., etc.,. For serial printers, a terminal line should       \n\have a name like /dev/tty01, /dev/tty02, ..., etc.		      \n\"};char h_mc[] ={"\n\The 'mc' parameter is the maximum number of copies allowed.		\n\This parameter is used in conjunction with the lpr -#n option.	  \n\See lpr(1) in the Ultrix Reference Pages.			     \n\"};char h_mx[] ={"\n\The 'mx' parameter specifies the maximum allowable filesize      	\n\(in BUFSIZ blocks) printable by each user.  Specifying mx=0     	\n\removes the filesize restriction entirely. If this parameter	    \n\is not specified, the default value of 1000 blocks is assumed.	  \n\The 'mx' parameter effects the size of the job on the machine	   \n\that the lpr command was executed.				      \n\"};char h_nc[] ={"\n\The 'nc' parameter does not allow control characters in the	     \n\output file.							    \n\"};char h_nf[] ={"\n\The 'nf' parameter specifies a ditroff filter. 				\n\"};char h_of[] ={"\n\The 'of' parameter specifies the output filter to be used with		\n\the printer.  Output filters are used to filter text data to the	\n\printer device when accounting is not used or when all text data	\n\must be passed through a filter.  Filters which can be used for		\n\output include:								\n\\n\	Filter name:	  		Description:			\n\	------------	  		------------			\n\	/usr/lib/lpdfilters/lpf	  	line printer filter 		\n\					   (LP25, LP26, LP27, LP29 )	\n\					   (LG01, LA210, LQP02, LQP03)	\n\	/usr/lib/lpdfilters/lqf	  	letter quality filter 		\n\					   (LQP02, LQP03)		\n\	/usr/lib/lpdfilters/la75of      LA75 Dot Matrix Printer filter  \n\	/usr/lib/lpdfilters/ln01of   	LN01 Laser Printer filter 	\n\	/usr/lib/lpdfilters/ln03of   	LN03 Laser Printer filter 	\n\	/usr/lib/lpdfilters/ln03of   	LN03S Laser Printer filter 	\n\	/usr/lib/lpdfilters/lj250of     LJ250 Ink Jet Printer filter    \n\	/usr/lib/lpdfilters/lcg01of     LCG01 Ink Jet Printer filter    \n\	/usr/lib/lpdfilters/lg02of      LG02 Line Printer filter	\n\	/usr/lib/lpdfilters/lg31of      LG31 Line Printer filter	\n\	/usr/lib/lpdfilters/lpscomm     PrintServer network filter      \n\\n\This filter is used as the output filter unless an accounting file      \n\is specified with the 'af' pareameter, in which case the filter	 \n\specified with the 'if' parameter is used as the output filter	  \n\as well as keeping track of accounting information.		     \n\\n\If you are setting up a PrintServer, the output filter requires         \n\non-standard arguments.  Replace the dummy nodename with the node       \n\name of your PrintServer followed by '%%U %%H %%J' (This causes your       \n\Nodename, Username Hostname and Job-id to be passed to the filter.)    \n\"};char h_op[] ={"\n\The 'op' parameter specifies the object port on a LAT terminal server.	\n\This parameter must be specified in uppercase.				\n\"};char h_os[] ={"\n\The 'os' parameter specifies the object service on a LAT server.	\n\(NOT USED)							      \n\"};char h_pl[] ={"\n\The 'pl' parameter specifies the page length in lines.  The 		\n\default page length is 66 lines.					\n\"};char h_pp[] ={"\n\The 'pp' parameter specifies the print command filter		   \n\replacement.  Filters currently available include:			\n\

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -