Changeset 841 for trunk/av2.c


Ignore:
Timestamp:
Sep 23, 2007, 6:27:51 PM (18 years ago)
Author:
Gregg Young
Message:

This implements large file support; The wrappers to allow WARP3 compatibility are not done so this will not run on Warp3or Warp 4 pre fixpack 12(?)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/av2.c

    r551 r841  
    11#define INCL_DOS
    22#define INCL_WIN
     3#define INCL_LONGLONG
    34
    45#include <os2.h>
     
    2627    HDIR search_handle;
    2728    ULONG num_matches;
    28     static FILEFINDBUF3 f;
     29    static FILEFINDBUF3L f;
    2930
    3031    save_dir(s);
     
    3637      strcat(s, "*");
    3738      search_handle = HDIR_CREATE;
    38       num_matches = 1L;
    39       if (!DosFindFirst(s,
     39      num_matches = 1;
     40      if (!xDosFindFirst(s,
    4041                        &search_handle,
    4142                        FILE_NORMAL | FILE_DIRECTORY |
     
    4344                        FILE_ARCHIVED,
    4445                        &f,
    45                         sizeof(FILEFINDBUF3), &num_matches, FIL_STANDARD)) {
     46                        sizeof(FILEFINDBUF3L), &num_matches, FIL_STANDARDL)) {
    4647        do {
    4748          strcpy(enddir, f.achName);
     
    5253          else
    5354            unlinkf("%s", s);
    54         } while (!DosFindNext(search_handle,
    55                               &f, sizeof(FILEFINDBUF3), &num_matches));
     55        } while (!xDosFindNext(search_handle,
     56                              &f, sizeof(FILEFINDBUF3L), &num_matches));
    5657        DosFindClose(search_handle);
    5758      }
     
    99100                      strchr(fullname, '*') || !strchr(fullname, '.'))) {
    100101
    101       static FILEFINDBUF3 ffb;
     102      static FILEFINDBUF3L ffb;
    102103      ULONG nm;
    103104      HDIR hdir;
     
    110111        enddir++;
    111112        hdir = HDIR_CREATE;
    112         nm = 1L;
    113         if (!DosFindFirst(fullname,
     113        nm = 1;
     114        if (!xDosFindFirst(fullname,
    114115                          &hdir,
    115116                          FILE_NORMAL | FILE_SYSTEM |
    116117                          FILE_READONLY | FILE_HIDDEN | FILE_ARCHIVED,
    117                           &ffb, sizeof(FILEFINDBUF3), &nm, FIL_STANDARD)) {
     118                          &ffb, sizeof(FILEFINDBUF3L), &nm, FIL_STANDARDL)) {
    118119          strcpy(enddir, ffb.achName);
    119120          DosFindClose(hdir);
     
    129130        static CHAR path[CCHMAXPATH];
    130131        CHAR *env;
    131         FILESTATUS3 fs;
     132        FILESTATUS3L fs;
    132133
    133134        env = getenv("FM3INI");
     
    137138            DosError(FERR_DISABLEHARDERR);
    138139            if (!DosQueryPathInfo(path,
    139                                   FIL_STANDARD, &fs, (ULONG) sizeof(fs))) {
     140                                  FIL_STANDARDL, &fs, (ULONG) sizeof(fs))) {
    140141              if (!(fs.attrFile & FILE_DIRECTORY)) {
    141142                env = strrchr(path, '\\');
     
    145146              DosError(FERR_DISABLEHARDERR);
    146147              if (!DosQueryPathInfo(path,
    147                                     FIL_STANDARD, &fs, (ULONG) sizeof(fs))) {
     148                                    FIL_STANDARDL, &fs, (ULONG) sizeof(fs))) {
    148149                if (fs.attrFile & FILE_DIRECTORY)
    149150                  switch_to(path);
Note: See TracChangeset for help on using the changeset viewer.