[comp.os.minix] gawk ported to MINIX-386, c-news port in progress, & bug reports

ghelmer@dsuvax.uucp (Guy Helmer) (02/12/91)

I've been working on porting C-news to MINIX, and as part of the process
I've found that bawk couldn't handle the c-news awk scripts.  So, I
grabbed gawk-2.11, replaced it's total dependence on floating point
with long integers, and tweaked a couple of things to get it to compile
under MINIX.  Now, it works great -- does anyone want it, and if so
should I post diffs or complete source?  It should work under any
MINIX with sizeof(int) = 4, and might just work with some effort
on PC MINIX.

C-news _almost_ runs.  /bin/sh needs help, as it can't run the C-news
configure script, so I generated the doit.* scripts on my VAX.  Bruce's
C compiler doesn't like to pass/return structures to/from functions,
so I've hacked dbz & friends.  C-news' fast stdio doesn't work with MINIX,
but I've brought up estdio2, which probably works at least as fast
(it is a very impressive package!).  putenv(3) seems broken (see below)
and dbz doesn't quite pass the regression tests yet.

putenv(3) (in lib/other/putenv.c) is broken.  It won't replace a
defined environment variable with a new value.  When replacing an old
definition of an environment variable with a new one, can (and should)
one do a free(3) on the old environment string before malloc(3) for
the new string?

Cristoph's cc68/386 gives a "memory fault: core dumped" now that
I've compiled with estdio2; it used to dump gibberish into the
.s files when compiled with the plain stdio.  Also, the "-DNOFLOAT"
option didn't seem to be completely implemented, as genfloat() and
gendouble() were left in genstmt.c and a couple of floating-point
related things were left in other files.  Has anyone developed
an out386_bcc.c?
-- 
Guy Helmer                          helmer@sdnet.bitnet, uunet!dsuvax!ghelmer
Dakota State University Computing Services ------------------- (605) 256-5315
MidIX -- networks, databases, DOS, UNIX, & MINIX ------------- (605) 256-2788

hp@vmars.tuwien.ac.at (Peter Holzer) (02/25/91)

ghelmer@dsuvax.uucp (Guy Helmer) writes:

>I've been working on porting C-news to MINIX, and as part of the process
>I've found that bawk couldn't handle the c-news awk scripts.  So, I
>grabbed gawk-2.11, replaced it's total dependence on floating point
>with long integers, and tweaked a couple of things to get it to compile
>under MINIX.  Now, it works great -- does anyone want it, and if so
                                      ^^^^^^^^^^^^^^^^^^^
Yes!

>should I post diffs or complete source?  It should work under any

Depends on how big the cdiffs are. If they are more than 25% of
the whole source, or the source is small, you might as well post
everything. Also, there are many people in Europe who have no or
unreliable FTP access, these might be happier with the whole
source than just the diffs.

Regards,
	Peter.
--
|    _  | Peter J. Holzer                       | Think of it   |
| |_|_) | Technical University Vienna           | as evolution  |
| | |   | Dept. for Real-Time Systems           | in action!    |
| __/   | hp@vmars.tuwien.ac.at                 |     Tony Rand |

ghelmer@dsuvax.uucp (Guy Helmer) (02/26/91)

In <2345@tuvie.UUCP> hp@vmars.tuwien.ac.at (Peter Holzer) writes:

>ghelmer@dsuvax.uucp (Guy Helmer) writes:

>>grabbed gawk-2.11, replaced it's total dependence on floating point
>>with long integers, and tweaked a couple of things to get it to compile
>>under MINIX.  Now, it works great -- does anyone want it, and if so
>                                      ^^^^^^^^^^^^^^^^^^^
>Yes!

I've received several requests for this, including some from people
who want the source just to have all the floating point overhead removed.

The complete source to gawk is large, so I plan on posting just the
necessary portions, with pointers to where to get the full source.
In other words, most of the documentation and some of the source
code that is not relevant to MINIX will be left out.

Now that I've temporarily gotten my news feeds straigtened out,
I plan on posting gawk in about 2 days.

>Regards,
>	Peter.
-- 
Guy Helmer--helmer@sdnet.bitnet, wuarchive!dsuvax!ghelmer, uunet!dsuvax!ghelmer
Dakota State University Computing Services ------------------- (605) 256-5264
MidIX -- networks, databases, DOS, UNIX, & MINIX ------------- (605) 256-2788
-------------------------------------------------------------------------------