From 9aa0a6be5ccfde7e7c21b4d4b18d2d144309bdcc Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 19 Nov 2024 09:47:35 +0100 Subject: [PATCH] Improve comments. * 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 | 4 +++- gettext-tools/src/sentence.h | 13 +++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/gettext-tools/src/locating-rules.h b/gettext-tools/src/locating-rules.h index 48269e953..f50ef6e96 100644 --- a/gettext-tools/src/locating-rules.h +++ b/gettext-tools/src/locating-rules.h @@ -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, diff --git a/gettext-tools/src/sentence.h b/gettext-tools/src/sentence.h index 978482490..fd507c39e 100644 --- a/gettext-tools/src/sentence.h +++ b/gettext-tools/src/sentence.h @@ -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 , 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 -- 2.47.3