|
|
1.1 root 1: /* ver.cpp */
2:
3: /* Synchronet version display */
4:
1.1.1.2 ! root 5: /* $Id: ver.cpp,v 1.23 2004/12/31 11:47:43 rswindell Exp $ */
1.1 root 6:
7: /****************************************************************************
8: * @format.tab-size 4 (Plain Text/Source Code File Header) *
9: * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
10: * *
1.1.1.2 ! root 11: * Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html *
1.1 root 12: * *
13: * This program is free software; you can redistribute it and/or *
14: * modify it under the terms of the GNU General Public License *
15: * as published by the Free Software Foundation; either version 2 *
16: * of the License, or (at your option) any later version. *
17: * See the GNU General Public License for more details: gpl.txt or *
18: * http://www.fsf.org/copyleft/gpl.html *
19: * *
20: * Anonymous FTP access to the most recent released source is available at *
21: * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net *
22: * *
23: * Anonymous CVS access to the development source and modification history *
24: * is available at cvs.synchro.net:/cvsroot/sbbs, example: *
25: * cvs -d :pserver:[email protected]:/cvsroot/sbbs login *
26: * (just hit return, no password is necessary) *
27: * cvs -d :pserver:[email protected]:/cvsroot/sbbs checkout src *
28: * *
29: * For Synchronet coding style and modification guidelines, see *
30: * http://www.synchro.net/source.html *
31: * *
32: * You are encouraged to submit any modifications (preferably in Unix diff *
33: * format) via e-mail to [email protected] *
34: * *
35: * Note: If this box doesn't appear square, then you need to fix your tabs. *
36: ****************************************************************************/
37:
38: #include "sbbs.h"
39:
1.1.1.2 ! root 40: extern "C" const char* beta_version = " "; /* Space if non-beta, " beta" otherwise */
1.1 root 41:
42: #if defined(_WINSOCKAPI_)
43: extern WSADATA WSAData;
1.1.1.2 ! root 44: #define SOCKLIB_DESC WSAData.szDescription
! 45: #else
! 46: #define SOCKLIB_DESC NULL
1.1 root 47: #endif
48:
49: #if defined(__unix__)
50: #include <sys/utsname.h> /* uname() */
51: #endif
52:
1.1.1.2 ! root 53: char* socklib_version(char* str, char* winsock_ver)
! 54: {
! 55: #if defined(_WINSOCKAPI_)
! 56:
! 57: strcpy(str,winsock_ver);
! 58:
! 59: #elif defined(__GLIBC__)
! 60:
! 61: sprintf(str,"GLIBC %u.%u",__GLIBC__,__GLIBC_MINOR__);
! 62:
! 63: #else
! 64:
! 65: strcpy(str,"No socket library version available");
! 66:
! 67: #endif
! 68:
! 69: return(str);
! 70: }
! 71:
1.1 root 72: void sbbs_t::ver()
73: {
74: char str[128],compiler[32];
75:
76: CRLF;
77: strcpy(str,VERSION_NOTICE);
78: #if defined(_DEBUG)
1.1.1.2 ! root 79: strcat(str," Debug");
1.1 root 80: #endif
81: center(str);
82: CRLF;
83:
1.1.1.2 ! root 84: DESCRIBE_COMPILER(compiler);
1.1 root 85:
86: sprintf(str,"Revision %c%s %s %.5s "
87: "SMBLIB %s %s"
1.1.1.2 ! root 88: ,toupper(REVISION)
! 89: ,beta_version
! 90: ,__DATE__,__TIME__
1.1 root 91: ,smb_lib_ver(),compiler);
92:
93: center(str);
94: CRLF;
95:
96: sprintf(str,"%s - http://www.synchro.net", COPYRIGHT_NOTICE);
97: center(str);
98: CRLF;
99:
1.1.1.2 ! root 100: #ifdef JAVASCRIPT
! 101: if(!(startup->options&BBS_OPT_NO_JAVASCRIPT)) {
! 102: center((char *)JS_GetImplementationVersion());
! 103: CRLF;
1.1 root 104: }
105: #endif
106:
1.1.1.2 ! root 107: center(socklib_version(str,SOCKLIB_DESC));
! 108: CRLF;
! 109:
! 110: center(os_version(str));
1.1 root 111: }
112:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.