From 1306e0fa83d68e919ff0378c74d2001b6e78c405 Mon Sep 17 00:00:00 2001 From: Hyunjee Kim Date: Tue, 12 Sep 2017 11:01:18 +0900 Subject: [PATCH] Apply Coding rule checker Change-Id: Ib5f5aa0b29eef84aaf6bc1935a0c8877a1ecd6a5 Signed-off-by: Hyunjee Kim --- i18ninfo/i18ninfo.cpp | 6 -- src/include/utils_i18n_measure_format.h | 4 +- src/include/utils_i18n_private.h | 4 +- src/include/utils_i18n_types.h | 44 ++++----- src/include/utils_i18n_uchar_iter.h | 170 ++++++++++++++++---------------- src/utils_i18n_timezone.cpp | 2 - 6 files changed, 111 insertions(+), 119 deletions(-) diff --git a/i18ninfo/i18ninfo.cpp b/i18ninfo/i18ninfo.cpp index 28d79fa..6d74518 100644 --- a/i18ninfo/i18ninfo.cpp +++ b/i18ninfo/i18ninfo.cpp @@ -343,7 +343,6 @@ char *__print_i18n_type_string(const char *type, int num) static char *_date_basic_format_convert(const char *input_pattern, int i, const char *type) { - int ret = 0; i18n_udate_format_h format_h = NULL; i18n_uchar timezone[BUF_SIZE] = {0, }; @@ -551,7 +550,6 @@ static int __get_date_and_time(char *input_time) static int __get_number_format(const char *input_number) { - int ret = 0; printf(" - To get various number format\n"); printf("****************************************\n"); @@ -699,7 +697,6 @@ static int __convert_number(char *custom_number) printf(" Convert number : %s\n", p_string); free(str); PRINT_ASCIIDOC_LOG("|===\n"); - } free(number_to_convert); return 0; @@ -1050,7 +1047,6 @@ static int __get_timezone_info() free(timezone_id); return 0; - } static int __get_tzdata_version() @@ -1512,7 +1508,6 @@ void testDatentime(char *input, char *locale) if (ret == -1) { printf("get i18n date and time list failed\n"); } - } } @@ -1522,7 +1517,6 @@ void testNumberFormat(char *input, char *locale) int loc_count; if (!input) { - } else { if (!locale) { loc_count = i18n_ulocale_count_available(); diff --git a/src/include/utils_i18n_measure_format.h b/src/include/utils_i18n_measure_format.h index 1b2b5f6..a195e77 100644 --- a/src/include/utils_i18n_measure_format.h +++ b/src/include/utils_i18n_measure_format.h @@ -238,7 +238,7 @@ int i18n_measure_format_format_buff(const i18n_measure_format_h measure_format, * Can be NULL if @a append_to_size <= 0. Otherwise * must be NULL terminated. * @param[out] output_length The length of the output string, which is the string in - @a append_to buffer with formatted string. + @a append_to buffer with formatted string. * * @return @c 0 on success, otherwise a negative error value * @retval #I18N_ERROR_NONE Successful @@ -274,7 +274,7 @@ int i18n_measure_format_format_measures(const i18n_measure_format_h measure_form * Can be NULL if @a append_to_size <= 0. Otherwise * must be NULL terminated. * @param[out] output_length The length of the output string, which is the string in - @a append_to buffer with formatted string. + @a append_to buffer with formatted string. * * @return @c 0 on success, otherwise a negative error value * @retval #I18N_ERROR_NONE Successful diff --git a/src/include/utils_i18n_private.h b/src/include/utils_i18n_private.h index c7c1172..7098cdb 100644 --- a/src/include/utils_i18n_private.h +++ b/src/include/utils_i18n_private.h @@ -86,8 +86,8 @@ extern "C" { #define ERR_MAPPING(ICU_ERROR, BASE_UTILS_ERROR) BASE_UTILS_ERROR = \ (i18n_error_code_e)_i18n_error_mapping((int)ICU_ERROR) #define COPY_STR(dst, src, dst_len) do { \ - strncpy((dst), (src), (dst_len)); \ - (dst)[(dst_len) - 1] = '\0'; \ + strncpy((dst), (src), (dst_len)); \ + (dst)[(dst_len) - 1] = '\0'; \ } while (0) int _i18n_error_mapping(int err); diff --git a/src/include/utils_i18n_types.h b/src/include/utils_i18n_types.h index 4ec25a6..ad89866 100644 --- a/src/include/utils_i18n_types.h +++ b/src/include/utils_i18n_types.h @@ -91,7 +91,7 @@ i18n_error_code_e; /** * @brief This value is intended for sentinel values for APIs that take or return single code points (#i18n_uchar32). * @details It is outside of the Unicode code point range 0..0x10ffff. For example, a "done" or "error" value in a new - * API could be indicated with #I18N_SENTINEL. + * API could be indicated with #I18N_SENTINEL. * @since_tizen 4.0 */ #define I18N_SENTINEL (-1) @@ -105,7 +105,7 @@ i18n_error_code_e; * @{ */ -#define I18N_U_MASK(x) ((uint32_t)1<<(x)) /**< Get a single-bit bit set (a flag) from a bit number 0..31. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ +#define I18N_U_MASK(x) ((uint32_t)1 << (x)) /**< Get a single-bit bit set (a flag) from a bit number 0..31. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ #define I18N_U_GC_CN_MASK I18N_U_MASK(I18N_UCHAR_U_GENERAL_OTHER_TYPES) /**< U_GC_XX_MASK constants are bit flags corresponding to Unicode general category values. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ #define I18N_U_GC_LU_MASK I18N_U_MASK(I18N_UCHAR_U_UPPERCASE_LETTER) /**< Mask constant for a #i18n_uchar_category_e. @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif*/ @@ -836,7 +836,7 @@ typedef enum { I18N_UCHAR_UBLOCK_ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS, /**< Arabic Mathematical Alphabetic Symbols (Since 4.0) */ I18N_UCHAR_UBLOCK_CHAKMA, /**< Chakma (Since 4.0) */ I18N_UCHAR_UBLOCK_MEETEI_MAYEK_EXTENSIONS, /**< Meetei Mayek Extensions (Since 4.0) */ - I18N_UCHAR_UBLOCK_MEROITIC_CURSIVE, /**< Meroitic Cursive (Since 4.0) */ + I18N_UCHAR_UBLOCK_MEROITIC_CURSIVE, /**< Meroitic Cursive (Since 4.0) */ I18N_UCHAR_UBLOCK_MEROITIC_HIEROGLYPHS, /**< Meroitic Hieroglyphs (Since 4.0) */ I18N_UCHAR_UBLOCK_MIAO, /**< Miao (Since 4.0) */ I18N_UCHAR_UBLOCK_SHARADA, /**< Sharada (Since 4.0) */ @@ -1328,7 +1328,7 @@ typedef i18n_ubool (*i18n_uchar_enum_char_type_cb)(const void *context, * @param[in] code The Unicode code point for the character with this name * @param[in] name_choice Selector for which kind of names is enumerated * @param[in] name The character's name, zero-terminated. Can be used only in the callback. - * To use outside, make a copy. + * To use outside, make a copy. * @param[in] length The length of the name * * @return @c true if the enumeration should continue, @c false to stop it @@ -1872,13 +1872,13 @@ typedef enum { * @since_tizen 2.3.1 */ typedef enum { - I18N_UDISPLAY_CONTEXT_STANDARD_NAMES = (I18N_UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 0, /**< Standard names */ - I18N_UDISPLAY_CONTEXT_DIALECT_NAMES = (I18N_UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 1, /**< Dialect names */ - I18N_UDISPLAY_CONTEXT_CAPITALIZATION_NONE = (I18N_UDISPCTX_TYPE_CAPITALIZATION<<8) + 0, /**< Capitalization: None */ - I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = (I18N_UDISPCTX_TYPE_CAPITALIZATION<<8) + 1, /**< Capitalization: For middle of sentence */ - I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = (I18N_UDISPCTX_TYPE_CAPITALIZATION<<8) + 2, /**< Capitalization: For beginning of sentence */ - I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_UI_LIST_OR_MENU = (I18N_UDISPCTX_TYPE_CAPITALIZATION<<8) + 3, /**< Capitalization: For UI list or menu */ - I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_STANDALONE = (I18N_UDISPCTX_TYPE_CAPITALIZATION<<8) + 4, /**< Capitalization: For standalone */ + I18N_UDISPLAY_CONTEXT_STANDARD_NAMES = (I18N_UDISPCTX_TYPE_DIALECT_HANDLING << 8) + 0, /**< Standard names */ + I18N_UDISPLAY_CONTEXT_DIALECT_NAMES = (I18N_UDISPCTX_TYPE_DIALECT_HANDLING << 8) + 1, /**< Dialect names */ + I18N_UDISPLAY_CONTEXT_CAPITALIZATION_NONE = (I18N_UDISPCTX_TYPE_CAPITALIZATION << 8) + 0, /**< Capitalization: None */ + I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = (I18N_UDISPCTX_TYPE_CAPITALIZATION << 8) + 1, /**< Capitalization: For middle of sentence */ + I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = (I18N_UDISPCTX_TYPE_CAPITALIZATION << 8) + 2, /**< Capitalization: For beginning of sentence */ + I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_UI_LIST_OR_MENU = (I18N_UDISPCTX_TYPE_CAPITALIZATION << 8) + 3, /**< Capitalization: For UI list or menu */ + I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_STANDALONE = (I18N_UDISPCTX_TYPE_CAPITALIZATION << 8) + 4, /**< Capitalization: For standalone */ } i18n_udisplay_context_e; /* Skeletons for dates. */ @@ -2724,13 +2724,13 @@ typedef struct { typedef enum { I18N_USET_SPAN_NOT_CONTAINED = 0, /**< Continue a span() while there is no set element at the current position. Stops before the first set element (character or string). - (For code points only, this is like while contains(current)==false). + (For code points only, this is like while contains(current) == false). When span() returns, the substring between where it started and the position it returned consists only of characters that are not in the set, and none of its strings overlap with the span. */ I18N_USET_SPAN_CONTAINED = 1, /**< Continue a span() while there is a set element at the current position. - (For characters only, this is like while contains(current)==true). + (For characters only, this is like while contains(current) == true). When span() returns, the substring between where it started and the position it returned consists only of set elements (characters or strings) that are in the set. @@ -2740,7 +2740,7 @@ typedef enum { (There must be a single, non-overlapping concatenation of characters or strings.) This is equivalent to a POSIX regular expression for (OR of each set element). */ I18N_USET_SPAN_SIMPLE = 2, /**< Continue a span() while there is a set element at the current position. - (For characters only, this is like while contains(current)==true). + (For characters only, this is like while contains(current) == true). When span() returns, the substring between where it started and the position it returned consists only of set elements (characters or strings) that are in the set. @@ -4147,11 +4147,11 @@ typedef uint8_t i18n_uversion_info[I18N_UVERSION_MAX_VERSION_LENGTH]; * @since_tizen 4.0 */ typedef enum { - I18N_UCHAR_ITER_START, /**< The 'start' origin */ - I18N_UCHAR_ITER_CURRENT, /**< The 'current' origin */ - I18N_UCHAR_ITER_LIMIT, /**< The 'limit' origin */ - I18N_UCHAR_ITER_ZERO, /**< The 'zero' origin */ - I18N_UCHAR_ITER_LENGTH, /**< The 'length' origin */ + I18N_UCHAR_ITER_START, /**< The 'start' origin */ + I18N_UCHAR_ITER_CURRENT, /**< The 'current' origin */ + I18N_UCHAR_ITER_LIMIT, /**< The 'limit' origin */ + I18N_UCHAR_ITER_ZERO, /**< The 'zero' origin */ + I18N_UCHAR_ITER_LENGTH, /**< The 'length' origin */ } i18n_uchar_iter_origin_e; /** @@ -4280,9 +4280,9 @@ typedef void *i18n_plural_rules_h; * @since_tizen 4.0 */ typedef enum { - I18N_UPLURAL_TYPE_CARDINAL, /**< Plural rules for cardinal numbers: 1 file vs. 2 files */ - I18N_UPLURAL_TYPE_ORDINAL, /**< Plural rules for ordinal numbers: - 1st file, 2nd file, 3rd file, 4th file, etc. */ + I18N_UPLURAL_TYPE_CARDINAL, /**< Plural rules for cardinal numbers: 1 file vs. 2 files */ + I18N_UPLURAL_TYPE_ORDINAL, /**< Plural rules for ordinal numbers: + 1st file, 2nd file, 3rd file, 4th file, etc. */ } i18n_uplural_type_e; /** diff --git a/src/include/utils_i18n_uchar_iter.h b/src/include/utils_i18n_uchar_iter.h index 377a6b2..eafc17f 100644 --- a/src/include/utils_i18n_uchar_iter.h +++ b/src/include/utils_i18n_uchar_iter.h @@ -63,8 +63,8 @@ extern "C" { * @param[out] iter The #i18n_uchar_iter_h handle * * @return @c 0 on success, otherwise a negative error value - * @retval #I18N_ERROR_NONE Successful - * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter * @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory */ int i18n_uchar_iter_create(i18n_uchar_iter_h *iter); @@ -73,11 +73,11 @@ int i18n_uchar_iter_create(i18n_uchar_iter_h *iter); * @brief Deletes an #i18n_uchar_iter_h object. * @since_tizen 4.0 * - * @param[in] iter The #i18n_uchar_iter_h object + * @param[in] iter The #i18n_uchar_iter_h object * * @return @c 0 on success, otherwise a negative error value - * @retval #I18N_ERROR_NONE Successful - * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ int i18n_uchar_iter_destroy(i18n_uchar_iter_h iter); @@ -89,13 +89,13 @@ int i18n_uchar_iter_destroy(i18n_uchar_iter_h iter); * @since_tizen 4.0 * @remarks The string @a s will not be copied or reallocated. * - * @param[in] iter The #i18n_uchar_iter_h structure to be set for iteration - * @param[in] s String to iterate over - * @param[in] length Length of @a s, or @c -1 if @c NULL-terminated + * @param[in] iter The #i18n_uchar_iter_h structure to be set for iteration + * @param[in] s String to iterate over + * @param[in] length Length of @a s, or @c -1 if @c NULL-terminated * * @return @c 0 on success, otherwise a negative error value - * @retval #I18N_ERROR_NONE Successful - * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ int i18n_uchar_iter_set_string(i18n_uchar_iter_h iter, const i18n_uchar *s, int32_t length); @@ -107,15 +107,15 @@ int i18n_uchar_iter_set_string(i18n_uchar_iter_h iter, const i18n_uchar *s, int3 * of bytes. * @since_tizen 4.0 * - * @param[in] iter #i18n_uchar_iter_h structure to be set for iteration - * @param[in] s UTF-16BE string to iterate over - * @param[in] length Length of @a s as an even number of bytes, or @c -1 if - * @c NULL-terminated (@c NULL means pair of 0 bytes at even - * index from @a s) + * @param[in] iter #i18n_uchar_iter_h structure to be set for iteration + * @param[in] s UTF-16BE string to iterate over + * @param[in] length Length of @a s as an even number of bytes, or @c -1 if + * @c NULL-terminated (@c NULL means pair of 0 bytes at even + * index from @a s) * * @return @c 0 on success, otherwise a negative error value - * @retval #I18N_ERROR_NONE Successful - * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter */ int i18n_uchar_iter_set_utf16be(i18n_uchar_iter_h iter, const char *s, int32_t length); @@ -131,15 +131,15 @@ int i18n_uchar_iter_set_utf16be(i18n_uchar_iter_h iter, const char *s, int32_t l * middle of a surrogate pair (from a 4-byte UTF-8 sequence for the corresponding supplementary code point). * i18n_uchar_iter_get_state() cannot also encode the UTF-16 index in the state value. * - * @param[in] iter #i18n_uchar_iter_h structure to be set for iteration - * @param[in] s UTF-8 string to iterate over - * @param[in] length Length of @a s, or @c -1 if @c NULL-terminated + * @param[in] iter #i18n_uchar_iter_h structure to be set for iteration + * @param[in] s UTF-8 string to iterate over + * @param[in] length Length of @a s, or @c -1 if @c NULL-terminated * * @return @c 0 on success, otherwise a negative error value - * @retval #I18N_ERROR_NONE Successful - * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter - * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), - * i18n_uchar_iter_set_UTF8(). + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), + * i18n_uchar_iter_set_UTF8(). */ int i18n_uchar_iter_set_utf8(i18n_uchar_iter_h iter, const char *s, int32_t length); @@ -150,15 +150,15 @@ int i18n_uchar_iter_set_utf8(i18n_uchar_iter_h iter, const char *s, int32_t leng * UChars if the underlying storage is not UTF-16. * @since_tizen 4.0 * - * @param[in] iter The #i18n_uchar_iter_h object - * @param[in] origin Origin defining action to perform - * @param[out] index The requested index, or #I18N_SENTINEL in an error condition + * @param[in] iter The #i18n_uchar_iter_h object + * @param[in] origin Origin defining action to perform + * @param[out] index The requested index, or #I18N_SENTINEL in an error condition * * @return @c 0 on success, otherwise a negative error value - * @retval #I18N_ERROR_NONE Successful - * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter - * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), - * i18n_uchar_iter_set_UTF8(). + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), + * i18n_uchar_iter_set_UTF8(). */ int i18n_uchar_iter_get_index(i18n_uchar_iter_h iter, i18n_uchar_iter_origin_e origin, int32_t *index); @@ -174,17 +174,17 @@ int i18n_uchar_iter_get_index(i18n_uchar_iter_h iter, i18n_uchar_iter_origin_e o * i18n_uchar_iter_get_index(#I18N_UCHAR_ITER_CURRENT) which will count the UChars if necessary. * @since_tizen 4.0 * - * @param[in] iter The #i18n_uchar_iter_h object - * @param[in] delta Movement - * @param[in] origin Origin defining action to perform - * @param[out] new_index The new index or #I18N_UCHAR_ITER_UNKNOWN_INDEX when the index is not known, - * or #I18N_SENTINEL on an error condition + * @param[in] iter The #i18n_uchar_iter_h object + * @param[in] delta Movement + * @param[in] origin Origin defining action to perform + * @param[out] new_index The new index or #I18N_UCHAR_ITER_UNKNOWN_INDEX when the index is not known, + * or #I18N_SENTINEL on an error condition * * @return @c 0 on success, otherwise a negative error value - * @retval #I18N_ERROR_NONE Successful - * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter - * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), - * i18n_uchar_iter_set_UTF8(). + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), + * i18n_uchar_iter_set_UTF8(). */ int i18n_uchar_iter_move(i18n_uchar_iter_h iter, int32_t delta, i18n_uchar_iter_origin_e origin, int32_t *new_index); @@ -192,14 +192,14 @@ int i18n_uchar_iter_move(i18n_uchar_iter_h iter, int32_t delta, i18n_uchar_iter_ * @brief Checks if i18n_uchar_iter_current() and i18n_uchar_iter_next() can still return another code unit. * @since_tizen 4.0 * - * @param[in] iter The #i18n_uchar_iter_h object - * @param[out] has_next @c true if another code unit can be returned, @c false otherwise + * @param[in] iter The #i18n_uchar_iter_h object + * @param[out] has_next @c true if another code unit can be returned, @c false otherwise * * @return @c 0 on success, otherwise a negative error value - * @retval #I18N_ERROR_NONE Successful - * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter - * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), - * i18n_uchar_iter_set_UTF8(). + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), + * i18n_uchar_iter_set_UTF8(). */ int i18n_uchar_iter_has_next(i18n_uchar_iter_h iter, bool *has_next); @@ -207,62 +207,62 @@ int i18n_uchar_iter_has_next(i18n_uchar_iter_h iter, bool *has_next); * @brief Checks if i18n_uchar_iter_previous() can still return another code unit. * @since_tizen 4.0 * - * @param[in] iter The #i18n_uchar_iter_h object - * @param[out] has_previous @c true if another code unit can be returned, @c false otherwise + * @param[in] iter The #i18n_uchar_iter_h object + * @param[out] has_previous @c true if another code unit can be returned, @c false otherwise * * @return @c 0 on success, otherwise a negative error value - * @retval #I18N_ERROR_NONE Successful - * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter - * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), - * i18n_uchar_iter_set_UTF8(). + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), + * i18n_uchar_iter_set_UTF8(). */ int i18n_uchar_iter_has_previous(i18n_uchar_iter_h iter, bool *has_previous); /** * @brief Returns the code unit at the current position, or #I18N_SENTINEL if there is none - * (index is at the limit). + * (index is at the limit). * @since_tizen 4.0 * - * @param[in] iter The #i18n_uchar_iter_h object - * @param[out] current The current code unit + * @param[in] iter The #i18n_uchar_iter_h object + * @param[out] current The current code unit * * @return @c 0 on success, otherwise a negative error value - * @retval #I18N_ERROR_NONE Successful - * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter - * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), - * i18n_uchar_iter_set_UTF8(). + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), + * i18n_uchar_iter_set_UTF8(). */ int i18n_uchar_iter_current(i18n_uchar_iter_h iter, i18n_uchar32 *current); /** * @brief Returns the code unit at the current index and increments the index (post-increment, like s[i++]), - * or returns #I18N_SENTINEL if there is none (index is at the limit). + * or returns #I18N_SENTINEL if there is none (index is at the limit). * @since_tizen 4.0 * - * @param[in] iter The #i18n_uchar_iter_h object - * @param[out] current The current code unit + * @param[in] iter The #i18n_uchar_iter_h object + * @param[out] current The current code unit * * @return @c 0 on success, otherwise a negative error value - * @retval #I18N_ERROR_NONE Successful - * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter - * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), - * i18n_uchar_iter_set_UTF8(). + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), + * i18n_uchar_iter_set_UTF8(). */ int i18n_uchar_iter_next(i18n_uchar_iter_h iter, i18n_uchar32 *current); /** * @brief Decrements the index and returns the code unit from there (pre-decrement, like s[--i]), - * or returns #I18N_SENTINEL if there is none (index is at the start). + * or returns #I18N_SENTINEL if there is none (index is at the start). * @since_tizen 4.0 * - * @param[in] iter The #i18n_uchar_iter_h object - * @param[out] previous The previous code unit + * @param[in] iter The #i18n_uchar_iter_h object + * @param[out] previous The previous code unit * * @return @c 0 on success, otherwise a negative error value - * @retval #I18N_ERROR_NONE Successful - * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter - * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), - * i18n_uchar_iter_set_UTF8(). + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), + * i18n_uchar_iter_set_UTF8(). */ int i18n_uchar_iter_previous(i18n_uchar_iter_h iter, i18n_uchar32 *previous); @@ -294,13 +294,13 @@ int i18n_uchar_iter_previous(i18n_uchar_iter_h iter, i18n_uchar32 *previous); * @since_tizen 4.0 * * @param[in] iter The #i18n_uchar_iter_h object - * @param[out] state The state word + * @param[out] state The state word * * @return @c 0 on success, otherwise a negative error value - * @retval #I18N_ERROR_NONE Successful - * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter - * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), - * i18n_uchar_iter_set_UTF8(). + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), + * i18n_uchar_iter_set_UTF8(). */ int i18n_uchar_iter_get_state(const i18n_uchar_iter_h iter, uint32_t *state); @@ -314,15 +314,15 @@ int i18n_uchar_iter_get_state(const i18n_uchar_iter_h iter, uint32_t *state); * the correct text contents and move relative to the current position without performance degradation. * @since_tizen 4.0 * - * @param[in] iter The #i18n_uchar_iter_h object - * @param[in] state The state word from an i18n_uchar_iter_get_state() call on a same-type, - * same-string iterator + * @param[in] iter The #i18n_uchar_iter_h object + * @param[in] state The state word from an i18n_uchar_iter_get_state() call on a same-type, + * same-string iterator * * @return @c 0 on success, otherwise a negative error value - * @retval #I18N_ERROR_NONE Successful - * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter - * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), - * i18n_uchar_iter_set_UTF8(). + * @retval #I18N_ERROR_NONE Successful + * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter + * @pre The string must be set with one of: i18n_uchar_iter_set_string(), i18n_uchar_iter_set_UTF16BE(), + * i18n_uchar_iter_set_UTF8(). */ int i18n_uchar_iter_set_state(i18n_uchar_iter_h iter, uint32_t state); diff --git a/src/utils_i18n_timezone.cpp b/src/utils_i18n_timezone.cpp index fe5ce27..df6e10f 100755 --- a/src/utils_i18n_timezone.cpp +++ b/src/utils_i18n_timezone.cpp @@ -229,7 +229,6 @@ int i18n_timezone_get_region(const char *timezone_id, char *region, int32_t *reg *region_len = TimeZone::getRegion(id, region, region_capacity, status); return _i18n_error_mapping(status); - } int i18n_timezone_get_offset_with_date(i18n_timezone_h timezone, i18n_udate date, i18n_ubool local, @@ -242,7 +241,6 @@ int i18n_timezone_get_offset_with_date(i18n_timezone_h timezone, i18n_udate date ((TimeZone *) timezone)->getOffset(date, local, *raw_offset, *dst_offset, status); return _i18n_error_mapping(status); - } int i18n_timezone_set_raw_offset(i18n_timezone_h timezone, int32_t offset_milliseconds) -- 2.7.4