Index: ossp-pkg/lmtp2nntp/lmtp.c RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/lmtp.c,v rcsdiff -q -kk '-r1.11' '-r1.12' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/lmtp.c,v' 2>/dev/null --- lmtp.c 2001/08/16 15:00:50 1.11 +++ lmtp.c 2001/08/21 07:40:41 1.12 @@ -142,7 +142,7 @@ lmtp_rc_t lmtp_readline(lmtp_t *lmtp, char *buf, size_t buflen) { /* read a line (characters until NL) from input stream */ - //FIXME RFC0821 4.2. SMTP REPLIES "Only the EXPN and HELP commands are expected to result in multiline replies in normal circumstances, however multiline replies are allowed for any command." + /*FIXME RFC0821 4.2. SMTP REPLIES "Only the EXPN and HELP commands are expected to result in multiline replies in normal circumstances, however multiline replies are allowed for any command." */ size_t n; char c; lmtp_readline_t *rl = &lmtp->rl; Index: ossp-pkg/lmtp2nntp/lmtp2nntp.c RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/lmtp2nntp.c,v rcsdiff -q -kk '-r1.20' '-r1.21' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/lmtp2nntp.c,v' 2>/dev/null --- lmtp2nntp.c 2001/08/20 14:11:30 1.20 +++ lmtp2nntp.c 2001/08/21 07:40:41 1.21 @@ -263,19 +263,19 @@ exit(ERR_EXECUTION); } ctx->ns[ctx->nsc].sa = sa; - //FIXME sa_destroy(sa); + /*FIXME sa_destroy(sa); */ ctx->ns[ctx->nsc].nntp = NULL; ctx->nsc++; break; - case 't': // -t (tracing) + case 't': /* -t (tracing) */ ctx->option_tracing = TRUE; trace_read (-1, optarg, 0); trace_write(-1, optarg, 0); break; - case 'v': // -v (verbose) + case 'v': /* -v (verbose) */ ctx->option_verbose = TRUE; break; - case 'V': // -V (version) + case 'V': /* -V (version) */ fprintf(stdout, "%s\n", lmtp2nntp_version.v_gnu); exit(0); break; @@ -287,7 +287,7 @@ } /* remaining arguments are Groupargs */ for (i = optind; i < argc; i++) { - //fprintf(stderr, "DEBUG: argv[i] = ***%s***\n", argv[i]); + /*fprintf(stderr, "DEBUG: argv[i] = ***%s***\n", argv[i]); */ argz_add(&ctx->azGroupargs, &ctx->asGroupargs, argv[i]); } @@ -315,7 +315,7 @@ static void resetsession(struct session *session) { - //FIXME what about non-graceful aborts? + /*FIXME what about non-graceful aborts? */ if (session->lhlo_domain != NULL) free(session->lhlo_domain); initsession(session); @@ -393,16 +393,16 @@ do { bOk = TRUE; if (connect(ctx->ns[i].s, ctx->ns[i].sa->sa_buf, ctx->ns[i].sa->sa_len) < 0) { - //fprintf(stderr, "DEBUG: connect failed: %s\n", strerror(errno)); + /*fprintf(stderr, "DEBUG: connect failed: %s\n", strerror(errno)); */ bOk = FALSE; } if (bOk && ((ctx->ns[i].nntp = nntp_create(ctx->ns[i].s, ctx->ns[i].s, ctx->option_tracing != TRUE ? NULL : &nntp_io)) == NULL)) { - //fprintf(stderr, "DEBUG: nntp_create failed: %s\n", strerror(errno)); + /*fprintf(stderr, "DEBUG: nntp_create failed: %s\n", strerror(errno)); */ bOk = FALSE; } if (bOk && ((rc = nntp_init(ctx->ns[i].nntp)) != NNTP_OK)) { - //fprintf(stderr, "DEBUG: nntp_init failed: %s\n", nntp_error(rc)); + /*fprintf(stderr, "DEBUG: nntp_init failed: %s\n", nntp_error(rc)); */ bOk = FALSE; } if (bOk) @@ -425,7 +425,7 @@ if (ctx->nsc == 0) { res.statuscode = "421"; res.dsncode = "4.4.1"; - res.statusmsg = "No connection to any NNTP Service."; //FIXME add error strings from above DEBUGs + res.statusmsg = "No connection to any NNTP Service."; /*FIXME add error strings from above DEBUGs */ lmtp_response(lmtp, &res); return LMTP_OK; } @@ -584,7 +584,7 @@ } if ((ctx->msg = msg_create()) == NULL) { - res.statuscode = "503"; // FIXME + res.statuscode = "503"; /* FIXME */ res.dsncode = "5.5.0"; res.statusmsg = "Internal error - memory."; lmtp_response(lmtp, &res); @@ -592,7 +592,7 @@ } if (!str_parse(req->msg, "m/^MAIL From:\\s*<(.+@.+)>$/i", &ctx->msg->mail_from)) { - //FIXME ^^^^ is this space required/ valid? Sendmail skips them! + /*FIXME ^^^^ is this space required/ valid? Sendmail skips them! */ res.statuscode = "553"; res.dsncode = "5.5.4"; res.statusmsg = "Domain name required for sender address."; @@ -623,7 +623,7 @@ } if (!str_parse(req->msg, "m/^RCPT To:\\s*(.+)$/i", &cp)) { - //FIXME ^^^^ is this space required/ valid? Sendmail skips them! + /*FIXME ^^^^ is this space required/ valid? Sendmail skips them! */ res.statuscode = "501"; res.dsncode = "5.5.2"; res.statusmsg = "Syntax error in parameters."; @@ -647,7 +647,7 @@ */ if (ctx->option_groupmode == GROUPMODE_ENVELOPE) { - //fprintf(stderr, "DEBUG: before transform cp=***%s***\n", cp); + /*fprintf(stderr, "DEBUG: before transform cp=***%s***\n", cp); */ if (!str_parse(cp, "m/^<(.+)?@[^@]+>$/i", &group)) { res.statuscode = "550"; res.dsncode = "5.1.1"; @@ -655,8 +655,8 @@ lmtp_response(lmtp, &res); return LMTP_OK; } - //fprintf(stderr, "DEBUG: after transform group=***%s***\n", group); - //FIXME do additional transform and checking + /*fprintf(stderr, "DEBUG: after transform group=***%s***\n", group); */ + /*FIXME do additional transform and checking */ if (0) { res.statuscode = "550"; res.dsncode = "5.1.1"; @@ -667,7 +667,7 @@ argz_add(&ctx->msg->azEnvgroups, &ctx->msg->asEnvgroups, group); } - //fprintf(stderr, "DEBUG: cp=***%s***\n", cp); + /*fprintf(stderr, "DEBUG: cp=***%s***\n", cp); */ argz_add(&ctx->msg->azRcpt, &ctx->msg->asRcpt, cp); res.statuscode = "250"; res.dsncode = "2.1.5"; @@ -705,7 +705,7 @@ str_format(errorstring, sizeof(errorstring), "Overflow reading message: %s", lmtp_error(rc)); res.statuscode = "500"; res.dsncode = "5.0.0"; - res.statusmsg = errorstring; //FIXME temp or perm error? + res.statusmsg = errorstring; /*FIXME temp or perm error? */ rcpt = NULL; while ((rcpt = argz_next(ctx->msg->azRcpt, ctx->msg->asRcpt, rcpt)) != NULL) { lmtp_response(lmtp, &res); @@ -737,7 +737,7 @@ return LMTP_OK; } - //fprintf(stderr, "DEBUG: before msg_split\n"); + /*fprintf(stderr, "DEBUG: before msg_split\n"); */ if ((rc = msg_split(ctx->msg)) != MSG_OK) { str_format(errorstring, sizeof(errorstring), "Error splitting message: %s", msg_error(rc)); res.statuscode = "500"; @@ -749,26 +749,26 @@ } return LMTP_OK; } - //fprintf(stderr, "DEBUG: after msg_split\n"); + /*fprintf(stderr, "DEBUG: after msg_split\n"); */ if (ctx->option_groupmode == GROUPMODE_ENVELOPE) { - ctx->msg->azNewsgroups = memcpy(malloc(ctx->msg->asEnvgroups + 1), ctx->msg->azEnvgroups, ctx->msg->asEnvgroups); //FIXME strdup == NULL + ctx->msg->azNewsgroups = memcpy(malloc(ctx->msg->asEnvgroups + 1), ctx->msg->azEnvgroups, ctx->msg->asEnvgroups); /*FIXME strdup == NULL */ ctx->msg->asNewsgroups = ctx->msg->asEnvgroups; } else if (ctx->option_groupmode == GROUPMODE_ARG) { - ctx->msg->azNewsgroups = memcpy(malloc(ctx->asGroupargs + 1), ctx->azGroupargs, ctx->asGroupargs); //FIXME strdup == NULL + ctx->msg->azNewsgroups = memcpy(malloc(ctx->asGroupargs + 1), ctx->azGroupargs, ctx->asGroupargs); /*FIXME strdup == NULL */ ctx->msg->asNewsgroups = ctx->asGroupargs; } /* else keep == GROUPMODE_HEADERS */ -#if 0 //FIXME debug paragraph +#if 0 /*FIXME debug paragraph */ rcpt = NULL; while ((rcpt = argz_next(ctx->msg->azNewsgroups, ctx->msg->asNewsgroups, rcpt)) != NULL) { fprintf(stderr, "DEBUG: commited group ***%s***\n", rcpt); } #endif - //fprintf(stderr, "DEBUG: before msg_join\n"); + /*fprintf(stderr, "DEBUG: before msg_join\n"); */ if ((rc = msg_join(ctx->msg)) != MSG_OK) { str_format(errorstring, sizeof(errorstring), "Error joining message: %s", msg_error(rc)); res.statuscode = "500"; @@ -780,11 +780,11 @@ } return LMTP_OK; } - //fprintf(stderr, "DEBUG: after msg_join\n"); + /*fprintf(stderr, "DEBUG: after msg_join\n"); */ bSuccess = NNTP_EOF; /* assume a hard error for the worst case */ for (i = 0; i < ctx->nsc; i++) { - //fprintf(stderr, "DEBUG: trying service %s\n", ctx->ns[i].h); + /*fprintf(stderr, "DEBUG: trying service %s\n", ctx->ns[i].h); */ switch (ctx->option_deliverymode) { case DELIVERYMODE_FAKE: break; @@ -806,7 +806,7 @@ ) bSuccess = NNTP_DEFER; } - //FIXME rc has only last error + /*FIXME rc has only last error */ /* RFC0821 4.2.1. REPLY CODES BY FUNCTION GROUPS * "250 Requested mail action okay, completed" Index: ossp-pkg/lmtp2nntp/msg.c RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/msg.c,v rcsdiff -q -kk '-r1.5' '-r1.6' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/msg.c,v' 2>/dev/null --- msg.c 2001/08/16 15:00:50 1.5 +++ msg.c 2001/08/21 07:40:41 1.6 @@ -32,7 +32,7 @@ { if (msg == NULL) return; - //FIXME what about non-graceful aborts? + /*FIXME what about non-graceful aborts? */ if (msg->azEnvgroups != NULL) free(msg->azEnvgroups); if (msg->cpMsg != NULL) @@ -103,17 +103,17 @@ memcpy(cpHeaders, "X-F:", 4); /* unwrap header lines */ - //FIXME poor man's s///g simulator as current str library doesn't support //global substitution + /*FIXME poor man's s///g simulator as current str library doesn't support //global substitution */ while (str_parse(cpHeaders, "s/(.*?)\\n[ \\t]+(.*)/$1 $2/s", &cpRem)) { free(cpHeaders); cpHeaders = cpRem; } /* split header lines into names and values */ - //FIXME str enhancement requests and bugs to be fixed - //FIXME - fix bug "not" [^...] working - //FIXME - improve str_parse(foo, "...", &foo) should free foo() on it's own - //FIXME - add "global" in s/search/replace/g (see above "unwrap hader lines") + /*FIXME str enhancement requests and bugs to be fixed */ + /*FIXME - fix bug "not" [^...] working */ + /*FIXME - improve str_parse(foo, "...", &foo) should free foo() on it's own */ + /*FIXME - add "global" in s/search/replace/g (see above "unwrap hader lines") */ while (str_parse(cpHeaders, "m/^([\\w-]+?:)[ \\t]*(.*?)[ \\t]*\\n(.*)/s", &cpName, &cpValue, &cpRem)) { free(cpHeaders); cpHeaders = cpRem; @@ -156,7 +156,7 @@ if (msg->cpMsgid != NULL) return MSG_ERR_SPLITIDMULTI; argz_delete(&msg->azHeaders, &msg->asHeaders, cp); /* del name */ - //fprintf(stderr, "DEBUG: Message-ID cp = ***%s***\n", cp); + /*fprintf(stderr, "DEBUG: Message-ID cp = ***%s***\n", cp); */ if ((cp == NULL) || (strlen(cp) == 0)) /* get value */ return MSG_ERR_SPLITIDEMPTY; if ((msg->cpMsgid = strdup(cp)) == NULL) @@ -166,7 +166,7 @@ } if (strcasecmp("Newsgroups:", cp) == 0) { argz_delete(&msg->azHeaders, &msg->asHeaders, cp); /* del name */ - //fprintf(stderr, "DEBUG: Newsgroups cp = ***%s***\n", cp); + /*fprintf(stderr, "DEBUG: Newsgroups cp = ***%s***\n", cp); */ if (argz_add(&msg->azNewsgroups, &msg->asNewsgroups, cp) != 0) /* get value */ return MSG_ERR_MEM; argz_delete(&msg->azHeaders, &msg->asHeaders, cp); /* del value */ @@ -186,7 +186,7 @@ return MSG_ERR_MEM; } argz_add(&msg->azHeaders, &msg->asHeaders, "Path:"); - argz_add(&msg->azHeaders, &msg->asHeaders, "not-for-mail"); //FIXME + argz_add(&msg->azHeaders, &msg->asHeaders, "not-for-mail"); /*FIXME */ return MSG_OK; } @@ -208,7 +208,7 @@ if (msg->azNewsgroups == NULL) return MSG_ERR_JOINGROUPNONE; argz_stringify(msg->azNewsgroups, msg->asNewsgroups, ','); - //fprintf(stderr, "DEBUG: join consolidated azNewsgroups = ***%s***\n", msg->azNewsgroups); + /*fprintf(stderr, "DEBUG: join consolidated azNewsgroups = ***%s***\n", msg->azNewsgroups); */ if (strlen(msg->azNewsgroups) == 0) return MSG_ERR_JOINGROUPEMPTY; argz_add(&msg->azHeaders, &msg->asHeaders, "Newsgroups:"); @@ -253,7 +253,7 @@ if (i < WRAPAT) i++; /* we don't care about the whitespace itself */ cpCut = str_dup(cpRem, i); - //FIXME 1.) continue searching downwards skipping all whitespaces and 2.) as we know the length replace str_dup/ strcat/ free with strncat only + /*FIXME 1.) continue searching downwards skipping all whitespaces and 2.) as we know the length replace str_dup/ strcat/ free with strncat only */ if (cpWrap == NULL) { if ((cpWrap = (char *)malloc(strlen(cpCut)+strlen(WRAPUSING)+1)) == NULL) return MSG_ERR_MEM; @@ -356,7 +356,7 @@ msg->cpMsg[n++] = '\n'; msg->cpMsg[n] = '\0'; - //fprintf(stderr, "DEBUG: Message = ***%s***\n", msg->cpMsg); + /*fprintf(stderr, "DEBUG: Message = ***%s***\n", msg->cpMsg); */ return MSG_OK; } Index: ossp-pkg/lmtp2nntp/nntp.c RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/nntp.c,v rcsdiff -q -kk '-r1.8' '-r1.9' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/nntp.c,v' 2>/dev/null --- nntp.c 2001/08/16 15:00:50 1.8 +++ nntp.c 2001/08/21 07:40:41 1.9 @@ -124,12 +124,12 @@ do { if ((rc = nntp_readline(nntp, line, sizeof(line))) != NNTP_OK) { - //fprintf(stderr, "DEBUG: nntp_readline returned ***%d***\n", rc); + /*fprintf(stderr, "DEBUG: nntp_readline returned ***%d***\n", rc); */ return rc; } } while (line[0] == '1'); - //fprintf(stderr, "DEBUG: nntp_readline got ***%s***\n", line); + /*fprintf(stderr, "DEBUG: nntp_readline got ***%s***\n", line); */ /* prepare for the INN kludge using 441 returns for other things but * "Duplicate". Typical welcome string is "200 host InterNetNews NNRP @@ -137,11 +137,11 @@ */ if (str_parse(line, "m/^200.*\\sINN\\s/")) { nntp->kludgeinn441dup = TRUE; - //fprintf(stderr, "DEBUG: INN kludge activated!\n"); + /*fprintf(stderr, "DEBUG: INN kludge activated!\n"); */ } else { nntp->kludgeinn441dup = FALSE; - //fprintf(stderr, "DEBUG: no INN kludge!\n"); + /*fprintf(stderr, "DEBUG: no INN kludge!\n"); */ } if (strncmp(line, "200", 3) == 0) @@ -205,7 +205,7 @@ buf[n] = '\0'; /* string termination */ if (n == (buflen-1)) return NNTP_ERR_OVERFLOW; - //fprintf(stderr, "DEBUG: nntp_readline <<<%s\n", buf); + /*fprintf(stderr, "DEBUG: nntp_readline <<<%s\n", buf); */ return NNTP_OK; } @@ -217,7 +217,7 @@ return NNTP_ERR_ARG; strncpy(tmp, buf, NNTP_LINE_MAXLEN-3); strcat(tmp, "\r\n"); - //fprintf(stderr, "DEBUG: nntp_writeline >>>%s", tmp); + /*fprintf(stderr, "DEBUG: nntp_writeline >>>%s", tmp); */ if (nntp->io.write(nntp->wfd, tmp, strlen(tmp)) < 0) return NNTP_ERR_SYSTEM; return NNTP_OK; @@ -327,12 +327,12 @@ if (strncmp(line, "340", 3) != 0) return NNTP_ERR_POST; - if ((rc = nntp->io.write(nntp->wfd, msg->cpMsg, strlen(msg->cpMsg))) < 0) //FIXME while() wrapper around write required + if ((rc = nntp->io.write(nntp->wfd, msg->cpMsg, strlen(msg->cpMsg))) < 0) /*FIXME while() wrapper around write required */ return NNTP_ERR_SYSTEM; if ((rc = nntp_readline(nntp, line, sizeof(line))) != NNTP_OK) return rc; - //fprintf(stderr, "DEBUG: answer to post = ***%s***, rc = %s\n", line, nntp_error(rc)); + /*fprintf(stderr, "DEBUG: answer to post = ***%s***, rc = %s\n", line, nntp_error(rc)); */ if (strncmp(line, "240", 3) == 0) return NNTP_OK; @@ -394,18 +394,18 @@ if (strncmp(line, "436", 3) == 0) return NNTP_DEFER; - if ( (strncmp(line, "437", 3) == 0) //FIXME style vs. optimization - redundant lines + if ( (strncmp(line, "437", 3) == 0) /*FIXME style vs. optimization - redundant lines */ || (strncmp(line, "480", 3) == 0) || (strncmp(line, "335", 3) != 0) ) return NNTP_ERR_POST; - if ((rc = nntp->io.write(nntp->wfd, msg->cpMsg, strlen(msg->cpMsg))) < 0) //FIXME while() wrapper around write required + if ((rc = nntp->io.write(nntp->wfd, msg->cpMsg, strlen(msg->cpMsg))) < 0) /*FIXME while() wrapper around write required */ return NNTP_ERR_SYSTEM; if ((rc = nntp_readline(nntp, line, sizeof(line))) != NNTP_OK) return rc; - //fprintf(stderr, "DEBUG: answer to post = ***%s***, rc = %s\n", line, nntp_error(rc)); + /*fprintf(stderr, "DEBUG: answer to post = ***%s***, rc = %s\n", line, nntp_error(rc)); */ if (strncmp(line, "235", 3) == 0) return NNTP_OK;