Commit 50e97150 authored by Bernhard Link's avatar Bernhard Link

added chunk_gettruth

parent d0e591a9
...@@ -343,3 +343,13 @@ retvalue chunk_getwordlist(const char *chunk,const char *name,struct strlist *st ...@@ -343,3 +343,13 @@ retvalue chunk_getwordlist(const char *chunk,const char *name,struct strlist *st
} }
return RET_OK; return RET_OK;
} }
retvalue chunk_gettruth(const char *chunk,const char *name) {
const char *field;
field = chunk_getfield(name,chunk);
if( !field )
return RET_NOTHING;
return RET_OK;
}
...@@ -22,6 +22,8 @@ retvalue chunk_getvalue(const char *chunk,const char *name,char **value); ...@@ -22,6 +22,8 @@ retvalue chunk_getvalue(const char *chunk,const char *name,char **value);
retvalue chunk_getfirstword(const char *chunk,const char *name,char **value); retvalue chunk_getfirstword(const char *chunk,const char *name,char **value);
retvalue chunk_getextralinelist(const char *chunk,const char *name,struct strlist *strlist); retvalue chunk_getextralinelist(const char *chunk,const char *name,struct strlist *strlist);
retvalue chunk_getwordlist(const char *chunk,const char *name,struct strlist *strlist); retvalue chunk_getwordlist(const char *chunk,const char *name,struct strlist *strlist);
/* return RET_OK, if field is found, RET_NOTHING, if not (or value indicates false in future variants) */
retvalue chunk_gettruth(const char *chunk,const char *name);
typedef retvalue chunkaction(void *data,const char *chunk); typedef retvalue chunkaction(void *data,const char *chunk);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment