summaryrefslogtreecommitdiff
path: root/tabbed.c
diff options
context:
space:
mode:
authorChristoph Lohmann <20h@r-36.net>2012-12-26 00:02:50 +0100
committerChristoph Lohmann <20h@r-36.net>2012-12-26 00:02:50 +0100
commit82fdff00239196e97958aceb6139f650fd9122ee (patch)
tree6d7ed10802b0c15f6ca5c69748d8db515357102f /tabbed.c
parent0a5c7074888161e3a3c040c0cc027c3ededd02af (diff)
Fixing the position parameter and adding the documentation for it.
Diffstat (limited to 'tabbed.c')
-rw-r--r--tabbed.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tabbed.c b/tabbed.c
index 308776e..b08d4f4 100644
--- a/tabbed.c
+++ b/tabbed.c
@@ -1089,7 +1089,7 @@ char *argv0;
void
usage(void) {
- die("usage: %s [-dfhsv] [-n name] [-p [+/-]pos] [-r narg]"
+ die("usage: %s [-dfhsv] [-n name] [-p [s+/-]pos] [-r narg]"
" command...\n", argv0);
}
@@ -1114,9 +1114,12 @@ main(int argc, char *argv[]) {
break;
case 'p':
pstr = EARGF(usage());
- if (pstr[0] == '-' || pstr[0] == '+')
+ if(pstr[0] == 's') {
npisrelative = True;
- newposition = atoi(pstr);
+ newposition = atoi(&pstr[1]);
+ } else {
+ newposition = atoi(pstr);
+ }
break;
case 'r':
replace = atoi(EARGF(usage()));