Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
558b6607
Commit
558b6607
authored
Jan 11, 2001
by
Josh DuBois
Committed by
Alexandre Julliard
Jan 11, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a simple usage() function.
parent
67d39034
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
main.c
server/main.c
+18
-1
No files found.
server/main.c
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
);
}
}
...
...
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