Index: ossp-pkg/lmtp2nntp/lmtp2nntp_common.h RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp_common.h,v rcsdiff -q -kk '-r1.2' '-r1.3' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp_common.h,v' 2>/dev/null --- lmtp2nntp_common.h 2003/01/30 19:42:12 1.2 +++ lmtp2nntp_common.h 2003/02/06 13:50:08 1.3 @@ -26,13 +26,6 @@ ** lmtp2nntp_common.h: common stuff */ -/* - * FIXME this stuff actually should be not global/common! It was mainly - * a temporary fix to allow code migration from lmtp2nntp_main.c's - * getopt switch to lmtp2nntp_config.[ch]. Unfortunately it is very hard - * to move this remaining stuff into local contexts. - */ - #ifndef __LMTP2NNTP_COMMON_H__ #define __LMTP2NNTP_COMMON_H__ @@ -46,8 +39,7 @@ size_t prefixlen; sa_addr_t *saa; }; -struct nntp_st; -typedef struct nntp_st nntp_t; + #include "lmtp2nntp_nntp.h" struct ns { sa_addr_t *saa; @@ -56,40 +48,13 @@ nntp_rc_t rc; l2_channel_t *l2; }; + struct session { int lhlo_seen; char *lhlo_domain; }; -#include - -struct headerrule_st; -typedef struct headerrule_st headerrule_t; -#include -struct headerrule_st { - headerrule_t *next; - int pri; - char *regex; - char *name; - char *val; - pcre *pcreRegex; - pcre_extra *pcreExtra; -}; -headerrule_t *FIXME1; - -struct headerdata_st; -typedef struct headerdata_st headerdata_t; -struct headerdata_st { - headerdata_t *prev; - headerdata_t *next; - char *name; - int ndata; /* =0 means data is invalid, =1 means use data.s, >1 means use data.m */ - union { - char *s; - char **m; - } data; -}; -headerdata_t *FIXME2; +#include typedef struct { l2_context_t ctx; val_t *prival; @@ -165,4 +130,3 @@ extern void logbook(l2_channel_t *, l2_level_t, const char *, ...); #endif /* __LMTP2NNTP_COMMON_H__ */ - Index: ossp-pkg/lmtp2nntp/lmtp2nntp_msg.c RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp_msg.c,v rcsdiff -q -kk '-r1.35' '-r1.36' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp_msg.c,v' 2>/dev/null --- lmtp2nntp_msg.c 2003/02/04 14:50:45 1.35 +++ lmtp2nntp_msg.c 2003/02/06 13:50:08 1.36 @@ -31,7 +31,7 @@ #include "lmtp2nntp_msg.h" #include "lmtp2nntp_argz.h" -#include "lmtp2nntp_common.h" /* FIMXE logbook only */ +#include "lmtp2nntp_common.h" /* only required for logbook() */ #include "tai.h" #include "str.h" Index: ossp-pkg/lmtp2nntp/lmtp2nntp_msg.h RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp_msg.h,v rcsdiff -q -kk '-r1.8' '-r1.9' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp_msg.h,v' 2>/dev/null --- lmtp2nntp_msg.h 2003/01/30 19:42:13 1.8 +++ lmtp2nntp_msg.h 2003/02/06 13:50:08 1.9 @@ -35,13 +35,41 @@ #include "val.h" #include "lmtp2nntp_global.h" +extern void logbook(l2_channel_t *, l2_level_t, const char *, ...); + +#include +struct headerrule_st; +typedef struct headerrule_st headerrule_t; +struct headerrule_st { + headerrule_t *next; + int pri; + char *regex; + char *name; + char *val; + pcre *pcreRegex; + pcre_extra *pcreExtra; +}; + +struct headerdata_st; +typedef struct headerdata_st headerdata_t; +struct headerdata_st { + headerdata_t *prev; + headerdata_t *next; + char *name; + int ndata; /* =0 means data is invalid, =1 means use data.s, >1 means use data.m */ + union { + char *s; + char **m; + } data; +}; + typedef struct { char *azEnvgroups; /* Groups according to Envelope in GROUPMODE_ENVELOPE */ size_t asEnvgroups; char *cpMsg; /* the wholly message to be received by DATA command */ char *azHeaders; /* header part of message above */ size_t asHeaders; - struct headerdata_st *hdFirst; /*FIXME i want headerdata_t here */ + headerdata_t *hdFirst; char *cpFid; /* foreign (aka sendmail queue) id from parsing headers */ char *cpBody; /* body part of message above */ char *cpMsgid; @@ -89,4 +117,3 @@ char *msg_error(msg_rc_t); #endif /* __MSG_H__ */ - Index: ossp-pkg/lmtp2nntp/lmtp2nntp_nntp.h RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp_nntp.h,v rcsdiff -q -kk '-r1.5' '-r1.6' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp_nntp.h,v' 2>/dev/null --- lmtp2nntp_nntp.h 2003/01/30 19:42:13 1.5 +++ lmtp2nntp_nntp.h 2003/02/06 13:50:08 1.6 @@ -34,19 +34,6 @@ #include #include -#include "lmtp2nntp_msg.h" - -/*FIXME see include below -struct nntp_st; -typedef struct nntp_st nntp_t; -*/ - -typedef struct { - void *ctx; - ssize_t (*read)(void *, void *, size_t); - ssize_t (*write)(void *, const void *, size_t); -} nntp_io_t; - typedef enum { NNTP_OK, NNTP_EOF, @@ -60,8 +47,15 @@ NNTP_ERR_UNKNOWN } nntp_rc_t; -/*FIXME see fixme above */ -#include "lmtp2nntp_common.h" +struct nntp_st; +typedef struct nntp_st nntp_t; +#include "lmtp2nntp_msg.h" + +typedef struct { + void *ctx; + ssize_t (*read)(void *, void *, size_t); + ssize_t (*write)(void *, const void *, size_t); +} nntp_io_t; typedef struct { int fd;