chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'branchpoint-5.1' into release
[disorder]
/
lib
/
kvp.h
diff --git
a/lib/kvp.h
b/lib/kvp.h
index 7b418374c7b6ea091abe9864fef3d6d2dae47c31..732a8a68623613be96154d3a0d3c95a57baaffeb 100644
(file)
--- a/
lib/kvp.h
+++ b/
lib/kvp.h
@@
-15,6
+15,9
@@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/** @file lib/kvp.h
+ * @brief Linked list of key-value pairs
+ */
#ifndef KVP_H
#define KVP_H
#ifndef KVP_H
#define KVP_H
@@
-22,10
+25,22
@@
struct dynstr;
struct sink;
struct dynstr;
struct sink;
+/** @brief Linked list of key-value pairs */
struct kvp {
struct kvp {
- struct kvp *next; /* next entry */
- const char *name; /* name */
- const char *value; /* value */
+ /** @brief Next entry */
+ struct kvp *next;
+
+ /** @brief Name
+ *
+ * Might not be unique. Must not be null.
+ */
+ const char *name;
+
+ /** @brief Value
+ *
+ * Must not be null.
+ */
+ const char *value;
};
struct kvp *kvp_urldecode(const char *ptr, size_t n);
};
struct kvp *kvp_urldecode(const char *ptr, size_t n);
@@
-56,6
+71,8
@@
char *urlencodestring(const char *s);
char *urldecodestring(const char *s, size_t ns);
struct kvp *kvp_make(const char *key, ...);
char *urldecodestring(const char *s, size_t ns);
struct kvp *kvp_make(const char *key, ...);
+void kvp_free(struct kvp *k);
+
#endif /* KVP_H */
/*
#endif /* KVP_H */
/*