Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / icu / source / tools / genrb / read.c
index 15c4db4..358c683 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 1998-2009, International Business Machines
+*   Copyright (C) 1998-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -19,6 +19,7 @@
 #include "read.h"
 #include "errmsg.h"
 #include "unicode/ustring.h"
+#include "unicode/utf16.h"
 
 #define OPENBRACE    0x007B
 #define CLOSEBRACE   0x007D
@@ -47,7 +48,7 @@ static void    seekUntilEndOfComment (UCHARBUF *buf, struct UString *token, UErr
 static UBool   isWhitespace          (UChar32 c);
 static UBool   isNewline             (UChar32 c);
 
-void resetLineNumber() {
+U_CFUNC void resetLineNumber() {
     lineCount = 1;
 }
 
@@ -59,11 +60,12 @@ void resetLineNumber() {
    never return eString twice in a row; instead, multiple adjacent
    string tokens will be merged into one, with no intervening
    space. */
-enum ETokenType getNextToken(UCHARBUF* buf,
-                             struct UString *token,
-                             uint32_t *linenumber, /* out: linenumber of token */
-                             struct UString *comment,
-                             UErrorCode *status) {
+U_CFUNC enum ETokenType
+getNextToken(UCHARBUF* buf,
+             struct UString *token,
+             uint32_t *linenumber, /* out: linenumber of token */
+             struct UString *comment,
+             UErrorCode *status) {
     enum ETokenType result;
     UChar32         c;
 
@@ -428,8 +430,7 @@ static void seekUntilEndOfComment(UCHARBUF *buf,
     }
 }
 
-UChar32 unescape(UCHARBUF *buf,
-                 UErrorCode *status) {
+U_CFUNC UChar32 unescape(UCHARBUF *buf, UErrorCode *status) {
     if (U_FAILURE(*status)) {
         return U_EOF;
     }