aboutsummaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
Diffstat (limited to 'man')
l---------man/libmagi.31
-rw-r--r--man/magi.369
-rw-r--r--man/magi_cookie.30
-rw-r--r--man/magi_error.30
-rw-r--r--man/magi_file.30
-rw-r--r--man/magi_loadfiles.30
-rw-r--r--man/magi_param.30
-rw-r--r--man/magi_parse.30
-rw-r--r--man/magi_request.30
-rw-r--r--man/magi_response.30
-rw-r--r--man/magi_urlenc.30
11 files changed, 70 insertions, 0 deletions
diff --git a/man/libmagi.3 b/man/libmagi.3
new file mode 120000
index 0000000..e341a9a
--- /dev/null
+++ b/man/libmagi.3
@@ -0,0 +1 @@
+magi.3 \ No newline at end of file
diff --git a/man/magi.3 b/man/magi.3
new file mode 100644
index 0000000..fcf6679
--- /dev/null
+++ b/man/magi.3
@@ -0,0 +1,69 @@
+.TH MAGI 3 2020-05-02 v0.0.1 "Library Manual"
+.SH NAME
+.B magi
+\- Common Gateway Interface (CGI) library
+.SH SYNOPSIS
+.B #include <magi.h>
+.SH DESCRIPTION
+The
+.B magi
+library gives the user a way to interact with the web server
+through CGI as described in
+.IR "RFC 3875" .
+The library is free and open source software.
+.SS Usage
+A program using
+.B magi
+library must be linked with the
+.B -lmagi
+option.
+.P
+Main task of the
+.B magi
+library is to analyse CGI request and represent it to the user in
+.B magi_request
+data structure. This is done by calling
+.B magi_parse
+on initialized via
+.B magi_request_init
+request variable. After initialization the user is able to configure
+limits on the input and setup callback to process files loaded as
+.IR multipart/form-data .
+The
+.B magi
+library comes with
+.B magi_loadfiles
+callback usable for the majority of cases.
+.P
+CGI response utilities are also provided. The CGI headers are
+outputted with
+.B magi_response
+and its methods. You can output defaults (Content-Type: text/html;
+Status: 200 Ok) by calling
+.BR magi_response_default .
+Utility to form urlencoded strings is provided via
+.BR magi_urlenc .
+.SS Error handling
+If function is returning pointer, error is only in case of null returned.
+If function is returning
+.I int
+as success mark it will be null only in case of error, and one otherwise.
+Exact
+.B magi_error
+code is in
+.B error
+field of
+.B magi_request
+structure. For other modules error codes seem to be overkill.
+.SH AUTHORS AND LICENSE
+Copyrigth 2019-2020
+.B Aleksey Veresov
+.RI < aleksey@veresov.pro >
+.P
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from
+the use of this software.
+.P
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
diff --git a/man/magi_cookie.3 b/man/magi_cookie.3
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/magi_cookie.3
diff --git a/man/magi_error.3 b/man/magi_error.3
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/magi_error.3
diff --git a/man/magi_file.3 b/man/magi_file.3
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/magi_file.3
diff --git a/man/magi_loadfiles.3 b/man/magi_loadfiles.3
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/magi_loadfiles.3
diff --git a/man/magi_param.3 b/man/magi_param.3
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/magi_param.3
diff --git a/man/magi_parse.3 b/man/magi_parse.3
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/magi_parse.3
diff --git a/man/magi_request.3 b/man/magi_request.3
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/magi_request.3
diff --git a/man/magi_response.3 b/man/magi_response.3
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/magi_response.3
diff --git a/man/magi_urlenc.3 b/man/magi_urlenc.3
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/magi_urlenc.3