GED_AsciiReg V1.4 documentation
*******************************

Author: Thies Wellpott
Date: 29.10.1998


Why this program?
================

The GoldED GUI configuration is quite nice but especially the editing of
commands lacks powerful copying and pasting capabilities. GED_AsciiReg
converts the registry files to ASCII files which can be edited with any
text editor (GoldED perhaps?) and then converts the ASCII file back.


General use
===========

GED_AsciiReg requires at least AmigaOS 2.04 and is only useful if you own
GoldED V4+. Shell use only.

GED_AsciiReg reads the registry files of GoldED (GOLDED:registry/ or
GOLDED:etc/registry) and saves them as plain ASCII files. You may edit them
with your favourite text editor. Afterwards GED_AsciiReg converts the ASCII
files back to registry files.
Main use is for mouse, gadgets, keyboard and menu registry files, otherwise
the GoldED GUI is IMHO the better choice.

Usage: GED_AsciiReg [LONG] File/M

GED_AsciiReg automatically recognizes the file (registry or ASCII file) via
the first 4 bytes ("OOP\0" or "AREG") and converts it corresponding.
Written ASCII files always get the suffix ".gtxt" appended, written
registry files get the ".gtxt" suffix removed (if present) or the suffix
".greg" appended.

If argument LONG is present (must be first argument!), OBJECT_EVENT_EVENT
lists (command definitions) will be written as standard lists not with special
keyword X(KEY)EVENT.

If you want to convert registry files of GoldED V5+ you should use to
program GED_AsciiReg_V5. Usage is exactly the same.


Some more words
===============

GED_AsciiReg depends heavily on the structure of the registry files. If
Dietmar changes or extends it this program might fail and/or break your
configuration. The ASCII file includes at the top the GoldED version for
which GED_AsciiReg is written.
I have implemented quite a lot of checking so only known structures will be
converted but this is not 100 % safe. I suggest following use: Make a
backup of your registry files. Convert them to ASCII and afterwards
immediatly back. Now (binary) compare your backups against the reconverted
registry files. There should be NO difference. If so, send me your
(original) registry file and the converted ASCII file, please.

Special note to the GoldED 5 version: I do not have GoldED 5, I just got
the required information (the registry.h file) from someone. I tested it
with some registry files I have but this is no guarantee.


ASCII file format
=================

First four bytes must be "AREG". Empty lines and lines which first nonblank
character is ";" (semicolon) will be ignored.

Every line (exceptions see below) is parsed with the template
OBJECT/A,NAME/K,NUMBER/K/N,STRING/K,DATA/K,LIST/K/N.
OBJECT is the name of the GoldED object with or without the "OBJECT_"
prefix. For a list see file GOLDED:developer/registry/include/registry.h.
Unknown object ids (e. g. of GoldED 6.x.y) have as name "UNKNOWN_#" where
"#" is the id number in decimal.
NAME specifies the optional object name. The last four arguments give the
data type and the data itself; only one of them must be specified. LIST
specifies the number of child objects.

Two special keywords exist for simple command definitions
(OBJECT_EVENT_EVENT list with specific 10 (or 7 for GoldED 5) child objects
and no OBJECT_EVENT_MORE list): XEVENT and XKEYEVENT.

Template for XEVENT: NAME/K,COMMANDS/M,KEYCODE/N/K,ASYNC/S,SHANGHAITIME/N/K,
        OUTPUT/K,HYPERNODE/K,DIRECTORY/K,VARIABLE/K,SHORTCUT/K

or for GoldED 5: NAME/K,COMMANDS/M,KEYCODE/N/K,SHANGHAITIME/N/K,
        OUTPUT/K,HYPERNODE/K,VARIABLE/K,SHORTCUT/K

Template for XKEYEVENT which is only used within the OBJECT_KEY_KEYS (or
ONJECT_KEY_KEYLIST) list in the keyboard registry file:
        KEYCODE/A/K,COMMANDS/M,ASYNC/S,SHANGHAITIME/N/K,OUTPUT/K,DIRECTORY/K
or for GoldED 5:
        KEYCODE/A/K,COMMANDS/M,SHANGHAITIME/N/K,OUTPUT/K

Unspecified arguments default to 0 (zero), FALSE or "" (empty string).
Strings for COMMANDS have following format: "T:command" where T gives the
command typ (N for not definied, I for internal, D for AmigaDOS, A for
ARexx, T for text, S for sequence and C for compiled sequence (last one for
GoldED 5 only)) and command is the command string.

For XKEYEVENT the KEYCODE argument is parsed with following template:
NUM/S,CTRL/S,ALT/S,SHIFT/S,RAW/S,CODE/A.
CODE can be a three digit decimal number (e. g. "029" or "009"), a single
character (only for non-raw keys) which ASCII is taken or a key description
(currently BACK, TAB, CR, ESC, SPC, DEL for non-raw keys and BACKTAB, UP,
DOWN, RIGHT, LEFT, F01 - F10, HELP for raw keys). The RAW flag must be set
even on key descriptions for raw keys (e. g. "SHIFT F01" is wrong, it must
be "SHIFT RAW F01").

Best example is a freshly converted registry file and GoldED`s GUI
configuration next to each other.

Remember: Every line is parsed with ReadArgs() so double quotes " and *
must be escaped with one *. Example: the string ab*cde"*" must be given as
ab**cde*"***". Special characters (currently ?, = and ;) must always be
enclosed in double quotes.
Even more complex is the parsing of the KEYCODE argument of XKEYEVENT: the
string is parsed twice. If you want to specify double quotes ("), you have
to use KEYCODE="*"***"*"" because after first parsing (for XKEYEVENT
template) "*"" is left which is parsed to your wich ". For the equal sign
you have to use KEYCODE="*"=*"" (after first parsing "=" is left).


Copyright and warrenty
======================

GED_AsciiReg is FreeWare, Copyright (c) 1997-98 Thies Wellpott.

Non-commercial use is free. Distribution on AmiNet, BBS, floppy disk which
cost less than $5 and freeware CDs which cost less than $25 is okay.
Otherwise or for commercial use please contact me first.

USAGE IS COMPLETELY ON YOUR OWN RISK, NO WARRENTY AT ALL.


History
=======

V1.0   20.3.1997
- first release

V1.1   16.4.1997
- recognizes GoldED 4.6.0 objects
- handles unknown object ids nicely

V1.2   22.4.1997
- special handling of ", ?, = and ; implemeted (thanks to Wolfgang Morgeneier
  for reporting this bug)

V1.3   16.5.1997
- update for GoldED 4.7.0
- OBJECT_EVENT_MORE list supported (e. g. needed for mouse registry - thanks
  to Kai Hofmann for reporting this)

V1.4   29.10.1998
- update for GoldED 4.7.3
- extra program version for GoldED 5.0.3 registry (thanks to Christoph A. Löwe
  for sending me the required information)
- comment for XEVENT is not written so often anymore



Author
======

Thies Wellpott

EMail: Thies.Wellpott@Informatik.Uni-Oldenburg.DE

Homepage: http://www.Informatik.Uni-Oldenburg.DE/~thies

Snailmail: Moorhauser Weg 14
           26419 Schortens
           Germany


Suggestions, bug reports and gifts are always welcome!

