From owner-freebsd-hackers Sun Nov 16 12:54:10 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA14262 for hackers-outgoing; Sun, 16 Nov 1997 12:54:10 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id MAA14257 for ; Sun, 16 Nov 1997 12:54:03 -0800 (PST) (envelope-from j@uriah.heep.sax.de) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id VAA25463 for hackers@FreeBSD.ORG; Sun, 16 Nov 1997 21:53:56 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.8.8/8.8.5) id VAA16237; Sun, 16 Nov 1997 21:47:41 +0100 (MET) Message-ID: <19971116214740.JL63294@uriah.heep.sax.de> Date: Sun, 16 Nov 1997 21:47:40 +0100 From: j@uriah.heep.sax.de (J Wunsch) To: hackers@FreeBSD.ORG Subject: Re: A stylistic question... References: <199711120858.JAA06510@labinfo.iet.unipi.it> X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199711120858.JAA06510@labinfo.iet.unipi.it>; from Luigi Rizzo on Nov 12, 1997 09:58:14 +0100 Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk As Luigi Rizzo wrote: > I have always wondered about this: most if not all programs, and some > pieces of the kernel as well (e.g. userconfig.c) > have a menu/usage function which is written like this: > > usage() > { > printf( "bla bla bla...\n" ); > printf( "bla bla bla...\n" ); > printf( "bla bla bla...\n" ); > ... > printf( "bla bla bla...\n" ); > } > > instead of what in my opinion would be much better: > > usage() > { > printf( "%s", "bla bla bla...\n" > "bla bla bla...\n" > ... > "bla bla bla...\n"); > } The first piece has probably been written by people who still adhere to the Old Testament. I use split (ANSI) strings all over the place, and don't care anymore for non-ANSI compilers. If you ask *me*, go ahead and remove all the __P() garbage in the code... (Well, i actually know exactly one non-ANSI compiler i'm rather fond of to know: bcc. "Bruce's C compiler", it's in the ports, and seems to be the only way to generate 16-bit x86 code on FreeBSD.) -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)