ltfdefs.h

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· C头文件 代码 · 共 541 行 · 第 1/2 页

H
541
字号
/*	@(#)ltfdefs.h	4.1	(ULTRIX)	7/17/90	*//**************************************************************** *								* *			Copyright (c) 1985 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.					* *								* ****************************************************************//**//* * *	File name: * *		ltfdefs.h * *	Source file description: * *		Contains common defintions of GLOBAL constants, *		structures, and external routine/variable *		declarations for the Labeled Tape Facility (LTF). * * * *	Functions: * *		n/a * *	Usage: * *		n/a * *	Compile: * *		n/a * *	Modification history: *	~~~~~~~~~~~~~~~~~~~~ * *	revision			comments *	--------	----------------------------------------------- *	  01.0		10-April-85	Ray Glaser *			Create orginal version. * *	  01.1		25-Mar-87	Suzanne Logcher *			Add Outbuf as a global variable to *			make its on a word boundary *	 *//**//*	----------------- * +-->  LOCAL  INCLUDES  <--+ *	----------------- * * 	Remaining "local" includes.. Other than this module so *	that every LTF module does not have to do repetative *	includes. */#include "ltferrs.h"	/* LTF error message macros and messages */#include "filetypes.h"	/* LTF file type definitions *//*		---------------- * +-->  	SYSTEM  INCLUDES		<--+ * *	UNCONDITIONAL  and  CONDITIONAL *	-------------------------------- */#include	<a.out.h>#include	<ctype.h>#include	<stdio.h>#include	<sys/errno.h>#include	<sys/wait.h>#include	<sys/param.h>	/* Defines system params, MAXPATHLEN */#include	<sys/types.h>#include	<sys/stat.h>	/* NOTE: stat.h depends on types.h */#include	<sys/mtio.h>	/* NOTE: mtio.h depends on types.h */#include	<sys/ioctl.h>#ifdef debug#include	"mtio.h"	/* NOTE: mtio.h depends on types.h */#include	"devio.h"#include	"ioctl.h"#endif/* * +-->	Match correct versions of include files and structures *	to the defined Ultrix system "type" (32, 32m, 11, PRO).. */#ifndef U11/* * +-->  FOR  ULTRIX 32/32m  SYSTEMS  <--+ */#include	<sys/time.h>#include	<sys/dir.h>#include	<sys/devio.h>#include	<sys/file.h>#else/* * +-->  FOR  ULTRIX-11 / PRO  SYSTEMS  <--+ */#include	<ndir.h>#include	<time.h>#define MAXPATHLEN 256#endif/**//*	------------------------------------ * +-->  UNCONDITIONAL  GLOBAL  DEFINITIONS  <--+ *	------------------------------------ */	/*	+-->  NOTE <--+	 *	      ----	 * The following defintions  MUST COME	 * before all others. Further definitions 	 * are dependant on their value(s).	 *//*_MUST_COME_FIRST_*/	/*	 * Insert position dependant definitions here..	 *//*_END_OF_MUST_COME_FIRST_*//*_A_*/#define ALL	3struct ALINKBUF	{	/* Link table used when writing files			 * to tape. Contains information			 * about all hard linked files. */	ino_t	a_inum;		/* inode number */	dev_t	a_dev;		/* device */	int	a_fsecno;	/* file section number */	int	a_fseqno;	/* file sequence number */	char	*a_pathname;	/* real file name */ 	struct	ALINKBUF *a_next; /* Point to next in chain */};/*E struct ALINKBUF */#define A_SPECIALS 21	/* Number of allowable special characters			 * in an "a"-chctr string *//*_B_*/#define	BINARY	10	/* File is some form of binary data */#define BUFSIZE	80	/* ANSI tape label buffer size *//*_C_*/#define	CHCTRSP	020000	/* Character Special File */#define CREATE	1	/* Create a new tape - function flag */#define COUNTED	-11	/* Counted record file */#define CPIO	070707	/* CPIO data *//*_D_*/#define DD	02	/* Direct (image) dump file */#define DELNL	1	/* Delete new line function */struct DIRE {	dev_t	dev;		/* device */	ino_t	inode;		/* inode number */	struct	DIRE *dir_next;	/* Next in list or 0= end */};#define DIRECT	04	/* A directory file *//*_E_*/#define EMPTY	27	/* An empty file */#define ENGLISH 28	/* English text */#define EXTRACT	3	/* Extract data from  tape - function flag *//*_F_*/#define FALSE	0	/* BOOLEAN value for error conditions */#define FAIL	-1	/* Exit with failure status */struct	FILESTAT	{	char	*f_src;		/* On output, contains the file 				 * name only, minus path name */	int	f_numleft;	/* f_numleft is initially set 				 * to a non-zero value. 				 * When the first occurance of the				 * named file is found, f_numleft is				 * set to zero to terminate searching				 * the input volume for further copies				 * of the file. Wild cards may be				 * used to extract all copies of a				 * given file with possible rename of				 * duplicates by the user if the -W				 * switch is given. Else, the last				 * copy found is the final result.				 * When wild cards are used, f_numleft				 * remains non-zero.				 */	int	f_found;	/* Number of occurances of f_src found.				 * Used because wild cards make it hard				 * to determine if any files were found				 * on the input volume unless we have				 * this flag because f_numleft stays				 * non-zero for a wildcard file name				 * on extract.				 */	int	f_flags;	/* Used when extracting files to				 * indicate if the file should be				 * directly dumped (dd) from tape,				 * "fuf" converted, or extracted				 * normally.				 */	struct	FILESTAT *f_next;/* Point to next in chain */};/*E struct FILESTAT */#define FIRST	1#define FIXED	'F'	/* Fixed length record file */#define FOREVER for (;;)/* A section of code executed until			 * forcefully exited by a break, goto,			 * system exit() call, or etc...			 */#define	FUF	 1	/* File is a Fortran Unformatted File *//*_G_*//*_H_*//*_I_*/#define IGNORE_ERRORS 0	/* General pupose flag *//*_J_*//*_K_*//*_L_*/#define LAST	2/*_M_*/#ifndef U11#define MAXBLKSIZE 20480 /* Maximum tape block size for reading			  * Ultrix-32 */#define MAXBLKWRT 20480 /* Maximum tape block size for writing			 * Ultrix-32 */#else#define MAXBLKSIZE 10240 /* Maximum tape block size for reading			  * Ultrix-11 */#define MAXBLKWRT 2048 /* Maximum tape block size for writing			 * Ultrix-11 */#endif#define MAXRECFUF 130#define MAXRECSIZE 512	/* Maximum tape record size */#define MAXREC4	126#define MAXREC6	124#define MIDDLE	0#define MINBLKSIZE 18	/* Minimum tape block size *//*_N_*/#define NASC	128	/* Number of ASCII characters recognized			 * by Filetypes.c */#define NO	0	/* BOOLEAN constant */

⌨️ 快捷键说明

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