diff options
| author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2011-05-14 17:47:37 +0200 |
|---|---|---|
| committer | Aurélien Aptel <aurelien.aptel@gmail.com> | 2011-05-14 17:47:37 +0200 |
| commit | 7d352f143655ace75dd4e40432199f18f296da5e (patch) | |
| tree | f2922a25996f343571e2fc6cfbb3a34ab0b9f72e /st.c | |
| parent | 5beae6a62ee15dfe36048e377ebf86df09a0cf82 (diff) | |
| download | st-7d352f143655ace75dd4e40432199f18f296da5e.tar.gz st-7d352f143655ace75dd4e40432199f18f296da5e.zip | |
applied parts of Connor Lane Smith's cleanup patch.
Diffstat (limited to 'st.c')
| -rw-r--r-- | st.c | 14 |
1 files changed, 7 insertions, 7 deletions
| @@ -34,8 +34,8 @@ | |||
| 34 | #endif | 34 | #endif |
| 35 | 35 | ||
| 36 | #define USAGE \ | 36 | #define USAGE \ |
| 37 | "st-" VERSION ", (c) 2010 st engineers\n" \ | 37 | "st-" VERSION ", (c) 2010-2011 st engineers\n" \ |
| 38 | "usage: st [-t title] [-c class] [-v] [-e cmd]\n" | 38 | "usage: st [-t title] [-c class] [-v] [-e command...]\n" |
| 39 | 39 | ||
| 40 | /* Arbitrary sizes */ | 40 | /* Arbitrary sizes */ |
| 41 | #define ESC_TITLE_SIZ 256 | 41 | #define ESC_TITLE_SIZ 256 |
| @@ -1907,17 +1907,17 @@ main(int argc, char *argv[]) { | |||
| 1907 | case 'c': | 1907 | case 'c': |
| 1908 | if(++i < argc) opt_class = argv[i]; | 1908 | if(++i < argc) opt_class = argv[i]; |
| 1909 | break; | 1909 | break; |
| 1910 | case 'e': | 1910 | case 'e': |
| 1911 | /* eat every remaining arguments */ | ||
| 1911 | if(++i < argc) opt_cmd = &argv[i]; | 1912 | if(++i < argc) opt_cmd = &argv[i]; |
| 1912 | break; | 1913 | goto run; |
| 1913 | case 'v': | 1914 | case 'v': |
| 1914 | default: | 1915 | default: |
| 1915 | die(USAGE); | 1916 | die(USAGE); |
| 1916 | } | 1917 | } |
| 1917 | /* -e eats every remaining arguments */ | ||
| 1918 | if(opt_cmd) | ||
| 1919 | break; | ||
| 1920 | } | 1918 | } |
| 1919 | |||
| 1920 | run: | ||
| 1921 | setlocale(LC_CTYPE, ""); | 1921 | setlocale(LC_CTYPE, ""); |
| 1922 | tnew(80, 24); | 1922 | tnew(80, 24); |
| 1923 | ttynew(); | 1923 | ttynew(); |
