home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / archiver / peek_221.arj / PEEKER.H < prev    next >
C/C++ Source or Header  |  1992-03-30  |  5KB  |  195 lines

  1. /* peeker.h file*/
  2.  
  3. #include "mem.h"
  4. #include "errno.h"
  5. #include "io.h"
  6. #include "fcntl.h"
  7. #include "dos.h"
  8. #include "dir.h"
  9. #include "stdio.h"
  10. #include "string.h"
  11. #include "stdlib.h"
  12. #include "ctype.h"
  13. #include "time.h"
  14. #include "stddef.h"
  15. #include "process.h"
  16. #include "share.h"
  17. #include "alloc.h"
  18. #include "stdarg.h"
  19. #include <sys/types.h>
  20. #include <sys/stat.h>
  21.  
  22. #ifdef __TURBOC__
  23.   #define _fastcall pascal
  24. #endif
  25.  
  26. #define BACKSPACE     "\b \b"
  27. #define MAXCOLORS     26
  28.  
  29. typedef unsigned       bit;
  30. typedef unsigned int  word;
  31. typedef unsigned char byte;
  32. typedef unsigned long ulong;
  33.  
  34. #define CSendByte(x)    if(baud) while(!fossil(TRANSMIT,(x))) carrchk()
  35. #define PurgeOut()      if(baud) fossil(PURGEOUT,0)
  36. #define PurgeIn()       if(baud) fossil(PURGEIN,0)
  37. #define FlushOut()      if(baud) fossil(FLUSHOUT,0)
  38. #define DTROn()         fossil(DTR,UP)
  39. #define DTROff()        fossil(DTR,DOWN)
  40.  
  41. /*-------------------------------------------------------------------------*/
  42. /* FBoard flags                                                            */
  43. /*-------------------------------------------------------------------------*/
  44. #define COUNTDLS   0x0001  /* Use timestamp as #dls   0000 0000 0000 0001 */
  45. #define FREEFILES  0x0002  /* Don't inc downloads     0000 0000 0000 0010 */
  46. #define FILEASSOC  0x0004  /* File area allows assoc  0000 0000 0000 0100 */
  47. #define FREEUP     0x0008  /* Don't inc uploads       0000 0000 0000 1000 */
  48.  
  49. /*--------------------------------------------------------------------------*/
  50. /* File area record                                                         */
  51. /*--------------------------------------------------------------------------*/
  52.  
  53. struct _fboard {
  54.   char       name[47];
  55.   char       flags;
  56.   char       dpath[79];
  57.   char       upath[79];
  58.   signed char age;
  59.   word       userflags;
  60.   char       leechpercent;
  61. };
  62.  
  63. /*--------------------------------------------------------------------------*/
  64. /* Protocol record                                                          */
  65. /*--------------------------------------------------------------------------*/
  66.  
  67.   struct   protocol {
  68.     char   name[25];
  69.     char   key;
  70.     int    adj;
  71.     char   spawndn[119];
  72.     char   spawnup[119];
  73.     char   abort[48];
  74.     unsigned wild:      1;
  75.     unsigned multi:     1;
  76.     unsigned simul:     1;
  77.     unsigned list:      1;
  78.     unsigned opus:      1;
  79.     unsigned noname:    1;
  80.     unsigned reserved:  2;
  81.     char   pad1;
  82.     char   pad2;
  83.   };
  84.  
  85.  
  86. /*=====================================================================*/
  87. /* FOSSIL definitions                                                  */
  88. /*=====================================================================*/
  89.  
  90. #define SETBAUD    0
  91. #define TRANSWAIT  1
  92. #define RECVWAIT   2
  93. #define GETSTAT    3
  94. #define INIT       4
  95. #define DEINIT     5
  96. #define DTR        6
  97.   #define UP         1
  98.   #define DOWN       0
  99. #define FLUSHOUT   8
  100. #define PURGEOUT   9
  101. #define PURGEIN    10
  102. #define TRANSMIT   11
  103. #define PEEK       12
  104. #define KEYNOWAIT  13
  105. #define KEYWAIT    14
  106. #define FLOW       15
  107. #define ONOFF      16
  108.   #define ON         0
  109.   #define OFF        2
  110. #define SETCRSR    17
  111. #define READCRSR   18
  112. #define ONEANSI    19
  113.   #define CARRIER    128
  114.   #define INITOK     0x1954
  115. #define WATCHDOG   20
  116. #define REBOOT     23
  117.   #define COLD       0
  118.   #define WARM       1
  119. #define BLOCKREAD  24
  120. #define BLOCKWRITE 25
  121.  
  122.  
  123. /* Symbols for SPAWNIT */
  124.  
  125. #define SPAWN 0;
  126. #define EXEC  1;
  127. #define BATCH 2;
  128. #define DOS   3;
  129. #define EXIT  4;
  130. #define PRINT 5;
  131.  
  132. /* Symbols for GENIN */
  133.  
  134. #define ALLL     1
  135. #define ALPHA    2
  136. #define NUM      3
  137. #define ALPHANUM 4
  138. #define YESNO    5
  139. #define FLE      6
  140. #define FLEP     7
  141. #define FLEW     8
  142. #define FLEPW    9
  143. #define NAME     10
  144. #define NEAT     11
  145. #define PHONE    12
  146. #define DATE     13
  147. #define SUBJECT  14
  148. #define YESNOM   15
  149. #define FLEX     16
  150. #define ARROWS   17
  151. #define ANSIIN   18
  152. #define ANSISET  19
  153. #define FBATCH   20
  154. #define FBATCHW  21
  155. #define FBATCHWP 22
  156. #define FBATCHP  23
  157. #define TRUEANSI 24
  158. #define WORD     25
  159. #define WORDNUM  26
  160. #define BITS     27
  161. #define ANY      28
  162. #define ANYNOECHO 29
  163. #define HYPER    30
  164. #define THRU     31
  165. #define FLENX    64
  166. #define YESNOQ   65
  167.  
  168. /***********************************/
  169. /* functions in ansi.c (low-level) */
  170. /***********************************/
  171.  
  172. /* NOTE:  all screen output except for status line should go (ultimately)
  173.  * through ansi_out().
  174.  */
  175. int _fastcall  ansi_out (char *buf);
  176. void _fastcall set_screensize (int reservedlines);
  177. void _fastcall put_char (char c,char attr,int x,int y);
  178. void _fastcall pos_hardcursor (int x,int y);
  179. void _fastcall hardcursor_off (void);
  180. void _fastcall hardcursor_on (int x,int y);
  181. void _fastcall scroll_up (int tx,int ty,int bx,int by,char attr);
  182. void _fastcall clearwindow (int tx,int ty,int bx,int by,char attr);
  183. void _fastcall cleartoeol (int x,int y,int ex,char attr);
  184. void _fastcall validate_cursor(void);
  185.  
  186. extern int    maxx,maxy;
  187. extern int    realmaxx,realmaxy;
  188. #ifndef OS2
  189.  extern int    usebios;
  190. #endif
  191. extern int    useansi;
  192. extern int    tabspaces;
  193.  
  194. /* END OF FILE: peeker.h */
  195.