5 May 1991
Geoffrey Furnish

This directory contains my files for the OS/2 port of PLPLOT.

There were a number of things which had to be dealt with in order to get
PLPLOT to work correctly on OS/2.

The biggest problem was that PLPLOT had apparently been developed on 
machine(s) with hardware architecture(s) differing significantly from the
architecture of the Intel family.  Although there are certainly good reasons
for the architectual choices made by other processor vendors, PLPLOT was
pretty blind in its reliance upon such things.	Further, PLPLOT was written
entirely in K&R C, which is a nightmare for Intel family processors.

In the process of bringing up PLPLOT on OS/2, I was driven to install ANSI
prototypes in a large number of the functions.	Specifically, all those 
taking float's as arguments (but not those taking float *) had to be explicitly
prototyped.  Note:  the problem is not solved in the prototype, however, unless
the function actually uses an ANSI sytle declaration.  So when I say I
prototyped these functions, what I really mean is that I declared the functions
using ANSI syntax.  However, since there are still a fair number of compilers
which do not support ANSI style function declarations (SUN C for one--can you
even believe it???) I was not willing to force the conversion.	Rather, I
made the declarations dependent upon a macro, PLSTDC.  Since I am not aware
of any compilers remaining in the OS/2 market which are not ANSI, this
is the default on OS/2.

Furthermore, there were several bugs in the inards of PLPLOT, where surprising
assumptions were made about machine architecture.  In one routine, I discovered
the amusing assumption that short == long !  That is of course patently false
on Intel machines, so this had to be "adjusted".  That was in plfill.c.

Another problem with this port was that sscanf breaks if linked with the
fortran stubs, and generates a null pointer assignment problem.  My only 
recourse in this case has been to remove sscanf, and replace it with atol,
or other functional equivalents, as the case allows.  This mostly affects
the drivers, but some other files too.

Also, it should be noted that the OS/2 Fortran stubs were written for use
with Microsft Fortran.	There are particular difficulties wtih MS Fortran
in regard to strings, so these stubs may or may not work with other compilers.

To the best of my knowledge, all the changes I made consisted of legitimate
enhancements only, and no actual changes to functionality, calling syntax,
or internal algorithms.

Finally, I added a PLPLOT meta file writer, and a corresponding renderer.

Enjoy.	Report problems to:
		furnish@fusion.ph.utexas.edu
