X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: attaching source code to the ececutable Date: 6 Feb 2004 12:19:33 GMT Organization: Aachen University of Technology (RWTH) Lines: 84 Message-ID: References: <20040205162505 DOT 24020 DOT qmail AT web41110 DOT mail DOT yahoo DOT com> <20040206015132 DOT 04483 DOT 00001364 AT mb-m10 DOT aol DOT com> NNTP-Posting-Host: ac3b07.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 1076069973 19381 137.226.33.205 (6 Feb 2004 12:19:33 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 6 Feb 2004 12:19:33 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Sterten wrote: > >Sterten wrote: > > > >> I usually attach my source code to the executable (type xxx.c >> xxx.exe) > >> but haven't seen thisdone by others. Why not ? > > > >Because it's a rather pointless exercise. > why ? Because I see no point in doing it. > >Not to mention that the > >majority of serious C programs are built from quite a lot more than a > >single source file, so this technique would fail anyway. > it can't fail, since just using the -E switch is one possibility. What on earth would -E (by which I'll assume you mean gcc -E, i.e. preprocessing the source) have to do with this? I'm not talking about the include files here, I'm talking about programs built from 100000 lines of source code without couting #include's, distributed over some 100 source files, none of which #include each other. > also ,just attaching the main source-file is still better than > attaching nothing. You can't argue, that a thing is useless just > because it can only be verified in parts. Well, let's put it this way: *you* claimed it's useful, but I don't see you quote any actual benefit. From your answer about saving space in the FAT, it's now finally become apparent you don't just attach the source file to the executable, but rather throw away the original source file, too. You never mentioned that before, and it renders this trick even more dangerous. If you want to keep only one file, throw away the executable after usage, but keep the source file. > >And then > >there's programs that use pasting of data after the end of the .exe > >file for storing *other* data (e.g. Allegro inlines .dat files). > I can't see, why this should conflict. That's because your vision is limited to what you know. Others have been further, and seen more. > You can attach the sorce after or before the other data, > both should work, I's prefer the source at the end of the .exe And what makes you think the .exe will not refuse to work in such a case, because it finds it's been tampered with after creation, and doesn't recognize what that manipulation is about? > >There are, more to the point, no advantages. > you really should name them for a discussion which makes sense. You really must be kidding. What, exactly, could there be for me to name, given my statement is that there *are* no advantages in the first place? > You can't say there are *no advantages*, Of course I can. It's called freedom of speech. > since some advantages are so apparant that they can't be > denied. (fewer number of files, source can easily be found) You claim there are advantages --> *you* name them. And now, finally, you did. If you want the source, give it a sensible file name and keep it in the same directory as the executable. If you really have a reason to limit the number of files, throw away the executable after use and keep only the source. If you want a record of your work, use a version control system or a logbook. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.