1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _os2_hxx 29 #define _os2_hxx 30 31 32 #define INCL_DOSEXCEPTIONS 33 #define INCL_DOSFILEMGR 34 #define INCL_DOSPROCESS 35 #define INCL_DOSDEVICES 36 #define INCL_DOSERRORS 37 #define INCL_DOSMISC 38 #define INCL_DOSNLS /* National Language Support values */ 39 #include <svpm.h> 40 41 #include <dirent.h> 42 #include <string.h> 43 44 #include <sys\types.h> 45 #include <sys\stat.h> 46 #include <stdio.h> 47 #include <ctype.h> 48 #include <emx/syscalls.h> 49 50 #define FSYS_UNIX FALSE 51 52 #define DOS_DIRECT _A_SUBDIR 53 #define DOS_VOLUMEID _A_VOLID 54 55 #define _mkdir(p) mkdir(p, 0777) 56 57 const char* TempDirImpl( char *pBuf ); 58 String ToLowerImpl( const String& ); 59 60 #define DEFSTYLE FSYS_STYLE_OS2 61 #define MKDIR( p ) mkdir( (unsigned char*) p ) 62 #define CMP_LOWER(s) ( s.ToLowerAscii() ) 63 64 #define START_DRV 'a' 65 66 inline BOOL DRIVE_EXISTS( char c ) 67 { 68 ULONG nCur, nMap; 69 APIRET nRet = DosQueryCurrentDisk( &nCur, &nMap ); 70 return ( nMap & 1 << (c - 'a') ) != 0; 71 } 72 73 #include <time.h> 74 //#include <datetime.hxx> 75 76 inline Time MsDos2Time( FTIME* aTime ) 77 { 78 return Time( aTime->hours, aTime->minutes, 2*aTime->twosecs ); 79 } 80 81 inline Date MsDos2Date( FDATE* aDate ) 82 { 83 return Date( aDate->day, aDate->month, aDate->year ); 84 } 85 86 Time MsDos2Time( const time_t *pTimeT ); 87 88 Date MsDos2Date( const time_t *pTimeT ); 89 90 #define FSysFailOnErrorImpl() 91 92 #endif 93 94