* any keypress.
*/
if (inst->exited)
- exit(0);
+ cleanup_exit(0);
}
static gint idle_exit_func(gpointer data)
4, 12, 5, 13, 6, 14, 7, 15
};
struct gui_data *inst = (struct gui_data *)data;
- char *title = dupcat(appname, " Reconfiguration", NULL);
+ char *title;
Conf *oldconf, *newconf;
int i, j, need_size;
else
inst->reconfiguring = TRUE;
+ title = dupcat(appname, " Reconfiguration", NULL);
+
oldconf = inst->conf;
newconf = conf_copy(inst->conf);
* repaint the space in between the window border
* and the text area.
*/
- if (i == 258) {
+ if (ww[i] == 258) {
set_window_background(inst);
draw_backing_rect(inst);
}
string_width("Could not change fonts in terminal window:"),
"OK", 'o', +1, 1,
NULL);
+ sfree(msgboxtext);
sfree(errmsg);
} else {
need_size = TRUE;
pid = fork();
if (pid < 0) {
perror("fork");
+ sfree(args);
return;
}
} else {
int status;
+ sfree(args);
waitpid(pid, &status, 0);
}
}
sprintf(option, "---[%d,%d]", pipefd[0], size);
- fcntl(pipefd[0], F_SETFD, 0);
+ noncloexec(pipefd[0]);
fork_and_exec_self(inst, pipefd[1], option, NULL);
close(pipefd[0]);
}
}
+ sfree(data);
+
return 0;
}