1 /* 2 * Get a free File Control Block 3 * 4 * 27/1/2002 - djm 5 * 6 * $Id: getfcb.c,v 1.1 2002-01-27 21:28:48 dom Exp $ 7 */ 8 9 10 #include <cpm.h> 11 #include <stdio.h> 12 13 14 15 getfcb(void)16struct fcb *getfcb(void) 17 { 18 struct fcb *fcb; 19 20 for ( fcb = _fcb ; fcb < &_fcb[MAXFILE]; fcb++ ) { 21 if ( fcb->use == 0 ) { 22 fcb->use = U_READ; 23 fcb->rwptr = 0; 24 return fcb; 25 } 26 } 27 return NULL; 28 } 29