X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=postlicyd%2Fquery.h;h=61f894d24bf811e7181ebcfbd7ce4f9315416872;hb=b0194db8ea91d49b9e50319f6e20b8f580e338ed;hp=1443d65e107cbad3b65a6fc14dcec674dd6d8df8;hpb=e327d3786ba0371eaaff8e6ba0fe3fc39f095ae2;p=apps%2Fpfixtools.git diff --git a/postlicyd/query.h b/postlicyd/query.h index 1443d65..61f894d 100644 --- a/postlicyd/query.h +++ b/postlicyd/query.h @@ -113,4 +113,11 @@ const char *query_field_for_name(const query_t *query, const char *name); __attribute__((nonnull)) const char *query_field_for_id(const query_t *query, postlicyd_token id); +/** Formats the given string by replacing ${field_name} with the content + * of the query. + * Unknown and empty fields are filled with (null). + */ +__attribute__((nonnull(3))) +ssize_t query_format(char *dest, size_t len, const char* fmt, const query_t *query); + #endif