~vcs-imports/busybox/trunk

« back to all changes in this revision

Viewing changes to libbb/getopt32.c

  • Committer: Denys Vlasenko
  • Date: 2020-12-29 15:53:11 UTC
  • Revision ID: git-v1:77a51a2709de1b646ab493f0bf771d896de6efc2
randomconfig fixes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
        root:x:0:0:root:/root:/bin/bash
90
90
        user:x:500:500::/home/user:/bin/bash
91
91
 
92
 
 "^"    options string is "^optchars""\0""opt_complementary".
93
 
 
94
 
 "!"    If the first character in the applet_opts string is a '!',
95
 
        report bad options, missing required options,
96
 
        inconsistent options with all-ones return value (instead of abort.
97
 
 
98
92
 "+"    If the first character in the applet_opts string is a plus,
99
93
        then option processing will stop as soon as a non-option is
100
94
        encountered in the argv array.  Useful for applets like env
102
96
        env -i ls -d /
103
97
        Here we want env to process just the '-i', not the '-d'.
104
98
 
105
 
        (The order of multiple prefixes must be "^!+...")
 
99
 "!"    Report bad options, missing required options,
 
100
        inconsistent options with all-ones return value (instead of abort).
 
101
 
 
102
 "^"    options string is "^optchars""\0""opt_complementary".
106
103
 
107
104
uint32_t
108
105
getopt32long(char **argv, const char *applet_opts, const char *logopts...)
296
293
 
297
294
/* Code here assumes that 'unsigned' is at least 32 bits wide */
298
295
 
299
 
const char *const bb_argv_dash[] ALIGN_PTR = { "-", NULL };
 
296
const char *const bb_argv_dash[] = { "-", NULL };
300
297
 
301
298
enum {
302
299
        PARAM_STRING,