cc@rayssd.ray.com (Charles R. Coday) (11/21/88)
Hi,
I just received Turbo C 2.0 and when I compiled a program written
under Turbo C 1.5, I discovered an EXE size increase of approx 5k bytes.
Without reproducing the complete program, the general flow of the program
is:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
main() {
z=time(thing);
.
.
srand(num);
x=rand(); /*rand stuff used to randomly select a file*/
.
.
result=fopen(......);
.
setvbuf(.....); /*so the fread is faster*/
.
result=fread(......);
.
.
scan the buffer of data for a code
.
.
loop on "putchar"ing a chunk of the data
.
.
}
I don't use printf or scanf. The TC 1.5 version was approx 11.5k and the
TC 2.0 is approx 17K. Both were compiled with the following options:
tiny model, optimize for size, and the rest were left at default except for
"debug" turned off in TC 2.0 .
Does anyone have an idea what causes this? Can you tell me where/what I've
missed/screwed up? If really necessary, I could post/mail the source.
BTW, the program is a "quote/fortune" thing I wrote. I'm not a C expert, I
just like to fool around with it.
Thanks.
--
Chuck Coday | All of these opinions are MINE and Raytheon
cc@rayssd.RAY.COM | can't have any of them!
(401) 847-8000 x4403 |--------------------------------------------
(401) 792-3985 |usmail: 84 Lake Rd., Narragansett, RI 02882
swarbric@tramp.Colorado.EDU (Frank Swarbrick) (11/22/88)
Re: Turbo C 2.0 executables being larger than TC 1.5 executables. Try turning off the debugging. It adds a lot of stuff to the executable. Frank Swarbrick (and, yes, the net.cat) University Of Colorado, Boulder swarbric@tramp.Colorado.EDU ...!{ncar|nbires}!boulder!tramp!swarbric "Cling to the past and you'll be left behind." --Y & T