
                           Sas2Ced v1.20 & v2.00

                                    By
                                Doug Keller

                   Copyright 1991 Synthetic Technologies
                                May 7, 1991


[0] Introduction

Sas2Ced is a program to interface SAS/C 5.10a and CygnusEd 2.12.  If an
error is encountered while compiling, Ced will be pulled to the front and
the cursor will be put on the first line with an error.  Sas2Ced has been
tested on an A3000 under both 1.3 and the latest 2.x, SAS/C 5.10a, and
CygnusEd 2.11 and 2.12.  Sas2Ced is _Enforcer_ and Mungwall hit free.


[1] Idea behind Sas2Ced

When LC encounters an error and the -E switch is used LC looks for a
message port called 'Lse', if the port is found LC sends arexx messages to
the port telling it some information about the errors.  If the port is not
found Lse is loaded.  Sas2Ced works by opening a port called 'Lse' and
intercepts all the messages LC sends it.  It then sends converted messages
to Ced.  Since Sas2Ced opens a message port called 'Lse', make sure Lse is
not running when Sas2Ced is.


[2] Usage

The best place to run Sas2Ced is in the startup-sequence.  Currently Sas2Ced
does not release itself from the CLI, so you must run it by typing;

    run >nil: <nil: sas2ced

When Sas2Ced is run it checks to see if Ced is running, if Ced is not running
it loads a dormant copy of it (ced -r).  This is the only time it is checked
to see if Ced is in memory, so you must have Ced dormant.  Once Sas2Ced is
running all you have to do is compile a program with LC with the -E option.
If an error is encountered Ced will be called to the front and the curser
will be put on the line and column position.  A requester will then ask if
you want to ReturnToCED by pressing Y or go to the NextError with N.  If you
return to Ced you get the next error by using the nexterror.s2c arexx program.

Instead of adding -E to all your makefiles it is easier to add an
environmental called 'sascopts' that contains -E.  

Sas2Ced has three different command line options.
    next - (default)pops up the nexterror requestor when an error is found
    show - pops up the showerrors requestor when an error is found
    quiet- moves the cursor to the first error when an error is found

Examples:
    1> sas2ced next  ;nexterror requestor
    1> sas2ced       ;same as above
    1> sas2ced show  ;showerrors requestor
    1> sas2ced quiet ;no requestor, 

Sas2Ced can be quit three different ways; by running Sas2Ced again, by
sending an arexx message 'quit' to the port named 'sas2ced', or by sending a
control-c to the Sas2Ced process (pressing ctrl-c or break cli# c).


[3] AREXX interface

Currently Sas2Ced supports three arexx commands, 'quit', 'nexterror', and
'showerrors'.  'quit' quits Sas2Ced.  'nexterror' moves the cursor to
the next error and displays the error message, with an okay2 requester.
'showerrors' displays all the currently cached errors in an okay1 requester.

See the Arexx programs that are included; quit.s2c, nexterror.s2c,
showerrors.s2c.

You do not have to have arexx to use Sas2Ced.  I have included two cli
programs that do 'nexterror' and 'showerrors'.


[4] Limitations

Funny things sometimes happen when compiling from RAM:.  If you load a file
using 'ram:' for the path Sas2Ced might not find the source file and might
try to load another copy.  This is because LC sends the path with 'Ram Disk:'
and Ced keeps the path like you typed it 'ram:', so comparisons between the
filenames will fail.

When an error is found in a include file only the filename is sent to Sas2Ced,
so looks for the include file in the following order:
	1.  filename
	2.  directory when the .c is
	3.  i: (see below)
	4.  opens up a file requestor and asks you to load it

The default for 3. is i:, but you have a total of 10 bytes to zap your own
string in.  Use a binary editor and search for 'i:<null>ZapHere', start at
the 'i' with you path.  Make sure you path does not go past the last 'e'
in ZapHere, and make sure if your string is shorter you put a NULL at the end.

Sas2Ced tries its best to put the cursor on the error.  Since Sas2Ced can
only be as good as the output LC sends it, sometimes Sas2Ced puts the cursor
on the wrong spot.


[5] Differences when under 1.3 and 2.0

This release of Sas2Ced includes two versions, v2.00 runs under AmigaDOS 2.0
or higher, and version v1.20 runs under 1.3 and 2.0.  If you are running
AmigaDOS 2.0 use v2.00 of Sas2Ced, it is smaller and faster since it uses
new 2.0 system calls.  Sas2Ced v2.00 requires AmigaDOS v37 or higher.


[6] Legal junk

Permission is granted to distribute this program and its documentation for
non-commercial purposes as long as the copyright notices are not removed.
This program may not be distributed for a profit without permission from Doug
Keller.  Fred Fish has permission to distribute this program as part of the
Fred Fish library.


[7] Thanks

I would like to thank all the guys at C= that are working on 2.0, keep up the
good work, ASDG and CygnusSoft for CygnusEd, SAS for their C compiler and
for adding sending of the full path when an error is encountered in v5.10a.

Thanks to Bryce Nesbitt for _Enforcer_ and Ewout Walraven for MungWall, this
program would not have been possible with out them.


[8] Bugs and Info

If you would like to get in touch with me I can be reached on the following

        BIX : dkeller
        UUCP: dougk@watson.ibm.com  until June 21, 1991
	      dkeller@lynx.northeastern.edu
