Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site wateng.UUCP Path: utzoo!watmath!wateng!padpowell From: padpowell@wateng.UUCP (PAD Powell) Newsgroups: net.lang.c Subject: Re: read-only strings? and also VOLATILE Message-ID: <1567@wateng.UUCP> Date: Sat, 20-Oct-84 11:17:50 EDT Article-I.D.: wateng.1567 Posted: Sat Oct 20 11:17:50 1984 Date-Received: Sun, 21-Oct-84 14:40:15 EDT References: <4488@utzoo.UUCP> Organization: U of Waterloo, Ontario Lines: 18 I like the VOLATILE concept, coupled with the following caveats: 1. No access optimizations must be done for objects fetched/stored using a volitile object. 2. Note that the above will "break" bit fields (Hurrah!) but allow us poor hardware types some idea of how to write code. I might add that newer interfaces do not suffer from the "byte/word" access problems, as us designers have learned (Well, some of us, anyways) about this problem. Read only strings? Sounds like a GOOD idea. In rebuttal to some people with "writable strings passed to routines", I suggest the following char *temp[] = "temp_fileXXXXXX"; ... if( mktemp(temp) < 0 ) FATALMSG( "your string was too short" ); Patrick ("snprintf? sprintf with bounds checking? PLLEEEASE??") Powell