From 5c520db0ebf08a49f4b1fed7773da551a3cf9dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnim=20L=C3=A4uger?= Date: Mon, 9 Jun 2008 20:00:38 +0000 Subject: [PATCH] avoid '\r' in i18n strings (Hartley Sweeten) git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1276 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/ChangeLog | 6 ++++++ jtag/po/fr.po | 6 +++--- jtag/po/rw.po | 6 +++--- jtag/po/sk.po | 6 +++--- jtag/src/flash/flash.c | 19 +++++++++++++------ jtag/src/svf/svf_flex.l | 6 ++++-- 6 files changed, 32 insertions(+), 17 deletions(-) diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 2b7e151f..72833d98 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,9 @@ +2008-06-09 Arnim Laeuger + + * src/svf/svf_flex.l, src/flash/flash.c (flashmem): + avoid '\r' in i18n strings (Hartley Sweeten) + * po/fr.po, po/rw.po, po/sk.po: remove '\r' + 2008-06-06 Kolja Waschk * src/bus/bcm1250.c: Allow for 8 IO_CS_L signals, not just 7 diff --git a/jtag/po/fr.po b/jtag/po/fr.po index 28b59fe6..b501a9c7 100644 --- a/jtag/po/fr.po +++ b/jtag/po/fr.po @@ -2697,7 +2697,7 @@ msgstr "" #: src/flash/flash.c:297 src/flash/flash.c:344 #, fuzzy, c-format -msgid "addr: 0x%08X\r" +msgid "addr: 0x%08X" msgstr "adr: 0x%08X" #: src/flash/flash.c:332 @@ -2737,12 +2737,12 @@ msgstr "" #: src/flash/flash.c:386 #, c-format -msgid "\r(100%% Completed) FLASH Block %d : Unlocking ... Erasing ... Ok.\n" +msgid "(100%% Completed) FLASH Block %d : Unlocking ... Erasing ... Ok.\n" msgstr "" #: src/flash/flash.c:388 #, c-format -msgid "Ok.\r%78s\r" +msgid "Ok.%78s" msgstr "" #: src/flash/flash.c:391 diff --git a/jtag/po/rw.po b/jtag/po/rw.po index 0e6df23a..11b61a0e 100644 --- a/jtag/po/rw.po +++ b/jtag/po/rw.po @@ -2549,7 +2549,7 @@ msgstr "Funga" #: src/flash/flash.c:297 src/flash/flash.c:344 #, fuzzy, c-format -msgid "addr: 0x%08X\r" +msgid "addr: 0x%08X" msgstr "Aderesi" #: src/flash/flash.c:332 @@ -2585,12 +2585,12 @@ msgstr "" #: src/flash/flash.c:386 #, c-format -msgid "\r(100%% Completed) FLASH Block %d : Unlocking ... Erasing ... Ok.\n" +msgid "(100%% Completed) FLASH Block %d : Unlocking ... Erasing ... Ok.\n" msgstr "" #: src/flash/flash.c:388 #, c-format -msgid "Ok.\r%78s\r" +msgid "Ok.%78s" msgstr "" #: src/flash/flash.c:391 diff --git a/jtag/po/sk.po b/jtag/po/sk.po index 40da44b0..e44bf3c8 100644 --- a/jtag/po/sk.po +++ b/jtag/po/sk.po @@ -2710,7 +2710,7 @@ msgstr "" #: src/flash/flash.c:297 src/flash/flash.c:344 #, fuzzy, c-format -msgid "addr: 0x%08X\r" +msgid "addr: 0x%08X" msgstr "adresa: 0x%08X" #: src/flash/flash.c:332 @@ -2750,12 +2750,12 @@ msgstr "" #: src/flash/flash.c:386 #, c-format -msgid "\r(100%% Completed) FLASH Block %d : Unlocking ... Erasing ... Ok.\n" +msgid "(100%% Completed) FLASH Block %d : Unlocking ... Erasing ... Ok.\n" msgstr "" #: src/flash/flash.c:388 #, c-format -msgid "Ok.\r%78s\r" +msgid "Ok.%78s" msgstr "" #: src/flash/flash.c:391 diff --git a/jtag/src/flash/flash.c b/jtag/src/flash/flash.c index 6e6adcad..d752738d 100644 --- a/jtag/src/flash/flash.c +++ b/jtag/src/flash/flash.c @@ -294,7 +294,8 @@ flashmem( bus_t *bus, FILE *f, uint32_t addr ) for (bc = 0; bc < bn; bc += flash_driver->bus_width) { int j; if ((adr & 0xFF) == 0) { - printf( _("addr: 0x%08X\r"), adr ); + printf( _("addr: 0x%08X"), adr ); + printf( "\r" ); fflush( stdout ); } @@ -330,7 +331,8 @@ flashmem( bus_t *bus, FILE *f, uint32_t addr ) for (bc = 0; bc < bn; bc += flash_driver->bus_width) { int j; if ((adr & 0xFF) == 0) { - printf( _("addr: 0x%08X\r"), adr ); + printf( _("addr: 0x%08X"), adr ); + printf( "\r" ); fflush( stdout ); } @@ -381,10 +383,15 @@ flasherase( bus_t *bus, uint32_t addr, int number ) fflush(stdout); status = flash_driver->erase_block( cfi_array, addr ); if (status == 0) { - if (i == number) - printf( _("\r(100%% Completed) FLASH Block %d : Unlocking ... Erasing ... Ok.\n"), block_no ); - else - printf( _("Ok.\r%78s\r"), "" ); + if (i == number) { + printf( "\r" ); + printf( _("(100%% Completed) FLASH Block %d : Unlocking ... Erasing ... Ok.\n"), block_no ); + } else { + printf( _("Ok.") ); + printf( "\r" ); + printf( _("%78s"), "" ); + printf( "\r" ); + } } else printf( _("ERROR.\n") ); diff --git a/jtag/src/svf/svf_flex.l b/jtag/src/svf/svf_flex.l index c415eeba..35c08477 100644 --- a/jtag/src/svf/svf_flex.l +++ b/jtag/src/svf/svf_flex.l @@ -305,10 +305,12 @@ fix_yylloc_nl(YYLTYPE * mylloc, char *str, YY_EXTRA_TYPE extra) if (*p == '\n') { mylloc->last_column = 0; ++mylloc->last_line; - if (extra->print_progress) - printf( _("\rParsing %6d/%d (%3.0d%%)"), + if (extra->print_progress) { + printf( "\r" ); + printf( _("Parsing %6d/%d (%3.0d%%)"), mylloc->last_line, extra->num_lines, ((mylloc->last_line * 100) + 1) / extra->num_lines ); + } } else { ++mylloc->last_column; }