1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
Prototype char *NewsHome;
Prototype char *SpoolHome;
Prototype char *CacheHome;
Prototype char *OverviewHome;
Prototype char *NewsCfg;
Prototype char *NewsLog;
Prototype char *OutGoing;
Prototype char *DiabloSock;
Prototype volatile int DebugOpt;
Prototype MemPool *SysMemPool;
Prototype void FreeNodeList(MemPool **pmp, Node **pnode);
Prototype void FreeNode(MemPool **pmp, Node *node);
Prototype Node *MakeNode(MemPool **pmp, const char *str, int val);
Prototype Node *MakeNode2(MemPool **pmp, const char *str1, const char *str2, int val);
Prototype int xopen(int modes, int perms, const char *ctl, ...);
Prototype FILE *xfopen(const char *modes, const char *ctl, ...);
Prototype int xfprintf(FILE *fo, const char *ctl, ...);
Prototype void ddprintf(const char *ctl, ...);
Prototype void vddprintf(const char *ctl, va_list va);
Prototype FILE *fcdopen(const char *path, const char *modes);
Prototype int cdopen(const char *path, int modes, int perms);
Prototype const char *cdcache(const char *path);
Prototype Buffer *bopen(int fd);
Prototype void bsetfd(Buffer *b, int fd);
Prototype void bclose(Buffer *b, int closeFd);
Prototype void efree(char **pcopy, int *pcopymax);
Prototype char *bgets(Buffer *b, int *pbytes);
Prototype char *egets(Buffer *b, int *pbytes);
Prototype void bwrite(Buffer *b, const void *data, int bytes);
Prototype void bflush(Buffer *b);
Prototype int berror(Buffer *b);
Prototype off_t btell(Buffer *b);
Prototype int bunget(Buffer *b, int n);
Prototype int bextfree(Buffer *b);
Prototype int WildCmp(const char *w, const char *s);
Prototype int WildCaseCmp(const char *w, const char *s);
Prototype void HistoryOpen(const char *fileName, int fastMode);
Prototype int HistoryClose(void);
Prototype int HistoryLookup(const char *msgid, char **pfi, int32 *rsize, int *pmart);
Prototype int HistoryLookupByHash(hash_t hv, History *h);
Prototype int HistoryAdd(const char *msgid, History *h);
Prototype int NewHSize;
Prototype int GetExpire(const char *msgid, const char *nglist, int size);
Prototype void LoadExpireCtl(int force);
Prototype int FeedAdd(const char *msgid, time_t t, History *h, const char *nglist, const char *npath);
Prototype int FeedWrite(int (*callback)(const char *hlabel, const char *msgid, const char *path, const char *offsize, int plfo), const char *msgid, const char *path, const char *offsize, const char *nglist, const char *npath);
Prototype void FeedFlush(void);
Prototype void LoadNewsFeed(time_t t, int force, const char *hlabel);
Prototype void TouchNewsFeed(void);
Prototype int FeedValid(const char *hlabel, int *pcount);
Prototype int IsFiltered(const char *hlabel, const char *nglist);
Prototype int FeedQuerySpam(const char *hlabel, const char *hostInfo);
Prototype int PathElmMatches(const char *hlabel, const char *p, int bytes, int *pidx);
Prototype int CommonElmMatches(const char *common, const char *p, int bytes);
Prototype FILE *FeedFo;
Prototype time_t parsedate(char *buf);
Prototype void rsignal(int sigNo, void (*func)(int sigNo));
Prototype int xflock(int fd, int flags);
Prototype int hflock(int fd, int offset, int flags);
Prototype void *pagealloc(int *psize, int bytes);
Prototype void pagefree(void *p, int bytes);
Prototype int ZoneFd; /* only necessary for USE_FALL_MMAP */
Prototype int ZoneBytes;
Prototype void ArticleFileName(char *path, History *h, int absolute);
Prototype void strlcpy(char *d, const char *s, int ssize, int dsize);
Prototype void strlcpynl(char *d, const char *s, int ssize, int dsize);
Prototype void *xmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset);
Prototype void xunmap(void *addr, size_t len);
Prototype void InitPreCommit(void);
Prototype int PreCommit(const char *msgid, int postMode);
Prototype int SetPreCommitExpire(int pcex);
Prototype void SetFilterTrip(int n);
Prototype void InitSpamFilter(void);
Prototype void TermSpamFilter(void);
Prototype int SpamFilter(hash_t mhv, const char *nntpPostingHost, hash_t *bhv, int *phow);
Prototype void TermSpamFilter(void);
Prototype void DumpSpamFilterCache(void);
Prototype int FilterFd;
Prototype void *nzalloc(MemPool **mpool, int bytes);
Prototype void *zalloc(MemPool **mpool, int bytes);
Prototype char *zallocStr(MemPool **pmp, const char *s);
Prototype char *zallocStrTrim(MemPool **pmp, const char *s, int l);
Prototype void zfree(MemPool **mpool, void *ptr, int bytes);
Prototype void zfreeStr(MemPool **pmp, char **ps);
Prototype void allocPool(MemPool **mpool, int bytes);
Prototype void freePool(MemPool **mpool);
Prototype void InitSeqSpace(void);
Prototype uint32 ExpireToSeq(uint16 exp);
Prototype void LoadSlotDir(time_t t);
Prototype void LoadDiabloConfig(void);
Prototype int DiabloExpire;
Prototype int DiabloHashMethod;
Prototype int DiabloCompatHashMethod;
Prototype int DiabloHashSize;
Prototype char *DiabloActive;
Prototype int DiabloRememberDays;
Prototype int MaxPerRemote;
Prototype int DiabloXRefSlave;
Prototype int DiabloReaderForks;
Prototype int DiabloReaderThreads;
Prototype KPDB *XKPDBOpen(int oflags, const char *ctl, ...);
Prototype KPDB *KPDBOpen(const char *fileName, int oflags);
Prototype void KPDBClose(KPDB *kpdb);
Prototype KPDB *KPDBReOpen(KPDB *kpdb);
Prototype void KPDBReSort(KPDB *kpdb);
Prototype const char *KPDBRead(KPDB *kpdb, const char *key, const char *tok, int lockMe, int *plen, const char *def);
Prototype const char *KPDBReadRecord(KPDB *kpdb, const char *key, int lockMe, int *preclen);
Prototype const char *KPDBScanFirst(KPDB *kpdb, int lockMe, int *preclen);
Prototype const char *KPDBScanNext(KPDB *kpdb, const char *rec, int lockMe, int *preclen);
Prototype const char *KPDBGetField(const char *rec, int recLen, const char *tok, int *plen, const char *def);
Prototype const char *KPDBGetFieldDecode(const char *rec, int recLen, const char *tok, int *plen, const char *def);
Prototype int KPDBWriteEncode(KPDB *kpdb, const char *key, const char *tok, const char *data, int unlockMe);
Prototype int KPDBWrite(KPDB *kpdb, const char *key, const char *tok, const char *data, int unlockMe);
Prototype void KPDBUnlock(KPDB *kpdb, const char *rec);
Prototype int KPDBDelete(KPDB *kpdb, const char *key);
Prototype void InitDActive(const char *fileName);
Prototype void GenerateXRef(Buffer *b, const char *nglist, const char *npName);
Prototype char *MsgId(const char *s);
Prototype hash_t hhash(const char *msgid);
Prototype void bhash(hash_t *h, const char *p, int len);
Prototype const char *GFName(const char *group, const char *prefix, int artBase);
Prototype void SetStatusLine(char *ptr, int len);
Prototype void vstprintf(const char *ctl, va_list va);
Prototype void stprintf(const char *ctl, ...);
Prototype pid_t RunProgramPipe(int rfds[3], int flags, char **argv);
Prototype void fatal(const char *ctl, ...);
|