1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _os2_hxx 25 #define _os2_hxx 26 27 28 #define INCL_DOSEXCEPTIONS 29 #define INCL_DOSFILEMGR 30 #define INCL_DOSPROCESS 31 #define INCL_DOSDEVICES 32 #define INCL_DOSERRORS 33 #define INCL_DOSMISC 34 #define INCL_DOSNLS /* National Language Support values */ 35 #include <svpm.h> 36 37 #include <dirent.h> 38 #include <string.h> 39 40 #include <sys\types.h> 41 #include <sys\stat.h> 42 #include <stdio.h> 43 #include <ctype.h> 44 #include <emx/syscalls.h> 45 46 #define FSYS_UNIX FALSE 47 48 #define DOS_DIRECT _A_SUBDIR 49 #define DOS_VOLUMEID _A_VOLID 50 51 #define _mkdir(p) mkdir(p, 0777) 52 53 const char* TempDirImpl( char *pBuf ); 54 String ToLowerImpl( const String& ); 55 56 #define DEFSTYLE FSYS_STYLE_OS2 57 #define MKDIR( p ) mkdir( (unsigned char*) p ) 58 #define CMP_LOWER(s) ( s.ToLowerAscii() ) 59 60 #define START_DRV 'a' 61 62 inline BOOL DRIVE_EXISTS( char c ) 63 { 64 ULONG nCur, nMap; 65 APIRET nRet = DosQueryCurrentDisk( &nCur, &nMap ); 66 return ( nMap & 1 << (c - 'a') ) != 0; 67 } 68 69 #include <time.h> 70 //#include <datetime.hxx> 71 72 inline Time MsDos2Time( FTIME* aTime ) 73 { 74 return Time( aTime->hours, aTime->minutes, 2*aTime->twosecs ); 75 } 76 77 inline Date MsDos2Date( FDATE* aDate ) 78 { 79 return Date( aDate->day, aDate->month, aDate->year ); 80 } 81 82 Time MsDos2Time( const time_t *pTimeT ); 83 84 Date MsDos2Date( const time_t *pTimeT ); 85 86 #define FSysFailOnErrorImpl() 87 88 #endif 89 90