	  Synchronet External Program Software Developer's Kit (XSDK)
		  Version 3.11 - March 2001 - Rob Swindell


What is it?
===========

The Synchronet XSDK is a software development kit for C/C++ programmers that
are interested in writing external online programs (aka "doors") for
Synchronet BBS Software (www.synchro.net). The XSDK consists of C source and
header files that contain functions and variables that make writing an external
program for Synchronet much easier than "from scratch".

The Synchronet XSDK can be used to create 16-bit DOS programs supported by
all versions of Synchronet and native 32-bit programs supported by Synchronet 
Version 3.0 for Win32 and Linux.

Programs written using the XSDK will automatically inherit the following
features:

o Reads Synchronet's XTRN.DAT drop file from the current node directory
  without any required command line parameters (easy configuration)
  initializing many user and system variables for the programmer to use

o Automatically supports remote user I/O with dropped connection detection

o Synchronet internode messaging (Ctrl-P), activity alerts, and node listings

o Automatic terminal type detection

o Intelligent Ctrl-A code expansion for Color/ANSI users

o Automatic screen pausing based on screen length (optional)

o 32-bit programs will default to no local console I/O (new in v3.11)


Supported Compilers
===================

o All Borland 16-bit and 32-bit C/C++ compilers for DOS and Windows
  e.g. Turbo C/C++, Borland C/C++, and Borland C++ Builder
  See xtrn/sbl/sbl.bpr and xtrn/sbj/sbj.bpr for example BCB 5 XSDK projects

o Microsoft Visual C++ Version 5 and 6
  (earlier 32-bit versions should work too)
  See xtrn/sbl/sbl.dsp and xtrn/sbj/sbj.dsp for example MSVC 6 XSDK projects

o GNU Compiler Collection
  (including Cygwin/MinGW for Win32)
  See xtrn/sbl/Makefile.gnu and xtrn/sbj/Makefile.gnu for example XSDK projects

o Watcom C/C++

o Symantec C/C++

o Other C/C++ compilers may be supported with slight modifications to the code
  (please share your modifications with me: sysop@vert.synchro.net)


How do I use it?
================

1. Copy the following files into the source directory for your project (or
   copy them to and build them from your Synchronet XTRN\SDK directory):

   xsdk.c
   xsdk.h
   xsdkvars.c
   xsdkwrap.c -> New in XSDK v3.10
   xsdkwrap.h -> New in XSDK v3.10
   xsdkinet.h -> New in XSDK v3.10
   xsdkdefs.h
   mswaits.obj (16-bit compilers only)
   mswaitl.obj (16-bit copmilers only)

2. Add the following line towards the top of your main .c file:

   #include "xsdk.h"

3. Compile your main .c file to verify that you do not have any
   incompatibilities with the contents of xsdk.h. If you receive any
   compilation errors, you'll need to resolve these errors (possibly by
   editing xsdk*.c or xsdk*.h) before you can continue.

4. Add a call to the XSDK "initdata" function to your program's entry point
   (typically main()). The XSDK "initdata" function will read in the BBS drop
   file (XTRN.DAT) and initialize the appropriate variables. See xsdk.h for a
   complete list of functions available to you and their descriptions.

5. Somewhere after the call to initdata(), add the following line to your
   code:

   bprintf("XSDK v%s",xsdk_ver);

   Note: You may also want to use the COMPILER_DESC and PLATFORM_DESC macros
         (new in v3.11) to describe the compiler used and the target platform.

6. Include xsdk.c, xsdkwrap.c and xsdkvars.c in your project or "make" file.

7. If you are using a 16-bit compiler, you will need to include mswaits.obj
   (for small memory models) or mswaitl.obj (for large memory models) in your
   project's linked library/object list. This is the millisecond wait/
   time-slice surrender library used by the 16-bit DOS version of Synchronet.

8. Compile and link your project.


Configuring Synchronet To Run Your Program
==========================================

Make sure you have the program configured (in SCFG) to create the XTRN.DAT
drop file in the Node Directory.

16-bit Programs
---------------
16-bit XSDK programs must have "Intercept I/O Interrupts" set to "Yes".

32-bit Programs
---------------
32-bit XSDK programs are only supported by Synchronet version 3. To configure 
a 32-bit program with Synchronet v3.0b, add the program's base filename to the
OS/2 program list in SCFG (this will be replaced with a toggle option in the 
extenral program configuration menu in the future).


/* End of XSDK.TXT */
