home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / editors / mutt / me2s_pl7.zoo / mu_edit2 / util / os.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-05  |  2.9 KB  |  89 lines

  1. /* $Id: os.h,v 1.1 1992/09/06 19:31:32 mike Exp $ */
  2.  
  3. /* $Log: os.h,v $
  4.  * Revision 1.1  1992/09/06  19:31:32  mike
  5.  * Initial revision
  6.  *
  7.  */
  8.  
  9. /* 
  10.  * os.h : machine and OS specific stuff
  11.  * Craig Durland    Public Domain
  12.  */
  13.  
  14.  
  15. #ifndef __OS_H_INCLUDED
  16. #define __OS_H_INCLUDED
  17.  
  18. /* ***************************************************************** */
  19. /* ************** OS Types ***************************************** */
  20. /* ***************************************************************** */
  21.  
  22. #define AMIGA        0    /* AmigaDOS !NOT SUPPORTED! */
  23. #define ATARI        1    /* AtariST/TT TOS or MiNT */
  24.  
  25. #define MSDOZ        0    /* MS-DOS */
  26.  
  27.    /* Various Un*x flavors.
  28.     * Note:  Some systems are mixes.  HP-UX is a mix of bsd and SysV.  Newer
  29.     *   DEC systems have Posix stuff in them.  This can make writing
  30.     *   portable code a real pain in the butt.  Pick the best match(es) and
  31.     *   hope.
  32.     */
  33. #define V7_OS        0    /* V7 UN*X or Coherent */
  34. #define BSD_OS        0    /* Sun, DEC, Apollo bsd4.3, ... */
  35. #define SYSV_OS        0    /* HP-UX, IBM, Apollo SysV, ... */
  36. #define POSIX_OS    0    /* Posix compliant: osf */    
  37.  
  38. #define UX_OS    (V7_OS || BSD_OS || SYSV_OS || POSIX_OS)
  39.  
  40. #define DOMAIN_OS    0    /* If you have an Apollo, set this also */
  41. #define AIX_OS        0    /* If you have IBM AIX, set this also */
  42.  
  43. /* ***************************************************************** */
  44. /* ************** Machine & CPU ************************************ */
  45. /* ***************************************************************** */
  46.  
  47. typedef unsigned char      uint8;    /* byte */
  48. typedef unsigned short int uint16;    /* 2 bytes */
  49. typedef short int        int16;    /* 16 bit int */
  50. typedef long  int        int32;    /* 32 bit int */
  51.  
  52.  
  53. #if MSDOZ || (ATARI && defined(__MSHORT__))
  54.     /* Atarist only when -mshort */
  55.     /* Systems with 2 byte "int"s and 4 byte "long int"s */
  56. #define INTDIGITS     6    /* 2 bytes worth + sign */
  57. #define LONGDIGITS    11    /* 4 bytes worth + sign */
  58. #else        /* 4 byte "int"s and "long int"s */
  59. #define INTDIGITS    11    /* 4 bytes worth + sign */
  60. #define LONGDIGITS    11    /* 4 bytes worth + sign */
  61. #endif
  62.  
  63. /* ***************************************************************** */
  64. /* ************** directry related stuff *************************** */
  65. /* ***************************************************************** */
  66.  
  67. #define M_SLASH '\\'    /* file seperator for MS-DOS */
  68. #define U_SLASH '/'    /* file seperator for UN*X */
  69.  
  70. #if MSDOZ || ATARI
  71. #define ISSLASH(c) ((c) == U_SLASH || (c) == M_SLASH)
  72. #else
  73. #define ISSLASH(c) ((c) == U_SLASH)
  74. #endif
  75.  
  76. #if MSDOZ
  77.     /* File attributes */
  78.     /* Note: attribute == 0 => normal file */
  79. #define FA_RD_ONLY   0x01    /* read only */
  80. #define FA_HIDDEN    0x02    /* hidden */
  81. #define FA_SYSTEM    0x04    /* system */
  82. #define FA_VOLUME    0x08    /* volume */
  83. #define FA_DIRECTORY 0x10    /* directory */
  84. #define FA_ARCHIVE   0x20    /* archive */
  85. #define FA_Z         0x80    /* my fake bit to match attr == 0 */
  86. #endif
  87.  
  88. #endif /* __OS_H_INCLUDED */
  89.