home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 318_01 / red.h < prev    next >
C/C++ Source or Header  |  1990-06-18  |  3KB  |  130 lines

  1. /*
  2.     Header file for RED -- Desmet C version
  3.     Source:  red.h
  4.     Version: January 18, 1990.
  5.  
  6.     Written by
  7.     
  8.         Edward K. Ream
  9.         166 N. Prospect
  10.         Madison WI 53705
  11.         (608) 257-0802
  12.  
  13.  
  14.     PUBLIC DOMAIN SOFTWARE
  15.  
  16.     This software is in the public domain.
  17.  
  18.  
  19.     DISCLAIMER
  20.  
  21.     With respect to the programs and documentation on this disk,
  22.     Edward K. Ream specifically disclaims all warranties, express or 
  23.     implied, including but not limited to implied warranties of
  24.     merchantability and fitness for a particular purpose.  In no event
  25.     shall Ream be liable for any loss of profit or commercial damage, 
  26.     including but not limited to special, incidental, consequential or 
  27.     other damages.
  28. */
  29.  
  30. /*
  31.     The following constants select the compiler and enable features.
  32.     If     #define'd,  the feature is enabled.
  33.     If NOT #define'd,  the feature is disabled.
  34.  
  35.     IBM:        code is for the IBM PC/XT/AT
  36.     DESMET:        code is for the Desmet C compiler.
  37.     TURBOC:        code is for TURBO C v2.0 compiler.
  38.  
  39.     SWAP:        enables auto-swapping of dirty blocks.
  40.     SUSPEND:    enables quit and auto-restart of RED.
  41. */
  42.  
  43. #define IBM        1
  44. #define SUSPEND        1
  45.  
  46. #include "d:\sherlock\sl.h"
  47.  
  48. #include <ctype.h>
  49. #include <setjmp.h>
  50. #include <stdio.h>
  51. #include <stdlib.h>
  52.  
  53. #include "redtmp.h"
  54. #include "red1.h"
  55. #include "redbuf.h"
  56.  
  57. /*
  58.     Define constants describing a text line.
  59.     These constants must be less than the maximum block
  60.     size defined in redbuf.h.
  61. */
  62. #define MAXLEN    200    /* max chars per line */
  63. #define MAXLEN1    201    /* MAXLEN + 1 */
  64.  
  65. /*
  66.     Define operating system constants.
  67. */
  68. #define SYSFNMAX 200            /* max length of a path name. */
  69. #define TEMP_FILE "@@TEMP@@.TMP"    /* name of temp file */
  70. #define DATA_FILE "@@DATA@@.TMP"    /* name of work file */
  71.  
  72. /*
  73.     Define misc. constants.
  74. */
  75. #define TRUE        (1)
  76. #define FALSE        (0)
  77. #define ERROR       (-1)    /* error code            */
  78. #define OK        (0)    /* opposite of ERROR        */
  79. #define EOF_MARK    (0x1a)    /* end-of-file mark        */
  80. #define HUGE        (32000)    /* practical infinity        */
  81.  
  82. /*
  83.     Declare globals variables.
  84. */
  85. extern int    hasdn;            /* describe terminals.      */
  86. extern int    hasup;
  87. extern int    hasins;
  88. extern int    hasdel;
  89. extern int    hasint;
  90. extern int    hascol;
  91. extern int    haswrap;
  92. extern int    hasword;
  93.  
  94. extern int    outx;            /* cursor position. */
  95. extern int    outy;
  96.  
  97. extern char    g_file [SYSFNMAX];
  98. extern jmp_buf    DISK_ERR;
  99.  
  100. extern int    fmtcol[MAXLEN1];
  101.  
  102. extern int    a_start, a_end, again_flag, a_rev;
  103. extern int    a_rflag, a_wflag, a_cflag;
  104. extern char    a_spat [MAXLEN1], a_rpat [MAXLEN1];
  105.  
  106. /*
  107.     Used by buffer routines.
  108. */
  109. extern int    DATA_RES;
  110. extern int    b_fatal;
  111. extern int    b_cflag;
  112. extern int    b_line;
  113. extern int    b_max_line;
  114. extern int    b_start;
  115. extern int    b_head;
  116. extern int    b_tail;
  117. extern int    b_max_diskp;
  118. extern int    b_max_put;
  119. extern int    b_data_fd;
  120. extern int    b_user_fd;
  121. extern int    b_free;
  122. extern struct BLOCK * b_bp;
  123. extern struct BLOCK * b_bpp [MAX_RES];
  124. extern char *    br_bufp;
  125. extern int    br_bufc;
  126. extern int    br_count;
  127. extern int    br_avail;
  128. extern int    br_out;
  129. extern int    bw_count;
  130.