From 3e6162e477834d36246088da24ef4a83af13778f Mon Sep 17 00:00:00 2001 From: leitner Date: Wed, 23 Oct 2002 15:10:57 +0000 Subject: [PATCH] less verbose reconstruction reporting --- test/uudecode.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/test/uudecode.c b/test/uudecode.c index a9c7b31..e41585a 100644 --- a/test/uudecode.c +++ b/test/uudecode.c @@ -90,7 +90,7 @@ int main(int argc,char* argv[]) { enum { BEFOREBEGIN, AFTERBEGIN, SKIPHEADER } state=BEFOREBEGIN; enum { UUDECODE, YENC } mode=UUDECODE; unsigned long fmode=0,lineno=0; - unsigned long offset,endoffset,totalsize,linelen,part; /* used only for yenc */ + unsigned long offset,endoffset,totalsize,linelen,part,reconstructed; /* used only for yenc */ static stralloc yencpart; unsigned int crc; @@ -194,6 +194,7 @@ invalidybegin: l=filename-line+6; if (!(filename=strstr(line," part="))) goto invalidybegin; if (filename[6+scan_ulong(filename+6,&part)] != ' ') goto invalidybegin; + if (part==1) reconstructed=0; if (!(filename=strstr(line," size="))) goto invalidybegin; if (filename[6+scan_ulong(filename+6,&totalsize)] != ' ') goto invalidybegin; if (!(filename=strstr(line," line="))) goto invalidybegin; @@ -242,9 +243,6 @@ invalidpart: /* ok, save block */ buffer_put(&fileout,out.s,out.len); } else { - buffer_puts(buffer_2,"warning: part "); - buffer_putulong(buffer_2,part); - buffer_puts(buffer_2," corrupt; attempting reconstruction... "); out.len=0; for (i=0; i=0) {