home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / program / achlib / achslib.h < prev    next >
C/C++ Source or Header  |  1988-03-22  |  4KB  |  144 lines

  1. /*
  2.      achslib.h
  3.  
  4.      871203    A C Howe       Implementation
  5.      880109                   Deque stuff
  6. */
  7.  
  8. #define achslib_header
  9.  
  10. typedef short  void;
  11. typedef char   *pointer;
  12.  
  13. #include  <ctype.h>
  14. #include  <gembind.h>
  15. #include  <gemdefs.h>
  16. #include  <osbind.h>
  17. #include  <stdio.h>
  18. #include  <tosdefs.h>
  19. #include  <vdibind.h>
  20.  
  21. /* AES Exports */
  22. extern short   gl_apid;
  23. extern short   global [];
  24. extern short   control [];
  25.  
  26. /* System Variables */
  27. extern char    DEFRES;
  28. extern char    MONITOR;  
  29. extern char    CONTERM;
  30.  
  31. /* Anthony's Stuff */
  32. extern char    TERM [][8];
  33. extern short   XMAX;
  34. extern short   YMAX;
  35. extern short   TABLEN;
  36. extern void    GOTOXY ();     /* short, short */
  37. extern void    MOVEMEM ();    /* pointer, pointer, long */
  38. extern long    STRLEN ();     /* char * */
  39. extern void    STRNPUT ();    /* char *, short */
  40. extern char *  STRTOK ();     /* char *, char * */
  41. extern char *  NEXTTOK;
  42. extern void    PUTDEC ();     /* short */
  43. extern void    PUTLONG ();    /* long */
  44. extern void    ULTOA ();      /* long, char * */
  45. extern long    ULD ();        /* long , long */
  46. extern long    DOS ();        /* short, long */
  47. extern long    FINDI ();      /* char *, short */
  48. extern long    LFINDI ();     /* char *, short */
  49. extern long    gemdos ();
  50. extern long    xbios ();
  51.  
  52.  
  53. /*   Atari System Variables (supervisor only) */
  54. #define   SHOW_SHIFT     (CONTERM |= 0x08)
  55. #define   HIDE_SHIFT     (CONTERM &= 0xf7)
  56.  
  57.  
  58. /*   Basic Terminal Functions */
  59. #define   BEEP           (Cconws (&TERM[0]))
  60. #define   SET_TERMINAL   (Cconws (&TERM[1]))
  61. #define   RST_TERMINAL   (Cconws (&TERM[2]))
  62. #define   HOME_CURSOR    (Cconws (&TERM[3]))
  63. #define   SCREEN_CLEAR   (Cconws (&TERM[4]))
  64. #define   EOL_CLEAR      (Cconws (&TERM[5]))
  65. #define   EOP_CLEAR      (Cconws (&TERM[6]))
  66. #define   ON_CURSOR      (Cconws (&TERM[7]))
  67. #define   OFF_CURSOR     (Cconws (&TERM[8]))
  68. #define   HI_LITE        (Cconws (&TERM[9]))
  69. #define   LO_LITE        (Cconws (&TERM[10]))
  70. #define   INS_LINE       (Cconws (&TERM[11]))
  71. #define   DEL_LINE       (Cconws (&TERM[12]))
  72. #define   UP_CURSOR      (Cconws (&TERM[13]))
  73. #define   DOWN_CURSOR    (Cconws (&TERM[14]))
  74. #define   RIGHT_CURSOR   (Cconws (&TERM[15]))
  75. #define   LEFT_CURSOR    (Cconws (&TERM[16]))
  76.  
  77. #define NULL        0
  78. #define LNULL       0L
  79. #define BLOCK       128            /* must be powers of 2 */
  80. #define DBLOCK      256            /* double block */
  81. #define CTRLZ       0x1a
  82. #define RUB         0x7f
  83.  
  84. #define FILES       0x00
  85. #define READONLY    0x01
  86. #define HIDDEN      0x02
  87. #define SYSTEM      0x04
  88. #define VOLUME      0x08
  89. #define DIRECTORY   0x10
  90. #define ARCHIVE     0x20
  91.  
  92.  
  93. typedef union cbuffer
  94. {
  95.      struct template
  96.      {
  97.           char max_line;
  98.           char length;
  99.           char line [BLOCK - 2 * sizeof (char)];
  100.      } c;
  101.      char buf [BLOCK];
  102.      CBUFFER;
  103.  
  104.  
  105. typedef struct command_entry
  106. {
  107.      char *name;
  108.      void (*function) ();
  109. }
  110.      COMMAND;
  111.  
  112.  
  113. typedef struct dta_buf
  114. {
  115.      char dummy[21];      /* first 21 bytes not used */
  116.      char attr;           /* file attribute */
  117.      short ftime;         /* file time stamp */
  118.      short fdate;         /* file date stamp */
  119.      long fsize;          /* file size in bytes */
  120.      char fname[14];      /* file name and extension */
  121. }
  122.      DTA;
  123.  
  124.  
  125. typedef struct deque
  126. {
  127.      long *base;
  128.      long *left;
  129.      long *right;
  130.      long *end;
  131. }
  132.      DEQUE;
  133.  
  134. #define   LEFT      0
  135. #define   RIGHT     1
  136.  
  137. extern DEQUE * MKDEQ ();      /* long */
  138. extern void    DEQADD ();     /* DEQUE *, short, long */
  139. extern long    DEQDEL ();     /* DEQUE *, short */
  140. extern void    RMDEQ ();      /* DEQUE * */
  141.  
  142.  
  143.