Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!dciem!nrcaer!cognos!geovision!alastair From: alastair@geovision.UUCP (Alastair Mayer) Newsgroups: comp.lang.c Subject: Re: pre#defined cpp symbols Message-ID: <125@geovision.UUCP> Date: Tue, 4-Aug-87 10:10:34 EDT Article-I.D.: geovisio.125 Posted: Tue Aug 4 10:10:34 1987 Date-Received: Sat, 8-Aug-87 07:21:30 EDT References: <1836@zaphod.UUCP> <165600004@uiucdcsb> <657@hsi.UUCP> Reply-To: alastair@geovision.UUCP (Alastair Mayer) Organization: Geovision Corporation, Ottawa, Canada Lines: 29 Summary: 'strings' won't find short strings In article <657@hsi.UUCP> stevens@hsi.UUCP (Richard Stevens) writes: >> >> A useful way of finding out what is defined (if you're on a Unix >> system) is to run `strings /lib/cpp`. Usually they are all grouped >> together. >> > >I've tried using strings to find these and it doesn't always seem to >work. For example, 'strings /lib/cpp | grep vax' on a 4.3 system >won't show 'vax' as being predefined, but it is. Looking at the source >for cpp shows that both "vax" and "unix" are put into the symbol table >the same way. > >Also, I was just trying to find all the predefined symbols under SCO Xenix >using strings and none of the 'M_I86xM' symbols show up, yet they are defined. > >Anyone know why ?? I don't know why strings wouldn't find 'M_I86xM' symbols, but it won't find "vax" or any other short identifier because the algorithm strings uses is to search for sequences of *four* or more printable characters. You could change strings (or write your own) to look for fewer characters, but the tradeoff is the signal to noise ratio, getting garbage sequences of bytes that just happen to look like characters. -- Alastair JW Mayer BIX: al UUCP: ...!utzoo!dciem!nrcaer!cognos!geovision!alastair (Why do they call it a signature file if I can't actually *sign* anything?)