]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Refactor.
authorBruno Haible <bruno@clisp.org>
Sun, 28 Jul 2024 07:41:17 +0000 (09:41 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 28 Jul 2024 07:41:17 +0000 (09:41 +0200)
* gettext-tools/src/message.h (message_comment_filepos): Change parameter names.
* gettext-tools/src/message.c (message_comment_filepos): Likewise.

gettext-tools/src/message.c
gettext-tools/src/message.h

index b852d0df8f5d8376633c54fd875a139fd500bcde..8d6b88de000833920af7a1b3383dc4ab87eb1675 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1995-1998, 2000-2010, 2012-2013, 2015-2016, 2019-2020, 2023 Free Software Foundation, Inc.
+   Copyright (C) 1995-2024 Free Software Foundation, Inc.
 
    This file was written by Peter Miller <millerp@canb.auug.org.au>
 
@@ -204,7 +204,8 @@ message_comment_dot_append (message_ty *mp, const char *s)
 
 
 void
-message_comment_filepos (message_ty *mp, const char *name, size_t line)
+message_comment_filepos (message_ty *mp,
+                         const char *file_name, size_t line_number)
 {
   size_t j;
   size_t nbytes;
@@ -214,7 +215,8 @@ message_comment_filepos (message_ty *mp, const char *name, size_t line)
   for (j = 0; j < mp->filepos_count; j++)
     {
       pp = &mp->filepos[j];
-      if (strcmp (pp->file_name, name) == 0 && pp->line_number == line)
+      if (strcmp (pp->file_name, file_name) == 0
+          && pp->line_number == line_number)
         return;
     }
 
@@ -224,8 +226,8 @@ message_comment_filepos (message_ty *mp, const char *name, size_t line)
 
   /* Insert the position at the end.  Don't sort the file positions here.  */
   pp = &mp->filepos[mp->filepos_count++];
-  pp->file_name = xstrdup (name);
-  pp->line_number = line;
+  pp->file_name = xstrdup (file_name);
+  pp->line_number = line_number;
 }
 
 
index 4fa65989e23b44fd3d92d43f6c564e04e103972d..377272f52e51aae7856f76b8ed7071f3acf8f6d4 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1995-1998, 2000-2010, 2012-2013, 2015-2016, 2019-2020, 2023 Free Software Foundation, Inc.
+   Copyright (C) 1995-2024 Free Software Foundation, Inc.
 
    This file was written by Peter Miller <millerp@canb.auug.org.au>
 
@@ -241,7 +241,8 @@ extern void
 extern void
        message_comment_dot_append (message_ty *mp, const char *comment);
 extern void
-       message_comment_filepos (message_ty *mp, const char *name, size_t line);
+       message_comment_filepos (message_ty *mp,
+                                const char *file_name, size_t line_number);
 extern message_ty *
        message_copy (message_ty *mp);