-/* Helper functions */
-/*****************************************************************************/
-
-
-
-static long GetFileSize (FILE* F)
-/* Calculate the size of the file F, return -1 on error. */
-{
- long Size;
- long CurPos = ftell (F);
- if (CurPos < 0) {
- /* Error */
- return -1;
- }
- if (fseek (F, 0, SEEK_END) != 0) {
- /* Error */
- return -1;
- }
- Size = ftell (F);
- if (Size < 0) {
- /* Error */
- return -1;
- }
- if (fseek (F, CurPos, SEEK_SET) != 0) {
- /* Error */
- return -1;
- }
- return Size;
-}
-
-
-
-static long GetFileTime (const char* Name)
-/* Get the time of last modification for the given file. Return -1 on errors. */
-{
- struct stat Buf;
- if (stat (Name, &Buf) != 0) {
- /* Error */
- return -1;
- }
- return (long) Buf.st_mtime;
-}
-
-
-
-/*****************************************************************************/
-/* struct IFile */