uudecode?

Bernard Dautrevaux DAUTREVAUX@microprocess.com
Sun Jan 31 23:52:00 GMT 1999


> -----Message d'origine-----
> De:	John Cooper [SMTP:John.Cooper@citrix.com]
> Date:	mardi 19 janvier 1999 15:40
> À:	Bernard Dautrevaux
> Cc:	'John Cooper'; mh@mike.franken.de; gnu-win32@cygnus.com
> Objet:	Re: uudecode?
> 
> Bernard Dautrevaux <DAUTREVAUX@microprocess.com> 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:	dautrevaux@microprocess.com
		b.dautrevaux@usa.net
------------------------------------------------------------------------
------


>  
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list