diff options
author | Guillaume Poirier <gpoirier@mplayerhq.hu> | 2006-11-06 12:38:00 +0000 |
---|---|---|
committer | Guillaume Poirier <gpoirier@mplayerhq.hu> | 2006-11-06 12:38:00 +0000 |
commit | d73427e347569d5f5f29f118217ad2e086a24990 (patch) | |
tree | c0a6100fe9bae1a6279e63c6d2322375f99a814b /libavutil | |
parent | 79e7b9609e3b1580c62f29dc349e4125c4101d74 (diff) | |
download | ffmpeg-streaming-d73427e347569d5f5f29f118217ad2e086a24990.zip ffmpeg-streaming-d73427e347569d5f5f29f118217ad2e086a24990.tar.gz |
Add doxy comments for macro GET_UTF8
another fix in PUT_UTF8 doxy description
Originally committed as revision 6917 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/common.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/libavutil/common.h b/libavutil/common.h index 2aaabfa..6b61d82 100644 --- a/libavutil/common.h +++ b/libavutil/common.h @@ -322,6 +322,18 @@ static inline int ff_get_fourcc(const char *s){ #define MKTAG(a,b,c,d) (a | (b << 8) | (c << 16) | (d << 24)) #define MKBETAG(a,b,c,d) (d | (c << 8) | (b << 16) | (a << 24)) +/*! + * \def GET_UTF8(val, GET_BYTE, ERROR) + * converts a utf-8 character (up to 4 bytes long) to its 32-bit ucs-4 encoded form + * \param val is the output and should be of type uint32_t. It holds the converted + * ucs-4 character and should be a left value. + * \param GET_BYTE gets utf-8 encoded bytes from any proper source. It can be + * a function or a statement whose return value or evaluated value is of type + * uint8_t. It will be execuded up to 4 times. + * \param ERROR action that should be taken when an invalid utf-8 byte is returned + * from GET_BYTE. It should be a statement that jumps out of the macro, + * like exit(), goto, return, break, or continue. + */ #define GET_UTF8(val, GET_BYTE, ERROR)\ val= GET_BYTE;\ {\ @@ -339,7 +351,7 @@ static inline int ff_get_fourcc(const char *s){ /*! * \def PUT_UTF8(val, tmp, PUT_BYTE) - * converts a 32-bit unicode character to its utf-8 encoded form (up to 6 bytes long). + * converts a 32-bit unicode character to its utf-8 encoded form (up to 4 bytes long). * \param val is an input only argument and should be of type uint32_t. It holds * a ucs4 encoded unicode character that is to be converted to utf-8. If * val is given as a function it's executed only once. @@ -349,7 +361,7 @@ static inline int ff_get_fourcc(const char *s){ * \param PUT_BYTE writes the converted utf-8 bytes to any proper destination. * It could be a function or a statement, and uses tmp as the input byte. * For example, PUT_BYTE could be "*output++ = tmp;" PUT_BYTE will be - * executed up to 6 times, depending on the length of the converted + * executed up to 4 times, depending on the length of the converted * unicode character. */ #define PUT_UTF8(val, tmp, PUT_BYTE)\ |