Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!shelby!neon!flamingo.Stanford.EDU!espie From: espie@flamingo.Stanford.EDU (Marc Espie) Newsgroups: comp.lang.c Subject: Re: mailing binary files Message-ID: <1991Feb20.224539.23290@Neon.Stanford.EDU> Date: 20 Feb 91 22:45:39 GMT References: <1025@tfsg.UUCP> <16968@crdgw1.crd.ge.com> Sender: news@Neon.Stanford.EDU (USENET News System) Organization: LIENS, ENS, 45 rue d'Ulm, Paris (France) Lines: 35 In article <16968@crdgw1.crd.ge.com> volpe@camelback.crd.ge.com (Christopher R Volpe) writes: >In article <1025@tfsg.UUCP>, mark@tfsg.UUCP (Mark Crafts) writes: >|>Quick question: >|> >|>What's the best way to send binary files through E-mail (you know, with >|>a "---cut here---" line) so that when "cut there", it can be saved to >|>a file and executed (or unpacked then executed or whatever). > >Well, C doesn't have any built-in "mail binary file" operator, so we'll >have to fudge it. [much deleted] >I would have, but seeing how this is just so applicable to comp.lang.c, I >thought I'd post it. >================== >Chris Volpe >G.E. Corporate R&D >volpecr@crd.ge.com So what's wrong with uuencode/uudecode ? I don't know of any reasonable machine which doesn't support it (AMIGA/UNIX/PC/MAC). It does precisely what you want in a standard and reasonably efficient way... you may even build a better interface on top of it (like a filter which scans uuencoded message, pass them through, creating decoded files automatically. I have such a filter on a permanent basis in my terminal emulator setting... which does only support 7bits ascii.) (I know this does not precisely belong in comp.lang.c, except that folks were starting to spout code redesigning the wheel.) You can program what you want, but you will gain some time if you use the uuencoded files standard. Better still ! There's a good chance you can *use* code written by other people :-). -- Marc (espie@flamingo.stanford.edu) So many FORTRAN programmers, so little time...