|
@@ -3,7 +3,7 @@
|
|
|
* namevalue.h - name value structure handling
|
|
* namevalue.h - name value structure handling
|
|
|
*
|
|
*
|
|
|
* Copyright © 1994,1995 Ian Jackson <ian@chiark.greenend.org.uk>
|
|
* Copyright © 1994,1995 Ian Jackson <ian@chiark.greenend.org.uk>
|
|
|
- * Copyright © 2009-2010 Guillem Jover <guillem@debian.org>
|
|
|
|
|
|
|
+ * Copyright © 2009-2011 Guillem Jover <guillem@debian.org>
|
|
|
*
|
|
*
|
|
|
* This is free software; you can redistribute it and/or modify
|
|
* This is free software; you can redistribute it and/or modify
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
* it under the terms of the GNU General Public License as published by
|
|
@@ -34,6 +34,8 @@ struct namevalue {
|
|
|
|
|
|
|
|
#define NAMEVALUE_DEF(n, v) \
|
|
#define NAMEVALUE_DEF(n, v) \
|
|
|
[v] = { .name = n, .value = v, .length = sizeof(n) - 1 }
|
|
[v] = { .name = n, .value = v, .length = sizeof(n) - 1 }
|
|
|
|
|
+#define NAMEVALUE_FALLBACK_DEF(n, v) \
|
|
|
|
|
+ [v] = { .name = n, .value = v, .length = 0 }
|
|
|
|
|
|
|
|
const struct namevalue *namevalue_find_by_name(const struct namevalue *head,
|
|
const struct namevalue *namevalue_find_by_name(const struct namevalue *head,
|
|
|
const char *str);
|
|
const char *str);
|