Re: uudecode for Red Hat 9.0?
From: P.T. Breuer (ptb_at_oboe.it.uc3m.es)
Date: 12/31/03
- Next message: Vassilis Pandis: "Upgrading kernel under Suse Linux"
- Previous message: Four Blades: "increasing backscroll buffer in console"
- In reply to: Timo: "Re: uudecode for Red Hat 9.0?"
- Next in thread: Timo: "Re: uudecode for Red Hat 9.0?"
- Reply: Timo: "Re: uudecode for Red Hat 9.0?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 31 Dec 2003 11:30:28 GMT
In comp.os.linux.misc Timo <t_i_m_0_news@yahoo.com> wrote:
> On Wed, 31 Dec 2003 11:10:49 +0200, Timo wrote:
> > Back to my original question, where can I find uudecode for red hat 9.0?
> > I did some googling but couldn't find that (maybe I am just poor at using
> > google? ;))
> I found some uudecode.c files by doing FTP search:
> http://www.alltheweb.com/search?ftype=4&cs=utf-8&cat=ftp&q=uudecode.c&avkw=fogg&o=0
> Unfortunately, all of them seem to be Net/FreeBSD sources, and they don't
> compile on Red Hat Linux. Any help here?
Then they're unix, and they should compile fine ...
betty:/usr/oboe/ptb% gcc uudecode.c
uudecode.c:46: parse error before string constant
uudecode.c:46: warning: data definition has no type or storage class
uudecode.c: In function `decode2':
uudecode.c:216: warning: assignment makes pointer from integer
without a cast
Oh - that's a silly identifier.
__FBSDID("$FreeBSD: src/usr.bin/uudecode/uudecode.c,v 1.49 2003/05/03 19:44:46 obrien Exp $");
Comment it out.
% gcc uudecode.c
uudecode.c: In function `decode2':
uudecode.c:216: warning: assignment makes pointer from integer without a cast
/tmp/ccXtLHVa.o: In function `decode2':
/tmp/ccXtLHVa.o(.text+0x458): undefined reference to `setmode'
/tmp/ccXtLHVa.o(.text+0x492): undefined reference to `getmode'
/tmp/ccXtLHVa.o(.text+0x683): undefined reference to `warnc'
/tmp/ccXtLHVa.o(.text+0x72a): undefined reference to `warnc'
/tmp/ccXtLHVa.o(.text+0x764): undefined reference to `warnc'
/tmp/ccXtLHVa.o: In function `base64_decode':
/tmp/ccXtLHVa.o(.text+0xeb7): undefined reference to `__b64_pton'
collect2: ld returned 1 exit status
Nothing much. It expects to be linked against some library. A quick
grep through my library symbols in /usr/lib comes up with
betty:/usr/oboe/ptb% strings --print-file-name /usr/lib/*.a | grep setmode
/usr/lib/libvga.a: vga_setmode
/usr/lib/libvga.a: vga_setmodeX
/usr/lib/libvga.a: vga_setmode
/usr/lib/libvga.a: vga_setmodeX
/usr/lib/libvga.a: vga_setmode
/usr/lib/libvga.a: setmode
/usr/lib/libvga.a: et4000_setmode
...
so let's try -lvga, though this seems silly! The code expects setmode
to return a void * which itthen uses as a handle in all subsequent ops.
I would suspect it's a file manipulation library. It's called as
handle = setmode(p)
where p is a buffer ... containing the "mode" in a uuencoded file.
Heck, why should we care. Let's just ignore the mode. Comment it all
out. Set mode to 0644 like always.
betty:/usr/oboe/ptb% gcc uudecode.c
/tmp/cclqqFpS.o: In function `decode2':
/tmp/cclqqFpS.o(.text+0x623): undefined reference to `warnc'
/tmp/cclqqFpS.o(.text+0x6ca): undefined reference to `warnc'
/tmp/cclqqFpS.o(.text+0x704): undefined reference to `warnc'
/tmp/cclqqFpS.o: In function `base64_decode':
/tmp/cclqqFpS.o(.text+0xe57): undefined reference to `__b64_pton'
collect2: ld returned 1 exit status
Oh, that's a warning message. Try something like
#define warnc(a, b, c...) { errno = a; warn(b " (%p)", c); }
betty:/usr/oboe/ptb% gcc uudecode.c
/tmp/ccWDzwvk.o: In function `base64_decode':
/tmp/ccWDzwvk.o(.text+0xe57): undefined reference to `__b64_pton'
collect2: ld returned 1 exit status
Hmm ...
n = b64_pton(inbuf, outbuf, sizeof(outbuf));
if (n < 0) break;
Oh - the bad news is that this code desn't conatin the actual routine
that does the translation of 4 words of 6-bit ascii input to 3 bytes
of binary output! Look for more source elsewhere on the site.
But why are you doing all this? uudecode and uudecode is a perfectly
normal part of linux!
sharutils: /usr/bin/uudecode
sharutils: /usr/man/man1/uudecode.1.gz
Peter
> Timo
>
-- --------------------------------------------------------------------- Peter T. Breuer MA CASM PhD. Ing., Prof. Ramon & Cajal Area de Ingenieria Telematica E-mail: ptb@it.uc3m.es Dpto. Ingenieria Tel: +34 91 624 91 80 Universidad Carlos III de Madrid Fax: +34 91 624 94 30/65 Butarque 15, E-28911 Leganes URL: http://www.it.uc3m.es/~ptb Spain
- Next message: Vassilis Pandis: "Upgrading kernel under Suse Linux"
- Previous message: Four Blades: "increasing backscroll buffer in console"
- In reply to: Timo: "Re: uudecode for Red Hat 9.0?"
- Next in thread: Timo: "Re: uudecode for Red Hat 9.0?"
- Reply: Timo: "Re: uudecode for Red Hat 9.0?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|