about summary refs log tree commit diff stats
path: root/gemtext_encode.3
diff options
context:
space:
mode:
Diffstat (limited to 'gemtext_encode.3')
-rw-r--r--gemtext_encode.339
1 files changed, 34 insertions, 5 deletions
diff --git a/gemtext_encode.3 b/gemtext_encode.3
index 046d21e..28fb5cc 100644
--- a/gemtext_encode.3
+++ b/gemtext_encode.3
@@ -15,7 +15,7 @@
 .Fo gemtext_encode
 .Fa "struct gemtext *line"
 .Fa "char **textptr"
-.Fa "int *lenptr"
+.Fa "size_t *lenptr"
 .Fc
 .Ft int
 .Fo gemtext_encode_fd
@@ -31,7 +31,7 @@
 .Fo gemtext_list_encode
 .Fa "struct gemtext **list"
 .Fa "char **textptr"
-.Fa "int *lenptr"
+.Fa "size_t *lenptr"
 .Fc
 .Ft int
 .Fo gemtext_list_encode_fd
@@ -43,6 +43,22 @@
 .Fa "struct gemtext **list"
 .Fa "const char *path"
 .Fc
+.Ft int
+.Fo gemtext_list_encode_to_html
+.Fa "struct gemtext **list"
+.Fa "char **textptr"
+.Fa "size_t *lenptr"
+.Fc
+.Ft int
+.Fo gemtext_list_encode_to_html_fd
+.Fa "struct gemtext **list"
+.Fa "int fd"
+.Fc
+.Ft int
+.Fo gemtext_list_encode_to_html_file
+.Fa "struct gemtext **list"
+.Fa "const char *path"
+.Fc
 .Sh DESCRIPTION
 .Fn gemtext_encode
 encodes
@@ -52,7 +68,7 @@ to
 and sets pointer pointed to by
 .Em textptr
 to the encoded text and sets
-.Em int
+.Em size_t
 pointed to by
 .Em lenptr
 to the size of the encoded text excluding terminating NULL byte, this can be discarded by setting
@@ -88,14 +104,27 @@ behave the same as the
 family of functions, except they operate on a list of
 .Em struct gemtext*
 terminated by a NULL pointer.
+.Pp
+.Fn gemtext_list_encode_to_html ,
+.Fn gemtext_list_encode_to_html_fd
+and
+.Fn gemtext_list_encode_to_html_file
+behave the same as the
+.Fn gemtext_list_encode
+family of functions, except the output provided in
+.Em textptr
+is formatted in HTML instead of gemtext.
 .Sh RETURN VALUES
 .Fn gemtext_encode ,
 .Fn gemtext_encode_fd ,
 .Fn gemtext_encode_file ,
 .Fn gemtext_list_encode ,
-.Fn gemtext_list_encode_fd
+.Fn gemtext_list_encode_fd ,
+.Fn gemtext_list_encode_file ,
+.Fn gemtext_list_encode_to_html ,
+.Fn gemtext_list_encode_to_html_fd
 and
-.Fn gemtext_list_encode_file
+.Fn gemtext_list_encode_to_html_file
 all return
 .Em 0
 on success or