Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Main
Synchronet
Commits
e7d972cf
Commit
e7d972cf
authored
2 years ago
by
Rob Swindell
Browse files
Options
Downloads
Patches
Plain Diff
Include Git branch/hash in detailed version output
svdm -V and "ATi1" output.
parent
5d5230fb
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
src/vdmodem/vdmodem.c
+22
-2
22 additions, 2 deletions
src/vdmodem/vdmodem.c
with
22 additions
and
2 deletions
src/vdmodem/vdmodem.c
+
22
−
2
View file @
e7d972cf
...
...
@@ -34,6 +34,8 @@
#include
"sockwrap.h"
#include
"telnet.h"
#include
"ini_file.h"
#include
"git_branch.h"
#include
"git_hash.h"
#define TITLE "Synchronet Virtual DOS Modem for Windows"
#define VERSION "0.0"
...
...
@@ -108,7 +110,8 @@ void usage(const char* progname)
"
\t
-d Enable debug output
\n
"
"
\t
-h<sock> Specify socket descriptor/handle to use (decimal)
\n
"
"
\t
-r<cps> Specify maximum receive data rate (chars/second)
\n
"
"
\t
-c<fname> Specify alternate configuration (.ini) filename
\n
"
"
\t
-c<fname> Specify alternate configuration (.ini) path/filename
\n
"
"
\t
-V Display detailed version information and exit
\n
"
,
progname
);
exit
(
EXIT_SUCCESS
);
...
...
@@ -756,7 +759,21 @@ char* atmodem_exec(struct modem* modem)
}
break
;
case
'I'
:
sprintf
(
respbuf
,
"
\r\n
"
TITLE
" v"
VERSION
" Copyright %s Rob Swindell
\r\n
"
,
&
__DATE__
[
7
]);
switch
(
val
)
{
case
0
:
safe_snprintf
(
respbuf
,
sizeof
(
respbuf
)
,
"
\r\n
"
TITLE
" v"
VERSION
" Copyright %s Rob Swindell
\r\n
%s/%s
\r\n
"
,
&
__DATE__
[
7
]
,
GIT_BRANCH
,
GIT_HASH
);
break
;
case
1
:
safe_snprintf
(
respbuf
,
sizeof
(
respbuf
),
"
\r\n
%s
\r\n
"
,
ini_fname
);
break
;
default:
return
error
(
modem
);
}
return
respbuf
;
case
'O'
:
if
(
sock
==
INVALID_SOCKET
)
...
...
@@ -1078,6 +1095,9 @@ int main(int argc, char** argv)
case
'R'
:
rx_delay
=
strtoul
(
arg
+
1
,
NULL
,
10
);
break
;
case
'V'
:
fprintf
(
stdout
,
"%s/%s
\n
"
,
GIT_BRANCH
,
GIT_HASH
);
return
EXIT_SUCCESS
;
default:
usage
(
argv
[
0
]);
break
;
...
...
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