I hate to ask for C help around here, but I'm trying to convert a rather old program from (I think) 1985 and I'm a tad stuck. It was written for several platforms (DOS, AIX, OS2, MVS, VM/CMS) and I'd like to make the necessary changes to make it compile as a Win32 program as well.

There are functions


int findfirst (const char *pathname, struct ffblk *ffblk, int attrib)
int findnext (struct ffblk *ffblk)
int access (const char *path, int amode)
void fnsplit (char *name, char *drive, char *dir, char *filename, char *extension)

and a struct 'ffblk'

The four functions and the structure are all for file operations. I'm certain there must be some equivalent but I'm rather rusty and some googling hasn't been fruitful so far (doesn't seem to be in C std lib). I'd really appreciate if someone could shed some light on this.
Posted on 2004-04-12 23:52:06 by Miko
http://www.delorie.com/djgpp/doc/incs/dir.h for ffblk

you want some directory traversal code? you can read this discussion and just follow the source flow of the codes posted. I'm sure you can convert the codes posted to C.

http://www.asmcommunity.net/board/index.php?topic=14133&highlight=file+recursive
Posted on 2004-04-13 00:56:11 by arkane