home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1630 / qterm.h < prev    next >
C/C++ Source or Header  |  1990-12-28  |  2KB  |  70 lines

  1. /* qterm.h -- defines and declarations for the qterm modules.
  2.  
  3.    Author: Craig Bishop
  4.    modified by David MacKenzie
  5.    loosly based on original program by Michael Cooper. */
  6.  
  7. #define    ABSEND        "\05"    /* Answerback string */
  8. #define    ALTSEND        "\033[c"/* Alternative string */
  9. #define DFLTSEND    "\033Z"    /* Default string */
  10. #define    CMASK        0177    /* Character mask */
  11. #define    MAXTERMS    100    /* Maximum # of terminals for qterm */
  12. #define    STRFILE        ".qterm"/* File containing terminal strings */
  13.  
  14. /* The number of seconds for alarm timeouts.  Some slower systems
  15.    may need to increase this value to 2 or maybe 3 seconds.  This value
  16.    affects how long qterm will run, because for each query string sent
  17.    the program must wait at least this long. */
  18.  
  19. #define    WAITSEC        1
  20.  
  21. #define    TRUE        1
  22. #define    FALSE        0
  23.  
  24. #define NULLSTR        (char *) NULL
  25. #define    NULLQT        (struct qt *) NULL
  26. #define    STREQUAL    (0)
  27.  
  28. #define FIELDSIZ    30
  29. #define    FULLSIZ        80
  30.  
  31. /* Structure of query table element. */
  32. struct qt
  33. {
  34.   char sendstr[FIELDSIZ];    /* String to send to terminal */
  35.   char recvstr[FIELDSIZ];    /* String expected in response */
  36.   char termname[FIELDSIZ];    /* Terminal name */
  37.   char fullname[FULLSIZ];    /* Full terminal name & description */
  38. };
  39.  
  40. extern int user_table_only;
  41. extern int user_table;
  42. extern int quiet_mode;
  43. extern int print_strings;
  44.  
  45. extern char querystr[];
  46. extern char recvbuf[];
  47. extern char *program_name;
  48.  
  49. extern struct qt *termtab[];
  50.  
  51. FILE *fopen ();
  52. char *getenv ();
  53. char *malloc ();
  54.  
  55. char *decode ();
  56. char *fixctl ();
  57. char *term_listen ();
  58. char *xmalloc ();
  59. char getch ();
  60. int mktable ();
  61. int readtabfile ();
  62. struct qt *findmatch ();
  63. struct qt *queryterm ();
  64. void catchint ();
  65. void fixterm ();
  66. void prinfo ();
  67. void setterm ();
  68. void unknown ();
  69. void wakeup ();
  70.