home *** CD-ROM | disk | FTP | other *** search
- The file SOZOINIT.S is a startup module for sozobon C that can be
- used to start either a desk accessory or a program. In fact, if
- a program is written carefully it will work both ways just by changing
- its name.
-
- This startup module sets a global int called _app to 1 if the program
- is being run as an application, or to 0 if it is run as a desk
- accessory.
-
- This startup module does not call the functions to parse the arcv[]
- array, nor does it call _exit() to clean up open file streams. These
- things are not necessary for accessories which do not take arguments
- or exit. It does set global variables for the basepage pointer and
- program size, so arguments can be retrieved and TSR's can easily
- exit. A bonus of this startup module is that simple executable files
- will be quite small, and there is no need to #include "minimum.h".
-
- The sozobon command CC will use the file DSTART.O as the startup module.
- I suggest you make a backup copy of the default dlibs version before
- you rename SOZOINIT.O to DSTART.O.
-
- It is my hope that more people will write desk accessories that also
- work as programs. Feel free to pass along this startup module.
-
- Samuel Streeper
-
- p.s. For a source code example of an accessory that also works as a
- program, you might want to look at the Double Vision formatter
- also posted to comp.sources. That was actually written in Laser C,
- but should work fine with Sozobon and this startup module. (you will
- probably have to cast a few (char *)'s to (long)'s)...
-