aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authorAurélien Aptel <aurelien.aptel@gmail.com>2011-05-14 17:47:37 +0200
committerAurélien Aptel <aurelien.aptel@gmail.com>2011-05-14 17:47:37 +0200
commitcdd993c39ee72c426a6f02475928c0f03dc5a71d (patch)
treef2922a25996f343571e2fc6cfbb3a34ab0b9f72e /st.c
parenta7f4af0139d6c0890007c7349b59ef94266ccea9 (diff)
downloadst-cdd993c39ee72c426a6f02475928c0f03dc5a71d.tar.gz
st-cdd993c39ee72c426a6f02475928c0f03dc5a71d.tar.bz2
applied parts of Connor Lane Smith's cleanup patch.
Diffstat (limited to 'st.c')
-rw-r--r--st.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/st.c b/st.c
index 8347dbe..01ffa21 100644
--- a/st.c
+++ b/st.c
@@ -34,8 +34,8 @@
#endif
#define USAGE \
- "st-" VERSION ", (c) 2010 st engineers\n" \
- "usage: st [-t title] [-c class] [-v] [-e cmd]\n"
+ "st-" VERSION ", (c) 2010-2011 st engineers\n" \
+ "usage: st [-t title] [-c class] [-v] [-e command...]\n"
/* Arbitrary sizes */
#define ESC_TITLE_SIZ 256
@@ -1907,17 +1907,17 @@ main(int argc, char *argv[]) {
case 'c':
if(++i < argc) opt_class = argv[i];
break;
- case 'e':
+ case 'e':
+ /* eat every remaining arguments */
if(++i < argc) opt_cmd = &argv[i];
- break;
+ goto run;
case 'v':
default:
die(USAGE);
}
- /* -e eats every remaining arguments */
- if(opt_cmd)
- break;
}
+
+ run:
setlocale(LC_CTYPE, "");
tnew(80, 24);
ttynew();