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:
parent
33001a7ad2
commit
03b2532474
237 changed files with 17550 additions and 13911 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue