lfile.h,v

来自「TCP-IP红宝书源代码」· H,V 代码 · 共 70 行

H,V
70
字号
head	1.2;
access;
symbols;
locks
	dls:1.2; strict;
comment	@ * @;


1.2
date	97.09.21.19.26.19;	author dls;	state Dist;
branches;
next	1.1;

1.1
date	94.05.10.20.48.46;	author dls;	state Old;
branches;
next	;


desc
@@


1.2
log
@pre-3e code
@
text
@/* lfile.h */

/* Local disk layout: disk block 0 is directory, then index area, and	*/
/* then data blocks.  Each disk block (512 bytes) in the index area	*/
/* contains 8 iblocks, which are 64 bytes long.  Iblocks are referenced	*/
/* relative to 0, so the disk block address of iblock k is given by	*/
/* truncate(k/8)+1.  The offset of iblock k within its disk block is	*/
/* given by 64*remainder(k,8).  The directory entry points to a linked	*/
/* list of iblocks, and each iblock contains pointers to IBLEN (29) data*/
/* blocks. Index pointers contain a valid data block address or DBNULL.	*/

#include <iblock.h>
#include <file.h>

struct	flblk	{			/* file "device" control block	*/
	int	fl_id;			/* file's "device id" in devtab	*/
	int	fl_dev;			/* file is on this disk device	*/
	int	fl_pid;			/* process id accessing the file*/
	struct	fdes	*fl_dent;	/* file's in-core dir. entry	*/
	int	fl_mode;		/* FLREAD, FLWRITE, or both	*/
	IBADDR	fl_iba;			/* address of iblock in fl_iblk	*/
	struct	iblk	fl_iblk;	/* current iblock for file	*/
	int	fl_ipnum;		/* current iptr in fl_iblk	*/
	long	fl_pos;			/* current file position (bytes)*/
	Bool	fl_dch;			/* has fl_buff been changed?	*/
	char	*fl_bptr;		/* ptr to next char in fl_buff	*/
	char	fl_buff[DBUFSIZ];	/* current data block for file	*/
};

#ifdef	Ndf
extern	struct	flblk	fltab[];
#endif
@


1.1
log
@Initial revision
@
text
@@

⌨️ 快捷键说明

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