Sun, 06 Oct 2024 12:08:40 +0200
fix build
ui/common/context.c | file | annotate | diff | comparison | revisions | |
ui/common/menu.c | file | annotate | diff | comparison | revisions | |
ui/common/toolbar.c | file | annotate | diff | comparison | revisions | |
ui/common/types.c | file | annotate | diff | comparison | revisions | |
ui/common/ucx_properties.c | file | annotate | diff | comparison | revisions |
--- a/ui/common/context.c Sun Oct 06 12:00:31 2024 +0200 +++ b/ui/common/context.c Sun Oct 06 12:08:40 2024 +0200 @@ -91,7 +91,7 @@ // as any document variable UiContext *var_ctx = ctx; while(var_ctx) { - if(var_ctx->vars_unbound && var_ctx->vars_unbound->size > 0) { + if(var_ctx->vars_unbound && cxMapSize(var_ctx->vars_unbound) > 0) { CxIterator i = cxMapIterator(var_ctx->vars_unbound); cx_foreach(CxMapEntry*, entry, i) { UiVar *var = entry->value; @@ -401,9 +401,9 @@ var->value = value; var->from = NULL; var->from_ctx = ctx; - size_t oldcount = ctx->vars->size; + size_t oldcount = cxMapSize(ctx->vars); cxMapPut(ctx->vars, name, var); - if(ctx->vars->size != oldcount + 1) { + if(cxMapSize(ctx->vars) != oldcount + 1) { fprintf(stderr, "UiError: var '%s' already exists\n", name); } @@ -462,7 +462,7 @@ } int* ui_active_groups(UiContext *ctx, int *ngroups) { - *ngroups = ctx->groups->size; + *ngroups = cxListSize(ctx->groups); return cxListAt(ctx->groups, 0); } @@ -516,7 +516,7 @@ gw.widget = widget; gw.enable = enable; - gw.numgroups = groups->size; + gw.numgroups = cxListSize(groups); gw.groups = cxCalloc(a, gw.numgroups, sizeof(int)); // copy groups
--- a/ui/common/menu.c Sun Oct 06 12:00:31 2024 +0200 +++ b/ui/common/menu.c Sun Oct 06 12:08:40 2024 +0200 @@ -104,7 +104,7 @@ menu->end = 0; - if (current->size == 0) { + if (cxListSize(current) == 0) { add_menu(menu); } else {
--- a/ui/common/toolbar.c Sun Oct 06 12:00:31 2024 +0200 +++ b/ui/common/toolbar.c Sun Oct 06 12:08:40 2024 +0200 @@ -132,7 +132,7 @@ } UiBool uic_toolbar_isenabled(void) { - return toolbar_defaults[0]->size + toolbar_defaults[1]->size + toolbar_defaults[2]->size > 0; + return cxListSize(toolbar_defaults[0]) + cxListSize(toolbar_defaults[1]) + cxListSize(toolbar_defaults[2]) > 0; } UiToolbarItemI* uic_toolbar_get_item(const char* name) {
--- a/ui/common/types.c Sun Oct 06 12:00:31 2024 +0200 +++ b/ui/common/types.c Sun Oct 06 12:08:40 2024 +0200 @@ -139,7 +139,7 @@ } int ui_list_count(UiList *list) { - return ((CxList*)list->data)->size; + return cxListSize(list->data); } void ui_list_append(UiList *list, void *data) { @@ -192,7 +192,7 @@ va_end(ap); - size_t len = cols->size; + size_t len = cxListSize(cols); info->columns = len; info->types = ui_calloc(ctx, len, sizeof(UiModelType)); info->titles = ui_calloc(ctx, len, sizeof(char*));
--- a/ui/common/ucx_properties.c Sun Oct 06 12:00:31 2024 +0200 +++ b/ui/common/ucx_properties.c Sun Oct 06 12:08:40 2024 +0200 @@ -201,12 +201,12 @@ cxstring name; cxstring value; while(ucx_properties_next(parser, &name, &value)) { - cxmutstr mutvalue = cx_strdup_a(map->allocator, value); + cxmutstr mutvalue = cx_strdup_a(map->collection.allocator, value); if(!mutvalue.ptr) { return 1; } if(cxMapPut(map, cx_hash_key_cxstr(name), mutvalue.ptr)) { - cxFree(map->allocator, mutvalue.ptr); + cxFree(map->collection.allocator, mutvalue.ptr); return 1; } }