Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
gdut-drcom
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
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
nanahira
gdut-drcom
Commits
225151ef
Commit
225151ef
authored
Nov 26, 2016
by
chenhaowen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add command line option: -v/--version
parent
30e48dbb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
src/Makefile
src/Makefile
+1
-1
src/gdut-drcom.c
src/gdut-drcom.c
+6
-1
No files found.
src/Makefile
View file @
225151ef
#CC:=gcc
VERSION
:=
1.6.
0
VERSION
:=
1.6.
1
CFLAGS
+=
-Wall
-fPIC
-DDEBUG
-DVERSION
=
\"
$(VERSION)
\"
objects
=
config.o auth.o
...
...
src/gdut-drcom.c
View file @
225151ef
...
...
@@ -29,13 +29,14 @@ int main(int argc, char *argv[])
{
{
"help"
,
no_argument
,
0
,
'h'
},
{
"config-file"
,
required_argument
,
0
,
'c'
},
{
"version"
,
no_argument
,
0
,
'v'
},
{
"remote-ip"
,
required_argument
,
0
,
0
},
{
"remote-port"
,
required_argument
,
0
,
1
},
{
"keep-alive1-flag"
,
required_argument
,
0
,
2
},
{
"enable-crypt"
,
no_argument
,
0
,
3
},
{
0
,
0
,
0
,
0
},
};
opt
=
getopt_long
(
argc
,
argv
,
"hc:"
,
long_options
,
&
option_index
);
opt
=
getopt_long
(
argc
,
argv
,
"hc:
v
"
,
long_options
,
&
option_index
);
if
(
opt
==
-
1
)
{
break
;
...
...
@@ -62,6 +63,10 @@ int main(int argc, char *argv[])
print_help
(
argv
[
0
]);
exit
(
0
);
break
;
case
'v'
:
fprintf
(
stdout
,
"version: %s
\n
"
,
VERSION
);
exit
(
0
);
break
;
case
'?'
:
break
;
default:
...
...
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