home *** CD-ROM | disk | FTP | other *** search
- /* $Id: os.h,v 1.1 1992/09/06 19:31:32 mike Exp $ */
-
- /* $Log: os.h,v $
- * Revision 1.1 1992/09/06 19:31:32 mike
- * Initial revision
- *
- */
-
- /*
- * os.h : machine and OS specific stuff
- * Craig Durland Public Domain
- */
-
-
- #ifndef __OS_H_INCLUDED
- #define __OS_H_INCLUDED
-
- /* ***************************************************************** */
- /* ************** OS Types ***************************************** */
- /* ***************************************************************** */
-
- #define AMIGA 0 /* AmigaDOS !NOT SUPPORTED! */
- #define ATARI 1 /* AtariST/TT TOS or MiNT */
-
- #define MSDOZ 0 /* MS-DOS */
-
- /* Various Un*x flavors.
- * Note: Some systems are mixes. HP-UX is a mix of bsd and SysV. Newer
- * DEC systems have Posix stuff in them. This can make writing
- * portable code a real pain in the butt. Pick the best match(es) and
- * hope.
- */
- #define V7_OS 0 /* V7 UN*X or Coherent */
- #define BSD_OS 0 /* Sun, DEC, Apollo bsd4.3, ... */
- #define SYSV_OS 0 /* HP-UX, IBM, Apollo SysV, ... */
- #define POSIX_OS 0 /* Posix compliant: osf */
-
- #define UX_OS (V7_OS || BSD_OS || SYSV_OS || POSIX_OS)
-
- #define DOMAIN_OS 0 /* If you have an Apollo, set this also */
- #define AIX_OS 0 /* If you have IBM AIX, set this also */
-
- /* ***************************************************************** */
- /* ************** Machine & CPU ************************************ */
- /* ***************************************************************** */
-
- typedef unsigned char uint8; /* byte */
- typedef unsigned short int uint16; /* 2 bytes */
- typedef short int int16; /* 16 bit int */
- typedef long int int32; /* 32 bit int */
-
-
- #if MSDOZ || (ATARI && defined(__MSHORT__))
- /* Atarist only when -mshort */
- /* Systems with 2 byte "int"s and 4 byte "long int"s */
- #define INTDIGITS 6 /* 2 bytes worth + sign */
- #define LONGDIGITS 11 /* 4 bytes worth + sign */
- #else /* 4 byte "int"s and "long int"s */
- #define INTDIGITS 11 /* 4 bytes worth + sign */
- #define LONGDIGITS 11 /* 4 bytes worth + sign */
- #endif
-
- /* ***************************************************************** */
- /* ************** directry related stuff *************************** */
- /* ***************************************************************** */
-
- #define M_SLASH '\\' /* file seperator for MS-DOS */
- #define U_SLASH '/' /* file seperator for UN*X */
-
- #if MSDOZ || ATARI
- #define ISSLASH(c) ((c) == U_SLASH || (c) == M_SLASH)
- #else
- #define ISSLASH(c) ((c) == U_SLASH)
- #endif
-
- #if MSDOZ
- /* File attributes */
- /* Note: attribute == 0 => normal file */
- #define FA_RD_ONLY 0x01 /* read only */
- #define FA_HIDDEN 0x02 /* hidden */
- #define FA_SYSTEM 0x04 /* system */
- #define FA_VOLUME 0x08 /* volume */
- #define FA_DIRECTORY 0x10 /* directory */
- #define FA_ARCHIVE 0x20 /* archive */
- #define FA_Z 0x80 /* my fake bit to match attr == 0 */
- #endif
-
- #endif /* __OS_H_INCLUDED */
-