literat.icn: Program to manage literature information

March 26, 2002; Matthias Heesch
Requires: large-integer arithmetic, ANSI terminal support
This file is in the public domain.
Database system to manage information concerning literature.
____________________________________________________________

           Written by: Dr. Matthias Heesch
       Department of Protestant Theology (FB 02)
            Johannes Gutenberg University
     Saarstrasse 21 / D-W-6500 Mainz 1 / Germany
____________________________________________________________

Written and tested under: DR/MS-DOS, using ansi.sys
____________________________________________________________

See the comment lines concerning the single user defined
functions if you want to use them separately. Note that all screen
access assumes ansi.sys to be installed.

Since arguments to the seek() function may be long integers,
long-integer support is required.

The program uses standard files literat.fil, literat2.fil and
adress.fil to store its data on the disk. It has a predefined
structure of the items and predefined field labels to make it easy
to use and to cut down the source code length.for users having some
knowledge of the Icon language it shouldn't be difficult to
change the program. In this case the item length (now 846 byte)
the option lists in menue() and the field label list have to be
modified. The main changes then will concern user defined
function edit_item() where the number of fields within an item
is decided by *labels. In function in_itemm() the number of dummy
field separators has to be equal to the amount of fields desired.
(items := list(200,"##" if two fields are desired). Within the
other functions only the amount of bytes for a whole item within
reads() and seek() operation has to be changed accordingly. Note
that "literat"'s editor in its present version isn't able to scroll.

See the description (comment lines) of user defined function
line() for details of the editing facilities.

The menue accepts input by <arrow up/dn> and the lower case short
hand key of every option. The selected option has to be activated
by <ret>.

iNPUT: function to update an existing file literat.dat. When moving
the cursor out of the actual item, the last or following item will
be displayed and is available for the editing process. Input treats
literat.dat as a sequential file. Only the items to be added to the
existing file are in the computer's memory. This fastens the option
to switch between the (new) items. Otherwise it would have been
necessary to load the whole literat.dat into the RAM or to load
every new item from the disk. The first would consume too much
memory with the result of potential loss of new items, the second
would cost much time. In one session "literat" can accept no more
than 200 new items.

tURN_OVER_ITEMS: literat.dat can be viewed and edited item by item
moving the cursor out of the actual item causes the next/last item
to be displayed. The edited items are written to file literat2.fil

aDRESS file: type words to be indicated. If they are found, the
item numbers of their occurrence will be recorded in file adress.fil.
Moving the cursor out of the editor causes the indicating
process to start. New items to adress.fil are simply added to the
file. Therefore changes of existing material in adress.fil have to
be made by creating a new adress.fil.

qUERY: searches item using the information in adress.fil. You are
prompted to type a word and if it's found in adress.fil the
programm will use the item numbers to compute arguments to the
seek()-function and then read the item. After viewing and if
desired editing the item it will be written to file literat2.fil.

dEL: prompts for an item number and removes the corresponding item.
the file then is written to literat2.fil, literat.fil remains
as it was.

AlPHA: alphabetical sorting, sorted file written to literat2.fil.

eND: return to the operating system.
____________________________________________________________

Important message to the user: everybody who will find and remove
a bug or add any improvement to the program is kindly encouraged
to send a copy to the above address.
____________________________________________________________

Note:  Clerical edits were made to this file by the Icon Project.
       It's possible they introduced errors.

Source code | Program Library Page | Icon Home Page