aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/icu/common/uinvchar.h
diff options
context:
space:
mode:
authorneksard <neksard@yandex-team.ru>2022-02-10 16:45:33 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:33 +0300
commit1d9c550e7c38e051d7961f576013a482003a70d9 (patch)
treeb2cc84ee7850122e7ccf51d0ea21e4fa7e7a5685 /contrib/libs/icu/common/uinvchar.h
parent8f7cf138264e0caa318144bf8a2c950e0b0a8593 (diff)
downloadydb-1d9c550e7c38e051d7961f576013a482003a70d9.tar.gz
Restoring authorship annotation for <neksard@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/icu/common/uinvchar.h')
-rw-r--r--contrib/libs/icu/common/uinvchar.h258
1 files changed, 129 insertions, 129 deletions
diff --git a/contrib/libs/icu/common/uinvchar.h b/contrib/libs/icu/common/uinvchar.h
index 105ef35b7d..a43cfcd982 100644
--- a/contrib/libs/icu/common/uinvchar.h
+++ b/contrib/libs/icu/common/uinvchar.h
@@ -1,58 +1,58 @@
// © 2016 and later: Unicode, Inc. and others.
-// License & terms of use: http://www.unicode.org/copyright.html
-/*
-*******************************************************************************
-*
-* Copyright (C) 1999-2015, International Business Machines
-* Corporation and others. All Rights Reserved.
-*
-*******************************************************************************
-* file name: uinvchar.h
+// License & terms of use: http://www.unicode.org/copyright.html
+/*
+*******************************************************************************
+*
+* Copyright (C) 1999-2015, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+*******************************************************************************
+* file name: uinvchar.h
* encoding: UTF-8
-* tab size: 8 (not used)
-* indentation:2
-*
-* created on: 2004sep14
-* created by: Markus W. Scherer
-*
-* Definitions for handling invariant characters, moved here from putil.c
-* for better modularization.
-*/
-
-#ifndef __UINVCHAR_H__
-#define __UINVCHAR_H__
-
-#include "unicode/utypes.h"
-#ifdef __cplusplus
-#include "unicode/unistr.h"
-#endif
-
-/**
- * Check if a char string only contains invariant characters.
- * See utypes.h for details.
- *
- * @param s Input string pointer.
- * @param length Length of the string, can be -1 if NUL-terminated.
- * @return TRUE if s contains only invariant characters.
- *
- * @internal (ICU 2.8)
- */
-U_INTERNAL UBool U_EXPORT2
-uprv_isInvariantString(const char *s, int32_t length);
-
-/**
- * Check if a Unicode string only contains invariant characters.
- * See utypes.h for details.
- *
- * @param s Input string pointer.
- * @param length Length of the string, can be -1 if NUL-terminated.
- * @return TRUE if s contains only invariant characters.
- *
- * @internal (ICU 2.8)
- */
-U_INTERNAL UBool U_EXPORT2
-uprv_isInvariantUString(const UChar *s, int32_t length);
-
+* tab size: 8 (not used)
+* indentation:2
+*
+* created on: 2004sep14
+* created by: Markus W. Scherer
+*
+* Definitions for handling invariant characters, moved here from putil.c
+* for better modularization.
+*/
+
+#ifndef __UINVCHAR_H__
+#define __UINVCHAR_H__
+
+#include "unicode/utypes.h"
+#ifdef __cplusplus
+#include "unicode/unistr.h"
+#endif
+
+/**
+ * Check if a char string only contains invariant characters.
+ * See utypes.h for details.
+ *
+ * @param s Input string pointer.
+ * @param length Length of the string, can be -1 if NUL-terminated.
+ * @return TRUE if s contains only invariant characters.
+ *
+ * @internal (ICU 2.8)
+ */
+U_INTERNAL UBool U_EXPORT2
+uprv_isInvariantString(const char *s, int32_t length);
+
+/**
+ * Check if a Unicode string only contains invariant characters.
+ * See utypes.h for details.
+ *
+ * @param s Input string pointer.
+ * @param length Length of the string, can be -1 if NUL-terminated.
+ * @return TRUE if s contains only invariant characters.
+ *
+ * @internal (ICU 2.8)
+ */
+U_INTERNAL UBool U_EXPORT2
+uprv_isInvariantUString(const UChar *s, int32_t length);
+
/**
* \def U_UPPER_ORDINAL
* Get the ordinal number of an uppercase invariant character
@@ -68,14 +68,14 @@ uprv_isInvariantUString(const UChar *s, int32_t length);
# error Unknown charset family!
#endif
-#ifdef __cplusplus
-
+#ifdef __cplusplus
+
U_NAMESPACE_BEGIN
-/**
+/**
* Like U_UPPER_ORDINAL(x) but with validation.
* Returns 0..25 for A..Z else a value outside 0..25.
- */
+ */
inline int32_t uprv_upperOrdinal(int32_t c) {
#if U_CHARSET_FAMILY==U_ASCII_FAMILY
return c - 'A';
@@ -90,8 +90,8 @@ inline int32_t uprv_upperOrdinal(int32_t c) {
#else
# error Unknown charset family!
#endif
-}
-
+}
+
// Like U_UPPER_ORDINAL(x) but for lowercase and with validation.
// Returns 0..25 for a..z else a value outside 0..25.
inline int32_t uprv_lowerOrdinal(int32_t c) {
@@ -109,17 +109,17 @@ inline int32_t uprv_lowerOrdinal(int32_t c) {
# error Unknown charset family!
#endif
}
-
+
U_NAMESPACE_END
#endif
-/**
+/**
* Returns true if c == '@' is possible.
* The @ sign is variant, and the @ sign used on one
* EBCDIC machine won't be compiled the same way on other EBCDIC based machines.
- * @internal
- */
+ * @internal
+ */
U_CFUNC UBool
uprv_isEbcdicAtSign(char c);
@@ -129,35 +129,35 @@ uprv_isEbcdicAtSign(char c);
* For ASCII, checks for exactly '@'. For EBCDIC, calls uprv_isEbcdicAtSign().
* @internal
*/
-#if U_CHARSET_FAMILY==U_ASCII_FAMILY
+#if U_CHARSET_FAMILY==U_ASCII_FAMILY
# define uprv_isAtSign(c) ((c)=='@')
-#elif U_CHARSET_FAMILY==U_EBCDIC_FAMILY
+#elif U_CHARSET_FAMILY==U_EBCDIC_FAMILY
# define uprv_isAtSign(c) uprv_isEbcdicAtSign(c)
-#else
-# error Unknown charset family!
-#endif
-
-/**
- * Compare two EBCDIC invariant-character strings in ASCII order.
- * @internal
- */
-U_INTERNAL int32_t U_EXPORT2
-uprv_compareInvEbcdicAsAscii(const char *s1, const char *s2);
-
-/**
- * \def uprv_compareInvCharsAsAscii
- * Compare two invariant-character strings in ASCII order.
- * @internal
- */
-#if U_CHARSET_FAMILY==U_ASCII_FAMILY
-# define uprv_compareInvCharsAsAscii(s1, s2) uprv_strcmp(s1, s2)
-#elif U_CHARSET_FAMILY==U_EBCDIC_FAMILY
-# define uprv_compareInvCharsAsAscii(s1, s2) uprv_compareInvEbcdicAsAscii(s1, s2)
-#else
-# error Unknown charset family!
-#endif
-
-/**
+#else
+# error Unknown charset family!
+#endif
+
+/**
+ * Compare two EBCDIC invariant-character strings in ASCII order.
+ * @internal
+ */
+U_INTERNAL int32_t U_EXPORT2
+uprv_compareInvEbcdicAsAscii(const char *s1, const char *s2);
+
+/**
+ * \def uprv_compareInvCharsAsAscii
+ * Compare two invariant-character strings in ASCII order.
+ * @internal
+ */
+#if U_CHARSET_FAMILY==U_ASCII_FAMILY
+# define uprv_compareInvCharsAsAscii(s1, s2) uprv_strcmp(s1, s2)
+#elif U_CHARSET_FAMILY==U_EBCDIC_FAMILY
+# define uprv_compareInvCharsAsAscii(s1, s2) uprv_compareInvEbcdicAsAscii(s1, s2)
+#else
+# error Unknown charset family!
+#endif
+
+/**
* Converts an EBCDIC invariant character to ASCII.
* @internal
*/
@@ -178,42 +178,42 @@ uprv_ebcdicToAscii(char c);
#endif
/**
- * Converts an EBCDIC invariant character to lowercase ASCII.
- * @internal
- */
-U_INTERNAL char U_EXPORT2
-uprv_ebcdicToLowercaseAscii(char c);
-
-/**
- * \def uprv_invCharToLowercaseAscii
- * Converts an invariant character to lowercase ASCII.
- * @internal
- */
-#if U_CHARSET_FAMILY==U_ASCII_FAMILY
-# define uprv_invCharToLowercaseAscii uprv_asciitolower
-#elif U_CHARSET_FAMILY==U_EBCDIC_FAMILY
-# define uprv_invCharToLowercaseAscii uprv_ebcdicToLowercaseAscii
-#else
-# error Unknown charset family!
-#endif
-
-/**
- * Copy EBCDIC to ASCII
- * @internal
- * @see uprv_strncpy
- */
-U_INTERNAL uint8_t* U_EXPORT2
-uprv_aestrncpy(uint8_t *dst, const uint8_t *src, int32_t n);
-
-
-/**
- * Copy ASCII to EBCDIC
- * @internal
- * @see uprv_strncpy
- */
-U_INTERNAL uint8_t* U_EXPORT2
-uprv_eastrncpy(uint8_t *dst, const uint8_t *src, int32_t n);
-
-
-
-#endif
+ * Converts an EBCDIC invariant character to lowercase ASCII.
+ * @internal
+ */
+U_INTERNAL char U_EXPORT2
+uprv_ebcdicToLowercaseAscii(char c);
+
+/**
+ * \def uprv_invCharToLowercaseAscii
+ * Converts an invariant character to lowercase ASCII.
+ * @internal
+ */
+#if U_CHARSET_FAMILY==U_ASCII_FAMILY
+# define uprv_invCharToLowercaseAscii uprv_asciitolower
+#elif U_CHARSET_FAMILY==U_EBCDIC_FAMILY
+# define uprv_invCharToLowercaseAscii uprv_ebcdicToLowercaseAscii
+#else
+# error Unknown charset family!
+#endif
+
+/**
+ * Copy EBCDIC to ASCII
+ * @internal
+ * @see uprv_strncpy
+ */
+U_INTERNAL uint8_t* U_EXPORT2
+uprv_aestrncpy(uint8_t *dst, const uint8_t *src, int32_t n);
+
+
+/**
+ * Copy ASCII to EBCDIC
+ * @internal
+ * @see uprv_strncpy
+ */
+U_INTERNAL uint8_t* U_EXPORT2
+uprv_eastrncpy(uint8_t *dst, const uint8_t *src, int32_t n);
+
+
+
+#endif