1 #ifndef _SUCK_CONFIG_H 2 #define _SUCK_CONFIG_H 1 3 4 #define DEFAULT_NNRP_PORT 119 /* port to talk to on remote machine */ 5 #define LOCAL_PORT 119 /* port to talk to on local host */ 6 #define DEFAULT_SSL_PORT 563 /* if using SSL, this is the default port */ 7 #define LOCAL_SSL_PORT 563 /* if using SSL, for local host */ 8 9 /* Max length of a Message-ID that is possbile */ 10 #define MAX_MSGID_LEN 512 11 /* Max length of a Group Name */ 12 #define MAX_GRP_LEN 128 13 14 /* If you don't EVER plan to use the KILLFILE stuff, comment this out for a slight speed increase */ 15 /* If you want to, or plan to, use the KILLFILE stuff, uncomment this */ 16 #define KILLFILE 1 17 18 /* This is the character used in killfiles to tell if we should do a case sensitive or a */ 19 /* case insensitive compare. It can be overridden in a killfile. */ 20 #define KILLFILE_QUOTE '"' 21 22 /* This is the character that is used as a comment flag in col 0 in killfiles */ 23 #define KILLFILE_COMMENT_CHAR '#' 24 25 /* This is the character used in killfiles to tell if we should always do a non-regex */ 26 /* compare on the string. It can be overridden in a killfile. */ 27 #define KILLFILE_NONREGEX '%' 28 29 /* this is the start buffer size for the killfile get body routine */ 30 /* this should be close to the max size of the message you expect to get */ 31 #define KILL_BODY_BUF_SIZE 80960 32 33 /* this is the amount of extra memory we grab everytime we need to increase memory */ 34 /* typically for huge articles */ 35 /* WARNING, THIS MUST BE BIGGER THAN MAXLINLEN */ 36 #define KILL_CHUNK_BUF_INCREASE 10240 37 38 /* if using -A (scan active file), this is the number I use for lastread when I get */ 39 /* a new group, 0 = all messages, -100 means get last 100 messages */ 40 #define ACTIVE_DEFAULT_LASTREAD -100 41 42 #ifdef HAVE_SELECT /* if the system doesn't support select, then you can't use this */ 43 /* if you want to timeout if no read after X seconds define this */ 44 /* as number of seconds before timeout */ 45 /* else, comment it out. If you comment it out, if link goes down */ 46 /* we'll just sit, twiddling our bits, until whenever. */ 47 #define TIMEOUT 90 48 #endif /* HAVE_SELECT */ 49 50 /* signal which will interrupt us DON'T USE SIGKILL OR SIGSTOP */ 51 /* if you don't want to be able to abort, and a miniscule speed */ 52 /* increase, comment this out */ 53 /* WARNING: if you plan to use the killprg part of the killfile routines */ 54 /* then leave this in. If you don't, and the child program dies unexpectedly */ 55 /* suck will also die. */ 56 #define MYSIGNAL SIGTERM 57 #define MYSIGNAL2 SIGINT 58 #define PAUSESIGNAL SIGUSR1 59 60 /* If you want to have suck check in your history file for articles */ 61 /* that you already have, uncomment this. */ 62 /* If you use DBM, DBZ, or NDBM then you need to edit the Makefile */ 63 /* to show which DB scheme you use. */ 64 #define CHECK_HISTORY 1 65 66 /* If your system doesn't like the lock file stuff in suck.c or lmove.c */ 67 /* comment this out */ 68 #define LOCKFILE 1 69 70 /* FULL PATH of error log used if -e option specifed to any of the programs */ 71 /* can be overridden at the command line with -E option */ 72 #define ERROR_LOG "./suck.errlog" 73 74 /* FULL PATH of status messages log if -s option specified to any of the programs */ 75 /* can be overridden at the command line with -S option */ 76 #define STATUS_LOG "/dev/null" /* /dev/null = silent mode */ 77 78 /* FIRST Character used in args to signify read arguments from a file */ 79 #define FILE_CHAR '@' 80 81 /* Comment character in arg file, everything after this on a line is ignored */ 82 #define FILE_ARG_COMMENT '#' 83 84 /* String used in RPOST to search for Duplicate Message-ID responses from server */ 85 #define RPOST_DUPE_STR "Duplicate" 86 #define RPOST_DUPE_STR2 "Already got" /* used by DNews */ 87 88 /* FILE NAMES */ 89 /* Data files read in */ 90 #define N_OLDRC "sucknewsrc" /* what newsgroups to download */ 91 #define N_KILLFILE "suckkillfile" /* Parameter file for which articles NOT to download via killfiles*/ 92 #define N_SUPPLEMENTAL "suckothermsgs" /* list of article nrs to add to our list to download */ 93 #define N_LMOVE_ACTIVE "active" /* list of active newsgroups for lmove to read */ 94 #define N_ACTIVE_IGNORE "active-ignore" /* list of newsgroups ignored by read local active option */ 95 #define N_LMOVE_CONFIG "lmove-config" /* config file for lmove */ 96 #define N_XOVER "suckxover" /* parameter file for which articles NOT to download via xover */ 97 #define N_NODOWNLOAD "sucknodownload" /* file name for message-ids that I never download */ 98 #define N_PHRASES "/etc/suck/phrases" /* default location for phrase file */ 99 #define HISTORY_FILE "/var/lib/news/history" /* default location for history file */ 100 101 /* TEMP FILES created */ 102 #define N_NEWRC "suck.newrc" 103 #define N_KILLLOG "suck.killlog" 104 #define N_LOCKFILE "suck.lock" 105 #define N_DBFILE "suck.db" 106 #define N_TMP_EXTENSION ".tmp" /* added to file in process of being downloaded */ 107 #define N_LMOVE_LOCKFILE "lmove.lock" 108 #define N_POSTFILE "suck.post" 109 110 /* Old copy of N_OLDRC (saved just in case) */ 111 #define N_OLD_OLDRC "sucknewsrc.old" 112 113 /* Various DIRECTORY PATHS, these can be overriden from command line */ 114 #define N_TMPDIR "." /* location of Temp Files */ 115 #define N_DATADIR "/etc/suck" /* location of Data Files */ 116 #define N_MSGDIR "./Msgs" /*location of articles produced by suck, if multifile option selected */ 117 118 /* Argument substition strings for rpost */ 119 #define RPOST_FILTER_IN "$$i" 120 #define RPOST_FILTER_OUT "$$o" 121 122 /* Max nr of args to the rpost filter */ 123 #define RPOST_MAXARGS 128 124 125 /* extension added by rpost to the batch file when */ 126 /* a message upload fails and we have to write out */ 127 /* a failed file */ 128 #define RPOST_FAIL_EXT ".fail" 129 130 /* RNEWS program called by lpost */ 131 #define RNEWS "/usr/bin/rnews" 132 133 /* character used as a comment in sucknewsrc */ 134 #define SUCKNEWSRC_COMMENT_CHAR '#' 135 136 /* character used as a separate in the PATH environment variable */ 137 #define PATH_SEPARATOR ':' 138 139 /* maximum number of args to killprg */ 140 #define KILLPRG_MAXARGS 128 141 142 /* length of string sent to killprg (min length must be 8) */ 143 #define KILLPRG_LENGTHLEN 8 144 145 /* mode for directory when creating in lmove */ 146 #define LMOVE_DEFAULT_DIR_MODE 0755 /* in octal */ 147 148 /* longest line possible in a message for lmove */ 149 #define LMOVE_MAXLINLEN 8192 150 151 /* mode for active file when rewriting it */ 152 #define LMOVE_ACTIVE_MODE 0755 /* in octal */ 153 154 /* max number of args for suck to pass to lmove */ 155 #define LMOVE_MAX_ARGS 12 156 157 /* Internal buffer size shouldn't need to change */ 158 #define MAXLINLEN 4096 159 160 /* Internal buffer size for print_phrases */ 161 #define PHRASES_BLOCK_SIZE 1024 162 163 /* Character that is used to separate variables (front and back) in phrases */ 164 #define PHRASES_SEPARATOR '%' 165 #define PHRASES_VAR_CHAR 'v' 166 167 /* phrase that defines a group name in suck.sorted */ 168 #define RESTART_GROUP "GROUP" 169 170 /* stuff needed for Perl killfile interpreter */ 171 #define PERL_PACKAGE_SUB "Embed::Persistant::perl_kill" 172 173 /* stuff needed for Perl rpost interpreter */ 174 #define PERL_RPOST_SUB "Embed::Persistant::perl_rpost" 175 176 /* stuff needed for PERL xover interpreter */ 177 #define PERL_OVER_SUB "Embed::Persistant::perl_overview" /* subroutine which gets the overview.fmt list */ 178 #define PERL_XOVER_SUB "Embed::Persistant::perl_xover" /* subroutine which gets each xoverview line */ 179 180 /*------------------------------------------------------------*/ 181 /* the following should be handled by the auto-config stuff */ 182 /* shouldn't need to touch below here */ 183 184 #ifndef HAVE_MEMMOVE /* if you don't have memmove, try bcopy */ 185 #define memmove(a,b,c) bcopy(b,a,c) 186 #endif 187 188 #ifndef PATH_MAX /* in case you don't have it */ 189 #ifdef _POSIX_PATH_MAX 190 #define PATH_MAX _POSIX_PATH_MAX 191 #endif 192 #endif 193 194 #ifndef PATH_MAX 195 #ifdef MAXPATHLEN 196 #define PATH_MAX MAXPATHLEN 197 #endif 198 #endif 199 #ifndef PATH_MAX 200 201 /* for Solaris */ 202 #ifdef MAXNAMLEN 203 #define PATH_MAX MAXNAMLEN 204 #endif 205 #endif 206 207 #endif /* _SUCK_CONFIG_H */ 208