Ignore:
Timestamp:
Mar 6, 2008, 3:18:30 PM (11 years ago)
Author:
Sam Hocevar
Message:
  • Get rid of WATCOMC tests.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/maker.cpp

    r56 r90  
    1515#include <string.h>
    1616#include <stdlib.h>
    17 #ifdef __WATCOMC__
    18 #   include <sys\types.h>
    19 #   include <direct.h>
    20 #   define make_dir(dir) mkdir(dir)
    21 #else
    22 #   include <sys/stat.h>
    23 #   define make_dir(dir) mkdir(dir,511)
    24 #endif
     17#include <sys/stat.h>
     18#define make_dir(dir) mkdir(dir,511)
    2519
    2620#define NO_LIBS 1
     
    4539#ifdef __linux__
    4640  return LINUX;
    47 #endif
    48 
    49 #ifdef __WATCOMC__
    50   return WATCOM;
    5141#endif
    5242
     
    10090
    10191
    102 #ifdef __WATCOMC__
    103 #include <dos.h>
    104 #endif
    105 
    10692int change_dir(char *path)
    10793{
    108 #ifdef __WATCOMC__
    109   unsigned cur_drive;
    110   _dos_getdrive(&cur_drive);
    111   if (path[1]==':')
    112   {
    113     unsigned total;
    114     _dos_setdrive(toupper(path[0])-'A'+1,&total);
    115 
    116 
    117     unsigned new_drive;
    118     _dos_getdrive(&new_drive);
    119 
    120     if (new_drive!=toupper(path[0])-'A'+1)
    121     {
    122       return 0;
    123     }
    124 
    125     path+=2;
    126   }
    127  
    128   int er=chdir(path);
    129   if (er)
    130   {
    131     unsigned total;
    132     _dos_setdrive(cur_drive,&total);
    133   }
    134   return !er;
    135 #else
    136   int ret=chdir(path);    // weird
    137   ret=chdir(path);
    138   return ret==0;
    139 #endif 
     94    int ret = chdir(path); // weird
     95    ret = chdir(path);
     96    return ret == 0;
    14097}
    14198
Note: See TracChangeset for help on using the changeset viewer.