Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
844928a8
Commit
844928a8
authored
Mar 29, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
getopt: remove unused ordering modes
parent
88c2bad6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
25 deletions
+5
-25
src/config/getopt.c
src/config/getopt.c
+5
-25
No files found.
src/config/getopt.c
View file @
844928a8
...
...
@@ -45,9 +45,7 @@
/* For communication from `getopt' to the caller.
When `getopt' finds an option that takes an argument,
the argument value is returned here.
Also, when `ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
the argument value is returned here. */
char
*
vlc_optarg
=
NULL
;
...
...
@@ -99,20 +97,12 @@ int vlc_optopt = '?';
to be given in any order, even with programs that were not written to
expect this.
RETURN_IN_ORDER is an option available to programs that were written
to expect options and other ARGV-elements in any order and that care about
the ordering of the two. We describe each non-option ARGV-element
as if it were the argument of an option with character code 1.
Using `-' as the first character of the list of option characters
selects this mode of operation.
The special argument `--' forces an end of option-scanning regardless
of the value of `ordering'. In the case of RETURN_IN_ORDER, only
`--' can cause `getopt' to return -1 with `optind' != ARGC. */
of the value of `ordering'. */
static
enum
{
REQUIRE_ORDER
,
PERMUTE
,
RETURN_IN_ORDER
REQUIRE_ORDER
,
PERMUTE
}
ordering
;
...
...
@@ -208,17 +198,7 @@ static const char *vlc_getopt_initialize(const char *optstring)
/* Determine how to handle the ordering of options and nonoptions. */
if
(
optstring
[
0
]
==
'-'
)
{
ordering
=
RETURN_IN_ORDER
;
++
optstring
;
}
else
if
(
optstring
[
0
]
==
'+'
)
{
ordering
=
REQUIRE_ORDER
;
++
optstring
;
}
else
if
(
posixly_correct
!=
NULL
)
if
(
posixly_correct
!=
NULL
)
ordering
=
REQUIRE_ORDER
;
else
ordering
=
PERMUTE
;
...
...
@@ -254,7 +234,7 @@ static const char *vlc_getopt_initialize(const char *optstring)
If OPTSTRING starts with `-' or `+', it requests different methods of
handling the non-option ARGV-elements.
See the comments about RE
TURN_IN_ORDER and RE
QUIRE_ORDER, above.
See the comments about REQUIRE_ORDER, above.
Long-named options begin with `--' instead of `-'.
Their names may be abbreviated as long as the abbreviation is unique
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment