]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Indent with spaces, not tabs.
authorBruno Haible <bruno@clisp.org>
Mon, 13 Nov 2006 12:44:39 +0000 (12:44 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:22 +0000 (12:14 +0200)
gettext-tools/src/ChangeLog
gettext-tools/src/write-po.c
gettext-tools/tests/ChangeLog
gettext-tools/tests/msgcat-15

index 18ff3120d45d6848a81815fa6d73a3dee5b5005f..1eb6e2281782de8a4083dc4823f47fc90e96c2bd 100644 (file)
@@ -1,3 +1,7 @@
+2006-11-12  Bruno Haible  <bruno@clisp.org>
+
+       * write-po.c (wrap): Indent by use of spaces, not tabs.
+
 2006-11-03  Bruno Haible  <bruno@clisp.org>
 
        Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
index 4db0972a39f07328ba60aed02a76c7339ac079b5..2afce96cb3b6b23cf14fc653b3a8f86e38a5f1cd 100644 (file)
@@ -725,30 +725,45 @@ internationalized messages should not contain the `\\%c' escape sequence"),
       /* Print the beginning of the line.  This will depend on whether
         this is the first line, and if the indented style is being
         used.  INDENT-F.  */
-      if (line_prefix != NULL)
-       fputs (line_prefix, fp);
-      if (first_line)
-       {
-         fputs (name, fp);
-         if (indent)
-           {
-             if (extra_indent > 0)
-               fwrite ("        ", 1, extra_indent, fp);
-             putc ('\t', fp);
-           }
-         else
-           putc (' ', fp);
-         first_line = false;
-       }
-      else
-       {
-         if (indent)
-           {
-             if (extra_indent > 0)
-               fwrite ("        ", 1, extra_indent, fp);
-             putc ('\t', fp);
-           }
-       }
+      {
+       int currcol = 0;
+
+       if (line_prefix != NULL)
+         {
+           fputs (line_prefix, fp);
+           currcol = strlen (line_prefix);
+         }
+       if (first_line)
+         {
+           fputs (name, fp);
+           currcol += strlen (name);
+           if (indent)
+             {
+               if (extra_indent > 0)
+                 fwrite ("        ", 1, extra_indent, fp);
+               currcol += extra_indent;
+               fwrite ("        ", 1, 8 - (currcol & 7), fp);
+               currcol = (currcol + 8) & ~7;
+             }
+           else
+             {
+               putc (' ', fp);
+               currcol++;
+             }
+           first_line = false;
+         }
+       else
+         {
+           if (indent)
+             {
+               if (extra_indent > 0)
+                 fwrite ("        ", 1, extra_indent, fp);
+               currcol += extra_indent;
+               fwrite ("        ", 1, 8 - (currcol & 7), fp);
+               currcol = (currcol + 8) & ~7;
+             }
+         }
+      }
 
       /* Print the portion itself, with linebreaks where necessary.  */
       putc ('"', fp);
@@ -756,12 +771,21 @@ internationalized messages should not contain the `\\%c' escape sequence"),
        {
          if (linebreaks[i] == UC_BREAK_POSSIBLE)
            {
+             int currcol;
+
              fputs ("\"\n", fp);
+             currcol = 0;
              /* INDENT-S.  */
              if (line_prefix != NULL)
-               fputs (line_prefix, fp);
+               {
+                 fputs (line_prefix, fp);
+                 currcol = strlen (line_prefix);
+               }
              if (indent)
-               putc ('\t', fp);
+               {
+                 fwrite ("        ", 1, 8 - (currcol & 7), fp);
+                 currcol = (currcol + 8) & ~7;
+               }
              putc ('"', fp);
            }
          putc (portion[i], fp);
index bf35519384159c337ebb0d24958eb5219fecb011..d258a8790a6af626c535198478d9088e78ed1a70 100644 (file)
@@ -1,3 +1,7 @@
+2006-11-12  Bruno Haible  <bruno@clisp.org>
+
+       * msgcat-15: Update expected test output.
+
 2006-11-03  Bruno Haible  <bruno@clisp.org>
 
        Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
index 5d655b75eb3b5cbe102b392cd6b9ef14cbf5df4a..7dd3f7b718527cb79b7be769a37be5753ff413ce 100755 (executable)
@@ -62,40 +62,40 @@ test $? = 0 || { rm -fr $tmpfiles; exit 1; }
 
 tmpfiles="$tmpfiles mcat-test15.ok"
 cat <<\EOF > mcat-test15.ok
-msgid  ""
-msgstr "Report-Msgid-Bugs-To: \n"
-       "Content-Type: text/plain; charset=UTF-8\n"
-       "Content-Transfer-Encoding: 8bit\n"
+msgid   ""
+msgstr  "Report-Msgid-Bugs-To: \n"
+        "Content-Type: text/plain; charset=UTF-8\n"
+        "Content-Transfer-Encoding: 8bit\n"
 
 #. TRANSLATORS: An error message.
 #: src/args.c:242
 #, fuzzy, c-format
-#| msgid       "too many arguments"
-msgid          "Too many arguments."
-msgstr         "zu viele Argumente"
+#| msgid        "too many arguments"
+msgid           "Too many arguments."
+msgstr          "zu viele Argumente"
 
 #. TRANSLATORS: An error message.
 #: src/args.c:247
 #, fuzzy, c-format
-#| msgid       "too many arguments"
-msgid          "Too few arguments."
-msgstr         "zu viele Argumente"
+#| msgid        "too many arguments"
+msgid           "Too few arguments."
+msgstr          "zu viele Argumente"
 
 # Oder besser "fehlende Argumente"?
 #. TRANSLATORS: An error message.
 #: src/args.c:273
 #, c-format
-#| msgid       "missing arguments"
-msgid          "Missing arguments."
-msgstr         "Argumente fehlen."
+#| msgid        "missing arguments"
+msgid           "Missing arguments."
+msgstr          "Argumente fehlen."
 
 #, fuzzy
-#~| msgid      "%s: invalid option -- %c\n"
-#~ msgid       "%s: illegal option -- %c\n"
-#~ msgstr      "%s: ungültige Option -- %c\n"
+#~| msgid       "%s: invalid option -- %c\n"
+#~ msgid        "%s: illegal option -- %c\n"
+#~ msgstr       "%s: ungültige Option -- %c\n"
 
-#~ msgid       "%s: invalid option -- %c\n"
-#~ msgstr      "%s: ungültige Option -- %c\n"
+#~ msgid        "%s: invalid option -- %c\n"
+#~ msgstr       "%s: ungültige Option -- %c\n"
 EOF
 
 : ${DIFF=diff}