home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d1xx
/
d156
/
flex.lha
/
Flex
/
Flex2
/
gnu.lib.src
/
seekdir.c
< prev
next >
Wrap
C/C++ Source or Header
|
1988-10-02
|
728b
|
29 lines
/*
* BSD/Unix expansion library for Amiga.
*
* seekdir() -- system independent directory code
*/
#include "dir.h"
/*
* telldir and seekdir don't work quite right. The problem is that you have
* to save more than a long's worth of stuff to indicate position, and it's
* socially unacceptable to alloc stuff that you don't free later under
* AmigaDOS. So we fake it - you get one level of seek, and dat's all.
* As of now, these things are untested.
*/
#define DIR_SEEK_RETURN ((long) 1) /* Not 0! */
void
seekdir(my_dir, where)
DIR *my_dir;
long where;
{
if (where == DIR_SEEK_RETURN)
my_dir->d_info = my_dir->d_seek ;
else /* Makes the next readdir fail */
setmem((char *) my_dir, sizeof(DIR), 0) ;
}