From: chris mikkelson Date: Wed, 10 Mar 2010 00:23:54 +0000 (-0600) Subject: Remove debug prints, etc. X-Git-Url: https://git.mikk.net/?a=commitdiff_plain;h=ec80e251aa6c88c14cf297f144f1d3cbaafc62c7;p=liburl Remove debug prints, etc. --- diff --git a/multipart.c b/multipart.c index 84468df..fb67a4b 100644 --- a/multipart.c +++ b/multipart.c @@ -3,7 +3,6 @@ * All Rights Reserved, for now. */ -#include /* XXX -- debugging */ #include #include #include @@ -81,8 +80,6 @@ setboundary(msgproc *m, int type, void *data, size_t size) mps->endre = pcre_compile(boundpat, PCRE_MULTILINE, &etxt, &epos, 0); if (!mps->endre) goto fail; - /* fprintf(stderr, "multipart_init: boundpat = %s\n", boundpat); */ - free(boundpat); /* no longer needed */ boundpat = 0; @@ -121,35 +118,14 @@ multipart_process(msgproc *m, char *buf, size_t len) msgproc *next; char *pmatch = 0; - /* fprintf(stderr, "multipart_process: %d chars\n", len); */ - while (l > 0 && mps->state != STATE_END) { - /* re_stream_exec needs to be tweaked: - - set state to nomatch and process to - end of match if partial - match is not at end of input. - - set state to nomatch and process to - beginning of match if previous state - was partial match and new match begins - after beginning of input - */ if (re_stream_result(mps->boundre) == -1) pmatch = strdup(re_stream_getresult(mps->boundre)); - /* fprintf(stderr, "multipart_process: s=%p, l=%d, state = %d\n", - s, l, mps->state); - fwrite(s, p, 1, stderr); - fprintf(stderr,"\n"); - if (pmatch) - fprintf(stderr, "multipart_process pmatch = '%s'\n", - pmatch); */ p = re_stream_exec(mps->boundre, s, l); if (p < 0) break; match = re_stream_result(mps->boundre); - /* fprintf(stderr, "multipart_process: p = %d, result = %d\n", - p, re_stream_result(mps->boundre)); */ - switch(mps->state) { case STATE_PREAMBLE: if (match == 1) { diff --git a/re_stream.c b/re_stream.c index 5230f8d..9a76de9 100644 --- a/re_stream.c +++ b/re_stream.c @@ -4,7 +4,6 @@ */ /* Stream-based regular expression matching implementation */ -#include /* XXX -- debugging */ #include #include #include "re_stream.h" @@ -77,9 +76,6 @@ re_stream_exec(struct stream_re *sre, char *sub, int slen) sre->ovec, sizeof(sre->ovec), sre->wspace, sizeof(sre->wspace)); - /* fprintf(stderr, "in (%d) = %s\n", slen, sub); - fprintf(stderr, "pcre_dfa_exec: match = %d\n", match); */ - if (match < 0 && match != PCRE_ERROR_PARTIAL) { sre->result[0] = sre->rlen = 0; sre->state = 0;