A binary configuration file format (.cnf) was introduced in v2 to speed up
the loading of configuration files and improve extensibility.
Although a 32-bit console-mode OS/2 version of Synchronet v2 was
released in 1995, it retained the same multi-node design as its DOS counterpart
and required a separate instance of the program for each node. It was also
during the active development life of Synchronet v2 that I began to release
32-bit extended DOS (DPMI), OS/2, and Win32 flavors of many of the utilities
included with Synchronet.
Synchronet v2 remained commercial software
until it was released as Freeware in early 1997 and the source code was
documented, packaged, and released to the Public
Domain later that same year (the Digital Dynamics' copyright was officially
relinquished at this time). In December of 1999, I released a public beta
of v2.30c for DOS and OS/2 (in binary form) that fixed a few millennium bugs and
introduced some of the minor features I had incorporated thus far in my
development of Synchronet v3.
This is not to suggest that only Unix/Linux sysops would potentially benefit
from Synchronet becoming an open-source project. It's just that Unix users are
traditionally more likely to be willing (and able) to mess with the source code,
and hence, more likely to submit useful modifications to the project. In
addition, development tools (i.e. C/C++ compiler, Make utility, CVS, etc) are
usually included free with Unix-like operating systems, while they are not
typically as readily available to Windows users.
So I created a revision control database (repository) using
CVS and checked-in the v2.3 and v3 source
code trees along with all the various menus, text files, and documents included
in Synchronet distributions. I chose CVS as the revision control system because
it is free software and is the tool of choice among most free/open-source
software developers. I would've preferred to use one of the commercial revision
control systems I've become accustomed to using in my professional development
career, but their price and status as proprietary software would have
potentially deterred valued open-source developers from contributing to the
project.
I also copyrighted all of the source code (as Rob Swindell) and put the majority of the v3 source code files under the
GNU General Public License to
protect them from inclusion in proprietary projects. I put the XSDK and SMBLIB
modules under the GNU Lesser
General Public License, which allows them to be linked with proprietary
projects.
|
Key |
Tool |
Supported Target Platforms |
|---|---|---|
| GCC | GNU Compiler Collection | GNU and Unix-variants (e.g. Linux) |
| GCCWIN | GCC (Cygwin/MinGW) for | Win32 |
| MSVC16 | Microsoft Visual C++ v1.52c | DOS and Win16 |
| MSVC32 | Microsoft Visual C++ v4+ | Win32 |
| MASM | Microsoft Macro Assembler v5.10 | DOS |
| BCCDOS | Any Borland C/C++ Compiler for | DOS |
| BCCWIN | Any Borland C/C++ Compiler for | Win32 |
| BCC31 | Borland C++ v3.1 | DOS |
| BCC45 | Borland C++ v4.5 | DOS, DPMI, Win16, and Win32 |
| BCCOS2 | Borland C++ for OS/2 v2.0 | OS/2 |
| BCB5 | Borland C++ Builder 5 | Win32 |
| BCC55 | Borland C++ Builder Compiler 5.5 | Win32 |
| WATCOM | Watcom C++ v10.0a | DOS, DPMI, Win16, Win32, and OS/2 |
| DELPHI | Borland Delphi 5 | Win32 |
|
Directory/File |
Description |
Supported Tools |
|---|---|---|
| CVSROOT/ | Administrative files | Do not edit |
| src/ | C/C++ source code | Various C/C++ Compilers |
| src/mswait/ | Millisecond wait/time-slice API for DOS | MASM |
| src/sbbs2/ | Synchronet Version 2 C source code | BCCDOS or BCCOS2 |
| src/sbbs2/addfiles/ | Utility to add files to BBS file database | |
| src/sbbs2/allusers/ | Perform actions on all users | |
| src/sbbs2/ans2msg/ | Convert ANSI file to Ctrl-A format | |
| src/sbbs2/autonode/ | Local login to first available node | |
| src/sbbs2/baja/ | Shell/module compiler (BAJA.EXE) | |
| src/sbbs2/dcdwatch/ | Monitor carrier detect for WWIV doors | |
| src/sbbs2/delfiles/ | Delete files from BBS file database | |
| src/sbbs2/dstsedit/ | Edit daily statistics | |
| src/sbbs2/dupefind/ | Find duplicate files in BBS file database | |
| src/sbbs2/echo/ | SBBSecho FidoNet Packet Tosser | WATCOM |
| src/sbbs2/execdos/ | Synchronet for OS/2's EXECDOS.EXE | |
| src/sbbs2/execsbbs/ | Used to re-run SBBS.EXE (for DOS/OS2) | |
| src/sbbs2/filelist/ | Create list of files from BBS file database | |
| src/sbbs2/install/ | DOS/OS2 Installer | |
| src/sbbs2/mlabels/ | Generate mailing labels from user database | |
| src/sbbs2/msg2ans/ | Convert Ctrl-A files to ANSI format | |
| src/sbbs2/node/ | Display/Control Nodes from command-line | |
| src/sbbs2/qwknodes/ | QWK Network utility | |
| src/sbbs2/rio/ | OS/2 and Win32 Remote I/O library | |
| src/sbbs2/scb/ | Synchronet Callback | |
| src/sbbs2/scfg/ | Configuration Program | BCC45 |
| src/sbbs2/slog/ | Statistics log viewer | |
| src/sbbs2/smb/ | Synchronet Message Base library and header files | |
| src/sbbs2/chksmb/ | Utility to check Synchronet message bases for errors | |
| src/sbbs2/fixsmb/ | Utility to rebuild Synchronet message base indices | |
| src/sbbs2/smbutil/ | Message base maintenance utility | |
| src/sbbs2/smbactiv/ | Message base activity monitor | |
| src/sbbs2/smm/ | Synchronet Match Maker | |
| src/sbbs2/uti/ | Synchronet UTI driver (for PostLink/RelayNet/RIME) | |
| src/spawno/ | Ralf Brown's EMS/XMS/disk swapping replacement for spawn...() | |
| src/stp/ | Synchronet Transfer Protocols (X/Y/Zmodem) [incomplete] | |
| src/tone/ | Tone generator (used for external sysop chat pager) | |
| src/uifc/ | User Interface Library (text-mode) | BCC45 or BCCOS2 |
| src/sbbs3/ | Synchronet Version 3 C/C++ source code and project/make files | MSVC32, BCC55, or GNUWIN |
| src/sbbs3/sbbs3.dsw | Microsoft Visual Studio 6 Workspace File | MSVC32 |
| src/sbbs3/sbbs.dsp | Microsoft Visual Studio 6 Project File for SBBS.DLL | MSVC32 |
| src/sbbs3/mailsrvr.dsp | Microsoft Visual Studio 6 Project File for MAILSRVR.DLL | MSVC32 |
| src/sbbs3/ftpsrvr.dsp | Microsoft Visual Studio 6 Project File for FTPSRVR.DLL | MSVC32 |
| src/sbbs3/baja.dsp | Microsoft Visual Studio 6 Project File for BAJA.EXE | MSVC32 |
| src/sbbs3/chksmb.dsp | Microsoft Visual Studio 6 Project File for CHKSMB.EXE | MSVC32 |
| src/sbbs3/fixsmb.dsp | Microsoft Visual Studio 6 Project File for FIXSMB.EXE | MSVC32 |
| src/sbbs3/smbutil.dsp | Microsoft Visual Studio 6 Project File for SMBUTIL.EXE | MSVC32 |
| src/sbbs3/sbbsexec.dsp | Microsoft Visual Studio 6 Project File for SBBSEXEC.DLL | MSVC32 |
| src/sbbs3/Makefile.bor | Borland make file for SBBS.DLL, FTPSRVR.DLL, and MAILSRVR.DLL | BCC55 |
| src/sbbs3/Makefile.gnu | GNU make file for SBBS.DLL, FTPSRVR.DLL, and MAILSRVR.DLL | GNUWIN |
| src/sbbs3/ctrl/ | Control Panel (Win32 GUI) | BCB5 |
| src/sbbs3/chat/ | Local Chat Module (Win32 GUI) | BCB5 |
| src/sbbs3/useredit/ | Local User Editor (Win32 GUI) | DELPHI |
| src/sbbs3/dosxtrn/ | External DOS Program Launcher (Win32) | MSVC16 |
| src/sbbs3/execvxd/ | FOSSIL/DOSIO driver for Win9x | MSVC32 and VtoolsD |
| exec/ | Ultimate destination for executables | |
| exec/*.src;*.inc | Loadable Modules and Command Shells | ASCII Editor and Baja |
| xtrn/ | External Programs (Doors) | |
| xtrn/sdk/ | External Program Software Development Kit (XSDK) | Various |
| xtrn/sbj/ | Synchronet Blackjack | BCCDOS, BCCWIN, or MSVC32 |
| xtrn/sbl/ | Synchronet BBS List | BCCDOS, BCCWIN, or MSVC32 |
| xtrn/smm/ | Synchronet Match Maker | BCC31 |
| text/ | Run-time read-only text files | ASCII editor |
| text/menu/ | Menu Files | ASCII or ANSI editor |
| text/menu/major/ | ||
| text/menu/pcboard/ | ||
| text/menu/renegade/ | ||
| text/menu/sdos/ | ||
| text/menu/simple/ | ||
| text/menu/wildcat/ | ||
| docs/ | Documentation | |
| ctrl/ | Run-time configuration files | SCFG |
| node1/ |
Presumably, you are reading this file because you want access to the source code. And you want access to the source code because you plan on making modifications (or maybe you just want to verify there aren't any "back doors"). In any case, if and when you make useful modifications to the source code, you are encouraged to submit those changes to mods@synchro.net for possible inclusion in a future Synchronet release. Frequent contributors may become official co-developers and be given direct read/write access to the CVS repository by me, the maintainer of the project.
If you are modifying the code for use on a single BBS and do not wish to give those modifications to anyone else, you have that right. To make synchronization of your version with the official Synchronet releases easier, it is highly recommended that you predefine a preprocessor symbol (e.g. MYMODS) and then wrap your modifications in a conditional compilation statement. Example:
#ifdef MYMODS
bprintf("You are experiencing my custom modification.\r\n");
#endif
If you are changing existing lines of code, it is recommended that you include both the original and modified versions in your source and use conditional compilation statements to determine which version will be used. Example:
#ifdef MYMODS i = j/100; #else /* Original code */ i = j/50; #endif
This allows you to easily "undo" your modifications for testing purposes (by simply undefining MYMODS) as well as clearly marking, for future reference, which parts of the code were modified by you.
If you'd like to submit your modifications for possible inclusion in a future Synchronet release, it would be beneficial if the programming style was consistent with the style of the existing code base. Consistency of style helps improve readability and maintainability of the source code.
Prior to Synchronet v3, I used a form of "condensed" K&R style to get as much code in an 80x25 character display as possible while maintaining some degree of readability.
Example (K&R style):
main()
{
char line[MAXLINE];
int found = 0;
while (getline(line, MAXLINE) > 0)
if (strindex(line, pattern) >= 0) {
printf("%s", line);
found++;
}
return found;
}
Example (Synchronet v2 style):
main()
{
char line[MAXLINE];
int found=0;
while(getline(line,MAXLINE)>0)
if(strindex(line,pattern)>=0) {
printf("%s",line);
found++; }
return(found);
}
As you've probably noticed, in the Synchronet v2 style, the body of the function is not indented and the closing curly brace is not on its own line. Additionally, unnecessary white-space characters have been removed from within the body of the expressions. While the above examples do not demonstrate the potential advantages of compressing white-space in a C coding style, you can imagine how the limitations of an 80 column display could make heavily nested expressions difficult without resulting to such measures.
In Synchronet v3, I've taken advantage of modern GUI text editors capable of displaying more than 80 characters on a line and have "uncompressed" the style to a degree:
Example (Synchronet v3 style):
main()
{
char line[MAXLINE];
int found=0;
while(getline(line,MAXLINE)>0)
if(strindex(line,pattern)>=0) {
printf("%s",line);
found++;
}
return(found);
}
Now the body of the function is indented and the closing curly brace has been placed on its own line (as in the K&R style), but the unnecessary white-space characters remain compressed (eliminated from the body of the expressions). You may still find v2 style closing braces in some of the v3 source files, but indentation and all other style elements should be consistent with the v3 style shown above.
There are two very important areas of compatibility that must be maintained when modifying the code:
On the first point, you must take care not to alter structure definitions or file formats that will cause the resulting file not to operate in a compatible way with Synchronet v2. If you need additional data storage, try to use unused or reserved elements, bit-fields, or data fields in existing structure or file definitions (without changing the overall size of the structure or data record) or create auxiliary data files that contain the additional required data. All binary words and double-words are to be stored in little endian (Intel) byte-order and there are currently no provisions in the source code to account for byte-order translations on big endian systems.
On the second point, it is critical that you do not add system calls or system-dependant functionality in a non-portable fashion. If you are adding code that is only supported on a specific platform and when built with a specific compiler or run-time library, be sure to wrap that code in conditional compilation statements that test for the appropriate pre-processor definitions. In addition, take care to add error conditions, warnings, or alternate behavior when the code is built on an unsupported platform or with an unsupported tool. For example:
#if defined(__MSDOS__) mswait(1); #elif defined(__OS2__) DosSleep(1); #elif defined (_WIN32) Sleep(1); #else #error "No Sleep Function for target platform!" #endif
To maintain as much compiler and platform compatibility as possible, do not unnecessarily restrict code portions to a specific Unix-like operating system (Linux for example) when the code will (or should) compile with most Unix-like operating systems. For example:
#if defined(__unix__) this_code_for_any_unix_variant; #endif #if defined(__linux__) this_code_only_for_linux; #endif
Also, be sure to separate compiler dependancies from platform dependancies. For example:
#if defined(__GNUC__) this_code_only_for_gcc; #else this_code_for_all_others; #endif
Please use the following pre-processor symbols to determine the target platform:
| Symbol | Target Platform |
|---|---|
|
| Any Unix-like OS |
|
| GNU/Linux (use sparingly) |
|
| FreeBSD (use sparingly) |
|
| Any BSD-based Unix |
|
| Win32-based OS |
|
| OS/2 |
|
| MS-DOS |
|
| Rational 32-bit DOS extender |
|
| Other 32-bit DOS extender |
Please use the following pre-processor symbols to determine the compiler:
| Symbol | Compiler |
|---|---|
|
| GNU C/C++ Compiler |
|
| Borland C++ or C++ Builder Compiler |
|
| Watcom C++ |
|
| Microsoft Visual C++ |
Little-endian/80386-class target CPUs are assumed, so no testing for CPU-type is required at this time.
When you've created a modification that you think other Synchronet sysops or users may find useful, you are encouraged to submit this modification to mods@synchro.net. Modifications should be submitted in the Unix diff format. Currently, I am the sole judge of which submissions will be merged into the code base and which ones will not. If I determine that a submission should not be merged into the code base for any reason, I will make my best effort to explain to the submitting developer the reasons why and offer advice on how to remedy the situation, if at all possible.