commit fe306465d022f6565adf74924fa7367c949558f0
parent 1f3f048ab768bc22f743c6b66b4a1039767eddd4
Author: Anselm R. Garbe <arg@suckless.org>
Date: Mon, 23 Oct 2006 10:56:06 +0200
same problem in sic as in dmenu
Diffstat:
2 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/config.mk b/config.mk
@@ -1,5 +1,5 @@
# sic version
-VERSION = 0.4
+VERSION = 0.5
# Customize below to fit your system
diff --git a/sic.c b/sic.c
@@ -232,16 +232,21 @@ main(int argc, char *argv[]) {
nick = fullname = getenv("USER");
for(i = 1; i < argc; i++)
- if(!strncmp(argv[i], "-s", 3))
- server = argv[++i];
- else if(!strncmp(argv[i], "-p", 3))
- port = (unsigned short)atoi(argv[++i]);
- else if(!strncmp(argv[i], "-n", 3))
- nick = argv[++i];
- else if(!strncmp(argv[i], "-k", 3))
- password = argv[++i];
- else if(!strncmp(argv[i], "-f", 3))
- fullname = argv[++i];
+ if(!strncmp(argv[i], "-s", 3)) {
+ if(++i < argc) server = argv[i];
+ }
+ else if(!strncmp(argv[i], "-p", 3)) {
+ if(++i < argc) port = (unsigned short)atoi(argv[i]);
+ }
+ else if(!strncmp(argv[i], "-n", 3)) {
+ if(++i < argc) nick = argv[i];
+ }
+ else if(!strncmp(argv[i], "-k", 3)) {
+ if(++i < argc) password = argv[i];
+ }
+ else if(!strncmp(argv[i], "-f", 3)) {
+ if(++i < argc) fullname = argv[i];
+ }
else if(!strncmp(argv[i], "-v", 3)) {
fputs("sic-"VERSION", (C)opyright MMVI Anselm R. Garbe\n", stdout);
exit(EXIT_SUCCESS);