]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Refactor.
authorBruno Haible <bruno@clisp.org>
Sun, 28 Jul 2024 11:24:29 +0000 (13:24 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 28 Jul 2024 11:24:29 +0000 (13:24 +0200)
* gettext-tools/src/read-catalog-abstract.h
(abstract_catalog_reader_class_ty::comment_filepos): Change parameter names.
(po_callback_comment_filepos): Likewise.
* gettext-tools/src/read-catalog-abstract.c (call_comment_filepos,
po_callback_comment_filepos): Likewise.
* gettext-tools/src/read-catalog.h (default_comment_filepos): Likewise.
* gettext-tools/src/read-catalog.c (default_comment_filepos): Likewise.

gettext-tools/src/read-catalog-abstract.c
gettext-tools/src/read-catalog-abstract.h
gettext-tools/src/read-catalog.c
gettext-tools/src/read-catalog.h

index 4e6901f12b34155a2d3e364ba40054967cd6b768..3b1c12d9121c6a8051221caa4612a2d15a555546 100644 (file)
@@ -129,11 +129,11 @@ call_comment_dot (abstract_catalog_reader_ty *pop, const char *s)
 }
 
 static inline void
-call_comment_filepos (abstract_catalog_reader_ty *pop, const char *name,
-                      size_t line)
+call_comment_filepos (abstract_catalog_reader_ty *pop,
+                      const char *file_name, size_t line_number)
 {
   if (pop->methods->comment_filepos)
-    pop->methods->comment_filepos (pop, name, line);
+    pop->methods->comment_filepos (pop, file_name, line_number);
 }
 
 static inline void
@@ -243,12 +243,12 @@ po_callback_comment_dot (const char *s)
 
 
 /* This function is called by po_parse_comment_filepos(), once for each
-   filename.  */
+   file name.  */
 void
-po_callback_comment_filepos (const char *name, size_t line)
+po_callback_comment_filepos (const char *file_name, size_t line_number)
 {
   /* assert(callback_arg); */
-  call_comment_filepos (callback_arg, name, line);
+  call_comment_filepos (callback_arg, file_name, line_number);
 }
 
 
index 91d487c7c30eaa02ab164f45358b0280b1b77fb3..282dcb155b0a36780c0f78550e55e0f704359dfa 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading PO files, abstract class.
-   Copyright (C) 1995-1996, 1998, 2000-2003, 2005-2006, 2008-2009, 2012, 2015, 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>
 
@@ -89,7 +89,7 @@ struct abstract_catalog_reader_class_ty
      definition seen.  Or completely ignored.  */
   void (*comment) (struct abstract_catalog_reader_ty *pop, const char *s);
 
-  /* What to do with a comment that starts with a dot (i.e.  extracted
+  /* What to do with a comment that starts with a dot (i.e. extracted
      by xgettext) - the expectation is that they will be accumulated,
      and added to the next message definition seen.  Or completely
      ignored.  */
@@ -100,7 +100,7 @@ struct abstract_catalog_reader_class_ty
      they will be accumulated, and added to the next message
      definition seen.  Or completely ignored.  */
   void (*comment_filepos) (struct abstract_catalog_reader_ty *pop,
-                           const char *s, size_t line);
+                           const char *file_name, size_t line_number);
 
   /* What to do with a comment that starts with a ',' or '!' - this is a
      special comment.  One of the possible uses is to indicate a
@@ -177,7 +177,8 @@ extern void po_callback_message (char *msgctxt,
                                  bool force_fuzzy, bool obsolete);
 extern void po_callback_comment (const char *s);
 extern void po_callback_comment_dot (const char *s);
-extern void po_callback_comment_filepos (const char *s, size_t line);
+extern void po_callback_comment_filepos (const char *file_name,
+                                         size_t line_number);
 extern void po_callback_comment_special (const char *s);
 extern void po_callback_comment_dispatcher (const char *s);
 
index 3ae2d702cfe6207aabad18035fdada5880bc9bf9..10bf977626ae498229530def7b01ef785798d814 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading PO files.
-   Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2016, 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>
 
    This program is free software: you can redistribute it and/or modify
@@ -283,7 +283,7 @@ default_comment_dot (abstract_catalog_reader_ty *that, const char *s)
 
 void
 default_comment_filepos (abstract_catalog_reader_ty *that,
-                         const char *name, size_t line)
+                         const char *file_name, size_t line_number)
 {
   default_catalog_reader_ty *this = (default_catalog_reader_ty *) that;
   size_t nbytes;
@@ -292,8 +292,8 @@ default_comment_filepos (abstract_catalog_reader_ty *that,
   nbytes = (this->filepos_count + 1) * sizeof (this->filepos[0]);
   this->filepos = xrealloc (this->filepos, nbytes);
   pp = &this->filepos[this->filepos_count++];
-  pp->file_name = xstrdup (name);
-  pp->line_number = line;
+  pp->file_name = xstrdup (file_name);
+  pp->line_number = line_number;
 }
 
 
index 238524f0da306a92f1ccac59aba3fc395aed7805..97358dc94c288ae815ee455042a0def6ae4105c5 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading PO files.
-   Copyright (C) 1995-2023 Free Software Foundation, Inc.
+   Copyright (C) 1995-2024 Free Software Foundation, Inc.
    This file was written by Bruno Haible <haible@clisp.cons.org>.
 
    This program is free software: you can redistribute it and/or modify
@@ -142,7 +142,7 @@ extern void default_comment (abstract_catalog_reader_ty *that, const char *s);
 extern void default_comment_dot (abstract_catalog_reader_ty *that,
                                  const char *s);
 extern void default_comment_filepos (abstract_catalog_reader_ty *that,
-                                     const char *name, size_t line);
+                                     const char *file_name, size_t line_number);
 extern void default_comment_special (abstract_catalog_reader_ty *that,
                                      const char *s);
 extern void default_set_domain (default_catalog_reader_ty *this, char *name);