X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/9faa7a88b7419b2d6151ac2c3fa52261c876ee8d..c240ff9a4d4efc1645f226593fec0c5efda5c17b:/lib/cgi.c?ds=sidebyside diff --git a/lib/cgi.c b/lib/cgi.c index 1c1154d..9e455bf 100644 --- a/lib/cgi.c +++ b/lib/cgi.c @@ -207,6 +207,12 @@ const char *cgi_get(const char *name) { return v ? *v : NULL; } +/** @brief Set a CGI argument */ +void cgi_set(const char *name, const char *value) { + value = xstrdup(value); + hash_add(cgi_args, name, &value, HASH_INSERT_OR_REPLACE); +} + /** @brief Add SGML-style quoting * @param src String to quote (UTF-8) * @return Quoted string