char * f_name = "init_winconfs()";
/* Fill world.winconf_ids with config/windows/Win_* filenames' end chars. */
char * f_name = "init_winconfs()";
/* Fill world.winconf_ids with config/windows/Win_* filenames' end chars. */
DIR * dp = opendir("config/windows");
exit_trouble(NULL == dp, f_name, "opendir()");
struct dirent * fn;
errno = 0;
DIR * dp = opendir("config/windows");
exit_trouble(NULL == dp, f_name, "opendir()");
struct dirent * fn;
errno = 0;
char * path = "config/windows/toggle_order_and_active";
FILE * file = try_fopen(path, "r", f_name);
uint16_t linemax = get_linemax(file, f_name);
char win_order[linemax + 1];
try_fgets(win_order, linemax + 1, file, f_name);
char * path = "config/windows/toggle_order_and_active";
FILE * file = try_fopen(path, "r", f_name);
uint16_t linemax = get_linemax(file, f_name);
char win_order[linemax + 1];
try_fgets(win_order, linemax + 1, file, f_name);
exit_trouble(read_uint8(file, &a), f_name, "read_uint8()");
exit_trouble(read_uint8(file, &a), f_name, "read_uint8()");
char * path = "config/windows/toggle_order_and_active";
char * path_tmp = "config/windows/toggle_order_and_active_tmp";
FILE * file = try_fopen(path_tmp, "w", f_name);
char * path = "config/windows/toggle_order_and_active";
char * path_tmp = "config/windows/toggle_order_and_active_tmp";
FILE * file = try_fopen(path_tmp, "w", f_name);
try_fwrite(line, sizeof(char), strlen(line), file, f_name);
if (0 != world.wmeta->active)
{
struct WinConf * wc = get_winconf_by_win(world.wmeta->active);
write_uint8(wc->id, file);
}
try_fwrite(line, sizeof(char), strlen(line), file, f_name);
if (0 != world.wmeta->active)
{
struct WinConf * wc = get_winconf_by_win(world.wmeta->active);
write_uint8(wc->id, file);
}
try_fclose_unlink_rename(file, path_tmp, path, f_name);
}
try_fclose_unlink_rename(file, path_tmp, path, f_name);
}