From: Christian Heller Date: Tue, 3 Sep 2013 14:35:46 +0000 (+0200) Subject: Coupled create_winconfs() and init_winconfs() that were only called as a couple anyhow. X-Git-Tag: tce~980 X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/te"st.html?a=commitdiff_plain;h=f544201717cb46f32794d27d5f2914df93cdd980;p=plomrogue Coupled create_winconfs() and init_winconfs() that were only called as a couple anyhow. --- diff --git a/src/main.c b/src/main.c index bf0caa9..fcf677e 100644 --- a/src/main.c +++ b/src/main.c @@ -207,7 +207,7 @@ int main(int argc, char *argv[]) char * err_winmem = "Trouble with init_win_meta() in main ()."; exit_err(init_win_meta(screen, &world.wmeta), &world, err_winmem); set_cleanup_flag(CLEANUP_WIN_META); - create_winconfs(&world); + // create_winconfs(&world); init_winconfs(&world); set_cleanup_flag(CLEANUP_WINCONFS); init_wins(&world); diff --git a/src/wincontrol.c b/src/wincontrol.c index bcb99b9..2a418ed 100644 --- a/src/wincontrol.c +++ b/src/wincontrol.c @@ -244,7 +244,7 @@ extern struct Win * get_win_by_id(struct World * world, char id) -extern void create_winconfs(struct World * world) +extern void init_winconfs(struct World * world) { char * err = "Trouble with malloc() in init_winconfs()."; struct WinConf * winconfs = malloc(4 * sizeof(struct WinConf)); @@ -254,12 +254,6 @@ extern void create_winconfs(struct World * world) create_winconf('l', &winconfs[2], draw_log_win); create_winconf('m', &winconfs[3], draw_map_win); world->winconfs = winconfs; -} - - - -extern void init_winconfs(struct World * world) -{ init_winconf_from_file(world, 'i'); init_winconf_from_file(world, 'k'); init_winconf_from_file(world, 'l'); @@ -337,7 +331,6 @@ extern void reload_win_config(struct World * world) } free_wins(world); free_winconfs(world); - create_winconfs(world); init_winconfs(world); init_wins(world); sorted_wintoggle(world); diff --git a/src/wincontrol.h b/src/wincontrol.h index dc07b98..f56bc39 100644 --- a/src/wincontrol.h +++ b/src/wincontrol.h @@ -43,7 +43,6 @@ extern struct Win * get_win_by_id(struct World * world, char id); /* Create/initialize (from config files)/free Winconf / Win structs. */ -extern void create_winconfs(struct World * world); extern void init_winconfs(struct World * world); extern void free_winconfs(struct World * world); extern void init_wins(struct World * world);