home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
r
/
rainbo12.zip
/
RB.DOC
< prev
next >
Wrap
Text File
|
1993-01-15
|
26KB
|
708 lines
RAINBOW
(c) Copyright 1991-1992
Cornerstone Systems
David A. Hattel
20906 East Dorado Circle
Aurora, Colorado 80015
(303) 680-1768
Compuserve ID 70570,572
RAINBOW IS SHAREWARE
If you find Rainbow enhances your editing environment, then support the
shareware concept and send $29.95 or whatever you feel is a fair price to
Cornerstone Systems. Use the order form found in this document. Only
Registered users will receive update notices and technical support.
Your comments and suggestions are greatly appreciated.
Rainbow is a utility that will colorize your editor. At first it will
seem inconsequential, but try it for 15 minutes and then try not to use it.
It is meant to highlight reserved words and make your comments stand out in
different colors. You can even have flashing text for those comments that
must not be missed.
System Requirements:
An IBM AT or compatible 286 machine or better.
MS-DOS or PC-DOS 3.0 or greater.
An EGA or better color monitor and graphics card.
Rainbow works in TEXT mode ONLY (Modes 0, 1, 2, 3, 7, ?)
and for display page 0. (It reads and writes directly to the text screen's
video memory for display page 0)
The normal use of rainbow is to put RB.EXE and RB.INI in the same
directory as your editor. Then rename your editor .EXE file to a new name
such as EDITOR.EXE. Then rename RB.EXE to the name that your editor used
to be. Then rename RB.INI to the same name which you renamed RB.EXE, but
with the extension of .INI. Change the editor name on the editor= line of
the .INI file to match the new name of your editor .EXE file. At this
point, at the DOS prompt, type what you always have to edit files!
Rainbow comes with the following files:
RB.EXE The main colorizing executable.
RB.INI A companion configuration file to RB.EXE which defines
everything that Rainbow needs to know.
COLORS.COM A utility file to help you determine what number is
associated with which color.
DOS.ERR A list of DOS error codes returned by Rainbow.
RB.DOC This file which explains how to use Rainbow.
README.1ST Important information relating to this version of Rainbow.
It explains any changes you may need to make for this version
of Rainbow to work properly if you are upgrading from a
previous version of Rainbow.
QUICKSTA.RT For those of you who are anxious to get started with Rainbow,
this one is for you.
RB.EXE is the program which is executed. When executed, it calls your
editor based on the "editor=" command which appears in the RB.INI file.
Rainbow can be deactivated and activated when you are in your editor by
pressing Alt-` the accent "`" is on the same key as the tilde "~". The
tilde key is usually located in the upper left hand corner of the keyboard.
COLOR.COM is a utility which aids in identifying what number is
associated with what color. This is a stand alone utility which will print
a color chart on the screen.
RB.INI is the configuration file which tells RB.EXE everything about
your editing environment. The name of this file must remain the same as
the name of the Rainbow EXE. For example, if RB.EXE is renamed to E.EXE
than the Rainbow INI file must also be renamed to E.INI. When Rainbow is
executed it first looks for the ".INI" file in the current working
directory, if it does not find it, Rainbow then looks for it in the
directory in which the ".EXE" file is located. This gives you the ability
to have different configuration files for different development
environments. This ".INI" file is where you define what entities Rainbow
should look at and the attributes of each entity. An entity is made up of
three parts: a token word, a token color attribute, and a token type
identifier. Each element of the entity is separated with a delimiter
character. The Default delimiter character is the pipe symbol "|", but
this can be changed to what ever character you wish to use.
Example of an Entity:
if|15|T
A token word is a single word like "if" or "while". When defining a
token word, the casing of the word is important. To Rainbow the words
"if", "IF", and "If" are not the same, they are treated as three separate
token words. A token word can be up to 75 characters in length. Token
words CANNOT contain any spaces, each word needs to be defined seperatly.
A token color attribute is the color Rainbow will colorize a token word
to, when it finds it. A token color attribute is a numeric value ranging
from 0 to 255. This number corresponds to the color you want the token
word colorized to. In the example above, the token word of "if" would be
colorized to the color which corresponds to the number 15 which is bright
white on black. These numeric values can be determined by using the
COLORS.COM utility provided with Rainbow.
A token type identifier tells Rainbow how to treat a token word when it
is found. A token type identifier can be of types "T", "C", "F", or "S".
A token type of "T" or "t" (case does not matter here) tells
Rainbow to colorize only the token word itself.
A token type of "C" or "c" (again case does not matter) tells
Rainbow that the token word is the start of a comment and that the entire
line starting with the token word should be colorized.
A token type of "F" or "f" (and again case does not matter) tells
Rainbow that the token word is to be colorized only if it is the first word
of a line.
A token type of "S" or "s" (case still does not matter) tells
Rainbow that the token word is to be colorized only if it immediately
follows another token word.
The structure of defining an entity
Token word to be colorized (case specific)
│
│ Delimiter symbol
│ │
│ │Color token word will be colorized to (numeric)
│ ││
│ ││ Another delimiter symbol
│ ││ │
│ ││ │Token word type (T, C, F, or S case insensitive)
│ ││ ││ │
xxxxxxxx|nnn|x │
│
┌───────────────┘
│
T colorizes the token word only
C colorizes the token word and the rest of the line
F colorizes token word only if first word on line
S colorizes if immediately after another token word
EXAMPLE 1:
The actual token word ("function")
│
│ The color the token word will be
│ │ colorized in (5 = Magenta on Black)
│ │
│ │ Token (will colorize "function" only)
│ │ │
function|5|T
EXAMPLE 2:
The actual token word ("function")
│
│ The color the token word will be
│ │ colorized in (2 = Green on Black)
│ │
│ │ Comment (will colorize "function" and the
│ │ │ rest of the line.)
function|2|C
EXAMPLE 3:
The actual token word ("function")
│
│ The color the token word will be
│ │ colorized in (2 = Green on Black)
│ │
│ │ First Occurrence (will colorize "function" only if it
│ │ │ is the first word on the line.)
function|2|F
EXAMPLE 4:
The actual token word ("case")
│
│ The color the token word will be
│ │ colorized in (2 = Green on Black)
│ │
│ │ Secondary Occurrence (will colorize "case" only if
│ │ │ it immediately follows another
│ │ │ token word .ie 'do case')
case|2|S
∙ Remember when defining token words, case is sensitive i.e.
for a token word definition of: function|7|T
"function" will be colorized to White on Black (7)
"FUNCTION" will not be colorized it will appear as normal
"Function" will not be colorized it will appear as normal
THE BUILDING OF A CONFIGURATION FILE.
∙ Do not put spaces between configuration file commands and the
equal sign.
editor=c:\editor\editor.exe is RIGHT
editor = c:\editor\editor.exe is WRONG
∙ Configuration file reserved word commands are not case sensitive.
∙ Configuration file reserved word commands must be flush left.
∙ Blank lines are ignored
All commands are MANDATORY for the correct operation of RB unless otherwise
specified.
Commands Description
──────── ───────────────────────────────────────────────────────────────────
bottom= This defines the last row that Rainbow will scan for tokens.
This number can range between 0 and 50 depending on your video
capabilities. On a CGA screen this number would be 24, on a
screen which supports more lines it would be equivalent to the
number of rows for the mode you are in.
EXAMPLE: bottom=24
clockr= This tells Rainbow which row to put a continuously running
clock on. This number can range between 0 and 50 depending on
your video capabilities. If you do not want a clock use -1.
EXAMPLE: clockr=24
clockc= This tells Rainbow which column to put a continuously running
clock on. This number should be at least 8 less than the total
width of you screen.
THIS COMMAND IS OPTIONAL only if clockr=-1.
EXAMPLE: clockc=72
delimiter= This tells Rainbow what character is used as the delimiter when
tokens are being defined. If this line is not in the
configuration file, than by default Rainbow will use the pipe
symbol "|" as the default delimiter character. THIS COMMAND IS
OPTIONAL only if you use the '|' as your delimiter.
EXAMPLE: delimiter=,
editor= This tells Rainbow where your editor is located and what
command executes your editor. The editor name must include the
file extension and the full path of your editor.
EXAMPLE: editor=c:\editor\editor.exe
left= This defines the first column for Rainbow to start scanning for
tokens. 0 is the left most column of the screen. If your
editor has a border in column 0, this would then be set to 1
(left=1).
EXAMPLE: left=0
rem= This is used for putting comment lines into your configuration
file.
THIS COMMAND IS OPTIONAL.
EXAMPLE: rem=this is a comment line which Rainbow ignores.
EXAMPLE: rem=editor=c:\ng\ng.exe
right= This defines the last column that Rainbow will scan for tokens.
This number can range between 0 and 79. 79 is the right most
column of the screen. If your editor has a border in column
79, this would then be set to 78 (right=78).
EXAMPLE: right=79
switch= This is for command line switches specific to your editor that
you may pass to your editor. You can have up to nine of these.
THIS COMMAND IS OPTIONAL.
EXAMPLE: switch=-lc:\editor\macros.cm
switch=-ec:\editor\startup.cm
text= This is the color attribute that your editor normally uses. For
instance if your screen text is white on black you would use
the number 7. Use the COLOR.COM utility to help you determine
the right color attribute.
***************** EXTREMELY IMPORTANT *******************
* *
* If you do not get this set to the correct color *
* attribute, Rainbow will appear to not be working at *
* all. Therefore, if your screen does not become *
* colorized when running Rainbow, double check to *
* make sure this value is correct. *
* *
*********************************************************
EXAMPLE: rem=My editor screen is white on black
text=7
top= This defines the screen row where Rainbow starts scanning for
tokens. This number can range between 0 and 50 depending on
your video capabilities. 0 is the top row of the screen.
EXAMPLE: top=0
version= This tells Rainbow to display the version number at startup.
If you do not want the version number, remove this line from
the .ini file or remark it out using the rem= command.
EXAMPLE: version=
width= This tells Rainbow how many screen columns your editor uses.
This should normally be set to 80 but some video cards and
editors allow other than 80 columns to be used, such as 40, 100
or 132.
EXAMPLE: width=80
SPECIAL NOTES
SPECIAL NOTE:
If you rename RB.EXE to another name, you must also rename
the RB.INI file to the same name but with the ".INI" extension.
For Example, if you rename RB.EXE to E.EXE you must also rename
RB.INI to E.INI.
BRIEF USERS:
Brief can use multiple video pages, Rainbow assume that
video page one is being used. For Brief version 3.0, in Briefs
setup, from the Main Menu, select the Display option. Then
from the Display Menu select the Video Page Test Option. Under
the Video Page Test option, Brief asks if you are using any
resident programs from the list of incompatibilities. Select
Yes for this option. This tells Brief to only use one video
page, doing this will enable Rainbow to work with Brief.
386Max and QEMM Users:
Do not relocate your video ROM into RAM, doing this has been known
to intermittently hang machines.
COMMON PROBLEMS
■ PROBLEM 1: Rainbow will not colorize anything.
POSSIBLE FIXES:
1) It is very critical that the text= statement in the
".INI" file has the correct value, refer to the text=
command for further explanation. If it is wrong
Rainbow will appear to not be working.
2) Make sure the left= statement in the ".INI" file takes
into account any borders your editor may have. If you
have a border in the first column of your screen the
left= statement should be set to 1 (left=1) as opposed
to 0.
■ PROBLEM 2: Rainbow exits back to DOS without doing anything.
POSSIBLE FIXES:
Rainbow sets DOS's errorlevel with any errors it
encounters. If it returns 100 then it cannot find it's
.INI file, make sure the .INI file has the same first name
as the RAINBOW executable, also make sure that the .INI
file is in the current directory or in the same directory
as the Rainbow executable. If it returns 101 then it is
out of memory. If the .INI file has many tokens (several
hundred?) try removing several until this error goes away
(also you can call us and we may be able to increase the
available memory for you). Any other error is a normal DOS
error, see the attached file (DOS.ERR) for these error
codes.
■ PROBLEM 3: Some lines will not colorize.
POSSIBLE FIXES:
The width= command in the .INI file may not be set correctly.
The width should be set to the number of columns that are
available when you are in your editor. An important note is
that the left= and right= commands in the .INI file are not
linked to the width= command in any way. For instance in your
editor comes up in 132 column mode the width= command should be
set to width=132 even though the left= command could be set to
left=1 and the right= command could be set to right=128.
■ PROBLEM 4: Tokens will not colorize if there is a space after them.
examples:
if (...) if will not colorize
if(...) if will colorize
POSSIBLE FIXES:
When defining a token you cannot have any spaces in the token
definition.
example of bad definition:
do while,3,t
This is an invalid token definition, it must be broken
up into two seperate definitions
example of good definitions:
while,3,t
do,3,t
■ PROBLEM 5: Rainbow intermittently hangs.
POSSIBLE FIXES:
Do not relocate your video ROM into RAM with memory managers
such as 386Max or QEMM. Doing this has been known to
intermittently hang machines.
SAMPLE RAINBOW SETUP PROCEDURE
This is a sample using Semware's QEdit.
C:\EDITOR> rename Q.EXE EDITOR.EXE
C:\EDITOR> rename RB.EXE Q.EXE
C:\EDITOR> rename RB.INI Q.INI
Now type Q as you always have to edit your files.
Remember to change the editor= line in the Q.INI file to be
editor=c:\editor\editor.exe for this example
SAMPLE .INI FILE
The following is an example of an Rainbow configuration File (The ".INI" file).
editor=c:\editor\editor.exe
rem=Macros to load for Qedit
switch=-lc:\editor\macros.cm
rem=Macros to execute at startup for Qedit
switch=-ec:\editor\startup.cm
delimiter=,
top=0
left=0
bottom=23
right=79
width=80
clockr=24
clockc=72
text=3
//note,240,C
//,2,C
_,3,T
{,5,T
},5,T
return,5,F
function,5,C
do,6,F
endcase,6,F
sequence,6,S
#define,9,F
#include,9,F
:=,10,T
==,14,T
=,14,T
loop,12,F
parameters,15,F
rem=End of initialization file !
VERSION HISTORY
EXE dated 12/09/92
1. Added a version number to the .EXE starting with
version 1.2. The version is displayed only when the
command "version=" is in the .ini file.
2. Fixed a bug that caused Rainbow to colorize tokens that
were contained within another word. For example, in
the word "Block" the letters "loc" which were defined
as a token would be colorized.
EXE dated 07/20/92
1. Added a new command width= which tells
Rainbow how many columns your editor is
using when you edit. This allows support
for any number of columns in your editor,
ie. 40, 80, 100, 132, etc..
2. Added a new command clockc= to put the clock
on the specified column
3. Changed clock= to clockr= to specify the clock
row.
4. Removed the command ng= which loaded the Norton
Guides in pass throught mode. To accomplish this
now set editor= to your norton guides and set the
first switch= to your editor path and name.
EXAMPLE:
editor=c:\ng\ng.exe
switch=c:\q\q.exe
EXE dated 07/12/92
Initial release.
RAINBOW REGISTRATION FORM
Please add me as a supporter of Rainbow and let me know of updates.
Thanks for your support!
Name _____________________________________________________________
Company _____________________________________________________________
Address _____________________________________________________________
City ______________________________ State _________ Zip __________
Amount $_________________ Date _______________ Copies ______________
Your Compuserve ID ___________________________________ (not required)
(Staple Check to Bottom of Page)
--------------------------------- Fold Here ----------------------------------
-------
│ place │
│ stamp │
│ here │
-------
Cornerstone Systems
20906 East Dorado Circle
Aurora, Colorado 80015
--------------------------------- Fold Here ----------------------------------
COPYRIGHT/LICENSE/WARRANTY
This document and the program file RB.EXE ("the software") are
copyrighted by the author. The copyright owner hereby licenses you to use
the software given these restrictions:
∙ the program shall be supplied in its original, unmodified
form, which includes this documentation;
∙ for-profit use without a license is prohibited;
∙ the program may not be included - or bundled - with other
goods or services. Exceptions may be granted upon request
only;
∙ no fee is charged; an exception is granted to non-profit
user's groups, which are permitted to charge a small fee
(not to exceed $5) for materials, handling, postage, and
general overhead. No other organization is permitted to
charge any amount for distribution of copies of the software
or documentation, or to include copies of the software or
documentation with sales of their own products. Exceptions
may be granted upon request only;
Cornerstone Systems hereby disclaims all warranties relating to this
software, whether expressed or implied, including without limitation any
implied warranties of merchantability or fitness for a particular purpose.
Cornerstone Systems will not be liable for any special, incidental,
consequential, indirect or similar damages due to loss of data or any other
reason, even if Cornerstone Systems or an agent of Cornerstone Systems has
been advised of the possibility of such damages. In no event shall
Cornerstone Systems liability for any damages ever exceed the price paid
for the license to use this software, regardless of the form of the claim.
The person using the software bears all risk as to the quality and
performance of the software.
THANK YOU
I would like to give a Special Thanks for programming assistance and
for the incredible ability to optimize and compress code to Peter Birch
CIS: 70473, 552.
Also I would like to thank the following people for their support,
assistance, and comments:
David Bauer
Lance Johnston
Stephen Usrey
I would also like to thank you (the user) for using this utility. I hope
that it makes your editing life easier and more colorful as it has made
mine.
TRADEMARKS
Qedit is a trademark of Applied Systems Technology, Inc.
Brief is a trademark of Borland International, Inc.
MS-DOS is a trademark of Microsoft Corporation.
IBM PC is a trademark of IBM.
Norton Guides is a trademark of Peter Norton Computing Incorporated.