1
0
Fork 0
forked from fun/fun

Fixed the code style in *.c files to two spaces indentation and add a linter named funstx to Fun. (0.39.0)

This commit is contained in:
Johannes Findeisen 2026-03-18 20:52:00 +01:00
commit 03b2532474
237 changed files with 17550 additions and 13911 deletions

View file

@ -12,17 +12,22 @@
/* OP_INI_SAVE */
#ifdef FUN_WITH_INI
case OP_INI_SAVE: {
Value vpath = pop_value(vm);
Value vh = pop_value(vm);
const char *path = (vpath.type==VAL_STRING)?vpath.s:NULL;
dictionary *d = ini_get((vh.type==VAL_INT)?(int)vh.i:0);
int ok = 0;
if (d && path) {
FILE *f = fopen(path, "w");
if (f) { iniparser_dump_ini(d, f); fclose(f); ok = 1; }
Value vpath = pop_value(vm);
Value vh = pop_value(vm);
const char *path = (vpath.type == VAL_STRING) ? vpath.s : NULL;
dictionary *d = ini_get((vh.type == VAL_INT) ? (int)vh.i : 0);
int ok = 0;
if (d && path) {
FILE *f = fopen(path, "w");
if (f) {
iniparser_dump_ini(d, f);
fclose(f);
ok = 1;
}
free_value(vpath); free_value(vh);
push_value(vm, make_int(ok));
break;
}
free_value(vpath);
free_value(vh);
push_value(vm, make_int(ok));
break;
}
#endif