home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / EDITOR / MG2A_SRC.ZIP / SYS / ATARI / SYSDEF.H < prev    next >
Encoding:
C/C++ Source or Header  |  1988-08-23  |  2.5 KB  |  82 lines

  1. /* sysdef.h --  MG header file for Atari ST
  2.  *
  3.  * author :  Sandra Loosemore
  4.  * date   :  24 Oct 1987
  5.  *
  6.  */
  7.  
  8. #define    NULL    0L            /* So who needs stdio.h?    */
  9. #include    <osbind.h>
  10.  
  11. /* This definition might be missing from your osbind.h */
  12.  
  13. #ifndef Supexec
  14. #define Supexec(a)  xbios(38,a)
  15. #endif
  16.  
  17.  
  18. #define    KBLOCK        512        /* Kill grow.            */
  19. #define    GOOD        0        /* Good exit status.        */
  20. #define NO_VOID_TYPE    1        /* "void" is not a builtin type */
  21. #ifdef MWC
  22. #undef    NO_VOID_TYPE
  23. #define    ZEROARRAY            /* See def.h            */
  24.     /*
  25.      * Using the MWC shell, ARGV is always the last environment entry
  26.      * (if ARGV is not defined, the program was not started from the
  27.      * MWC shell).  The last environment variable is followed by
  28.      * the string pointed to by argv[0], then argv[1], etc.  This
  29.      * means that the non-MWC getenv() in misc.c will take command line
  30.      * args as environment variables.  It also means that if spawn()
  31.      * (misc.c) runs the MWC shell, the shell takes this program's args
  32.      * as its own.  So here we truncate the environment by zeroing out
  33.      * the first character of argv[0], thus working around both problems.
  34.      */
  35. #define SYSINIT (*(argv[0]) = 0)    /* run in main()         */
  36. #endif /* MWC */
  37.  
  38. #define MALLOCROUND(m) ((m)+=1,(m)&=~1)    /* 2-byte blocks (see alloc.c)    */
  39. #define LOCAL_VARARGS    1        /* For echo.c            */
  40. #define RSIZE long            /* Type for file/region sizes   */
  41. #define KCHAR int                       /* 16 bits for keystrokes       */
  42.  
  43.  
  44. /* Enable various things */
  45.  
  46. #define DO_METAKEY    1        /* Meta key code */
  47. #define METABIT        0x200
  48. #define FKEYS        1        /* Enable fkey code */
  49. #define GOSMACS     1        /* Goslings compatibility functions */
  50. #define PREFIXREGION    1        /* Enable prefix-region function */
  51. #define BSMAP        FALSE        /* BSMAP code, default to off */
  52.  
  53. /* Disable some features for now. */
  54.  
  55. #define NO_BACKUP    1
  56.  
  57.  
  58. /* Alcyon thinks subtracting two pointers gives a long.  Cast it to int.
  59.  */
  60.  
  61. #define OFFSET(type,member) ((int)((char *)&(((type *)0)->member)-(char *)((type *)0)))
  62. #ifdef MWC
  63. #undef    OFFSET
  64. #endif /* MWC */
  65.  
  66. /*
  67.  * Macros used by the buffer name making code.
  68.  * Start at the end of the file name, scan to the left
  69.  * until BDC1 (or BDC2, if defined) is reached. The buffer
  70.  * name starts just to the right of that location, and
  71.  * stops at end of string (or at the next BDC3 character,
  72.  * if defined). BDC2 and BDC3 are mainly for VMS.
  73.  */
  74.  
  75. #define    BDC1    '\\'            /* Buffer names.        */
  76. #define    BDC2    ':'
  77.  
  78.  
  79. #define fncmp strcmp            /* All filenames are lowercased */
  80. extern char *strncpy();
  81.  
  82.