more docs
This commit is contained in:
@@ -24,11 +24,12 @@
|
|||||||
* | THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | *
|
* | THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | *
|
||||||
* | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | *
|
* | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | *
|
||||||
* | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH | *
|
* | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH | *
|
||||||
* | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | * *
|
* | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | * *
|
||||||
* +------------------------------------------------------------+--+ *
|
* +------------------------------------------------------------+--+ *
|
||||||
* | For more information, please refer to <http://unlicense.org/> | *
|
* | For more information, please refer to <http://unlicense.org/> | *
|
||||||
* +---------------------------------------------------------------+ *
|
* +---------------------------------------------------------------+ *
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
/* Takes as input a string of C code [str] of length
|
||||||
|
* [len] and returns the same C code but annotated
|
||||||
|
* with HTML tags. The returned string must be freed
|
||||||
|
* using [free]. The class names of each tag are
|
||||||
|
* prefixed with the value provided through [prefix].
|
||||||
|
* If [prefix] is NULL, then no prefix is used.
|
||||||
|
*
|
||||||
|
* If the function fails, NULL is returned and a
|
||||||
|
* human-readable description of the error is
|
||||||
|
* returned through the output parameter [error].
|
||||||
|
* The returned error string doesn't need to be
|
||||||
|
* deallocated. If you're not interested in the
|
||||||
|
* error description, you can just provide NULL.
|
||||||
|
*
|
||||||
|
* The [str] string isn't assumed to be zero-terminated
|
||||||
|
* and if it's NULL, an empty string is assumed.
|
||||||
|
*
|
||||||
|
* If [len] is negative, then [str] is assumed
|
||||||
|
* to be zero-terminated and it's length is calculated
|
||||||
|
* using [strlen].
|
||||||
|
*/
|
||||||
char *c2html(const char *str, long len,
|
char *c2html(const char *str, long len,
|
||||||
const char *prefix, const char **error);
|
const char *prefix, const char **error);
|
||||||
|
|||||||
@@ -65,10 +65,9 @@
|
|||||||
* the c2h- prefix is used, which is the default in the
|
* the c2h- prefix is used, which is the default in the
|
||||||
* CLI but not in the C API.
|
* CLI but not in the C API.
|
||||||
*
|
*
|
||||||
* Most of the following attributes are merely stylistic.
|
* Most of the following attributes are merely stylistic,
|
||||||
* Some of them though are necessary for a correct
|
* but some are necessary for a correct display of the
|
||||||
* display of the code. Read the following comments
|
* code. Read the following comments to know more.
|
||||||
* to know more.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user