*.cc *.h:: ++jrb bammi@cadence.com
	Massive number of hacks for atariST.

---------------------------- Patchlevel 1 -----------------------------------

*.cc *.h:: david

Hi. Enclosed are working libs and include files. The main mods have been
to the file I/O stuff (except for a bug you introduced in str.cc, tsk tsk...)
The following tests have been run:

tBitSet, tBitString, tComplex, tFile, tFix, tFix16, tFix24, tGetOpt,
tInteger, tObstack, tRandom, tRational, tString

and all work fine and run easily except for a couple of (minor) caveats

	tRandom - one of the values (for SmplHist) is wrong, it's -3 times
		  the value it ought to be
	tRational - needs a #define PI. Use the one in pml.h, since it's
		    the most precise one I could find (and the only one
		    that worked for every test)
	tObstack - crashed with bombs the first time I tried (at the end
		   of the program, after all tests had been run successfully)
		   Hasn't been a problem since.
	tComplex - needed hypot() defined. This is something that could
		   perhaps be moved into the pml library.

The only one that's actually *wrong* is tRandom - everything else is fine.

The other tests are for container classes/generic stuff. I haven't looked
at them yet.....

As I said earlier, the main diffs are in the file I/O stuff.  When you
look through them, take the following order - File, streambuf, filebuf,
Filebuf, then istream/ostream.  File and streambuf are pretty well
bin/text clean, but I haven't tested them to any great extent so there
are likely to be problems.  filebuf's are likely to be ok, Filebuf's
less so.  I don't remember making any mods to istream/ostream.... 

I started to get a little lost in Filbuf's. (Multiple inheritance always
gives me a headache...) The file opening stuff comes from File, while the
buffering is from streambuf's. (BTW, I'm using the names of classes, not
files.)

All I can really promise about the stream stuff is that it works well
enough to run the tests!

Here are a few more notes about the operation of the libs....

overflow/underflow are defined all over the place, and act as filbuf/flush
for whatever class they're defined for. (These all filter down to
each _filbuf/fflush or read/write.) must_overflow and must_underflow are
called before every read/write, and call overflow/underflow if they
have to. The File based classes use fputc/fgetc, and the bin/text stuff
is handled by the GCC libs, though there's extra status in the state
variable to indicate whether the File is in bin/text mode. The streambuf
side, the putc is done by an inline, _atari_putc, while the various
forms of getc all do their own thing. (There's get, get and advance, and
advance.) There's a _bin_mode flag for streambufs. There may be a
problem with the handling of _bin_mode for stdin/out/err: the streambuf
stuff only deals with the file descriptor, not the FILE pointer, so I
can't get at the _flags - all I do is check the fd against stdout->_file,
etc.

The end-pointer for the buffers is two less than the size of the buffers,
in case of a '\n' write at the end of the buffer in text mode. (This hasn't
been tested, so it won't work... ;-)

The big change (ie, the one that actually got the streams working) was
in Filebuf.cc, overflow(). _cnt is worked out before calling fflush
(I think), and that was using the BSD semantics of _cnt, not yours.
(Since I worked on the I/O stuff from the bottom up, this wasn't fixed
until quite late on... :-(

I don't do anything with _IONBF, _IOFBF, and _IOLBF. (You'll know what's
best in these situations. This is known as 'passing the buck'... ;-)
I also don't do anything about 16/32, though I reckon that's what all
your size_t stuff is for, yes? (I haven't gotten round to investigating
it.)

I haven't included the exception handling stuff - not gotten round to
testing them.

It's now midnight on Sunday, I'm tired and going to bed. G'night.


Addendum...

Filenames now truncated to eight characters, and are all lowercase. Diffs
are included, plus some extra files that didn't make it to patchlevel 1.

---------------------------- Patchlevel 2 -----------------------------------

str.cc:: ++jrb
	char *str, "blanks" should really be a long, since the others
are size_t, and a int would ovr/undr flow when -mshort.

Makefile, makefile.16, makefile.32, mincl:: ++jrb
	new files. set up make as per our conventions in all other libs

xcomplex.h:: ++jrb
	hypot() moved to pml lib where it belongs.

xfile.cc:: ++jrb
	use the enum constants _atari_bin/text instead of hardcoding
	the numbers

streambu.h:: ++jrb
	streambuf::stossc(): just need to advance the get pointer. No need to
	special case for _bin/_text mode, as the get fns (sgetc(), snextc())
	will advance the gptr over a \r when !_bin_mode. (the next time a
	get happens, after the advance).

ident.c:: ++jrb
	new file, for ident(1) identification.

---------------------------- Patchlevel 3 -----------------------------------

streambu.h:: david
    use <bool.h> instead of #defining TRUE/FALSE

gnulib3.c:: ++jrb
	the atexit() call for destructors was inside a #ifdef section
	and was never compiled. moved it out. now the iostreams
	stuff works much better. i was wondering for a while there
	why destructors were not happening at the end.

*.h *.cc:: ++jrb
	sync with gnu libg++-1.40. Note there are hardly any real changes
	mostly gpl lib licencing header comment changes. we might
	as well be in sync though.

---------------------------- Patchlevel 4 -----------------------------------

*.h:: ++jrb
	get rid of #pragma once from gcc-2.0

---------------------------- Patchlevel 5 -----------------------------------

all files:: ++jrb
	brand new port of libg++-2.0: note iosteams are the defaults now.

---------------------------- Patchlevel 6 -----------------------------------
