]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
tuklib_mbstr_width: Don't mention shift states in the API docs
authorLasse Collin <lasse.collin@tukaani.org>
Mon, 21 Oct 2024 15:47:56 +0000 (18:47 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Wed, 18 Dec 2024 15:09:30 +0000 (17:09 +0200)
It is assumed that this code won't be used with charsets that use
locking shift states.

src/common/tuklib_mbstr.h

index 4c8eeb7e3700cbeba72a189e3c9247f0f0e3431c..3ab0a82aad7dca6b8834375eca1870bec430e426 100644 (file)
@@ -27,10 +27,7 @@ extern size_t tuklib_mbstr_width(const char *str, size_t *bytes);
 ///
 /// This is somewhat similar to wcswidth() but works on multibyte strings.
 ///
-/// \param      str         String whose width is to be calculated. If the
-///                         current locale uses a multibyte character set
-///                         that has shift states, the string must begin
-///                         and end in the initial shift state.
+/// \param      str         String whose width is to be calculated.
 /// \param      bytes       If this is not NULL, *bytes is set to the
 ///                         value returned by strlen(str) (even if an
 ///                         error occurs when calculating the width).
@@ -38,8 +35,7 @@ extern size_t tuklib_mbstr_width(const char *str, size_t *bytes);
 /// \return     On success, the number of columns needed to display the
 ///             string e.g. in a terminal emulator is returned. On error,
 ///             (size_t)-1 is returned. Possible errors include invalid,
-///             partial, or non-printable multibyte character in str, or
-///             that str doesn't end in the initial shift state.
+///             partial, or non-printable multibyte character in str.
 
 #define tuklib_mbstr_fw TUKLIB_SYMBOL(tuklib_mbstr_fw)
 extern int tuklib_mbstr_fw(const char *str, int columns_min);