

    Clusse

    (c) Heikki Hannikainen 1994-1998

    Source Code Released



    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.



    See the file "COPYING" for a full copy of the GNU GPL.

    ------------------------------------------------------------------

 This is the Borland Pascal source code for Clusse 0.31.

    Yes, the source is free. YES, I DO WANT YOU TO READ THE "COPYING"
    FILE. At least if you haven't been into the Unix world of free
    software before. The GNU GPL licence sets some interesting
    restrictions on the code, just to make sure it keeps free.
    Please note that some source files which contain code written by
    someone else than me are not under the GPL, but instead, in the
    public domain.

    No, the source code is not pretty. No, it is not designed well. It's
    not good for a software design lecture. It's how i learned how NOT to
    design large applications.

    Most of the comments in the source were in finnish. I spent a night
    going through the code, translating most of them in english, adding some
    more comments, and adding the copyright/copying clauses. Some comments
    are still in finnish, i hope you don't mind.

    I also added comments in the beginning of each source file, trying
    to describe what each module does (or tries to do). To make it easier
    to find something, I copied the descriptions below.

 On compiling environment:

    The code has been compiled using Borland Pascal 7. It might compile on
    version 6. At least with minor modifications (it would be buggy though).
    I'm not at all sure if it would compile with version 5. I am pretty
    damn sure it won't compile on version 4 or 3. Your mileage may vary.
    (Do not ask me to provide you with a compiler, since i won't. It's
    commercialware. Try finding one in the shops. It might turn out to
    be a bit hard. You should be able to get it for virtually free from
    somewhere.)

 On version naming and new distributions:



 Discussion area:

    Feel free to use the Clusse Discussion mailing list (as documented
    on the web site at http://zone.pspt.fi/clusse/ and the clusse
    documents) for discussion about modifications, additions, compiling
    and porting.

    ------------------------------------------------------------------

Unit AutoBIN;  { autobin.pas }

  { Implements the "DOS" file manipulation commands and file transfer
    protocols like AUTOBIN and ASCII, as well as the DOS, RUN and
    PG commands (requiring a dos shell) }

Unit BPQ;      { bpq.pas }

  { Implements a sort of socket abstraction layer to protect the rest
    of the code from seeing the ugly BPQ "stream" interface (which is
    actually a block interface), or the very different PC/FlexNet
    API. Also provides some callsign handling functions and does
    the band monitoring. Hey, even some IP/TCP/UDP/ARP decoding! }

