system/src/newlib/_syscalls.c
/* Return the next lowest numbered free file
 structure, or -1 if we can't find one. */
Return the next lowest numbered free file
structure, or -1 if we can't find one.
Return the next lowest numbered free file structure or - 1 if we can ' t find one .
static int
newslot (void)
{
  int i;
  for (i = 0; i < MAX_OPEN_FILES; i++)
    {
      if (openfiles[i].handle == -1)
        {
          break;
        }
    }
  if (i == MAX_OPEN_FILES)
    {
      return -1;
    }
  return i;
}
static int newslot ( void ) { int i ; for ( i = 0 ; i < MAX_OPEN_FILES ; i ++ ) { if ( openfiles [ i ] . handle == -1 ) { break ; } } if ( i == MAX_OPEN_FILES ) { return -1 ; } return i ; }
Return the next lowest numbered free file
structure, or -1 if we can't find one.
Return the next lowest numbered free file structure or - 1 if we can ' t find one .