From cbf21103b97023803c63c5041311a3057efa8098 Mon Sep 17 00:00:00 2001 From: HummyPkg Date: Thu, 9 Mar 2017 20:34:12 +0000 Subject: [PATCH] Add function documentation to README --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 9ba937c..f65b8ad 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,29 @@ # libxconv Lightweight ISO-6937 to UTF-8 conversion library. +## SYNOPSIS +`` +int xconv(char *inbuf, char *outbuf, size_t outbuflen); +`` + +## DESCRIPTION + +The xconv() function converts a sequence of characters in ISO-6937 +encoding to UTF-8. + +If a UTF-8 sequence is found within the input string, processing is aborted. + +## RETURN VALUE + +On successful conversion, the xconv() function returns the number of +characters placed into _outbuf_. + +If no conversion is necessary (plain ASCII input string or a UTF-8 sequence +was found) then the function returns 0. In this case, the state of the +output buff is undefined and it should not be used. + +## NOTES + +This library was written to replace iconv() for a specific conversion task +in a small embedded environment with little memory or CPU time available. +