Mail Archives: djgpp/1997/01/07/00:02:44
Matthew Kennedy wrote:
>
> If I start of with a program such as this:
> void main(void)
> {
> int i;
> for (i=0; i<5; i++); /* do-nothing */
> }
> ...
> and compile it like this:
> gcc test.c -o without...
> Then I add one function (to reposition cursor), like this:...
> #include <conio.h>
> void main(void)
> {
> int i;
> for (i=0; i<5; i++); /* do-nothing */
> gotoxy(1,1);
> }
> ...
> gcc test.c -o with
> Now, it I compare the file sizes of with.exe and without.exe,
> 1-04-97 22:46 100,205 with.exe
> 1-04-97 22:47 61,446 without.exe
Hmmm ....a wild guess is that DJGPP makes the function inline and then
unrulls the loop, (make five copies of gotoxy()) but does it make the
executable 40Kb larger???
I assume that DJGPP's version of gotoxy() is a very complex function
(????) but it should NOT be inline if it's so big!
Try this:
1 Disassemble your code (both version) and send them up to this
newsgroup.
2. Take a good look at the gotoxy() function, source is available on the
net.
3. Strip the symbols, run strip (or whatever it's called),
i think you can do this from compilers command-line too.
BTW, the whole conio will not be linked to your exe-file.
-- Arash
_____ |\/\/\/|
/ \ _____________ | | _______________
\/\/ | | diz sux... \ | | | way too much |
| (c)(c) | ..he he cool| | (o)(o) | MTV dad! |
C .---_) | __________/ S _) \ ____________|
| |.___| / / | ,___| __/ /
| \__/ <__/ | / <____/
- Raw text -