How Does 'C' Store Strings ?
Richard Childers
childers at avsd.UUCP
Sat Oct 14 09:45:13 AEST 1989
I recently said ...
>I've tried explicitly defining char arrays, IE
>
> #define vers[CMDBUFSIZ] = "v1.00 891010 richard childers" ;
I actually meant to say ...
char vers[CMDBUFSIZ] = "v1.00 891010 richard childers" ;
... which changes the problem somewhat.
A wide variety of people have replied, and, much to my surprise, nobody
felt it necessary to call me 'hosehead' or tell me to go to a different
newsgroup, such as alt.msdos.programmer, for which I am thankful.
The best help I've gotten to date suggested that I use 'static' storage
classes for SCCS-type buried ID strings, and another individual at UC
Santa Cruz suggested I try opening the file using "binary" mode, which
doesn't seem to be documented in my version of MSC.
One possibility that's occurred to me is that, in a PC environment, the
designers of the compiler might have decided that string compression was
a win, much as ( according to many contributors ) Lattice' compiler tries
to identify and eliminate redundant strings from the resulting image,
given the significant decrease in space available in an MS-DOS environ-
-ment.
I've been informed that if this is true, it would be useful information to
know, and I'll keep everyone posted on what I find out ...
-- richard
--
* A CITIZEN: "Who might you be ? Samson ? --" *
* CYRANO: "Precisely. Would you kindly lend me your jawbone ?" *
* from _Cyrano de Bergerac_, by Edmond Rostand *
* ..{amdahl|decwrl|octopus|pyramid|ucbvax}!avsd.UUCP!childers *
More information about the Comp.lang.c
mailing list