]> git.mikk.net Git - liburl/commitdiff
Remove debug prints, etc.
authorchris mikkelson <chris@mikk.net>
Wed, 10 Mar 2010 00:23:54 +0000 (18:23 -0600)
committerchris mikkelson <chris@mikk.net>
Wed, 10 Mar 2010 00:23:54 +0000 (18:23 -0600)
multipart.c
re_stream.c

index 84468df1edbdffecf0130271252dcf93dac82300..fb67a4b8b7b89f4ede0786796a50fe7aa2cd4468 100644 (file)
@@ -3,7 +3,6 @@
  * All Rights Reserved, for now.
  */
 
-#include <stdio.h>   /* XXX -- debugging */
 #include <stdlib.h>
 #include <string.h>
 #include <pcre.h>
@@ -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) {
index 5230f8d834bf48a374fd6c846959bec9f73fb6fe..9a76de9f480c87ffef6e5b6198f99d0b1f89cd8e 100644 (file)
@@ -4,7 +4,6 @@
  */
 /* Stream-based regular expression matching implementation */
 
-#include <stdio.h>   /* XXX -- debugging */
 #include <pcre.h>
 #include <strings.h>
 #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;