5500 /* 5501 * One file structure is allocated 5502 * for each open/creat/pipe call. 5503 * Main use is to hold the read/write 5504 * pointer associated with each open 5505 * file. 5506 */ 5507 struct file 5508 { 5509 char f_flag; 5510 char f_count; /* reference count */ 5511 int f_inode; /* pointer to inode structure */ 5512 char *f_offset[2]; /* read/write character pointer */ 5513 } file[NFILE]; 5514 /* ------------------------ */ 5515 5516 /* flags */ 5517 #define FREAD 01 5518 #define FWRITE 02 5519 #define FPIPE 04 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549