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