2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
11 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
24 // Global Variables ----------------------------------------------------------
26 static int _FileFindFlag = 0;
27 static struct find_t _FileFindStruct;
33 int FileFindFirst(char *search_str, FILEFINDSTRUCT *ffstruct)
37 if (_FileFindFlag) return -1;
39 retval = _dos_findfirst(search_str, 0, &_FileFindStruct);
40 if (retval) return (int)retval;
42 ffstruct->size = _FileFindStruct.size;
43 strcpy(ffstruct->name, _FileFindStruct.name);
50 int FileFindNext(FILEFINDSTRUCT *ffstruct)
54 if (!_FileFindFlag) return -1;
56 retval = _dos_findnext(&_FileFindStruct);
57 if (retval) return (int)retval;
59 ffstruct->size = _FileFindStruct.size;
60 strcpy(ffstruct->name, _FileFindStruct.name);
66 int FileFindClose(void)
70 if (!_FileFindFlag) return -1;
72 if (retval) return (int)retval;
80 //returns 0 if no error
81 int GetFileDateTime(int filehandle, FILETIMESTRUCT *ftstruct)
83 return _dos_getftime(filehandle, &ftstruct->date, &ftstruct->time);
88 //returns 0 if no error
89 int SetFileDateTime(int filehandle, FILETIMESTRUCT *ftstruct)
91 return _dos_setftime(filehandle, ftstruct->date, ftstruct->time);
95 #endif //__ENV_DJGPP__