Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!fernwood!vixie!avsd!childers From: childers@avsd.UUCP (Richard Childers) Newsgroups: comp.lang.c Subject: Re: How Does 'C' Store Strings ? Message-ID: <2157@avsd.UUCP> Date: 13 Oct 89 23:45:13 GMT References: <2141@avsd.UUCP> Reply-To: childers@avsd.UUCP (Richard Childers) Organization: Metaprogrammers International Lines: 39 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 *