Subject: RE: uudecode?
From: [email-masked] (Bernard Dautrevaux)

21 Jan 1999 01:58:42 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
To: "'John Cooper'" <[email-masked]>,
        Bernard Dautrevaux
	 <[email-masked]>
Cc: [email-masked], [email-masked]

> -----Message d'origine-----
> De:	John Cooper [SMTP:[email-masked]]
> Date:	mardi 19 janvier 1999 15:40
> À:	Bernard Dautrevaux
> Cc:	'John Cooper'; [email-masked]; [email-masked]
> Objet:	Re: uudecode?
> 
> Bernard Dautrevaux <[email-masked]> writes:
> 
>  > I'm not sure, but I'll bet that you have to sligthly change the
> uudecode
>  > source code to ensure that the open of the output file is done in
> binary
>  > mode : open(... O_BINARY) or fopen(..., "wb")). Your problem is
> most surely
>  > this infamous text!=binary feature :-( of Losedows...
> 
> It already does this - is there a known problem with `fopen'?  Do I
> need to use
> `open' instead?
> 
> 4 lines matching "open" in buffer uudecode.c.
>     9:    FILE *out, *in = fopen(fname, "rb");
>    11:        fprintf(stderr,"Impossible to open %s\n",fname);
>    33:    out = fopen(outname, "wb");
>    35:        fprintf(stderr,"Impossible to open %s\n",outname);
> 
> 1 line matching "open" in buffer uuencode.c.
>    10:    if ((in = fopen(nom, "rb")) == NULL)
> 
> 
Oh yes but all opens are done in binary mode.. What I imply is that
opens of binary files (input for uuencode and output for uudecode) must
use binary mode; however opens of text files (output of uuencode and
input of uudecode) should be in text mode, and anyway most surely the
output of uuencode is in text mode, as this is simply stdout, that all C
run-times assume (unless special settings in the environment or your
program) that stdin, stdout and stderr should be opened in text mode...

What properly happens is that at some point uudecode, which read text in
binary mode, get a raw ^M at end of line, and then either go wild or
just stop...

------------------------------------------------------------------------
------
Bernard Dautrevaux
Microprocess Ingéniérie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:	+33 (0) 1 47 68 80 80
Fax:	+33 (0) 1 47 88 97 85
e-mail:	[email-masked]
		[email-masked]
------------------------------------------------------------------------
------

>  
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".