Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!lll-tis!ptsfa!ihnp4!ttrdc!levy From: levy@ttrdc.UUCP (Daniel R. Levy) Newsgroups: comp.lang.c Subject: Re: Question on ANSI C compatibility Message-ID: <1954@ttrdc.UUCP> Date: Tue, 10-Nov-87 13:35:28 EST Article-I.D.: ttrdc.1954 Posted: Tue Nov 10 13:35:28 1987 Date-Received: Fri, 13-Nov-87 21:52:49 EST References: <10224@brl-adm.ARPA> Organization: AT&T, Skokie, IL Lines: 26 In article <10224@brl-adm.ARPA>, RMANGALD%CLARKU.BITNET@wiscvm.wisc.EDU writes: > It's a real pain to prefix all the > "printf()"'s, "gets()"'s, etc. with "(void)", so could someone tell me... > whether it is good programming style? > Rahul Mangaldas. When you want to do this, "#define" statements can help you, e.g.: #define Printf (void) printf #define Puts (void) puts etc. Then all you have to do is make a global change on the rest of your source file with an editor. You probably want to do this with some care, that is, don't change fprintf to fPrintf, etc. Use smart pattern matching, e.g., .,$s/\([ ({]\)printf\([( ]\)/\1Printf\2/g (where is a real tab) in ed or vi. -- |------------Dan Levy------------| Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa, | an Engihacker @ | vax135}!ttrdc!ttrda!levy | AT&T Computer Systems Division | Disclaimer? Huh? What disclaimer??? |--------Skokie, Illinois--------|