static void tputtab(int);
static void tputc(char *, int);
static void treset(void);
static void tputtab(int);
static void tputc(char *, int);
static void treset(void);
static void tscrollup(int, int);
static void tscrolldown(int, int);
static void tsetattr(int *, int);
static void tscrollup(int, int);
static void tscrolldown(int, int);
static void tsetattr(int *, int);
if(waitpid(pid, &stat, 0) < 0)
die("Waiting for pid %hd failed: %s\n", pid, strerror(errno));
if(waitpid(pid, &stat, 0) < 0)
die("Waiting for pid %hd failed: %s\n", pid, strerror(errno));
- if(WIFEXITED(stat)) {
- exit(WEXITSTATUS(stat));
- } else {
- exit(EXIT_FAILURE);
- }
+ ret = WIFEXITED(stat) ? WEXITSTATUS(stat) : EXIT_FAILURE;
+ if (ret != EXIT_SUCCESS)
+ die("child finished with error '%d'\n", stat);
+ exit(EXIT_SUCCESS);
void
tclearregion(int x1, int y1, int x2, int y2) {
int x, y, temp;
void
tclearregion(int x1, int y1, int x2, int y2) {
int x, y, temp;
- term.line[y][x] = term.c.attr;
- memcpy(term.line[y][x].c, " ", 2);
+ gp->fg = term.c.attr.fg;
+ gp->bg = term.c.attr.bg;
+ gp->mode = 0;
+ memcpy(gp->c, " ", 2);
tresize(int col, int row) {
int i;
int minrow = MIN(row, term.row);
tresize(int col, int row) {
int i;
int minrow = MIN(row, term.row);