static char *xstrdup(char *);
static void usage(void);
-static void version(void);
static void (*handler[LASTEvent])(XEvent *) = {
[KeyPress] = kpress,
if (openpty(&m, &s, NULL, NULL, &w) < 0)
die("openpty failed: %s\n", strerror(errno));
- ttyresize();
-
switch (pid = fork()) {
case -1:
die("fork failed\n");
xunloadfonts();
xloadfonts(usedfont, arg->f);
cresize(0, 0);
+ ttyresize();
redraw();
xhints();
}
tresize(col, row);
xresize(col, row);
- ttyresize();
}
void
return;
cresize(e->xconfigure.width, e->xconfigure.height);
+ ttyresize();
}
void
}
} while (ev.type != MapNotify);
- ttynew();
cresize(w, h);
+ ttynew();
+ ttyresize();
clock_gettime(CLOCK_MONOTONIC, &last);
lastblink = last;
void
usage(void)
{
- die("usage: %s "
- "[-aiv] [-c class] [-f font] [-g geometry] [-n name] [-o file]\n "
- " [-T title] [-t title] [-w windowid] [[-e] command [args ...]\n "
- " %s [-aiv] [-c class] [-f font] [-g geometry] [-n name] [-o file]\n "
- " [-o file] [-T title] [-t title] [-w windowid] -l line"
- " [stty_args ...]\n", argv0, argv0);
-}
-
-void
-version(void)
-{
- die("%s " VERSION " (c) 2010-2016 st engineers\n", argv0);
+ die("usage: %s [-aiv] [-c class] [-f font] [-g geometry]"
+ " [-n name] [-o file]\n"
+ " [-T title] [-t title] [-w windowid]"
+ " [[-e] command [args ...]]\n"
+ " %s [-aiv] [-c class] [-f font] [-g geometry]"
+ " [-n name] [-o file]\n"
+ " [-T title] [-t title] [-w windowid] -l line"
+ " [stty_args ...]\n", argv0, argv0);
}
int
opt_embed = EARGF(usage());
break;
case 'v':
- version();
+ die("%s " VERSION " (c) 2010-2016 st engineers\n", argv0);
break;
default:
usage();