home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.uni-stuttgart.de/pub/systems/acorn/
/
Acorn.tar
/
Acorn
/
acornet
/
dev
/
scheme
/
scmdist.spk
/
scm
/
!ReHacking
< prev
next >
Wrap
Text File
|
1993-11-04
|
4KB
|
97 lines
!Port
-----
Having uploaded scm4c5 a few weeks ago after having hacked it into shape I
got a piece of email asking about distributing the source for the port.
I am loathe to do this as basically I don't like the idea of different
versions kicking around when I have tested this version to the best of the
test-suite and found that it works fine.
However...
I believe there are some people that have a penchant for windowing apps
- I am not one of these people, I feel that command line apps are infinitely
preferable for this sort of thing in terms of speed and general application.
(Also I havent got a ghost of a clue how to make windows etc appear on
screen and I simply have not got the time..)
Secondly the thing I cant stand is software that wont run in either a
windwing environment or command line - this can as it stands - either run it
to get it by itself or run a taskwindow and then it multitasks. Voila.
(I have seen but one other piece of software thats a free port that runs
either in a window or in a command line (ok so Ive cheated but :-)
Anyways thats the preamble.
If you want to hack up your own version of scm4d0 for whatever deviant
purposes heres how to get it running with unixlib (Ill assume you are using
3.6c as I know that works) - if you want to try native compilation with
the C stubs or riscos_lib then you are on your own....
edit config.h so that you ae something like :
#define IMPLINIT "<scm$dir>.scm.Init" /* or whereever you want it */
#define IO_EXTENSIONS
#define STACK_LIMIT (HEAP_SEG_SIZE/2)
everything else is as default.
now have a look at the makefile Ive bundled along :
change the paths to unixlib headrs and library code so that it points to
where you keep it.
ok now we are ready to trundle...
bring up a command line and try
amu @.scm
now you should have a few errors about cant open <sys/ioctl.h>
- wherever this happens - comment this line outm it doesnt apply to unixlib
and we havent got it...
Other problems are that it complains about <sys/times.h> - there might be
at most two places it does this - change to <time.h> - if it does it more
than that then you have probably removed the -DLACK_FTIME -DLACK_TIMES
flags to the C compiler - put em back in...
Eventually it should get past that and trundle thru the rest of the source
without griping ...
Now we come to the fun part.
Scheme has a rather fun habit of loading in sizeable chunks of itself at
run-time.
Ive had to change a couple of pieces of the Init source so that it would
even run without gagging halfway thru - relevant fragments to replace with
bits given below are :
(define scheme-file-suffix
(case (software-type)
((NOSVE) (lambda () "_scm"))
;;; (else (lambda () ".scm")))) ;;; --- ams
(else (lambda () ""))))
;;; This is the vicinity where this file resides.
;;; --- ams this is disgusting but works..
;;; (define implementation-vicinity
;;; (let ((vic (program-vicinity)))
;;; (lambda () vic)))
(define implementation-vicinity
(let ((vic "<scm$dir>."))
(lambda () vic)))
;;; note we want require not require.scm
;;;
(cond ((try-load
(in-vicinity (library-vicinity) "require" (scheme-file-suffix))))
(else
(perror "WARNING")
(display "WARNING: Couldn't find require.scm in (library-vicinity)"
(current-error-port))
(write (library-vicinity) (current-error-port))
(newline (current-error-port))
(errno 0)))
and thats it. any other problems with it then email me and Ill try and help
you out - although I cant promise to assist unless Ive got some free time.
(Coursework is such a joy :-)
Hope this is of some use ...
alastair.