delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/02/06/02:16:16

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Lines: 58
X-Admin: news AT aol DOT com
From: sterten AT aol DOT com (Sterten)
Newsgroups: comp.os.msdos.djgpp
Date: 06 Feb 2004 06:51:32 GMT
References: <20040205162505 DOT 24020 DOT qmail AT web41110 DOT mail DOT yahoo DOT com>
Organization: AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com
Subject: Re: attaching source code to the ececutable
Message-ID: <20040206015132.04483.00001364@mb-m10.aol.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

 >Are you trying to save space in your FAT?

that's one of the advantages, not the most important one IMO.
It makes searching for files easier and faster.

-------------------

 >Sterten <sterten AT aol DOT com> 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 ?

 >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.
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.

 >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.
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

 >> Are there disadvantages ?
 >
 >There are, more to the point, no advantages.

you really should name them for a discussion which makes sense.
You can't say there are *no advantages* , since some advantages
are so apparant that they can't be denied. (fewer number of files,
source can easily be found)

 >> Shouldn't it be supported by the compiler and maybe even be the default ?
 >
 >Definitely not.

just your opinion, no arguing.


I should also mention, that I usually have a simple routine and a commandline
switch which prints the attached sourcecode of these .exes.
It's also easy to change an existing editor and compiler to
edit and re-compile such .exes
In case of recompiling, a new version-number-suffix should be created.



Guenter Stertenbrink

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019