home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / STVI369G.ZIP / PORTING.DOC < prev    next >
Text File  |  1990-05-01  |  2KB  |  69 lines

  1.  
  2.          Release Notes for STEVIE - Version 3.68
  3.  
  4.            Atari ST Editor for VI Enthusiasts
  5.  
  6.                     Porting
  7.  
  8.  
  9.                   Tony Andrews
  10.  
  11.                   8/6/88
  12.  
  13.  
  14.     Porting the editor is a relatively simple task. Most of the
  15. code is pretty machine-independent. For each environment, there is
  16. a file of routines that perform various low-level operations that
  17. tend to vary a lot from one machine to another. Another file contains
  18. the escape sequences to be used for each machine.
  19.  
  20.     The machine-dependent files currently used are:
  21.  
  22. tos.c:      Atari ST running TOS
  23. unix.c:      UNIX System V or BSD
  24. os2.c:      Microsoft OS/2
  25. dos.c:      MS DOS 3.3
  26. minix.c:  Minix on the Atari ST
  27.  
  28.  
  29.     Each of these files are around 250 lines long and deal with
  30. low-level issues like character I/O to the terminal, terminal
  31. initialization, signal handling (if supported), cursor addressing, and
  32. so on. There are different tradeoffs to be made depending on the
  33. environment. For example, the UNIX and Minix versions buffer terminal
  34. output because of the relatively high overhead of system calls. A quick
  35. look at the files will make it clear what needs to be done in a new
  36. environment.
  37.  
  38.     The file "env.h" contains macro definitions to customize the
  39. editor for your particular environment. The macros there select the
  40. machine/os, enable various optional features, etc.
  41.  
  42.     One of the options in env.h is whether to use the termcap
  43. routines or hard-wired escape sequences. The hard-wired sequences,
  44. if used, are defined in term.h. The file term.c contains code to access
  45. the termcap database, if enabled. Termcap is only supported by some of
  46. the system-dependent files (unix.c and minix.c) but can be added easily
  47. to others, if needed.
  48.  
  49.  
  50.     The basic process for doing a new port is:
  51.  
  52.     1. Come up with a macro name to use when ifdef'ing your system-
  53.        specific changes. Add a line to 'env.h' to define the macro
  54.        name you've chosen.
  55.  
  56.     2. Look at the system-dependent files and copy the one that comes
  57.        closest to working on your system. Then modify your new file
  58.        as needed.
  59.  
  60.     3. Look at term.h and edit the file appropriately adding a new
  61.        set of escape sequence definitions for your system.
  62.  
  63.     4. Compile and debug the editor.
  64.  
  65.  
  66.     In most cases it should really be that simple. Other ports have
  67. been done for which I don't have the code, including the Amiga, and a
  68. Data General machine of some kind (in Australia).
  69.