From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NIWPP-00044J-Dp for mharc-grub-devel@gnu.org; Wed, 09 Dec 2009 18:57:27 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NIWPN-00043g-Rh for grub-devel@gnu.org; Wed, 09 Dec 2009 18:57:25 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NIWPJ-00041q-Py for grub-devel@gnu.org; Wed, 09 Dec 2009 18:57:25 -0500 Received: from [199.232.76.173] (port=39213 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIWPJ-00041m-Ju for grub-devel@gnu.org; Wed, 09 Dec 2009 18:57:21 -0500 Received: from 197.red-80-32-81.staticip.rima-tde.net ([80.32.81.197]:46176 helo=mail.pina.cat) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NIWPI-0006IT-QJ for grub-devel@gnu.org; Wed, 09 Dec 2009 18:57:21 -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 0F6E9288F30C3 for ; Thu, 10 Dec 2009 00:57:15 +0100 (CET) Received: by pinux (Postfix, from userid 1000) id 9528910210; Wed, 9 Dec 2009 23:57:27 +0000 (GMT) Date: Wed, 9 Dec 2009 23:57:27 +0000 From: Carles Pina i Estany To: The development of GNU GRUB Message-ID: <20091209235727.GA18509@pina.cat> References: <20091207140923.GA6439@riva.ucam.org> <4B1D7C04.1000503@gmail.com> <20091207231203.GK6439@riva.ucam.org> <20091207233836.GA10791@riva.ucam.org> <4B1D96E0.1020004@gmail.com> <20091208001033.GQ6439@riva.ucam.org> <4B1D9AA2.6060505@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="YZ5djTAD1cGYuMQK" Content-Disposition: inline In-Reply-To: <4B1D9AA2.6060505@gmail.com> 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: Re: Build failures on Ubuntu due to gettext 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: Wed, 09 Dec 2009 23:57:26 -0000 --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Vladimir, Colin, On Dec/08/2009, Vladimir '??-coder/phcoder' Serbinenko wrote: > > My patch made the following transformation: > > > > - grub_printf (_("literal string")); > > + grub_printf ("%s", _("literal string")); > > > > This was only necessary in five places, so I doubt that a function is > > worth it. > > > Then it's not worth it. But again we haven't gettext'ized whole grub2 > yet to know for sure. Perhaps a macro so we can change it later if > necessary? Vladimir, Colin: see the attached patch with the Colin changes but macrofied. Should compile fine in Ubuntu, but I have not tried. Are we happy with grub_put_ function name? Colin: could you apply this patch or similar? I don't want to push more gettext strings before setting up the basic infrastructure to avoid working twice. Thanks, -- Carles Pina i Estany http://pinux.info --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="grub_put_.patch" === modified file 'include/grub/misc.h' --- include/grub/misc.h 2009-12-08 00:08:52 +0000 +++ include/grub/misc.h 2009-12-09 23:51:07 +0000 @@ -34,6 +34,8 @@ /* XXX: If grub_memmove is too slow, we must implement grub_memcpy. */ #define grub_memcpy(d,s,n) grub_memmove ((d), (s), (n)) +#define grub_put_(str) grub_printf("%s", (str)) + void *EXPORT_FUNC(grub_memmove) (void *dest, const void *src, grub_size_t n); char *EXPORT_FUNC(grub_strcpy) (char *dest, const char *src); char *EXPORT_FUNC(grub_strncpy) (char *dest, const char *src, int c); === modified file 'normal/menu_entry.c' --- normal/menu_entry.c 2009-12-08 00:08:52 +0000 +++ normal/menu_entry.c 2009-12-09 23:46:36 +0000 @@ -1000,7 +1000,7 @@ run (struct screen *screen) grub_cls (); grub_printf (" "); - grub_printf_ (N_("Booting a command list")); + grub_put_ (N_("Booting a command list")); grub_printf ("\n\n"); @@ -1182,6 +1182,6 @@ grub_menu_entry_run (grub_menu_entry_t e grub_print_error (); grub_errno = GRUB_ERR_NONE; grub_putchar ('\n'); - grub_printf_ (N_("Press any key to continue...")); + grub_put_ (N_("Press any key to continue...")); (void) grub_getkey (); } === modified file 'normal/menu_text.c' --- normal/menu_text.c 2009-12-08 00:08:52 +0000 +++ normal/menu_text.c 2009-12-09 23:47:04 +0000 @@ -40,7 +40,7 @@ void grub_wait_after_message (void) { grub_putchar ('\n'); - grub_printf_ (N_("Press any key to continue...")); + grub_put_ (N_("Press any key to continue...")); (void) grub_getkey (); grub_putchar ('\n'); } @@ -206,7 +206,7 @@ entry is highlighted."); if (nested) { grub_printf ("\n "); - grub_printf_ (N_("ESC to return previous menu.")); + grub_put_ (N_("ESC to return previous menu.")); } } } @@ -655,7 +655,7 @@ notify_execution_failure (void *userdata grub_errno = GRUB_ERR_NONE; } grub_printf ("\n "); - grub_printf_ (N_("Failed to boot default entries.\n")); + grub_put_ (N_("Failed to boot default entries.\n")); grub_wait_after_message (); } --YZ5djTAD1cGYuMQK--