[comp.lang.icon] Porting Icon 7.5 to a new and Unique UNIX machine

jeffc@osf.ORG (Jeff Carter) (03/06/90)

I recently began porting (a reasonably simple task) Icon to a 
DECstation 3100 (MIPS RISC chipset, runs Ultrix. aka PMAX). I have run
in to a couple of things that hopefully someone else out there has a 
solution for, or suggestions how to debug:

(1) There are numurous calls to fopen() with "rb" and "wb" modes that
are _not_ surrounded by OS-specific #ifdef's. This leads me to believe
(unfortunately) that maybe the particular version I have hasn't been
run on a wide variety of UNIX machines. Any comments? Are other versions
of UNIX more forgiving than ULTRIX 3.0?

(2) Floating-point conversions. I get numerous failures of the "eval"
and "fncs" tests that seem to stem from a problem with the conversion of
real numbers to their string representations. For example, from the
"eval" test:

3c3
< 2.0 === +2.0 ----> 9.018482111602407e-O4
---
> 2.0 === +2.0 ----> 2.0

And from the "fncs" test:

3c3
< copy(1.0) ----> 9.017964046223754e-O4
---
> copy(1.0) ----> 1.0

There are numerous other examples, but almost all of the reported errors 
are similar to these.

(3) Memory allocation. Early the startup, the executable calls fopen() in 
order to get the code file. This, unfortunately, causes fopen() to call
malloc(), which immediately fails because initalloc() hasn't been 
called. And initalloc doesn't get called until after the header is read
from the code file. This forces me to use the static allocation versions
of the memory management routines. The first application that I want to use
this for wants to use a _lot_ of string space. I keep getting "out
of space in string region" errors, and having to restart with larger and
larger values. This is a royal pain. Has anyone looked at making the code
region be allocated out of the static memory region, or some other technique
that would let me initialize the memory allocation routine earlier? 
Is there a particular reason why this _won't_ work (so I don't waste my
time on it, only to dicover the fatal flaw.)

	jeff carter
	jeffc@osf.org

ralph@CS.ARIZONA.EDU (Ralph Griswold) (03/06/90)

Version 8 of Icon, to be out shortly, will support the DECstation and
several other newer workstations, including the Sun SPARCstation and
the NeXT machine.  (All of the problems noted in earlier mail are
corrected in Version 8.)

  Ralph Griswold / Dept of Computer Science / Univ of Arizona / Tucson, AZ 85721
  +1 602 621 6609   ralph@cs.arizona.edu  uunet!arizona!ralph