Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Adding -T to the usage too.
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
64e2cec
..
0db3d58
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-560,7
+560,8
@@
static int frclen = 0;
ssize_t
xwrite(int fd, const char *s, size_t len)
{
ssize_t
xwrite(int fd, const char *s, size_t len)
{
- size_t aux = len, r;
+ size_t aux = len;
+ ssize_t r;
while (len > 0) {
r = write(fd, s, len);
while (len > 0) {
r = write(fd, s, len);
@@
-1329,9
+1330,8
@@
execsh(void)
die("who are you?\n");
}
die("who are you?\n");
}
- if (
!(sh = getenv("SHELL"))) {
+ if (
(sh = getenv("SHELL")) == NULL)
sh = (pw->pw_shell[0]) ? pw->pw_shell : shell;
sh = (pw->pw_shell[0]) ? pw->pw_shell : shell;
- }
if (opt_cmd)
prog = opt_cmd[0];
if (opt_cmd)
prog = opt_cmd[0];
@@
-4259,9
+4259,11
@@
usage(void)
{
die("%s " VERSION " (c) 2010-2015 st engineers\n"
"usage: st [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]\n"
{
die("%s " VERSION " (c) 2010-2015 st engineers\n"
"usage: st [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]\n"
- " [-i] [-t title] [-w windowid] [-e command ...] [command ...]\n"
+ " [-i] [-t title] [-T title] [-w windowid] [-e command ...]"
+ " [command ...]\n"
" st [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]\n"
" st [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]\n"
- " [-i] [-t title] [-w windowid] [-l line] [stty_args ...]\n",
+ " [-i] [-t title] [-T title] [-w windowid] [-l line]"
+ " [stty_args ...]\n",
argv0);
}
argv0);
}
@@
-4302,6
+4304,7
@@
main(int argc, char *argv[])
opt_line = EARGF(usage());
break;
case 't':
opt_line = EARGF(usage());
break;
case 't':
+ case 'T':
opt_title = EARGF(usage());
break;
case 'w':
opt_title = EARGF(usage());
break;
case 'w':