{{{  Preface
Amiga 1.6.40 alpha

This is a readme file for the Amiga-Origami-Version only.  To learn
more about the origami features please read the origami-manual !

Please read the bug.fixes file each time you get a new version !

   Thomas Hadig
}}}
{{{  Disclaimer
The author cannot be held liable for the  suitability or  accuracy  of
this manual  and/or  the  program(s)  it  describes.   Any  damage
directly  or indirectly caused by the use or misuse of  this manual
and/or the  program it describes is the sole responsibility of the user
her/him self.
}}}

{{{  Installing Origami
To run origami you need some files :
 * origami    : the executable
 * .origamirc : the binding file
and optional :
 * .origamihelp : this file contains a text, that will be displayed when
                  calling the origami-help function (not distributed)
 * .origamimenu : the menu name definitions

You also need some environment variables :
 * HOME    : this environment variable contains the name of the directory,
             where origami can find the .origami* files
and optional :
 * SHELL   : this environment variable contains the command, that will be
             executed when calling the create-shell function
 * ORITERM : this environment variable contains the definition of the window
             origami will work in. (NTSC Amigas will have to use this
             variable, to specify the window-size)

If you don't find the `.origamirc` file, you have to use the keybind command
to generate these files.Therefore some example binding-files are
distributed in the `bindings`-directory !
}}}
{{{  Additional Amiga Features
There are some additional features in the amiga version of the origami
editor :

 {{{  Mouse
 * Mouse-Handling : The mouse can be used in this version by defining
   it in the binding file using the command 'mouse-buttons'.
   (See the doc-files in the doc directory and the amiga.keys example
   file !)
 }}}
 {{{  Menu
 * Menus can be used in this version too.

   The menu titles have to be defined in the file .origamimenu
   using the following syntax :
   {{{  .origamimenu
   MenuTitle 0
   ItemTitle 0
   ItemTitle 1
   ...
   ItemTitle n0
   #
   MenuTitle 1
   ItemTitle 0
   ...
   ItemTitle n1
   #
   ...
   #
   MenuTitle n
   ItemTitle 0
   ...
   ItemTitle nn
   #
   #
   }}}
   You`ve got to bind the menus in the binding file using 'keybind'
   and the syntax : $csi "G Menu-Number Item-Number

   {{{  example
   To add a menu-strip to origami, showing the following menus and items:

     File   Fold
     Load   Open Fold
     Save   Close Fold
     Exit   Create Fold

   you`ve got to make a file named '.origamimenu' containing the lines

     File
     Load
     Save
     Exit
     #
     Fold
     Open Fold
     Close Fold
     Create Fold
     #
     #

   and add the following keysequences to your amiga.keys file.

     ; load is the 0.item in the 0.menu
     (keybind read-file ($menu "0 "0))
     ; save is the 1.item in the 0.menu
     (keybind save-file ($menu "0 "1))
     ; exit is the 2.item in the 0.menu
     (keybind exit-origami ($menu "0 "2))
     ; Open Fold is the 0.item in the 1.menu
     (keybind open-fold ($menu "1 "0))
     ; Close Fold is the 1.item in the 1.menu
     (keybind close-fold ($menu "1 "1))
     ; Create Fold is the 2.item in the 1.menu
     (keybind create-fold ($menu "1 "2))

   After making a new '.origamirc' file and restarting origami this
   menustrip will work !
   }}}
 }}}
 {{{  FileRequester
 * If the 'asl.library' is present, origami will use the system file
   requester.
 * If the 'arp.library' is present, origami will use the arp file requester.

 To use the 'read-file' function within macros I had to use a complex way to
 adress the requesters :
   - If you use 'read-file' the file-prompt will be displayed under the
     status-line.
   - Press : to start from the directory you started origami from
     or    / to start from the directory the current file is in
   - Press RETURN
   - One of the file-requesters will come up
 To make an easy use of the requesters bind the function
   {{{  function
   (deffun amiga-read-file
    (
     read-file
     ":
     O_RETURN
    ))
   }}}
 to the key  the 'read-file' function is bound to now.
 }}}
 {{{  Workbench
 * Origami can be called from Workbench; the command line options can be
   specified as TOOL_TYPES, but there may be only one option per line;
   you can also multiselect additonal files, which will be edited.
 }}}
 {{{  Iconify
 * Iconify : if you press the left mouse button beyond the title line,
             origami will change his window position to the upper/left
             edge of the screen and resize to the smallest possible size.
             The window title will show the filename.
             To open the window again, click the right mouse button, when
             origami is activ.
 }}}
 {{{  Wildcards
 * Origami will now recognise wildcards in the command line filenames
   and edit all matching files ('next-file' command).
 }}}
 {{{  Arexx port (experimental)
 * This version has an additional command-line option : -XR
   It `is`/`will be` used to start the Origami Arexx port !
   !!! This arexx port is highly experimental and may be buggy !!!
   Read the README.arexx file for more information !
 }}}
 {{{  Protection Bits
 * Origami presevers the protection bits for read (r), write (w), delete (d),
   executable (e), script (s) and pure (p).
   Origami always deletes the archive bit.
 }}}
 {{{  Window
 * To open a window on a specific screen or with a specific size, you can
   use the ORITERM environment variable.
   You can use the following keywords :
   PAL
   NTSC : origami will use a pal (256 lines) or ntsc (200 lines) window
   SCREEN : origami will use his own screen
   LACE : origami will open an interlaced screen (if SCREEN is given) or
          open interlace-sized window
   WINDOW:x/y/w/h : origami will use a window with the width w, the height h,
          the offset (x,y)

   You have to divide the keywords with a ',' character.
 }}}
}}}
{{{  Making your own keybind
{{{  general remarks
To make changes in the binding files, you need to know the syntax of the
OCL-commands and the keysequences the origami-terminal will send, when a
key is pressed.

The OCL-commands are explained in the origami-manual; please look there !

To get the keysequences, you can use the program GetKeyCode, distributed
in the amiga directory.  Start this program from cli, activate the
window and press the key, which keysequence you want to know.  The
keysequences will be shown in the origin CLI-window.
}}}

Here are some (additional) remarks :
{{{  key classes
The keys, the origami-terminal will send, can be devided in five classes
 {{{  mouse-clicks
 * Mouse-clicks : Use the ocl function mouse-buttons !
   There are 30 (!) mouse-buttons defined :
   {{{  Left Mouse Button
     0 : Left mouse button released, no special key pressed
     1 : Left mouse button released, shift pressed
     2 : Left mouse button released, control pressed
     3 : Left mouse button released, alt pressed
     4 : Left mouse button released, left amiga pressed
     5 : Left mouse button released, right amiga pressed
     6 : Left mouse button pressed, no special key pressed
     7 : Left mouse button pressed, shift pressed
     8 : Left mouse button pressed, control pressed
     9 : Left mouse button pressed, alt pressed
    10 : Left mouse button pressed, left amiga pressed
    11 : Left mouse button pressed, right amiga pressed
   }}}
   {{{  Right Mouse Button
    12 : Right mouse button released, no special key pressed
    13 : Right mouse button released, shift pressed
    14 : Right mouse button released, control pressed
    15 : Right mouse button released, alt pressed
    16 : Right mouse button released, left amiga pressed
    17 : Right mouse button released, right amiga pressed
   You can`t bind a function to the right button pressed, because
   there would be difficulties with using menus
   }}}
   {{{  Middle Mouse Button
    18 : Middle mouse button released, no special key pressed
    19 : Middle mouse button released, shift pressed
    20 : Middle mouse button released, control pressed
    21 : Middle mouse button released, alt pressed
    22 : Middle mouse button released, left amiga pressed
    23 : Middle mouse button released, right amiga pressed
    24 : Middle mouse button pressed, no special key pressed
    25 : Middle mouse button pressed, shift pressed
    26 : Middle mouse button pressed, control pressed
    27 : Middle mouse button pressed, alt pressed
    28 : Middle mouse button pressed, left amiga pressed
    29 : Middle mouse button pressed, right amiga pressed
   }}}
   To bind a function to one of the buttons use the keybind function
   'mouse-buttons' !

   {{{  Example
   To bind the function open-fold to the left-mouse button released
   with control pressed, you have to add the keysequence

   ; left button release with control pressed is button 2
   (mouse-buttons  no-operation no-operation open-fold)

   Please remember that you can use the 'mouse-buttons' function
   only once in a file !
   (See the doc-files in the doc directory for detailed information)
   }}}
 }}}
 {{{  menu-select
 * Menu-seletions :
   The keysequence will have the following format :
     155 71 48+x 48+y ($csi "G "0 "0)
   where x is the number of the Menu title (0,1,2,...) and
         y is the number of the Menu item  (0,1,2,...).
   (See the Additional Amiga Features chapter for more information)
 }}}
 {{{  Vanilla-Keys
 * Vanilla-Keys :
   All keys that are defined in the system keymap will send their
   keysequences
 }}}
 {{{  Raw-Keys
 * Raw-Keys :
   All other keys will send a keysequence, that will have the following
   format :
     155 69 select code ($csi "E ? ?)
   where select is a code used to determine the alt/amiga/ctrl and shift
                keys; it will be :
                  65
                  +1 if shift is pressed
                  +2 if control is pressed
                  +4 if alt is pressed
                  +8 if left amiga is pressed
                 +16 if right amiga is pressed and
         code   is the number of the key.
 }}}
 {{{  Number-pad
 * Number-pad-Keys :
   The number-pad keys are handled differently :
   They will have the format :
     155 70 select code ($csi "F ? ?)
   where select and code are the same as described in the Raw-Keys-section
 }}}
}}}
{{{  aliases
There are some aliases known to keybind :
They are defined in the file ami.termalias and have to be included to be
known. Look in the amiga.keys example.

{{{F origami:amiga/ami.termalias
:::F origami:amiga/ami.termalias
}}}
}}}
}}}
{{{  Bugs
There are two known bugs :
 * To get the maximum window size, I used the system-function GetScreenData()
   If you use workbench 2.0 this will only be the maximum screen size of your
   monitor, not the overscan size !
 * I have heard, that there are problems, using Workbench 1.3 with standard
   cli-tool when starting origami in the directory origami is in ! I will
   try to find the bug and fix it.
}}}
{{{  Compiling Origami
To compile the sources you need to have the SAS C-Compiler or the DICE
C-Compiler.
Each version will be tested with the SAS C-Compiler (V5.10b at this time).
All beta-versions will be tested with the registered version of the Dice
C-Conpiler (Version 1.6.40).
I will not test origami on other compilers, but diffs or bug reports are
welcome.

Please notify :
You will need the arp_lib.fd files to generate the arp.lib file (fdtolib)
used during linking for the Arp-File-Requester !

Notify also :
You will have to change the arpbase.h file. Both, Commodores asl.h and
arpbase.h, use the structure FileRequester but they define it different.
So you have to rename the FileRequester-Structure in the arpbase.h into
ArpFileRequester !

If you want to compile the origami executables use the makefiles in the amiga
directory like this:

Notify : The ^-character has to be replaced by 'l' for the SAS and by 'd'
for the Dice C-Compiler.

 * assign your directory containing the origami sources to the name
   origami:
   ( example : assign origami: Lattice:Progs/Origami1_6/src )
 * Change directory to the directory 'origami:amiga'
   ( example : cd origami:amiga )
 * Start the batch-file 'scripts/start_me_amiga`
   ( example : scripts/start_me_amiga )
   This file will do some copying for you :
   {{{  start_me_amiga
   * Build an empty file with the name 'unistd.h'
     ( example : echo >unistd.h "" )
   * Copy the C-include file 'include:sys/dir.h' into the directory
     'origami:' renaming it to 'dirent.h'
     ( example : copy include:sys/dir.h origami:dirent.h )
   * Set the script mode for all '#?_^mf' files in the
     'origami:amiga/^mf-files' directory
     ( example : protect origami:amiga/^mf-files/#?_^mf +s )
   * Repeat the following steps for the directories
     - origami
     - keybind
     - viewrc
     - dirfold
     - pager
     * Change directory to one of the mentioned directories
       (example : cd origami:origami )
     * Make a directory named '..'
       ( example : makedir ..)
     * Copy the contents of the directory 'origami:h' to the directory '../h'
       ( example : copy origami:h/#? ../h )
     * Copy the batchfiles origami_^mf, keybind_^mf, folder_^mf, pager_^mf
       and viewrc_^mf from the directory 'origami:amiga/^mf-files' to the
       directory and rename them to 'mf'
       ( example : copy origami:amiga/^mf-files/origami_^mf
                        origami:origami:mf )
   }}}
 * Start the compilation in each directory using the 'mf' batch-file
   ( example : cd origami:origami
               mf - )
 * Change directory to the directory 'origami:amiga'
   ( example : cd origami:amiga )
 * Compile the amiga special files
   ( example : mf - )
 * Install the binaries in your path using
   scripts/install_origami <your_install_diretory>
   {{{  install_origami
   ( example : copy origami:amiga/GetKeyCode c:
               copy origami:amiga/MakeDiffs c:
               copy origami:amiga/refer c:
               copy origami:amiga/mkref c:
               copy origami:origami/origami c:
               copy origami:keybind/keybind c:
               copy origami:viewrc/viewrc c:
               copy origami:dirfold/dirfold c:
               copy origami:pager/oripager c:    )
   }}}
 * Set the environment variables and test the executables ( see Installing
   Origami )
 * Clean up the directories using the batch file 'clean_up'
   ( example : cd origami:amiga
               srcipts/clean_up )
}}}
{{{  Features in next releases
There are some features, that will be implemeted in the next releases
 * I am planing to add an arexx port to origami
 * Future releases of the origami will be ported
 * Bugs will be fixed
}}}
{{{  Copyrights
The copyrights of the amiga version of the origami editor are
identical to those mentioned in the origami manuals.

The amiga source code files are copyrighted by Thomas Hadig.

This Program is  FREEWARE  so no financial donations are required ( but
welcome).  This program may be freely distributed as long as all source
code, documentation and executable(s) remain unchanged and are included
with the distribution.  Also no profit is to be made by selling  this
program.  You may not charge more than Fred Fish does for a single
library disk.  This program may be distributed on disk magazines, cover
disks etc.  When you do decide to distribute this program on a disk
magazine or cover disk please send me a copy of the distribution.  When
you use this program on a regular base I would appreciate a postcard of
your home town.
}}}
{{{  Acknowlegdements
I want to thank some people for their help :
 * Adam Levine for his getopt package
 * Michael Sinz for his simple_rexx package
 * Andreas Schneider for testing the versions
 * Patrick Kandel for developping the icons and rewriting the manuals
   in plain english.
 * Wolfgang Stumvoll und Michael Haardt for developing the Unix and
   Minix version of origami and their help finding problems.
}}}
{{{  Mail addresses
Please use the mail address of Michael Haardt (mentioned in the origami
manuals ) for reports (bugs, comments, ...) about the general origami
features.

Reports on the amiga version can be mailed to Thomas Hadig :
E-mail    : hadig@ouzo.rog.rwth-aachen.de
            hadig@pool.informatik.rwth-aachen.de
Papermail : Thomas Hadig
            Eduard-Bauschstr. 4
            D-4053 Juechen 3
or
            Thomas Hadig
            Otto-Petersen-Haus Zi. 1009
            Ruetscherstr. 155
            D-5100 Aachen
}}}
