diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-11 23:26:42 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-11 23:26:42 +0200 |
commit | 00528822004e5763c669e58191f10c5202f679b5 (patch) | |
tree | c60a30ca27a190bb09f6d4fe3948c56e0aef3583 /libbb | |
parent | 56573cb4f7393fdb320660a5c258c72688a74f64 (diff) | |
download | busybox-w32-00528822004e5763c669e58191f10c5202f679b5.tar.gz busybox-w32-00528822004e5763c669e58191f10c5202f679b5.tar.bz2 busybox-w32-00528822004e5763c669e58191f10c5202f679b5.zip |
top: add -m ("memory") option
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/getopt32.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libbb/getopt32.c b/libbb/getopt32.c index 17b8dd1a4..cab3eb745 100644 --- a/libbb/getopt32.c +++ b/libbb/getopt32.c | |||
@@ -147,15 +147,15 @@ const char *opt_complementary | |||
147 | 147 | ||
148 | Special characters: | 148 | Special characters: |
149 | 149 | ||
150 | "-" A dash as the first char in a opt_complementary group forces | 150 | "-" A group consisting of just a dash forces all arguments |
151 | all arguments to be treated as options, even if they have | 151 | to be treated as options, even if they have no leading dashes. |
152 | no leading dashes. Next char in this case can't be a digit (0-9), | 152 | Next char in this case can't be a digit (0-9), use ':' or end of line. |
153 | use ':' or end of line. For example: | 153 | Example: |
154 | 154 | ||
155 | opt_complementary = "-:w-x:x-w"; | 155 | opt_complementary = "-:w-x:x-w"; // "-w-x:x-w" would also work, |
156 | getopt32(argv, "wx"); | 156 | getopt32(argv, "wx"); // but is less readable |
157 | 157 | ||
158 | Allows any arguments to be given without a dash (./program w x) | 158 | This makes it possible to use options without a dash (./program w x) |
159 | as well as with a dash (./program -x). | 159 | as well as with a dash (./program -x). |
160 | 160 | ||
161 | NB: getopt32() will leak a small amount of memory if you use | 161 | NB: getopt32() will leak a small amount of memory if you use |