Unit Buck;     { buck.pas }

      A simple interface to use the HamCall CD-ROM by Buckmaster Publishing.
    Requires BuckTSR (Not supplied with pre-1995 CD-ROM's).

    This was printed on some (1996, 1997?) Buckmaster CD, along with a
    copy of a Clusse. It is in the public domain (unlike the rest of
    the source code).

Unit CluLink;  { clulink.pas }

  { This is where i was going to implement the CluLink protocol.
    Huh, what a plan. The protocol is mostly documented, and I suppose
    it is actually implemented in DxNet! Good job, Olivier.
    In reality, this file doesn't implement anything. }

Program Clu;   { clusse.pas }

 { This has the "main" function. Not any actual code, just some useful
   comments. The most important thing is the Uses clause, which defines
   the order the modules will be linked in the actual executable, which
   in turn defines how much will be swapped out when going to DOS shell.
   It is important that the ExecWSwp module is linked in first, to
   maximize the amount of available memory in the shell... }

Unit Cluster;  { cluster.pas }

  { Implements many important parts of the cluster user interface.
    That includes at least the transmission of cluster events (DX, ANN,
    etc etc), the user command parser, and the "cluster submode" multiplexer. }

Unit cMath;    { cmath.pas }

  { Implements some functions which fall in the "math" class, including
    coordinates/locators conversions, and distance/azimuth calculations.
    Some bugs here! At least the latter is a dead one. Fix it. }

Unit cmd_Sys;  { cmd_sys.pas }

  { Implements some user commands which fall in the "system" class,
    including things like system status queries, version queries,
    "sysop-only" commands, user file editing, etc. }

Unit cmd_User; { cmd_user.pas }

  { Implements lots of basic cluster user commands. Check here first. }

Unit Config;   { config.pas }

  { Implements the startup procedure (yes, the master initialization
    function is here), critical error and heap memory error handlers,
    the exit procedure, and the (non-working?) software watchdog timer.
    Also includes a bunch of global constants like version numbers and
    copyright/address defines. }

Unit Console;  { console.pas }

  { Implements the keyboard handler (line editing, function keys, etc),
    console connection/disconnection, the main timer function that
    calls other timers, and an "at" facility (timed function execution,
    i don't remember if it's used or if it works at all). The main
    shutdown procedure seems to be here too. }

Unit Convers;  { convers.pas }

  { Implements the conference mode. Mostly a pascal rewrite of the
    NOS implementation of the conversd. Even implements most of the
    conversd linking protocol, though it was never finished. I tried
    linking it once or twice, but ran in to bandwidth problems on my
    1k2 link to home... with a little work it might be possible to
    get it working. The linking code is completely disabled now. }

Unit crc;      { crc.pas }

  { Functions to calculate 16 and 32 bit CRC values. Used for autobin
    and some other stuff, i don't remember what. This code is not mine,
    just a pascal rewrite of some public domain code i think. I can't
    remember where i got this. }

Unit cStrings; { cstrings.pas }

  { Implements *lots* of different character string and integer/float
    manipulation and conversion functions used elsewhere in the code. }

Unit Database; { database.pas }

  { Implements the LOUSY "database" thing. Ugly, bad, slow, inefficient.
    I didn't know just about anything about programming back when wrote
    this. Includes the "find" command, implements the remote
    database stuff, and the special prefix database as well. }

Unit Environ;  { environ.pas }

  { DOS environment variable handling code. Originally TPENV.BAS by
    TurboPower Software, copyrighted by them, not under the GPL.
    With slight modifications by me i think. They gave it away for free. }

Unit ExecWSwp; { execwswp.pas }

 { Execute a program ("dos shell" as they call it... "dos hell" as I
   call it at times). Wish i had fork() & pipe() in DOS. 8-(
   Originally by TurboPower Software, copyrighted by them, and given
   to the public domain. With modifications by me. Can swap most of
   the program core to disk or EMS (dunno if the EMS part actually
   works). }

Unit Files;    { files.pas }

  { Implements most of the clusse binary data file handling, some config
    file reading/parsing, file system functions, a couple of user commands
    to get filesystem status and data from some files (like the DX spot
    list/search facility). Whew, actually quite a LOT of code. }

Unit Filters;  { filters.pas }

  { Implements the DX spot filtering system. Not very clean, but i
    am proud of the implementation of this feature, and it's
    versatility. }

Unit Linker;   { linker.pas }

  { Implements the linking connection script system. A place of many bugs.
    Ugly. }

Unit Main;     { main.pas }

  { Includes the main polling loop the program spins in. To figure out
    how the program works, start reading here. Also includes the main
    input multiplexer, and connection/disconnection handlers. }

Unit MultiTsk; { multitsk.pas }

  { Implements detection of multitasking environments, including
    DesqView, OS/2, and different M$ Windows generations, and
    generic DPMI. This information isn't actually used for anything
    else but releasing a timeslice if we have nothing else to do with
    it (which is also implemented here). For some odd reason, the
    "normal" console dos shell function appears to be here as well? }

Unit PCLink;   { pclink.pas }

  { Implements much of the PacketCluster linking protocol. The main
    message parser is here, for example, as are the message transmitting
    functions. This code was originally in protocol.pas, and the intention
    was to separate the PC-specific stuff here when i started to think
    about supporting another protocol, but much of the stuff is still
    in the Protocol module. }

Unit Protocol; { protocol.pas }

  { Implements the main cluster networking core. Includes much
    PC-specific linking stuff, and some networking-related user
    commands. DO NOT MESS WITH THIS UNLESS YOU ARE REALLY SURE
    WHAT YOU'RE DOING IS SANE. YOU CAN EASILY CRASH THE WHOLE
    CLUSTER NETWORK BY SENDING BAD DATA TO A LINK. }

Unit Screen;   { screen.pas }

  { Implements the console screen handling. An amount of video hardware
    specific code, primitive windowing features etc. Half of the
    video I/O is direct, the other half through BIOS. Uuuglyyyy. }

Unit Speech;   { speech.pas }

  { Implements the "speaking dx cluster" facility. Support for
    8 bit SoundBlaster sound cards (later models are backwards
    compatible of course), and paraller port DAC's. The original
    DAC driver and word ordering system was written by Sakari Nylund,
    OH1KH. I added support for the SB, storing words in XMS, and
    audible CW. This works, but has some killer bugs in it. Some
    important stuff is unimplemented. This is sort-of-freeware, not
    under the GPL. }

Unit Unproto;  { unproto.pas }

  { Implements the unproto/broadcasting cluster API, which was intended
    as a way to save LOTS of bandwidth. A bit like the FBB/TPK unproto
    system. But without using connected mode at all. The information
    transmission is completely implemented, but the queries probably don't
    work too well. If they did, and we had a nice working Windoze client
    for the protocol, this would be a killer app. }

Unit xmsLib;   { xmslib.pas }

  { An XMS library. Mostly implemented in inline assembly. I found this
    from somewhere, a long time ago, i suppose it's in the public domain
    (not under the GPL). Author unknown. I have added the accounting, and
    an user command to check the results. }


   **** Other files included ****

flxapp.tpu  - This is the PC/FlexNet API module. I got it from the
              PC/FlexNet team. No, i don't have the source code for it,
              just the .int interface description file. Must be linked in.

BUCK\    - This directory includes some documentation from BuckMaster
           about their CD format, and some C code to access it by
           Olivier Le Cam.

CLU\     - This directory includes my debugging installation. That's
           where I compile to, and run while debugging. It's not what
           i've been distributing.

DOC\     - Some random pieces of documentation.

SETUP\   - The setup program source code. The first Object Oriented
           piece of software I did. No comments, thank you. 8-)
           Mostly ugly, if you know object oriented programming.
           Done using the Turbo Vision libraries, and based on a
           Turbo Vision demo program. The directory includes the only
           shared piece of source, conffile.pas, which defines the
           binary configuration file format. This is also compiled
           in clusse.exe.

SPEECH\  - Some speech related stuff, vocal data files, testing/debugging
           source code, etc etc. Also some sound blaster driver sources
           i found on the net, and used as an example.

UPD\     - Some data file conversion code, for helping clusse version
           migrations.

