Skip to content

Commit

Permalink
appmodel: style format fix
Browse files Browse the repository at this point in the history
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
  • Loading branch information
alltilla committed May 22, 2024
1 parent 97135f2 commit ebccc0d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
18 changes: 9 additions & 9 deletions modules/appmodel/app-parser-generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,18 @@ _generate_action(AppParserGenerator *self, Application *app)

if (app->filterx_expr)
g_string_append_printf(self->block,
" filterx {\n"
" meta.app_name = '%s';\n"
" };\n",
app->super.name);
" filterx {\n"
" meta.app_name = '%s';\n"
" };\n",
app->super.name);

else
g_string_append_printf(self->block,
" rewrite {\n"
" set-tag('.app.%s');\n"
" set('%s' value('.app.name'));\n"
" };\n",
app->super.name, app->super.name);
" rewrite {\n"
" set-tag('.app.%s');\n"
" set('%s' value('.app.name'));\n"
" };\n",
app->super.name, app->super.name);
}

static void
Expand Down
6 changes: 3 additions & 3 deletions modules/appmodel/app-transform-generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ app_transform_generate_config(AppObjectGenerator *s, GlobalConfig *cfg, GString

self->block = result;
g_string_append_printf(result, "## app-transform(flavour(%s))\n"
"channel {\n"
" filterx {\n", self->flavour);
"channel {\n"
" filterx {\n", self->flavour);
appmodel_iter_transformations(cfg, _generate_app_transform, self);
g_string_append(result, " };\n"
"}");
"}");
self->block = NULL;
}

Expand Down
3 changes: 2 additions & 1 deletion modules/appmodel/appmodel.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ appmodel_register_transformation(GlobalConfig *cfg, Transformation *transformati
}

void
appmodel_iter_transformations(GlobalConfig *cfg, void (*foreach)(Transformation *transformation, gpointer user_data), gpointer user_data)
appmodel_iter_transformations(GlobalConfig *cfg, void (*foreach)(Transformation *transformation, gpointer user_data),
gpointer user_data)
{
AppModelContext *appmodel = appmodel_get_context(cfg);
appmodel_context_iter_objects(appmodel, TRANSFORMATION_TYPE_NAME, (AppModelContextIterFunc) foreach, user_data);
Expand Down
3 changes: 2 additions & 1 deletion modules/appmodel/appmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ void appmodel_iter_applications(GlobalConfig *cfg,
gpointer user_data);

void appmodel_register_transformation(GlobalConfig *cfg, Transformation *transformation);
void appmodel_iter_transformations(GlobalConfig *cfg, void (*foreach)(Transformation *transformation, gpointer user_data), gpointer user_data);
void appmodel_iter_transformations(GlobalConfig *cfg, void (*foreach)(Transformation *transformation,
gpointer user_data), gpointer user_data);

#endif

0 comments on commit ebccc0d

Please sign in to comment.