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
62de4d22
Commit
62de4d22
authored
23 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Created os_version() and socklib_version() functions for other modules to use.
parent
2bcb306a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sbbs3/sbbs.h
+8
-0
8 additions, 0 deletions
src/sbbs3/sbbs.h
src/sbbs3/ver.cpp
+54
-33
54 additions, 33 deletions
src/sbbs3/ver.cpp
with
62 additions
and
33 deletions
src/sbbs3/sbbs.h
+
8
−
0
View file @
62de4d22
...
...
@@ -789,6 +789,10 @@ extern "C" {
/* conobj.cpp */
JSObject
*
js_CreateConsoleObject
(
JSContext
*
cx
,
JSObject
*
parent
);
/* sockobj.c */
JSObject
*
DLLCALL
js_CreateSocketObject
(
scfg_t
*
cfg
,
JSContext
*
cx
,
JSObject
*
parent
,
char
*
name
,
SOCKET
);
#endif
#ifdef SBBS
/* These aren't exported */
...
...
@@ -822,6 +826,10 @@ extern "C" {
/* qwk.cpp */
void
remove_re
(
char
*
str
);
/* ver.cpp */
char
*
os_version
(
char
*
str
);
char
*
socklib_version
(
char
*
str
);
/* sortdir.cpp */
int
fnamecmp_a
(
char
**
str1
,
char
**
str2
);
/* for use with resort() */
int
fnamecmp_d
(
char
**
str1
,
char
**
str2
);
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/ver.cpp
+
54
−
33
View file @
62de4d22
...
...
@@ -38,10 +38,11 @@
#include
"sbbs.h"
#if defined(JAVASCRIPT) || defined(__unix__)
#define BETA "
a
lpha"
#define BETA "
A
lpha"
#else
#define BETA "
b
eta"
/* Space if non-beta, " beta" otherwise */
#define BETA "
B
eta"
/* Space if non-beta, " beta" otherwise */
#endif
extern
"C"
const
char
*
beta_version
=
BETA
;
#if defined(_WINSOCKAPI_)
extern
WSADATA
WSAData
;
...
...
@@ -51,46 +52,27 @@
#include
<sys/utsname.h>
/* uname() */
#endif
void
sbbs_t
::
ver
(
)
char
*
socklib_version
(
char
*
str
)
{
char
str
[
128
],
compiler
[
32
];
CRLF
;
strcpy
(
str
,
VERSION_NOTICE
);
#if defined(_DEBUG)
strcat
(
str
,
"Debug"
);
#endif
center
(
str
);
CRLF
;
#if defined(_WINSOCKAPI_)
COMPILER_DESC
(
compiler
);
strcpy
(
str
,
WSAData
.
szDescription
);
sprintf
(
str
,
"Revision %c%s %s %.5s "
"SMBLIB %s %s"
,
REVISION
,
BETA
,
__DATE__
,
__TIME__
,
smb_lib_ver
(),
compiler
);
#elif defined(__GLIBC__)
center
(
str
);
CRLF
;
sprintf
(
str
,
"GLIBC %u.%u"
,
__GLIBC__
,
__GLIBC_MINOR__
);
sprintf
(
str
,
"%s - http://www.synchro.net"
,
COPYRIGHT_NOTICE
);
center
(
str
);
CRLF
;
#ifdef JAVASCRIPT
center
((
char
*
)
JS_GetImplementationVersion
());
CRLF
;
#else
strcpy
(
str
,
"No socket library version available"
);
#endif
#if defined(_WINSOCKAPI_)
center
(
WSAData
.
szDescription
);
CRLF
;
#endif
return
(
str
);
}
char
*
os_version
(
char
*
str
)
{
#if defined(__OS2__) && defined(__BORLANDC__)
sprintf
(
str
,
"OS/2 %u.%u (%u.%u)"
,
_osmajor
/
10
,
_osminor
/
10
,
_osmajor
,
_osminor
);
...
...
@@ -140,6 +122,45 @@ void sbbs_t::ver()
#endif
return
(
str
);
}
void
sbbs_t
::
ver
()
{
char
str
[
128
],
compiler
[
32
];
CRLF
;
strcpy
(
str
,
VERSION_NOTICE
);
#if defined(_DEBUG)
strcat
(
str
,
"Debug"
);
#endif
center
(
str
);
CRLF
;
COMPILER_DESC
(
compiler
);
sprintf
(
str
,
"Revision %c%s %s %.5s "
"SMBLIB %s %s"
,
REVISION
,
BETA
,
__DATE__
,
__TIME__
,
smb_lib_ver
(),
compiler
);
center
(
str
);
CRLF
;
sprintf
(
str
,
"%s - http://www.synchro.net"
,
COPYRIGHT_NOTICE
);
center
(
str
);
CRLF
;
#ifdef JAVASCRIPT
center
((
char
*
)
JS_GetImplementationVersion
());
CRLF
;
#endif
center
(
socklib_version
(
str
));
CRLF
;
center
(
os_version
(
str
));
}
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