Path: utzoo!attcan!uunet!oddjob!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.std.c Subject: Re: my two cents Keywords: string constant Message-ID: <12892@mimsy.UUCP> Date: 8 Aug 88 04:15:39 GMT References: <5812@batcomputer.tn.cornell.edu> Distribution: comp Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 22 In article <5812@batcomputer.tn.cornell.edu> davidra@batcomputer.tn.cornell.edu (David A. Rabson) writes: >... second edition of K&R ... "[string constants] are no longer >modifiable, and so may be placed in read-only memory." >This will cause mktemp() and many, many other things to break. On the contrary, in practise it causes very little to break. Mktemp() is in fact the only place I have seen code crash. Callers will have to write static char foo[] = "/tmp/abcXXXXXX"; name = mktemp(foo); rather than simply name = mktemp("/tmp/abcXXXXXX"); This is inconvenient, but not, I think, too drastic. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris