Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!seismo!mcvax!cernvax!cui!Fisch From: Fisch@cui.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: ARC 5.20 UUENCODE Message-ID: <42@cui.UUCP> Date: Sat, 18-Apr-87 15:53:49 EST Article-I.D.: cui.42 Posted: Sat Apr 18 15:53:49 1987 Date-Received: Sun, 19-Apr-87 11:58:27 EST References: <434@csm9a.UUCP> <206900013@mirror> Reply-To: Fisch@cui.UUCP (FISCHER Florian) Organization: University of Geneva/Switzerland Lines: 51 Summary: How to repair it In article <206900013@mirror> jvc@mirror.UUCP writes: >Uudecode reports "short file" and the resulting arc520.com does not >unarc itself. >I used UNIX uudecode on a pyramid 90x. The reason is that some mailer, somewhere, removed all of the trailing space. Uudecode don't like it (at least here). So, I wrote a little program to put it back. I have tried the resulting arc520.com, and it seems to work. uucp: mcvax!cernvax!cui!Fisch / Fisch@cui.uucp X400/ean: Fisch@cui.unige.chunet bitnet/earn: Fisch%cui.unige.chunet@cernvax __________________________________ CUT HERE __________________________________ /* Try to repair uuencoded files when trailing space has been removed. It pads short lines with spaces whenever needed. It reads from stdin and writes to stdout. use: pgm repaired uudecode repaired or: pgm main() { char c; int tab, len; tab = 0; while ((c = getchar()) != EOF) { if (tab == 0) { if (' '<=c && c<='Z') len = ((c-' '+2)/3)*4+1; else len = 1; } if (c == '\n') { while (tab++