* Invocation: program [file|-]...
*
* without arguments, it reads the input.
* Invocation: program [file|-]...
*
* without arguments, it reads the input.
struct json_object *root = NULL;
struct json_object *d_perms = NULL;
struct json_object *a_perms = NULL;
struct json_object *root = NULL;
struct json_object *d_perms = NULL;
struct json_object *a_perms = NULL;
const char *onevent = NULL;
const char *api = NULL;
const char *scope = NULL;
const char *prefix = NULL;
const char *postfix = NULL;
const char *onevent = NULL;
const char *api = NULL;
const char *scope = NULL;
const char *prefix = NULL;
const char *postfix = NULL;
struct json_object *permissions_of_verb(struct json_object *obj)
{
struct json_object *x, *y;
struct json_object *permissions_of_verb(struct json_object *obj)
{
struct json_object *x, *y;
- asprintf(&b, "&_afb_auths_v2_%s[%d]", api, json_object_array_length(a_perms));
+ asprintf(&b, "&_afb_auths_v2_%s[%d]", capi, json_object_array_length(a_perms));
x = json_object_new_string(desc);
y = json_object_new_string(b);
json_object_array_add(a_perms, x);
x = json_object_new_string(desc);
y = json_object_new_string(b);
json_object_array_add(a_perms, x);
+ struct json_object *p, *i;
+ const char *info;
+
+ info = NULL;
+ if (json_object_object_get_ex(obj, "description", &i))
+ info = json_object_get_string(i);
- , p ? json_object_get_string(decl_perm(p)) : "NULL"
+ , p && decl_perm(p) ? json_object_get_string(decl_perm(p)) : "NULL"
+ , info ? make_info(info, 0) : "NULL"
getvar(&onevent, "#/info/x-binding-c-generator/onevent", NULL);
getvar(&scope, "#/info/x-binding-c-generator/scope", "static");
getvar(&prefix, "#/info/x-binding-c-generator/prefix", "afb_verb_");
getvar(&postfix, "#/info/x-binding-c-generator/postfix", "_cb");
getvarbool(&priv, "#/info/x-binding-c-generator/private", 0);
getvar(&onevent, "#/info/x-binding-c-generator/onevent", NULL);
getvar(&scope, "#/info/x-binding-c-generator/scope", "static");
getvar(&prefix, "#/info/x-binding-c-generator/prefix", "afb_verb_");
getvar(&postfix, "#/info/x-binding-c-generator/postfix", "_cb");
getvarbool(&priv, "#/info/x-binding-c-generator/private", 0);
"%sconst struct afb_binding_v2 %s%s = {\n"
" .api = \"%s\",\n"
" .specification = _afb_description_v2_%s,\n"
"%sconst struct afb_binding_v2 %s%s = {\n"
" .api = \"%s\",\n"
" .specification = _afb_description_v2_%s,\n"