[haiku-commits] haiku: hrev53441 - in src: preferences/time kits/locale

  • From: Adrien Destugues <pulkomandy@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 31 Aug 2019 12:50:08 -0400 (EDT)

hrev53441 adds 2 changesets to branch 'master'
old head: 91c8637753340bead59f87865c4a4f510b41c095
new head: 27823b29cd6f64a6180b76e4b297682c2bbcea9b
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=27823b29cd6f+%5E91c863775334

----------------------------------------------------------------------------

60b52ce0bc40: HashMapCatalog: handle more standard escpae sequences.
  
  Fixes #14705

27823b29cd6f: Time preferences: remove \r
  
  We are not Windows, we don't need these.

                             [ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

3 files changed, 16 insertions(+), 6 deletions(-)
src/kits/locale/HashMapCatalog.cpp       | 12 +++++++++++-
src/preferences/time/NetworkTimeView.cpp |  4 ++--
src/preferences/time/Time.cpp            |  6 +++---

############################################################################

Commit:      60b52ce0bc40bf653fd04cad29fb4d6f99f4ddad
URL:         https://git.haiku-os.org/haiku/commit/?id=60b52ce0bc40
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Sat Aug 31 16:40:13 2019 UTC

Ticket:      https://dev.haiku-os.org/ticket/14705

HashMapCatalog: handle more standard escpae sequences.

Fixes #14705

----------------------------------------------------------------------------

diff --git a/src/kits/locale/HashMapCatalog.cpp 
b/src/kits/locale/HashMapCatalog.cpp
index 801fd46f68..0db2b76718 100644
--- a/src/kits/locale/HashMapCatalog.cpp
+++ b/src/kits/locale/HashMapCatalog.cpp
@@ -159,10 +159,20 @@ parseQuotedChars(BString& stringToParse)
 
        while (*in != 0) {
                if (quoted) {
-                       if (*in == 'n')
+                       if (*in == 'a')
+                               *out = '\a';
+                       else if (*in == 'b')
+                               *out = '\b';
+                       else if (*in == 'f')
+                               *out = '\f';
+                       else if (*in == 'n')
                                *out = '\n';
+                       else if (*in == 'r')
+                               *out = '\r';
                        else if (*in == 't')
                                *out = '\t';
+                       else if (*in == 'v')
+                               *out = '\v';
                        else if (*in == '"')
                                *out = '"';
                        else if (*in == 'x') {

############################################################################

Revision:    hrev53441
Commit:      27823b29cd6f64a6180b76e4b297682c2bbcea9b
URL:         https://git.haiku-os.org/haiku/commit/?id=27823b29cd6f
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Sat Aug 31 16:48:20 2019 UTC

Time preferences: remove \r

We are not Windows, we don't need these.

----------------------------------------------------------------------------

diff --git a/src/preferences/time/NetworkTimeView.cpp 
b/src/preferences/time/NetworkTimeView.cpp
index be8d497e80..f8854ecc28 100644
--- a/src/preferences/time/NetworkTimeView.cpp
+++ b/src/preferences/time/NetworkTimeView.cpp
@@ -409,12 +409,12 @@ NetworkTimeView::MessageReceived(BMessage* message)
                                if (message->FindInt32("error code", 
&errorCode) == B_OK) {
                                        snprintf(buffer, sizeof(buffer),
                                                B_TRANSLATE("The following 
error occured "
-                                                       "while 
synchronizing:\r\n%s: %s"),
+                                                       "while 
synchronizing:\n%s: %s"),
                                                errorString, 
strerror(errorCode));
                                } else {
                                        snprintf(buffer, sizeof(buffer),
                                                B_TRANSLATE("The following 
error occured "
-                                                       "while 
synchronizing:\r\n%s"),
+                                                       "while 
synchronizing:\n%s"),
                                                errorString);
                                }
 
diff --git a/src/preferences/time/Time.cpp b/src/preferences/time/Time.cpp
index e5499c11d6..216ea45c9e 100644
--- a/src/preferences/time/Time.cpp
+++ b/src/preferences/time/Time.cpp
@@ -94,13 +94,13 @@ main(int argc, char** argv)
                const char* errorString = NULL;
                int32 errorCode = 0;
                if (update_time(settings, &errorString, &errorCode) == B_OK) {
-                       printf("Synchronization successful\r\n");
+                       printf("Synchronization successful\n");
                } else if (errorCode != 0) {
                        printf("The following error occured "
-                                       "while synchronizing:\r\n%s: %s\r\n",
+                                       "while synchronizing:\n%s: %s\n",
                                errorString, strerror(errorCode));
                } else {
-                       printf("The following error occured while 
synchronizing:\r\n%s\r\n",
+                       printf("The following error occured while 
synchronizing:\n%s\n",
                                errorString);
                }
        } else {


Other related posts:

  • » [haiku-commits] haiku: hrev53441 - in src: preferences/time kits/locale - Adrien Destugues