X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Funicode.h;h=f5139ec10f4c52c075dfd50747fb03b8b8e9f4a9;hb=cfc50ae514f805dcd9c14589f21158185424daf6;hp=0f20bdc78ee9ee326d154941b35af1ac2fb5b9ce;hpb=f38b84ea2b6b61d309c604faedd41ab3b0fcf16b;p=sliver-openvswitch.git diff --git a/lib/unicode.h b/lib/unicode.h index 0f20bdc78..f5139ec10 100644 --- a/lib/unicode.h +++ b/lib/unicode.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Nicira Networks. + * Copyright (c) 2009, 2010 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,8 @@ #define UNICODE_H 1 #include +#include +#include "compiler.h" /* Returns true if 'c' is a Unicode code point, otherwise false. */ static inline bool @@ -50,4 +52,7 @@ uc_is_surrogate(int c) int utf16_decode_surrogate_pair(int leading, int trailing); +size_t utf8_length(const char *); +char *utf8_validate(const char *, size_t *lengthp) WARN_UNUSED_RESULT; + #endif /* unicode.h */