home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / vsoup128.zip / global.hh < prev    next >
Text File  |  1997-04-20  |  3KB  |  113 lines

  1. //  $Id: global.hh 1.16 1997/04/20 19:09:24 hardy Exp $
  2. //
  3. //  This progam/module was written by Hardy Griech based on ideas and
  4. //  pieces of code from Chin Huang (cthuang@io.org).  Bug reports should
  5. //  be submitted to rgriech@swol.de.
  6. //
  7. //  This file is part of VSoup for OS/2.  VSoup including this file
  8. //  is freeware.  There is no warranty of any kind implied.  The terms
  9. //  of the GNU Gernal Public Licence are valid for this piece of software.
  10. //
  11.  
  12.  
  13. #ifndef __GLOBAL_HH__
  14. #define __GLOBAL_HH__
  15.  
  16.  
  17. #ifdef DEFGLOBALS
  18. #define EXTERN
  19. #define INIT(i) = i
  20. #else
  21. #define EXTERN extern
  22. #define INIT(i)
  23. #endif
  24.  
  25.  
  26. #include "areas.hh"
  27. #include "newsrc.hh"
  28.  
  29.  
  30. //
  31. //  defines for threads
  32. //
  33. #if defined(OS2)  &&  defined(__MT__)
  34. #define MAXNNTPTHREADS 10                // bei mehr als 15 hat es zu wenig Files !?
  35. #else
  36. #define MAXNNTPTHREADS 1
  37. #endif
  38.  
  39.  
  40. #define TIMEOUT        (100L)            // timeout value for connecting, aborting etc.
  41.  
  42.  
  43. //
  44. //  global variables
  45. //
  46. #if MAXNNTPTHREADS < 4
  47. #define DEFNNTPTHREADS MAXNNTPTHREADS
  48. #else
  49. #define DEFNNTPTHREADS 4
  50. #endif
  51.  
  52. EXTERN int maxNntpThreads INIT(DEFNNTPTHREADS);
  53.  
  54. #ifdef DEFGLOBALS
  55.    TAreasMail areas("AREAS","%07d");
  56.    TNewsrc newsrc;
  57. #else
  58.    extern TAreasMail areas;
  59.    extern TNewsrc newsrc;
  60. #endif
  61.  
  62. EXTERN int doAbortProgram             INIT(0);
  63.  
  64.  
  65. //
  66. //  program options
  67. //
  68. EXTERN char doNewGroups               INIT(0);
  69. EXTERN char doXref                    INIT(1);
  70. EXTERN char *homeDir                  INIT( NULL );
  71. EXTERN char killFile[FILENAME_MAX]    INIT("");
  72. EXTERN char killFileOption            INIT(0);
  73. EXTERN unsigned long maxBytes         INIT(0);
  74. EXTERN char newsrcFile[FILENAME_MAX]  INIT("");
  75. EXTERN char *progname                 INIT(NULL);
  76. EXTERN char readOnly                  INIT(0);
  77. EXTERN char forceMailDelete           INIT(0);
  78.  
  79.  
  80. //
  81. //  host/user/passwd storage for the different protocols
  82. //
  83. struct serverInfo {
  84.     const char *host;
  85.     const char *user;
  86.     const char *passwd;
  87.     int port;
  88. };
  89.  
  90. #ifdef DEFGLOBALS
  91. serverInfo smtpInfo = {NULL,NULL,NULL,-1};
  92. serverInfo pop3Info = {NULL,NULL,NULL,-1};
  93. serverInfo nntpInfo = {NULL,NULL,NULL,-1};
  94. #else
  95. extern serverInfo smtpInfo;
  96. extern serverInfo pop3Info;
  97. extern serverInfo nntpInfo;
  98. #endif
  99.  
  100.  
  101. //
  102. //  filenames
  103. //
  104. #ifdef OS2
  105. #define FN_NEWSTIME "newstime"
  106. #else
  107. #define FN_NEWSTIME ".newstime"
  108. #endif
  109. #define FN_REPLIES  "replies"
  110.  
  111.  
  112. #endif   // __GLOBAL_HH__
  113.