Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NELFi-0000SV-UE for mharc-grub-devel@gnu.org; Sat, 28 Nov 2009 06:14:11 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NELFg-0000QY-Aq for grub-devel@gnu.org; Sat, 28 Nov 2009 06:14:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NELFb-0000MN-A3 for grub-devel@gnu.org; Sat, 28 Nov 2009 06:14:07 -0500 Received: from [199.232.76.173] (port=51875 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NELFa-0000M1-Va for grub-devel@gnu.org; Sat, 28 Nov 2009 06:14:03 -0500 Received: from 197.red-80-32-81.staticip.rima-tde.net ([80.32.81.197]:55397 helo=mail.pina.cat) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NELFa-0005mR-D6 for grub-devel@gnu.org; Sat, 28 Nov 2009 06:14:02 -0500 Received: from pinux (82-45-164-87.cable.ubr06.hari.blueyonder.co.uk [82.45.164.87]) by mail.pina.cat (Postfix) with ESMTP id 3F30D28904CA1 for ; Sat, 28 Nov 2009 12:14:01 +0100 (CET) Received: by pinux (Postfix, from userid 1000) id 5297D105A9; Sat, 28 Nov 2009 11:14:09 +0000 (GMT) Date: Sat, 28 Nov 2009 11:14:09 +0000 From: Carles Pina i Estany To: grub-devel@gnu.org Message-ID: <20091128111409.GA17183@pina.cat> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="CE+1k2dSO48ffgeK" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: new function: grub_printfnl X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2009 11:14:08 -0000 --CE+1k2dSO48ffgeK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, Gettextizzing files I have a very common situation: grub_printf ("Bla bla bla\n"); That I have to change to: grub_printf (_("Bla bla bla")); grub_putchar ('\n'); Any problem to apply the attached patch with the export where needed (I haven't compiled, just written the idea). So I could change: grub_printf ("Bla bla bla\n"); by: grub_printfnl (_("Bla bla bla")); (nl for new line) Other question: doing this "trivial" change and adding some more _("") in file means that I have to change the copyright date? Thanks, -- Carles Pina i Estany http://pinux.info --CE+1k2dSO48ffgeK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="grub_printfnl.patch" === modified file 'kern/misc.c' --- kern/misc.c 2009-11-24 21:42:14 +0000 +++ kern/misc.c 2009-11-28 11:10:48 +0000 @@ -126,6 +126,21 @@ grub_printf (const char *fmt, ...) return ret; } +int grub_printfnl (const char *fmt, ...) +{ + va_list ap; + int ret; + + va_start (ap, fmt); + ret = grub_vprintf (fmt, ap); + va_end (ap); + + grub_putchar ('\n'); + ret++; + + return ret; +} + #if defined (APPLE_CC) && ! defined (GRUB_UTIL) int grub_err_printf (const char *fmt, ...) --CE+1k2dSO48ffgeK--