diff --git a/config.sh b/config.sh

index fc1134c0c98d9f57cb2cfdbb3b9d6faf35001dfd..70c4489bf5fd48fc0eb636bf739a5d82dcff8663 100644

--- a/config.sh

+++ b/config.sh

@@ -5,6 +5,7 @@ AS=${AS:-as}

CC=${CC:-cc}

CFLAGS=${CFLAGS:-}

LD=${LD:-ld}

+LIBSSL=

for arg

do

@@ -12,6 +13,9 @@ # TODO: Add args for install directories

case "$arg" in

	--prefix=*)

		PREFIX=${arg#*=}

		;;

esac

done

@@ -72,12 +76,27 @@ return 1

fi

}

+find_library() {

+}

run_configure() {

mkdir -p $outdir

for flag in -g -std=c11 -D_XOPEN_SOURCE=700 -Wall -Wextra -Werror -pedantic

do

	if test_cflags "$flag"

	then

		echo yes

@@ -86,9 +105,13 @@ echo no

	fi

done

printf "Creating $outdir/config.mk... "

cat <<-EOF > "$outdir"/config.mk

CC=$CC

PREFIX=${PREFIX:-/usr/local}

OUTDIR=${outdir}

_INSTDIR=\$(DESTDIR)\$(PREFIX)

diff --git a/configure b/configure

index 7b1a48b785b7ab1a8811cb36ea9ee00a68fc9ff8..680b57fc9e319c2707e0cc2ded0bc22597544d78 100755

--- a/configure

+++ b/configure

@@ -4,7 +4,10 @@ eval ". $srcdir/config.sh"

gmni() {

genrules gmnic \

}

all="gmnic"

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

new file mode 100644

index 0000000000000000000000000000000000000000..dbd73234311331ea52650d59dbd9cf535b73298b

--- /dev/null

+++ b/include/client.h

@@ -0,0 +1,67 @@

+#ifndef GEMINI_CLIENT_H

+#define GEMINI_CLIENT_H

+#include <netdb.h>

+#include <openssl/ssl.h>

+#include <sys/socket.h>

+struct gemini_response {

+};

+struct gemini_options {

+};

+enum gemini_result {

+};

+// Requests the specified URL via the gemini protocol. If options is non-NULL,

+// it may specify some additional configuration to adjust client behavior.

+//

+// Returns a value indicating the success of the request. If GEMINI_OK is

+// returned, the response details shall be written to the gemini_response

+// argument.

+enum gemini_result gemini_request(const char *url,

+// Must be called after gemini_request in order to free up the resources

+// allocated during the request. If you intend to re-use the SSL_CTX provided by

+// gemini_options, set the ctx pointer to NULL before calling

+// gemini_response_finish.

+void gemini_response_finish(struct gemini_response *resp);

+#endif

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

new file mode 100644

index 0000000000000000000000000000000000000000..a1184ba3141b2992b0b18e44105bdc4474a7d8c9

--- /dev/null

+++ b/include/escape.h

@@ -0,0 +1,175 @@

+#ifndef ESCAPE_H

+#define ESCAPE_H

+/***************************************************************************

+/* from curl.h */

+typedef enum {

+} CURLcode;

+/* Escape and unescape URL encoding in strings. The functions return a new

+bool Curl_isunreserved(unsigned char in);

+CURLcode Curl_urldecode(const char *string, size_t length,

+char *curl_easy_escape(const char *string, int length);

+char *curl_escape(const char *string, int length);

+char *curl_easy_unescape(const char *string,

+char *curl_unescape(const char *string, int length);

+#endif /* HEADER_CURL_ESCAPE_H */

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

new file mode 100644

index 0000000000000000000000000000000000000000..155fd55740dbe47a498062713aca217ab259734f

--- /dev/null

+++ b/include/url.h

@@ -0,0 +1,103 @@

+#ifndef URLAPI_H

+#define URLAPI_H

+/***************************************************************************

+/* the error codes for the URL API */

+typedef enum {

+} CURLUcode;

+typedef enum {

+} CURLUPart;

+#define CURLU_PATH_AS_IS (1<<4) /* leave dot sequences */

+#define CURLU_DISALLOW_USER (1<<5) /* no user+password allowed */

+#define CURLU_URLDECODE (1<<6) /* URL decode on get */

+#define CURLU_URLENCODE (1<<7) /* URL encode on set */

+#define CURLU_APPENDQUERY (1<<8) /* append a form style part */

+typedef struct Curl_URL CURLU;

+/*

+struct Curl_URL *curl_url(void);

+/*

+void curl_url_cleanup(struct Curl_URL *handle);

+/*

+struct Curl_URL *curl_url_dup(struct Curl_URL *in);

+/*

+CURLUcode curl_url_get(struct Curl_URL *handle, CURLUPart what,

+/*

+CURLUcode curl_url_set(struct Curl_URL *handle, CURLUPart what,

+#endif

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

new file mode 100644

index 0000000000000000000000000000000000000000..5f2debb52c310f88e82ad83ca2251ba233d6a704

--- /dev/null

+++ b/src/client.c

@@ -0,0 +1,190 @@

+#include <assert.h>

+#include <errno.h>

+#include <netdb.h>

+#include <openssl/bio.h>

+#include <openssl/ssl.h>

+#include <stdlib.h>

+#include <string.h>

+#include <sys/socket.h>

+#include <sys/types.h>

+#include <unistd.h>

+#include "client.h"

+#include "url.h"

+static enum gemini_result

+gemini_get_addrinfo(struct Curl_URL *uri, struct gemini_options *options,

+{

+}

+static enum gemini_result

+gemini_connect(struct Curl_URL *uri, struct gemini_options *options,

+{

+cleanup:

+}

+#define GEMINI_META_MAXLEN 1024

+#define GEMINI_STATUS_MAXLEN 2

+enum gemini_result

+gemini_request(const char *url, struct gemini_options *options,

+{

+cleanup:

+}

+void

+gemini_response_finish(struct gemini_response *resp)

+{

+}

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

new file mode 100644

index 0000000000000000000000000000000000000000..d083da699d96f01a94a6ce8a86e41f0a47c54ffe

--- /dev/null

+++ b/src/escape.c

@@ -0,0 +1,213 @@

+/***************************************************************************

+/* Escape and unescape URL encoding in strings. The functions return a new

+#include <ctype.h>

+#include <limits.h>

+#include <stdbool.h>

+#include <stddef.h>

+#include <stdio.h>

+#include <stdlib.h>

+#include <string.h>

+#include "escape.h"

+/* Portable character check (remember EBCDIC). Do not use isalnum() because

+*/

+bool Curl_isunreserved(unsigned char in)

+{

+}

+/* for ABI-compatibility with previous versions */

+char *curl_escape(const char *string, int inlength)

+{

+}

+/* for ABI-compatibility with previous versions */

+char *curl_unescape(const char *string, int length)

+{

+}

+char *curl_easy_escape(const char *string, int inlength)

+{

+}

+/*

+CURLcode Curl_urldecode(const char *string, size_t length,

+{

+}

+/*

+char *curl_easy_unescape(const char *string, int length, int *olen)

+{

+}

+/* For operating systems/environments that use different malloc/free

+void curl_free(void *p)

+{

+}

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

index 35a49493cc6af2486d055c9bde5a576942c2e40a..7b2eb183ebfe67dce0aaf8c6010bf6785b503df6 100644

--- a/src/gmnic.c

+++ b/src/gmnic.c

@@ -1,8 +1,91 @@

+#include <assert.h>

+#include <getopt.h>

+#include <openssl/err.h>

+#include <stdbool.h>

#include <stdio.h>

+#include <stdlib.h>

+#include "client.h"

+static void

+usage(char *argv_0)

+{

+}

int

-main(int argc, char *argv[]) {

+main(int argc, char *argv[])

+{

return 0;

}

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

new file mode 100644

index 0000000000000000000000000000000000000000..47e31b5fcbeeecb5bc3962585311b20e3518bb73

--- /dev/null

+++ b/src/url.c

@@ -0,0 +1,1448 @@

+/***************************************************************************

+#define MAX_SCHEME_LEN 8

+#include <assert.h>

+#include <ctype.h>

+#include <stdarg.h>

+#include <stdbool.h>

+#include <stdio.h>

+#include <stdlib.h>

+#include <string.h>

+#include <strings.h>

+#include "escape.h"

+#include "url.h"

+/* Provided by gmni */

+static char *

+aprintf(const char *fmt, ...)

+{

+}

+/* via lib/dotdot.c */

+char *Curl_dedotdotify(const char *input)

+{

+}

+/* via lib/url.c */

+CURLcode Curl_parse_login_details(const char *login, const size_t len,

+{

+}

+/* Internal representation of CURLU. Point to URL-encoded strings. */

+struct Curl_URL {

+};

+#define DEFAULT_SCHEME "https"

+static void free_urlhandle(struct Curl_URL *u)

+{

+}

+/* move the full contents of one handle onto another and

+static void mv_urlhandle(struct Curl_URL *from,

+{

+}

+/*

+static const char *find_host_sep(const char *url)

+{

+}

+/*

+static bool urlchar_needs_escaping(int c)

+{

+}

+/*

+size_t Curl_strlen_url(const char *url, bool relative)

+{

+}

+/* strcpy_url() copies a url to a output buffer and URL-encodes the spaces in

+void Curl_strcpy_url(char *output, const char *url, bool relative)

+{

+}

+/*

+bool Curl_is_absolute_url(const char *url, char *buf, size_t buflen)

+{

+}

+/*

+char *Curl_concat_url(const char *base, const char *relurl)

+{

+}

+/*

+static CURLUcode parse_hostname_login(struct Curl_URL *u,

+{

+}

+static CURLUcode parse_port(struct Curl_URL *u, char *hostname)

+{

+}

+/* scan for byte values < 31 or 127 */

+static CURLUcode junkscan(char *part)

+{

+}

+static CURLUcode hostname_check(char *hostname, unsigned int flags)

+{

+}

+#define HOSTNAME_END(x) (((x) == '/') || ((x) == '?') || ((x) == '#'))

+static CURLUcode seturl(const char *url, struct Curl_URL *u, unsigned int flags)

+{

+}

+/*

+static CURLUcode parseurl(const char *url, struct Curl_URL *u, unsigned int flags)

+{

+}

+/*

+struct Curl_URL *curl_url(void)

+{

+}

+void curl_url_cleanup(struct Curl_URL *u)

+{

+}

+#define DUP(dest, src, name) \

+struct Curl_URL *curl_url_dup(struct Curl_URL *in)

+{

+}

+CURLUcode curl_url_get(struct Curl_URL *u, CURLUPart what,

+{

+}

+CURLUcode curl_url_set(struct Curl_URL *u, CURLUPart what,

+{

+}

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

This content has been proxied by September (ba2dc).