home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
unix
/
volume3
/
sps
/
part1
/
filecount.c
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1986-11-30
|
351 b
|
17 lines
# include "sps.h"
/* FILECOUNT - Counts the # open files for the current process */
filecount ()
{
register int i ;
register struct file **f ;
register int count ;
extern union userstate User ;
count = 0 ;
for ( i = 0, f = User.u_us.u_ofile ; i < NOFILE ; i++ )
if ( *f++ )
count++ ;
return ( count ) ;
}