home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Guide / c-cplusplus-interactive-guide.iso / c_ref / csource4 / 280_01 / tools.h < prev    next >
Text File  |  1989-01-13  |  3KB  |  100 lines

  1. /* [tools.H of JUGPDS Vol.46] */
  2. /*
  3. *****************************************************************
  4. *                                *
  5. *    Written by  Hakuo Katayose (JUG-CP/M No.179)        *
  6. *            49-114 Kawauchi-Sanjuunin-machi        *
  7. *            Sendai, Miyagi 980                          *
  8. *            Phone: 0222-61-3219                *
  9. *                                *
  10. *       Modifird by Toshiya Oota   (JUG-CPM No.10)              *
  11. *                   Sakae ko-po 205                 *
  12. *            5-19-6 Hosoda                *
  13. *            Katusikaku Tokyo 124            *
  14. *                                *
  15. *        for MS-DOS Lattice C V3.1J & 80186/V20/V30    *
  16. *                                *
  17. *    Edited & tested by Y. Monma (JUG-C/M Disk Editor)       *
  18. *                                *
  19. *****************************************************************
  20. */
  21.  
  22. /* stdio.h - Standard I/O Header for Software Tools */
  23.  
  24. /***    Definitions for MS-DOS ***/
  25.  
  26. #define LETTER    'a'
  27. #define DIGIT    '0'
  28. #define ALPHA    'a'
  29.  
  30. #define YES    1
  31. #define NO     0
  32. #define ON    YES
  33. #define OFF    NO
  34.  
  35. #define EOS        '\0'
  36. #define CPMBREAK    0x003
  37. #define BELL        0x007
  38. #define BACKSPACE    0x008
  39. #define TAB        '\t'
  40. #define CRETURN        '\r'
  41. #define VT        0x00b
  42. #define FORMFEED    0x00c
  43. #define NEWLINE        '\n'
  44. #define ESC        0x01b
  45. #define SPACE        ' '
  46. #define BLANK        ' '
  47. #define CPMEOF        0x01a
  48. #define NOT        0x021                /* Append 1986-11-24 */
  49.  
  50. #define    NPAT        0x07b                /* Append 1986-11-25 */
  51. #define BPAT        0x07b                /* Append 1986-11-25 */
  52. #define    NPATEND        0x07d                /* Append 1986-11-25 */
  53. #define    EPAT        0x07d                /* Append 1986-11-25 */
  54. #define    ANY        0x03f    /*'?'*/            /* Append 1986-11-25 */
  55. #define    EOL        0x024    /*'$'*/            /* Append 1986-11-25 */
  56. #define    BOL        0x025    /*'%'*/            /* Append 1986-11-25 */
  57. #define AND        0x026    /*'&'*/            /* Append 1987-01-18 */
  58. #define LPAREN        0x028    /*'('*/            /* Append 1987-02-08 */
  59. #define RPAREN        0x029    /*')'*/            /* Append 1987-02-08 */
  60. #define    CLOSURE        0x02a    /*'*'*/            /* Append 1986-11-25 */
  61. #define    PLUS        0x02b    /*'+'*/            /* Append 1986-11-25 */
  62. #define    CCL        0x05b    /*'['*/            /* Append 1986-11-25 */
  63. #define LBRACKET    CCL                /* Append 1987-02-08 */
  64. #define    CCLEND        0x05d    /*']'*/            /* Append 1986-11-25 */
  65. #define RBRACKET    CCLEND                /* Append 1987-02-08 */
  66. #define    CHAR        0x061    /*'a'*/            /* Append 1986-11-25 */
  67. #define NCCL        0x06f    /*'n'*/            /* Append 1986-11-25 */
  68. #define    SUBSTRG        0x07e    /*'~'*/            /* Append 1987-01-18 */
  69. #define    OK        -2                /* Append 1986-11-25 */
  70. #define    CLOSIZE        4                /* Append 1986-11-25 */
  71. #define    ESCAPE        0x040    /*'@'*/            /* Append 1986-11-25 */
  72. #define    DASH        0x02d    /*'-'*/            /* Append 1986-11-25 */
  73. #define DITTO        -3                /* Append 1987-01-18 */
  74. #define COUNT        1                /* Append 1987-01-18 */
  75. #define START        3                /* Append 1987-01-18 */
  76. #define PREVCL        2                /* Append 1987-01-18 */
  77.  
  78. #if LATTICE
  79. #define STDIN        stdin
  80. #define STDOUT        stdout
  81. #define STDERR        stderr
  82. #define READ        "r"
  83. #define WRITE        "w"
  84. #else
  85. #define STDIN        0
  86. #define STDOUT        1
  87. #endif
  88.  
  89. #define    ERROR        -1
  90.  
  91. #define    TBUFSIZ        512
  92. #define MAXSET        253
  93. #define MAXLINE        253
  94. #define MAXPAT          127
  95.  
  96. #define remark(str)    (printf("%s\n",(str)))
  97. #define iswhite(c)    isspace(c)
  98. #define FOREVER for(;;)
  99.  
  100.