diff --git a/configure b/configure

index 407886859d8ca0b9cbcb085ecef89d004c68cde4..aca6e8a1eaa9a6271f03eb8863640d0d93cdf435 100755

--- a/configure

+++ b/configure

@@ -7,6 +7,7 @@ genrules gmni \

	src/client.c \

	src/escape.c \

	src/gmni.c \

	src/url.c

}

diff --git a/include/gmni.h b/include/gmni.h

index 4d46380f2ef13db72ebf2e1a3434865142b6bcbc..d78d1c8eb4e94507c363219573691e60d40e8ea8 100644

--- a/include/gmni.h

+++ b/include/gmni.h

@@ -103,4 +103,64 @@ // Returns the general response class (i.e. with the second digit set to zero)

// of the given Gemini status code.

enum gemini_status_class gemini_response_class(enum gemini_status status);

+enum gemini_tok {

+};

+struct gemini_token {

+};

+struct gemini_parser {

+};

+// Initializes a text/gemini parser which reads from the specified BIO.

+void gemini_parser_init(struct gemini_parser *p, BIO *f);

+// Finishes this text/gemini parser and frees up its resources.

+void gemini_parser_finish(struct gemini_parser *p);

+// Reads the next token from a text/gemini file.

+//

+// Returns 0 on success, 1 on EOF, and -1 on failure.

+//

+// Caller must call gemini_token_finish before exiting or re-using the token

+// parameter.

+int gemini_parser_next(struct gemini_parser *p, struct gemini_token *token);

+// Must be called after gemini_next to free up resources for the next token.

+void gemini_token_finish(struct gemini_token *token);

#endif

diff --git a/src/gmni.c b/src/gmni.c

index 6e27b2f859c692f37fb483184cda245a7e979cbe..75c6c5afb6e7f1f286d314d93f2b44ef8414afb3 100644

--- a/src/gmni.c

+++ b/src/gmni.c

@@ -233,9 +233,11 @@ case SHOW_HEADERS:

		printf("%d %s\n", resp.status, resp.meta);

		/* fallthrough */

	case OMIT_HEADERS:

			break;

		}

		char last;

		char buf[BUFSIZ];

		for (int n = 1; n > 0;) {

diff --git a/src/parser.c b/src/parser.c

new file mode 100644

index 0000000000000000000000000000000000000000..ffcc28767be7d638d18609764999d004790aa9a2

--- /dev/null

+++ b/src/parser.c

@@ -0,0 +1,144 @@

+#include <assert.h>

+#include <ctype.h>

+#include <openssl/bio.h>

+#include <stddef.h>

+#include <stdlib.h>

+#include <string.h>

+#include "gmni.h"

+void

+gemini_parser_init(struct gemini_parser *p, BIO *f)

+{

+}

+void

+gemini_parser_finish(struct gemini_parser *p)

+{

+}

+int

+gemini_parser_next(struct gemini_parser *p, struct gemini_token *tok)

+{

+}

+void

+gemini_token_finish(struct gemini_token *tok)

+{

+}

Proxy Information
Original URL
gemini://gmn.clttr.info:1965/sources/cgmnlm.git/commits/48d0feed6d097c54662a7f231c7bc4704837f023.patch
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
139.687032 milliseconds
Gemini-to-HTML Time
4.098912 milliseconds

This content has been proxied by September (3851b).