Adjusted paramhandling to accept parameters with empty values (which is legal)
[citadel.git] / webcit / paramhandling.h
index 35999ad98f552aa64144036b50e7f14fdd68a0ce..4aaddea71cff0df7ea5a631a3415e7e43c87fd17 100644 (file)
@@ -1,3 +1,15 @@
+/*
+ * Copyright (c) 1996-2013 by the citadel.org team
+ *
+ * This program is open source software.  You can redistribute it and/or
+ * modify it under the terms of the GNU General Public License, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
 /* URL / Mime Post parsing -> paramhandling.c */
 void upload_handler(char *name, char *filename, char *partnum, char *disp,
                    void *content, char *cbtype, char *cbcharset,
@@ -20,6 +32,7 @@ long LBstr(const char *key, size_t keylen);
 long LBSTR(const char *key);
 
 #define ibstr(a) IBstr(a, sizeof(a) - 1)
+#define ibcstr(a) IBstr(a.Key, a.len)
 int IBstr(const char *key, size_t keylen);
 int IBSTR(const char *key);
 
@@ -39,3 +52,6 @@ const char *Bstr(const char *key, size_t keylen);
 #define putbstr(a, b) PutBstr(a, sizeof(a) - 1, b)
 void PutBstr(const char *key, long keylen, StrBuf *Value);
 
+#define putlbstr(a, b) PutlBstr(a, sizeof(a) - 1, b)
+void PutlBstr(const char *key, long keylen, long Value);
+