Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csosdefs.h

00001 /*
00002     Copyright (C) 1998 by Jorrit Tyberghein
00003     Written by Andrew Zabolotny <bit@eltech.ru>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public
00016     License along with this library; if not, write to the Free
00017     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 */
00019 
00020 #ifndef __CSOSDEFS_H__
00021 #define __CSOSDEFS_H__
00022 
00023 // The 2D graphics driver used by software renderer on this platform
00024 #define CS_SOFTWARE_2D_DRIVER "crystalspace.graphics2d.dosraw"
00025 
00026 #if defined (CS_SYSDEF_PROVIDE_GETCWD)
00027 #  include <dos.h>
00028 char _getdrive ()
00029 {
00030   unsigned int drive;
00031   _dos_getdrive (&drive);
00032   return (char) drive; // is this correct?
00033 }
00034 void _chdrive (char drive)
00035 {
00036   unsigned int num_drives; // useless
00037   _dos_setdrive (drive, &num_drives);
00038 }
00039 #endif
00040 
00041 #if defined (CS_SYSDEF_PROVIDE_GETCWD) || defined (CS_SYSDEF_PROVIDE_ACCESS)
00042 #  include <unistd.h>
00043 #  undef CS_SYSDEF_PROVIDE_GETCWD
00044 #  undef CS_SYSDEF_PROVIDE_ACCESS
00045 static inline char *djgpp_getcwd (char *buf, size_t size)
00046 {
00047   char *out = getcwd (buf, size);
00048   int i;
00049   for (i = 0; out [i]; i++)
00050     if (out [i] == '/') out [i] = '\\';
00051   return out;
00052 }
00053 #  define getcwd djgpp_getcwd
00054 #endif
00055 
00056 #if defined (CS_SYSDEF_PROVIDE_DIR)
00057 #  define __NEED_GENERIC_ISDIR
00058 #endif
00059 
00060 #define CS_LITTLE_ENDIAN
00061 
00062 #endif // __CSOSDEFS_H__

Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000