]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Improve comments.
authorBruno Haible <bruno@clisp.org>
Tue, 19 Nov 2024 08:47:35 +0000 (09:47 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 19 Nov 2024 08:47:35 +0000 (09:47 +0100)
* gettext-tools/src/locating-rules.h (locating_rule_list_locate): Improve
specification.
* gettext-tools/src/sentence.h (sentence_end): Likewise.

gettext-tools/src/locating-rules.h
gettext-tools/src/sentence.h

index 48269e95389b49c3f2e793e52cff6173edb65927..f50ef6e96317cb660e6e6c950491ac995820bfca 100644 (file)
@@ -90,7 +90,9 @@ extern bool
    when the "language name" is NAME (can be NULL if not provided),
    accoding to the locating rules in the RULES object.
    The result is just the base name of the .its file; the caller then
-   needs to find it, using "search-path.h".  */
+   needs to find it, using "search-path.h".
+   The lifetime of the result is limited by the lifetime of the RULES
+   object.  */
 extern const char *
        locating_rule_list_locate (const locating_rule_list_ty *rules,
                                   const char *filename,
index 978482490395144fb384c45f9202b4d732a93536..fd507c39e410c69eb70fdb5722199b9d3f3ed174 100644 (file)
@@ -1,5 +1,5 @@
 /* Sentence handling.
-   Copyright (C) 2015 Free Software Foundation, Inc.
+   Copyright (C) 2015-2024 Free Software Foundation, Inc.
    Written by Daiki Ueno <ueno@gnu.org>, 2015.
 
    This program is free software: you can redistribute it and/or modify
@@ -28,11 +28,12 @@ extern "C" {
    end of sentence.  */
 extern DLL_VARIABLE int sentence_end_required_spaces;
 
-/* Locate the position of a sentence end marker (a period, a question
-   mark, etc) in a null-terminated string STR.  If there is no
-   sentence end marker found in STR, return a pointer to the null byte
-   at the end of STR.  ENDING_CHARP is a return location of the end
-   marker character.  */
+/* Locates the position of a sentence end marker (a period, a question
+   mark, etc.) in a null-terminated string STR.
+   If found, it returns a pointer to this marker and sets *ENDING_CHARP
+   to this marker character.
+   If not found, it returns a pointer to the NUL byte at the end of STR
+   and sets *ENDING_CHARP to U+FFFD.  */
 extern const char *sentence_end (const char *string, ucs4_t *ending_charp);
 
 #ifdef __cplusplus