Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
558b6607
Commit
558b6607
authored
24 years ago
by
Josh DuBois
Committed by
Alexandre Julliard
24 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added a simple usage() function.
parent
67d39034
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/main.c
+18
-1
18 additions, 1 deletion
server/main.c
with
18 additions
and
1 deletion
server/main.c
+
18
−
1
View file @
558b6607
...
...
@@ -24,7 +24,18 @@ int persistent_server = 0;
unsigned
int
server_start_ticks
=
0
;
/* parse-line args */
/* FIXME: should probably use getopt, and add a help option */
/* FIXME: should probably use getopt, and add a (more complete?) help option */
static
void
usage
(
const
char
*
exeName
)
{
fprintf
(
stderr
,
"
\n
usage: %s [options]
\n\n
"
,
exeName
);
fprintf
(
stderr
,
"options:
\n
"
);
fprintf
(
stderr
,
" -d<n> set debug level to <n>
\n
"
);
fprintf
(
stderr
,
" -p make server persistent
\n
"
);
fprintf
(
stderr
,
" -h display this help message
\n
"
);
fprintf
(
stderr
,
"
\n
"
);
}
static
void
parse_args
(
int
argc
,
char
*
argv
[]
)
{
int
i
;
...
...
@@ -38,17 +49,23 @@ static void parse_args( int argc, char *argv[] )
if
(
isdigit
(
argv
[
i
][
2
]))
debug_level
=
atoi
(
argv
[
i
]
+
2
);
else
debug_level
++
;
break
;
case
'h'
:
usage
(
argv
[
0
]
);
exit
(
0
);
break
;
case
'p'
:
persistent_server
=
1
;
break
;
default:
fprintf
(
stderr
,
"Unknown option '%s'
\n
"
,
argv
[
i
]
);
usage
(
argv
[
0
]
);
exit
(
1
);
}
}
else
{
fprintf
(
stderr
,
"Unknown argument '%s'. Your version of wine may be too old.
\n
"
,
argv
[
i
]
);
usage
(
argv
[
0
]);
exit
(
1
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment