[Freeciv-commits] r33949 - in /branches/S2_6/utility: registry_ini.c section_file.c support.c support.h

2016-09-29 Thread cazfi74
Author: cazfi
Date: Fri Sep 30 06:20:23 2016
New Revision: 33949

URL: http://svn.gna.org/viewcvs/freeciv?rev=33949=rev
Log:
Moved make_escapes() and remove_escapes() to support.c.

See patch #7734

Modified:
branches/S2_6/utility/registry_ini.c
branches/S2_6/utility/section_file.c
branches/S2_6/utility/support.c
branches/S2_6/utility/support.h

Modified: branches/S2_6/utility/registry_ini.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/registry_ini.c?rev=33949=33948=33949=diff
==
--- branches/S2_6/utility/registry_ini.c(original)
+++ branches/S2_6/utility/registry_ini.cFri Sep 30 06:20:23 2016
@@ -51,7 +51,7 @@
   can, but they have no particular significance.  There can be
   optional whitespace before and/or after the equals sign.
   You can put a newline after (but not before) the equals sign.
-  
+
   Backslash is an escape character in strings (double-quoted strings
   only, not names); recognised escapes are \n, \\, and \".
   (Any other \ is just treated as .)
@@ -188,39 +188,6 @@
 
 static struct entry *section_entry_filereference_new(struct section *psection,
  const char *name, const 
char *value);
-
-/
-  Copies a string and convert the following characters:
-  - '\n' to "\\n".
-  - '\\' to "".
-  - '\"' to "\\\"".
-  See also remove_escapes().
-/
-static void make_escapes(const char *str, char *buf, size_t buf_len)
-{
-  char *dest = buf;
-  /* Sometimes we insert 2 characters at once ('\n' -> "\\n"), so keep
-   * place for '\0' and an extra character. */
-  const char *const max = buf + buf_len - 2;
-
-  while (*str != '\0' && dest < max) {
-switch (*str) {
-case '\n':
-  *dest++ = '\\';
-  *dest++ = 'n';
-  str++;
-  break;
-case '\\':
-case '\"':
-  *dest++ = '\\';
-  /* Fallthrough. */
-default:
-  *dest++ = *str++;
-  break;
-}
-  }
-  *dest = 0;
-}
 
 /***
   Simplification of fileinfoname().

Modified: branches/S2_6/utility/section_file.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/section_file.c?rev=33949=33948=33949=diff
==
--- branches/S2_6/utility/section_file.c(original)
+++ branches/S2_6/utility/section_file.cFri Sep 30 06:20:23 2016
@@ -1,4 +1,4 @@
-/** 
+/***
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -127,39 +127,6 @@
   secfile->allow_digital_boolean = allow_digital_boolean;
 }
 
-/
-  Copies a string. Backslash followed by a genuine newline always
-  removes the newline.
-  If full_escapes is TRUE:
-- '\n' -> newline translation.
-- Other '\c' sequences (any character 'c') are just passed
-  through with the '\' removed (eg, includes '\\', '\"').
-  See also make_escapes().
-/
-static void remove_escapes(const char *str, bool full_escapes,
-   char *buf, size_t buf_len)
-{
-  char *dest = buf;
-  const char *const max = buf + buf_len - 1;
-
-  while (*str != '\0' && dest < max) {
-if (*str == '\\' && *(str + 1) == '\n') {
-  /* Escape followed by newline. Skip both */
-  str += 2;
-} else if (full_escapes && *str == '\\') {
-  str++;
-  if (*str == 'n') {
-*dest++ = '\n';
-str++;
-  }
-} else {
-  *dest++ = *str++;
-}
-  }
-  *dest = '\0';
-}
-
-
 /**
   Add entry to section from token.
 **/

Modified: branches/S2_6/utility/support.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/support.c?rev=33949=33948=33949=diff
==
--- branches/S2_6/utility/support.c (original)
+++ branches/S2_6/utility/support.c Fri Sep 30 06:20:23 2016
@@ -159,6 +159,71 @@
 return ((int) (unsigned char) fc_tolower(*str0))
   - ((int) (unsigned char) fc_tolower(*str1));
 #endif /* HAVE_STRNCASECMP */
+}
+
+/
+  Copies a string and convert the following characters:
+  - '\n' to 

[Freeciv-commits] r33947 - /branches/S2_5/translations/freeciv/uk.po

2016-09-29 Thread swiatos
Author: swiatos
Date: Fri Sep 30 06:09:51 2016
New Revision: 33947

URL: http://svn.gna.org/viewcvs/freeciv?rev=33947=rev
Log:
update for uk.po, correction + removed few fuzzies & empties. left: 18k - 31699.

Modified:
branches/S2_5/translations/freeciv/uk.po

[This mail would be too long, it was shortened to contain the URLs only.]

Modified: branches/S2_5/translations/freeciv/uk.po
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/translations/freeciv/uk.po?rev=33947=33946=33947=diff


___
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits


[Freeciv-commits] r33948 - in /trunk/utility: registry_ini.c section_file.c support.c support.h

2016-09-29 Thread cazfi74
Author: cazfi
Date: Fri Sep 30 06:20:15 2016
New Revision: 33948

URL: http://svn.gna.org/viewcvs/freeciv?rev=33948=rev
Log:
Moved make_escapes() and remove_escapes() to support.c.

See patch #7734

Modified:
trunk/utility/registry_ini.c
trunk/utility/section_file.c
trunk/utility/support.c
trunk/utility/support.h

Modified: trunk/utility/registry_ini.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/utility/registry_ini.c?rev=33948=33947=33948=diff
==
--- trunk/utility/registry_ini.c(original)
+++ trunk/utility/registry_ini.cFri Sep 30 06:20:15 2016
@@ -51,7 +51,7 @@
   can, but they have no particular significance.  There can be
   optional whitespace before and/or after the equals sign.
   You can put a newline after (but not before) the equals sign.
-  
+
   Backslash is an escape character in strings (double-quoted strings
   only, not names); recognised escapes are \n, \\, and \".
   (Any other \ is just treated as .)
@@ -221,39 +221,6 @@
 
 static struct entry *section_entry_filereference_new(struct section *psection,
  const char *name, const 
char *value);
-
-/
-  Copies a string and convert the following characters:
-  - '\n' to "\\n".
-  - '\\' to "".
-  - '\"' to "\\\"".
-  See also remove_escapes().
-/
-static void make_escapes(const char *str, char *buf, size_t buf_len)
-{
-  char *dest = buf;
-  /* Sometimes we insert 2 characters at once ('\n' -> "\\n"), so keep
-   * place for '\0' and an extra character. */
-  const char *const max = buf + buf_len - 2;
-
-  while (*str != '\0' && dest < max) {
-switch (*str) {
-case '\n':
-  *dest++ = '\\';
-  *dest++ = 'n';
-  str++;
-  break;
-case '\\':
-case '\"':
-  *dest++ = '\\';
-  /* Fallthrough. */
-default:
-  *dest++ = *str++;
-  break;
-}
-  }
-  *dest = 0;
-}
 
 /***
   Simplification of fileinfoname().

Modified: trunk/utility/section_file.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/utility/section_file.c?rev=33948=33947=33948=diff
==
--- trunk/utility/section_file.c(original)
+++ trunk/utility/section_file.cFri Sep 30 06:20:15 2016
@@ -1,4 +1,4 @@
-/** 
+/***
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -128,39 +128,6 @@
   secfile->allow_digital_boolean = allow_digital_boolean;
 }
 
-/
-  Copies a string. Backslash followed by a genuine newline always
-  removes the newline.
-  If full_escapes is TRUE:
-- '\n' -> newline translation.
-- Other '\c' sequences (any character 'c') are just passed
-  through with the '\' removed (eg, includes '\\', '\"').
-  See also make_escapes().
-/
-static void remove_escapes(const char *str, bool full_escapes,
-   char *buf, size_t buf_len)
-{
-  char *dest = buf;
-  const char *const max = buf + buf_len - 1;
-
-  while (*str != '\0' && dest < max) {
-if (*str == '\\' && *(str + 1) == '\n') {
-  /* Escape followed by newline. Skip both */
-  str += 2;
-} else if (full_escapes && *str == '\\') {
-  str++;
-  if (*str == 'n') {
-*dest++ = '\n';
-str++;
-  }
-} else {
-  *dest++ = *str++;
-}
-  }
-  *dest = '\0';
-}
-
-
 /**
   Add entry to section from token.
 **/

Modified: trunk/utility/support.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/utility/support.c?rev=33948=33947=33948=diff
==
--- trunk/utility/support.c (original)
+++ trunk/utility/support.c Fri Sep 30 06:20:15 2016
@@ -270,6 +270,71 @@
   fc_release_mutex(_buffer_mutex);
 
   return ret;
+}
+
+/
+  Copies a string and convert the following characters:
+  - '\n' to "\\n".
+  - '\\' to "".
+  - '\"' to "\\\"".
+  See also remove_escapes().
+/
+void make_escapes(const char *str, char *buf, size_t 

[Freeciv-commits] r33946 - /branches/S2_5/translations/freeciv/uk.po

2016-09-29 Thread swiatos
Author: swiatos
Date: Fri Sep 30 04:32:09 2016
New Revision: 33946

URL: http://svn.gna.org/viewcvs/freeciv?rev=33946=rev
Log:
update for uk.po, correction + removed few fuzzies & empties. left: 18k - 32965.

Modified:
branches/S2_5/translations/freeciv/uk.po

[This mail would be too long, it was shortened to contain the URLs only.]

Modified: branches/S2_5/translations/freeciv/uk.po
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/translations/freeciv/uk.po?rev=33946=33945=33946=diff


___
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits


[Freeciv-commits] r33944 - /branches/S2_5/translations/freeciv/uk.po

2016-09-29 Thread swiatos
Author: swiatos
Date: Fri Sep 30 01:13:38 2016
New Revision: 33944

URL: http://svn.gna.org/viewcvs/freeciv?rev=33944=rev
Log:
update for uk.po, correction + removed few fuzzies & empties. left: 18k - 34718.

Modified:
branches/S2_5/translations/freeciv/uk.po

[This mail would be too long, it was shortened to contain the URLs only.]

Modified: branches/S2_5/translations/freeciv/uk.po
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/translations/freeciv/uk.po?rev=33944=33943=33944=diff


___
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits


[Freeciv-commits] r33945 - /branches/S2_5/translations/freeciv/uk.po

2016-09-29 Thread swiatos
Author: swiatos
Date: Fri Sep 30 03:23:55 2016
New Revision: 33945

URL: http://svn.gna.org/viewcvs/freeciv?rev=33945=rev
Log:
update for uk.po, correction + removed few fuzzies & empties. left: 18k - 34106.

Modified:
branches/S2_5/translations/freeciv/uk.po

[This mail would be too long, it was shortened to contain the URLs only.]

Modified: branches/S2_5/translations/freeciv/uk.po
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/translations/freeciv/uk.po?rev=33945=33944=33945=diff


___
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits