
                            Technical information
                            

This file descrived how this project was coded. From coding style, to
compilers supported.

Cr/Lf

Basicly since this project is a DOS command interpreter, all files should be
saved as DOS files (CrLf). When I will add a UNIX port, I hope that the
compiler will be able to handle them well.

Writing style

The  coding/writing  style  is  basicly  K&R. Some times 2, sometime 3 spaces.
Depends  on  my mood. The code (I think) is very clear from this point. If you
want to continue, please dont write messy code. I  will not force you to write
in any way. If you make a function/file, I will probably put it as it is. Even
if your coding style does not match mine. Freedom.

Adding new files

Each file you add to the project, should include "fdshell.h". This include
file should include all other files needed by any file of this project and
define any symbol needed.
You  should  also  write a *.H file to in the include directory, with the same
name as the c file, and then change "fdshell.h" to include this file.

Porting to new compilers

When porting to a new compiler, all you need to do is:

 1) Write an include file for that compiler. There is a standard for
    C coding which headers should define which functions, but each
    compiler implements them in a different way. For example Hi-Tech-C
    does not include fnsplit(), fnmerge(), strupr(), strlwr(), access().
    Thease functions are defined in HITECHC.H. The functions are implemented
    in HITECHC.C, which is linked to the project (only the Hi-Tech-C project).
    Each copmiler also has a project/makefile for itself.

 2) Edit FDSHELL.H, and before the end of the file, check for the specific
    compiler, and if found define thease symbols as well:
    __FDSHELL_COMPILER_SUPPORTED__ as 1, and __COMPILER_FOUND__ as the name
    of the compiler. The first is used by FDSHELL.H to determinate if this
    copmiler could be used to compile the code. The second could be used as
    a output string to display the platform of the program. (for example in
    a command like "VER" ). Example on DJGPP compilations
    __FDSHELL__COMPILER__SUPPORTED__ will be 1, and __COMPILER_FOUND__ is
    "DJGPP (DOS 32bit Protected-mode)".

 3) Write an include file for that compiler. Basicly it should just include
    the files you need. Note that all files in this project incude FDSHELL.H
    which includes your file, which in it's turn will include all include
    files for that platform/compiler.

 3) Write a makefile, or save a desktop if that compilers/IDE. The name should
    be the same as the compilers name. I used DJGPP both for UNIX and DOS, so
    I saved two project files, one called DJGPP (dos) and one called UNIX (the
    linux version).

 4) When adding new command(s), the must be declared like foo( BATCH *batch ).
    This  pointer  is  the  only link to the "main program" and this is all it
    needs.  This  pointer  will  let  you  know all you need about the current
    running  batch  file.  All  output  will be directed to batch->output, and
    not stdout, since output can be redirected (it is handeled internally).


  - diego (dgi_il@hotmail.com)
23-01-01 12:42:51

