aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Johnson <nick@nicksphere.ch>2022-01-18 00:00:00 +0000
committerNicholas Johnson <nick@nicksphere.ch>2022-01-18 00:00:00 +0000
commitc3c766e2602c911b9033baf90ded125d1b9403c4dc653a133e899d62f9173caf (patch)
tree55a5d7b8dddccd1c88a33178eeb7d262a9bf8855519e330996331f1ea5d82bac
parent7a280b6c86c99371f2a9d8ecc142be6b80a690f1f4585da8d51fbd66dff350d6 (diff)
Document header file and main
-rw-r--r--src/gemini2html.h4
-rw-r--r--src/main.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/gemini2html.h b/src/gemini2html.h
index 2d40c5f..0b86e42 100644
--- a/src/gemini2html.h
+++ b/src/gemini2html.h
@@ -1,4 +1,8 @@
#ifndef GEMINI2HTML_H
#define GEMINI2HTML_H
+/*
+ * Reads in Gemini from standard in, outputs HTML to standard out.
+ * Returns 0 if file conversion is successful, -1 if file reading/writing fails.
+ */
int gmi_to_html(FILE* fp_gmi, FILE* fp_html);
#endif \ No newline at end of file
diff --git a/src/main.c b/src/main.c
index 90d8b06..a1baf35 100644
--- a/src/main.c
+++ b/src/main.c
@@ -22,6 +22,7 @@
#include "gemini2html.h"
+/* displays the help menu */
void display_help_text(char* prog) {
char* help_text =
"Convert Gemini files to HTML.\n"
@@ -33,6 +34,7 @@ void display_help_text(char* prog) {
printf("Usage: %s [OPTION]... < input.gmi > output.html\n%s", prog, help_text);
}
+/* CLI for gemini2html */
int main(int argc, char* argv[]) {
if (argc > 1) {
if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0) {