[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] uudecode doesn't work on files with DOS line endings
From: |
Pavel Roskin |
Subject: |
Re: [PATCH] uudecode doesn't work on files with DOS line endings |
Date: |
Sun, 30 Apr 2006 15:12:55 -0400 |
On Sun, 2006-04-30 at 09:02 -0600, Bob Proulx wrote:
> Pavel Roskin wrote:
> > With this patch, uuencoded files with DOS newlines are decoded
> > correctly.
> > if (fgets (buf, sizeof(buf), stdin) == NULL
> > - || strcmp (buf, "end\n"))
> > + || strncmp (buf, "end", 3))
> > {
>
> That seems too permissive to me. How about this?
>
> if (fgets (buf, sizeof(buf), stdin) == NULL
> || strcmp (buf, "end\n")
> || strcmp (buf, "end\r\n"))
> {
Fine with me. Ideally, Mac newlines (CR only) should be supported too,
but it would take more than just fixing processing of the "end"
directive.
--
Regards,
Pavel Roskin
Re: [PATCH] uudecode doesn't work on files with DOS line endings, Bob Proulx, 2006/04/30