nextfile() {extern int maxfiles, unit; extern char FilStat[]; do unit = unit%maxfiles + 1; while ( FilStat[unit] != 'o' ); return( unit ); };