home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / gopher / Unix / gopher-gateways / techinfo / techinpher / v1.0 / gophernodes.h.Z / gophernodes.h
Encoding:
C/C++ Source or Header  |  1993-02-22  |  2.7 KB  |  100 lines

  1. /*
  2.   This software is copyrighted by the University of Pennsylvania.
  3.   Read COPYRIGHT for details.
  4.   */
  5.  
  6. #define HELPER                   "techinpher-helper"
  7. #define CACHEDIR                 "cache/"
  8. #define CACHETIMEOUT             1200  /* 20 min in seconds */
  9. #define GW_SOURCENAME            "gateway"
  10. #define GW_LONGSRCNAME           "PennInfo ==> Gopher Gateway"
  11. #define GW_EMAILADDR             "penninfo-gopher@dccs.upenn.edu"
  12.  
  13. #define GW_NODE_UNUSED(lastu)    ( (todaysdate-lastu) > 5 )
  14.  
  15. /* reserved nodes (see nodes.reserved) */
  16. #define MAINMENUNODE                  0
  17. #define DUMMY_NODE                    2
  18. #define HELP_MENU_NODE               10
  19.  
  20. #define GOPHERFILETYPES_UNAVAILABLE  20
  21. #define CLIENT_NEEDS_TELNET          21
  22. #define UNKNOWN_DOC_TYPE             22
  23. #define FILE_NOT_SEARCHABLE          23
  24. #define NO_SHOW_PATH                 24
  25. #define NO_OUTLINE                   25
  26. #define TRY_SEARCHCMD                26
  27. #define FILE_NOT_AMENU               27
  28. #define MENU_NOT_AVAILABLE           28
  29. #define GLOBGOPH_SRCH_NODE         1000 /* Used for veronica */
  30.  
  31. #define FIRST_UNRESERVED_NODE      1000
  32. #define MAX_RESV_NODES             FIRST_UNRESERVED_NODE
  33. #define is_reserved_node(nid)      (nid < FIRST_UNRESERVED_NODE)
  34. #define NUMFIELDS_RESVNODES        4
  35.  
  36. /* Which node to use for global gopher search -- this nodeid
  37.    must appear in gw_nodes_file */
  38.  
  39. #define NUMFIELDS_GOPHER       4 /* title,path,server,port */
  40. #define NUMFIELDS_GOPHNODES    3 /* nodeid,lastu,gopherinfo */
  41.  
  42. struct s1 {
  43.   char gophertype;
  44.   char *gophertitle;
  45.   char *gopherserver;
  46.   char *gopherport;
  47.   char *gopherpath;
  48.   long nodeid;
  49.   short lastused;    /* last date item was used: either it was
  50.             used in a menu, OR selected (i.e. w:2:N:1, t:N) */
  51.   struct s1 *nextnode;
  52. };
  53.  
  54. /* lastused, count, initcount should be used to decide which
  55.    gopher nodes to delete from the datastructures.  */
  56.  
  57. struct s2 {
  58.   long nodeid;
  59.   struct s1 *node;
  60.   struct s2 *nextnode;
  61. };
  62.  
  63. struct resvnode {
  64.   long nodeid;
  65.   short numchildren;
  66.   long *children;
  67.   char *title;
  68.   char *file;
  69. };
  70.  
  71. struct gopherabbrev  {
  72.   char gophtyp;
  73.   char *gophabbrev;
  74. };
  75.  
  76. #define GOPHER_DLM        '\t'
  77. /* Got the following types from gopher v1.11, Jan 1993 */
  78. #define GOPHTYP_TEXT      '0'
  79. #define GOPHTYP_MENU      '1'
  80. #define GOPHTYP_CSO       '2'
  81. #define GOPHTYP_ERROR     '3'
  82. #define GOPHTYP_MACHQX    '4'
  83. #define GOPHTYP_DOSBIN    '5'
  84. #define GOPHTYP_UUENC     '6'
  85. #define GOPHTYP_SEARCH    '7'
  86. #define GOPHTYP_TELNET    '8'
  87. #define GOPHTYP_BINARY    '9'
  88. #define GOPHTYP_SOUND     's'
  89. #define GOPHTYP_EVENT     'e'
  90. #define GOPHTYP_CALENDAR  'c'
  91. #define GOPHTYP_GIF       'g'
  92. #define GOPHTYP_HTML      'h'
  93. #define GOPHTYP_TN3270    'T'
  94. #define GOPHTYP_MIME      'M'
  95. #define GOPHTYP_IMAGE     'I'
  96.  
  97. #define GOPHTYP_DUPSRV  '+'
  98.  
  99.  
  100.