diff --git a/syllable.c b/syllable.c index 90b17ed..a0f9ee6 100644 --- a/syllable.c +++ b/syllable.c @@ -33,7 +33,7 @@ struct syllable *syllable_append(struct syllable *tail, const char *data) return ptr; } -unsigned long syllable_chain_length(struct syllable *head) +unsigned int syllable_chain_length(struct syllable *head) { struct syllable *walk = head; unsigned int length = 0; diff --git a/syllable.h b/syllable.h index 739ff56..2ac75da 100644 --- a/syllable.h +++ b/syllable.h @@ -13,7 +13,7 @@ void syllable_drop(struct syllable *syllable); struct syllable *syllable_append(struct syllable *tail, const char *data); -unsigned long syllable_chain_length(struct syllable *head); +unsigned int syllable_chain_length(struct syllable *head); char *syllable_chain_to_string(struct syllable *head); #endif /* __SYLLABE_H */ diff --git a/transliteration.c b/transliteration.c index 6524d64..6558eb7 100644 --- a/transliteration.c +++ b/transliteration.c @@ -7,7 +7,7 @@ #include "syllable.h" #include "utf8.h" -static const struct transliteration_letter *find_letter_by_code(unsigned long c, +static const struct transliteration_letter *find_letter_by_code(unsigned int c, const struct transliteration_letter *table) { const struct transliteration_letter *walk = table; @@ -43,7 +43,7 @@ char *transliterate_devanagari_to_latin(const char *text, const char *ptr = text; const char *end = ptr + length; char *tmp; - unsigned long c; + unsigned int c; struct syllable *head, *tail; const struct transliteration_letter *letter; diff --git a/transliteration.h b/transliteration.h index 408c49c..22ca2f0 100644 --- a/transliteration.h +++ b/transliteration.h @@ -10,7 +10,7 @@ #define FLAG_MODIFIER 1 << 1 struct transliteration_letter { - unsigned long code; + unsigned int code; unsigned int flags; const char *data; }; diff --git a/utf8.c b/utf8.c index 8a27e08..394f086 100644 --- a/utf8.c +++ b/utf8.c @@ -3,9 +3,9 @@ #include #include "utf8.h" -unsigned long utf8_unpack_char(const char *src) +unsigned int utf8_unpack_char(const char *src) { - unsigned long c = 0; + unsigned int c = 0; if ((src[0] & 0x80) == 0x00) { c = ((src[0] & 0x7f) << 0); @@ -26,7 +26,7 @@ unsigned long utf8_unpack_char(const char *src) return c; } -void utf8_pack_char(char *dest, unsigned long c) +void utf8_pack_char(char *dest, unsigned int c) { if (c <= 0x00007f) { dest[0] = c; @@ -47,7 +47,7 @@ void utf8_pack_char(char *dest, unsigned long c) } } -unsigned int utf8_char_length(unsigned long c) +unsigned int utf8_char_length(unsigned int c) { if (c <= 0x00007f) { return 1; @@ -62,7 +62,7 @@ unsigned int utf8_char_length(unsigned long c) return 0; // should not happen } -char *utf8_code_to_string(unsigned long c) +char *utf8_code_to_string(unsigned int c) { unsigned int length = utf8_char_length(c) + 1; char *buffer; diff --git a/utf8.h b/utf8.h index 2291254..83864f2 100644 --- a/utf8.h +++ b/utf8.h @@ -3,10 +3,10 @@ #ifndef __UTF8_H #define __UTF8_H -unsigned long utf8_unpack_char(const char *src); -void utf8_pack_char(char *dest, unsigned long c); +unsigned int utf8_unpack_char(const char *src); +void utf8_pack_char(char *dest, unsigned int c); -unsigned int utf8_char_length(unsigned long c); -char *utf8_code_to_string(unsigned long c); +unsigned int utf8_char_length(unsigned int c); +char *utf8_code_to_string(unsigned int c); #endif /* __UTF8_H */