From owner-freebsd-arch Wed Dec 13 11:17:20 2000 From owner-freebsd-arch@FreeBSD.ORG Wed Dec 13 11:17:16 2000 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from palrel1.hp.com (palrel1.hp.com [156.153.255.242]) by hub.freebsd.org (Postfix) with ESMTP id A8E2937B402 for ; Wed, 13 Dec 2000 11:17:16 -0800 (PST) Received: from adlmail.cup.hp.com (adlmail.cup.hp.com [15.0.100.30]) by palrel1.hp.com (Postfix) with ESMTP id 28E26526; Wed, 13 Dec 2000 11:17:14 -0800 (PST) Received: from cup.hp.com (gauss.cup.hp.com [15.28.97.152]) by adlmail.cup.hp.com (8.9.3 (PHNE_18546)/8.9.3 SMKit7.02) with ESMTP id LAA17062; Wed, 13 Dec 2000 11:17:13 -0800 (PST) Sender: marcel@cup.hp.com Message-ID: <3A37CB39.C2E8AA67@cup.hp.com> Date: Wed, 13 Dec 2000 14:17:13 -0500 From: Marcel Moolenaar Organization: Hewlett-Packard X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Marius Bendiksen Cc: Poul-Henning Kamp , Dag-Erling Smorgrav , Hajimu UMEMOTO , arch@FreeBSD.ORG Subject: Re: %a and %A formats References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Marius Bendiksen wrote: > > vector *v; > v_create(&v, 3 /*initial*/, 0 /*maxgrow*/); > v_append(v, vdesc_ipfw_proto, myproto); > v_append(v, vdesc_ipfw_ip, myfromip); > v_append(v, vdesc_ipfw_ip, mytoip); > say("Deny \1 from \2 to \3", v); > v_destroy(v); Using indexes to refer to the arguments (vectors) has an advantage for i18n. The order of the arguments is related to the language and some translations produce better messages if the order of the arguments isn't fixed. Other than that, I think I prefer a one line printf() over a 7 line say() anytime :-) -- Marcel Moolenaar mail: marcel@cup.hp.com / marcel@FreeBSD.org tel: (408) 447-4222 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message