1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: os2.hxx,v $
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 ************************************************************************/
35 #define INCL_DOSEXCEPTIONS
36 #define INCL_DOSFILEMGR
37 #define INCL_DOSPROCESS
38 #define INCL_DOSDEVICES
39 #define INCL_DOSERRORS
41 #define INCL_DOSNLS /* National Language Support values */
47 #include <sys\types.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() )
69 inline BOOL
DRIVE_EXISTS( char c
)
72 APIRET nRet
= DosQueryCurrentDisk( &nCur
, &nMap
);
73 return ( nMap
& 1 << (c
- 'a') ) != 0;
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()