* Imported the original 3.0-8.1 Debian diff.

git-svn-id: svn://svn.zoy.org/elk/trunk@2 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
sam 2003-08-19 19:22:48 +00:00
parent 3132f65611
commit f37781fa62
43 changed files with 1237 additions and 116 deletions

View File

@ -21,7 +21,8 @@
# Make sure $install_dir doesn't point to the top of the source tree
# (i.e. choose a subdirectory or a directory outside the source tree).
install_dir=/usr/local/elk
install_dir='$(DESTDIR)'/usr
final_dir=/usr
# Libraries against which to link the X11 extension (typically -lX11).
@ -31,42 +32,42 @@ install_dir=/usr/local/elk
# an additional -R/usr/X11/lib and -lsocket may be required in case of
# SunOS 5.x/SysVR4).
libxlib='-L/usr/local/X11/lib -lX11'
libxlib='-L/usr/X11R6/lib -lX11'
# Libraries against which to link the Xt extension (typically
# -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11). -lXaw is needed to get the
# correct definition of the vendor shell widget class
libxt='-L/usr/local/X11/lib -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11'
libxt='-L/usr/X11R6/lib -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11'
# Libraries against which to link the Athena widgets extension (typically
# identical to libxt above)
libxaw='-L/usr/local/X11/lib -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11'
libxaw='-L/usr/X11R6/lib -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11'
# Libraries against which to link the Motif extension (typically like
# libaw above with Xaw replaced by Xm)
libxmotif='-L/usr/local/X11/lib -lXm -lXmu -lXt -lSM -lICE -lXext -lX11'
libxmotif='-L/usr/X11R6/lib -lXm -lXmu -lXt -lSM -lICE -lXext -lX11'
# Additional flags (typically -Isomething) to be supplied to the C
# compiler when compiling an X11 application, or a Motif application,
# respectively.
x11_incl=-I/usr/local/X11/include
motif_incl=
x11_incl=-I/usr/X11R6/include
motif_incl=-I/usr/include/Xm
# Set "gdbm" to "yes" if you have the GNU gdbm library installed and
# want the gdbm extension to be compiled. "gdbm_inc" gives additional
# C compiler flags required to compile a program using gdbm.
gdbm=
gdbm_incl="-I/usr/gnu/include/gdbm"
gdbm=yes
gdbm_incl=
# Do you want to use the generational garbage collector? If not, the

367
config/system Normal file
View File

@ -0,0 +1,367 @@
# This is a shell script. It is sourced by the build scripts in the
# various subdirectories to gather system-, compiler-, and OS-specific
# information required for building the Makefiles.
#
# Most variables in this script are interpreted as boolean variables and
# indicate presence or absence of one specific feature. The value "yes"
# is regarded as "true", all other values (including no value or even
# non-existence of the variable) are interpreted as "false".
#
# Do not forget to quote values that contain shell meta syntax.
#
# -----------------------------------------------------------------------
# $system should contain the name of this file. It may be used by some
# of the build scripts to do things that are specific to one single
# type of system.
system=i486-linux-gcc
# Does the system support the vprintf library function? If not,
# availability of the (non-portable) _doprnt function is assumed.
vprintf=yes
# Does the directory(3) library follow the POSIX conventions (i.e.
# requires the <dirent.h> include file and uses "struct dirent")?
# If not, the (obsolete) BSD-style interface with <sys/dir.h> and
# "struct direct" is assumed.
dirent=yes
# Does the system have the random/srandom library functions? If not,
# rand/srand will be used instead.
random=yes
# Does the system have the index library function? If not, strchr
# will be used.
index=yes
# Does the system have the bcopy, bzero, and bcmp library functions?
# If not, memcpy/memset/memcmp will be used.
bstring=yes
# Does using the access system call require <unistd.h> to be included?
# (Look into the manual page for access if in doubt.)
include_unistd_h=yes
# If the FIONREAD ioctl command is defined, which file must be included?
fionread_include="<termios.h>"
# What is the name of the a.out include file?
aout_h='<a.out.h>'
# The following variables control how certain system limits are obtained
# during runtime.
#
# If getdtablesize() is available to determine the maximum number of open
# files per process, set getdtablesize=yes.
# Alternatively, if POSIX-style sysconf() can be called with _SC_OPEN_MAX,
# set sysconf_open_max=yes.
# If neither is set to "yes", an educated guess will be made.
getdtablesize=yes
sysconf_open_max=yes
# If POSIX-style pathconf() can be invoked with _PC_PATH_MAX to determine
# the maximum pathname length, set pathconf_path_max=yes.
pathconf_path_max=yes
# If the system page size can be determined by calling getpagesize()
# set getpagesize=yes.
# Alternatively, if sysconf() can be invoked with _SC_PAGESIZE, set
# sysconf_pagesize=yes.
# These two variables are only required if the generational garbage
# collector is used.
getpagesize=yes
sysconf_pagesize=no
# Set reliable_signals=bsd if your system supports BSD-style reliable
# signals (has sigblock and related functions); set reliable_signals=posix
# for POSIX-style signals (sigprocmask, sigsets); otherwise old V7/SysV
# signal semantics are assumed.
reliable_signals=posix
# To support dynamic loading of object files and "dump", the system's
# a.out format has to be known. Choose one of the following:
#
# coff ecoff xcoff elf macho hp9k convex
#
# Other values of "aout_format" are interpreted as BSD-style a.out format.
aout_format=elf
# Which mechanism should be used to dynamically load object files?
# Possible values currently are:
#
# ld BSD-style incremental loading based on ld -A
# rld NeXT-style rld_load()
# shl HP-UX shl_load()
# dl SysVR4/SunOS5 dlopen()
#
# Leave load_obj empty if dynamic loading is not supported.
load_obj=dl
# The following variables are only relevant if load_obj is set.
# Linker options to produce a shared object from a .o file.
# Only used if load_obj=dl.
ldflags_shared=-shared
# The libraries against which dynamically loaded files are resolved
# at the time they are loaded.
load_libraries=
# Additional flags to be passed to the linker for an incremental
# linker run (ld -A). Ignored unless load_obj=ld.
incremental_ldflags="-x -static"
# Systems with "aout_format=ecoff" may require a call to the cacheflush
# system call after an object file has been loaded. Which include file
# has to be included in this case?
cachectl_h='<sys/cachectl.h>'
# Is the ANSI-C atexit function supported to register an exit handler?
# If not, the exit library function will be redefined and will end in
# a call to _exit.
atexit=yes
# Do the names of external functions in the symbol table always begin
# with a special character (such as underline)? If so, syms_begin_with
# should hold this character, otherwise leave it empty.
syms_begin_with=
# The symbol prefixes of extension initialization and finalization
# functions (without the initial $syms_begin_with). Do not change
# these unless the compiler or linker restricts the length of symbols!
init_prefix=elk_init_
finit_prefix=elk_finit_
# Is the "dump" function supported?
can_dump=yes
# The following variables are only relevant if "can_dump=yes".
# Is the fchmod system call broken or unavailable?
fchmod_broken=no
# These four variables are only relevant if the system has the BSD-style
# a.out format.
# segment_size is the segment size of the system's memory management
# unit, i.e. the number to a multiple of which the size of an a.out
# segment (e.g. .text) is rounded up.
# file_text_start is the file offset at which the text segment starts
# in an a.out file.
# mem_text_start is the starting address of the text segment in memory.
# text_length_adj must be set to "sizeof (struct exec)" if the length of
# the text segment stored in the a.out header includes the a.out header
# itself.
segment_size=1024
file_text_start='N_TXTOFF(hdr)'
mem_text_start='0'
text_length_adj='0'
# Only relevant if "aout_format=coff": the system's pagesize.
coff_pagesize=4096
# Only relevant if "aout_format=hp9k" and "load_obj=shl"
hp_shared_libraries=yes
# Print debug messages when dumping
debug_dump=yes
# Is the "termio" terminal interface supported by the system? If not,
# BSD-style tty handling will be used.
termio=yes
# flush_stdio and flush_tty indicate how clear-input/output-port can
# flush (purge) a FILE pointer and a TTY file descriptor.
# Possible values of flush_stdio:
# bsd assume old BSD-style FILE* (with _cnt, _ptr, _base)
# fpurge use 4.4BSD-style fpurge stdio library function
# Possible values of flush_tty:
# tiocflush use TIOCFLUSH ioctl from <sys/ioctl.h>
# tcflsh use TCFLSH ioctl from <termio.h>
# Leave the variable(s) empty if flushing is not supported.
flush_stdio=
flush_tty=tcflsh
# The interpreter uses the getrlimit function to determine the maximum
# stack size of the running program. If this function is not supported,
# set max_stack_size to a (fixed) maximum stack size (in bytes).
max_stack_size=
# Is the mprotect system call supported? The generational garbage collector
# requires mprotect to implement incremental GC. $mprotect is ignored if
# generational_gc is set to "no" in the site file. Set mprotect=mmap if
# mprotect is supported, but only for mmap()ed memory.
mprotect=no
# How can a SIGSEGV or SIGBUS signal handler find out the address of
# the faulting memory reference? This variable is only used if
# $mprotect is "yes" or "mmap". Possible values are:
#
# siginfo handler is called with siginfo_t structure (enabled
# by a call to sigaction)
# sigcontext address is in the sigcontext structure (3rd arg, sc_badvaddr)
# arg4 address is delivered to handler as argument #4
# aix use an AIX-specific hack to get hold of the bad address
# hpux use a HP-UX-specific hack
sigsegv_addr=
# Does the system support the alloca library function, and does this
# function actually extend the stack? If in doubt, extract alloca.o
# from the C library and check if it contains the symbols malloc and free.
# If this is the case, forget it.
use_alloca=yes
# Must <alloca.h> be included to use alloca? Is "#pragma alloca" required?
include_alloca_h=yes
pragma_alloca=no
# Does the system (or compiler) require certain objects (e.g. doubles)
# to be aligned at 8-byte boundaries? If not, 4-byte alignment will
# be assumed.
align_8byte=no
# The C compiler used to compile the source code.
cc='gcc'
# The name of the linker. This is usually just "ld", or /usr/ccs/bin/ld
# in SVR4-based systems.
ld=ld
# The C compiler flags used for all files.
cflags='-O2 -I/usr/include/libelf'
# Are extra C compiler flags (such as -D_NO_PROTO) required to compile
# Motif applications?
motif_cflags=
# Are extra C compiler flags (such as -G 0) required to compile
# dynamically loadable files?
obj_cflags=-fPIC
# Are extra linker flags (such as -G 0) required to link several object
# files together to one dynamically loadable file?
obj_ldflags=
# The linker flags used to link the interpreter.
ldflags='-rdynamic -lm -ldl -lelf -lgdbm'
# The lint flags.
lintflags='-abxh'
# Are function prototypes in the header files required? If prototypes=yes,
# prototypes are used unconditionally; if prototypes=no, prototypes are
# not used; otherwise prototypes are only used if the source code is
# compiled with an ANSI-C- or C++-compiler.
prototypes=yes
# Does your C preprocessor support the ANSI-C ## operator, although
# __STDC__ is not defined?
ansi_cpp=yes
# The UNIX extension likes to know which of the following system calls,
# library functions, and include files are supported by the system.
gettimeofday=yes
ftime=yes
vfork=yes
gethostname=yes
uname=yes
mktemp=yes
tmpnam=yes
tempnam=yes
getcwd=yes
getwd=yes
rename=yes
waitpid=yes
wait3=yes
wait4=yes
utime_h=yes
regcomp=yes
# Element type of the gidset argument of getgroups(); typically int
# or gid_t. Only needed by the UNIX extension.
getgroups_type=gid_t

30
debian/README.Debian vendored Normal file
View File

@ -0,0 +1,30 @@
elk for Debian
--------------
New location of files in Debian GNU/Linux version of Elk:
---------------------------------------------------------
The default install location of files and directories in the
Elk distribution does not comply with the FSSTND. This is the reason
why some reordering has been done for the Debian packaged version.
However the documentation has not been changed. All relative
and absolute paths referred therein are the original.
The following table relates the original locations to the new ones:
Original location New location
................. ............
$install_dir/bin/scheme /usr/bin/scheme
$install_dir/include/ /usr/include/elk/
$install_dir/runtime/{scm,obj}/ /usr/lib/elk/{scm,obj}/
$install_dir/lib/*.o /usr/lib/elk/*.o
$install_dir/lib/{linkscheme,makedl} /usr/bin/{linkscheme,makedl}
$install_dir/lib/ldflags /usr/bin/ldflags-elk
-- Enrique Zanardi <ezanard@debian.org>, Mon, 26 Mar 2001 20:19:04 +0100

90
debian/changelog vendored Normal file
View File

@ -0,0 +1,90 @@
elk (3.0-8.1) unstable; urgency=low
* New maintainer.
* Fixed spelling in the package description (Closes: #161056).
* Updated standards version to 3.5.9.0.
* Replaced sys_errlist usage with strerror calls, and mktemp with mkstemp.
-- Samuel Hocevar <sam@zoy.org> Fri, 28 Mar 2003 10:30:34 +0100
elk (3.0-8.1) unstable; urgency=low
* NMU.
* Added missing build dependencies (closes: #109854, #116532).
* Fix menu item (closes: #121004).
* Apply patch to make package lintian clean (closes: #126987).
* src/build: include debian/arch-config to specify build flags for
the alpha (-O0). May fix #59893.
-- Matthias Klose <doko@debian.org> Fri, 11 Jan 2002 18:12:44 +0100
elk (3.0-8) unstable; urgency=low
* documentation moved to /usr/share/doc (Closes: Bug#91451, Bug#91453)
* manpages moved to /usr/share/man (Closes: Bug#91148)
* elkdoc moved to section doc (Closes: Bug#35701)
* Updated to current policy (Closes: Bug#82811)
* Added Build-Depends line (Closes: Bug#70820)
* link to libgdbmg1 (Closes: Bug#75710, Bug#65457)
-- Enrique Zanardi <ezanard@debian.org> Mon, 26 Mar 2001 21:14:03 +0100
elk (3.0-7) frozen; urgency=high
* Just recompiled. If someone builds a program that links to elk 3.0-6
and libc6 2.1.3 (potato version) it segfaults on start.
The version of sced that fixes RC bug #62971 depends on this version
of elk!
-- Enrique Zanardi <ezanard@debian.org> Sat, 13 May 2000 13:06:01 +0100
elk (3.0-6) frozen; urgency=low
* Don't strip modules. Bug#23772 wasn't fixed by the previous upload.
(Closes Bug#23772).
-- Enrique Zanardi <ezanard@debian.org> Wed, 28 Oct 1998 20:09:58 +0000
elk (3.0-5) frozen; urgency=low
* Renamed /usr/bin/scheme to /usr/bin/scheme-elk. /usr/bin/scheme is
now managed via update-alternatives. (Closes Bug#25295).
* Use --strip-unneeded for the modules. (Closes Bug#23772, Bug#26061).
* Moved /usr/bin/ldflags-elk to /usr/lib/elk/ldflags. (Closes Bug#26059).
-- Enrique Zanardi <ezanard@debian.org> Tue, 27 Oct 1998 14:16:42 +0000
elk (3.0-4) frozen; urgency=low
* Added copyright file in elkdoc. (Closes Bug#19298).
* Stripped obj files.
* Updated policy version.
* Added !/bin/sh in ldflags-elk.
* Added usr/lib/elk/scm/elk.ini to use slib with Elk.
-- Enrique Zanardi <ezanardi@molec1.dfis.ull.es> Mon, 16 Mar 1998 12:47:07 +0000
elk (3.0-3) unstable; urgency=low
* Removed hardcoded Architecture: i386. (Closes Bug#13618).
-- Enrique Zanardi <ezanardi@molec1.dfis.ull.es> Sun, 25 Jan 1998 04:02:45 +0000
elk (3.0-2) unstable; urgency=low
* Rebuilt with libc6
* Provide manpages for ldflags-elk, makedl and linkscheme (Bug#6280)
* Renamed changelog.upstream.gz changelog.gz
* Pristine sources
-- Enrique Zanardi <ezanardi@molec1.dfis.ull.es> Sat, 27 Sep 1997 01:26:21 +0100
elk (3.0-1) unstable; urgency=low
* Initial release
-- Enrique Zanardi <ezanardi@molec1.dfis.ull.es> Wed, 30 Oct 1996 13:05:48 +0000
Local variables:
mode: debian-changelog
End:

30
debian/control vendored Normal file
View File

@ -0,0 +1,30 @@
Source: elk
Section: devel
Priority: optional
Maintainer: Samuel Hocevar <sam@zoy.org>
Build-Depends: debhelper (>> 2.0.0), libelfg0-dev, xlibs-dev, lesstif-dev, libgdbmg1-dev, libxaw7-dev
Standards-Version: 3.5.9.0
Package: elk
Architecture: any
Section: devel
Priority: optional
Depends: ${shlibs:Depends}
Conflicts: pact (<= 980714-1)
Description: the Extension Language Kit, a Scheme implementation
Elk is an implementation of the Scheme programming language,
designed specifically as an embeddable, reusable extension
language subsystem for applications written in C or C++.
.
Elk is also useful as a stand-alone Scheme implementation.
Package: elkdoc
Architecture: all
Section: doc
Priority: optional
Description: the Extension Language Kit documentation
Elk is an implementation of the Scheme programming language,
designed specifically as an embeddable, reusable extension
language subsystem for applications written in C or C++.
.
Elk is also useful as a stand-alone Scheme implementation.

50
debian/copyright vendored Normal file
View File

@ -0,0 +1,50 @@
This is Debian GNU/Linux's prepackaged version of the Extension Language Kit,
an Scheme implementation.
Elk was written by Oliver Laumann <net@informatik.uni-bremen.de>.
This package was put together by me, Enrique Zanardi
<ezanardi@molec1.dfis.ull.es>, from sources obtained from:
ftp://ftp.uni-bremen.de/pub/programming/languages/scheme/elk/elk-3.0.tar.gz
Changes:
* added Debian GNU/Linux package maintenance system files
* added config/system file with Linux-ELF specific information for
the Makefiles.
* modified config/site to look for the X libs and includes at the right
place.
* modified */.../build* and config/site scripts to obtain FSSTND
compliant installation. The new locations of the files are listed in
addendum.txt
* modified src/dump-elf.c as suggested in Elk-News web page to avoid
a "syms.h include file not found" compile-time error. (Just deleted
the "#include <syms.h>" line).
Copyright 1990, 1991, 1992, 1993, 1994, 1995, Oliver Laumann, Berlin
(except for the contents of the directory `doc/usenix').
This software was derived from Elk 1.2, which was Copyright 1987, 1988,
1989, Nixdorf Computer AG and TELES GmbH, Berlin (Elk 1.2 has been written
by Oliver Laumann (me) for TELES Telematic Services, Berlin, in a joint
project between TELES and Nixdorf Microprocessor Engineering, Berlin).
Oliver Laumann, TELES GmbH, and Nixdorf Computer AG, as co-owners or
individual owners of copyright in this software, grant to any person or
company a worldwide, royalty free, license to
i) copy this software,
ii) prepare derivative works based on this software,
iii) distribute copies of this software or derivative works,
iv) perform this software, or
v) display this software,
provided that this notice is not removed and that neither Oliver Laumann
nor Teles nor Nixdorf are deemed to have made any representations as to
the suitability of this software for any purpose nor are held responsible
for any defects of this software.
THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
Berlin, June 20, 1995
Oliver Laumann <net@informatik.uni-bremen.de>

1
debian/dirs vendored Normal file
View File

@ -0,0 +1 @@
usr

2
debian/elk.docs vendored Normal file
View File

@ -0,0 +1,2 @@
README
PATCHLEVEL

278
debian/elk.ini vendored Normal file
View File

@ -0,0 +1,278 @@
;;;"elk.init" Initialisation file for SLIB for ELK 2.1 -*- Scheme -*-
;;; Copyright (C) 1991, 1992, 1993 Aubrey Jaffer.
;
;Permission to copy this software, to redistribute it, and to use it
;for any purpose is granted, subject to the following restrictions and
;understandings.
;
;1. Any copy made of this software must include this copyright notice
;in full.
;
;2. I have made no warrantee or representation that the operation of
;this software will be error-free, and I am under no obligation to
;provide any services, by way of maintenance, update, or otherwise.
;
;3. In conjunction with products arising from the use of this
;material, there shall be no use of my name in any advertising,
;promotional, or sales literature without prior written consent in
;each case.
; No guarantees are given about the correctness of any of the
; choices made below. Only enough work was done to get the require
; mechanism to work correctly.
;
; Stephen J. Bevan <bevan@cs.man.ac.uk> 19920912 modified by Mike
; Sperber to work correctly with statically-linked Elk and slib1d. Be
; sure to change the library vicinities according to your local
; configuration. If you're running MS-DOS (which is possible since
; 2.1), you probably have to change this file to make everything work
; correctly.
;;; (software-type) should be set to the generic operating system type.
;;; UNIX, VMS, MACOS, AMIGA and MS-DOS are supported.
(define (software-type) 'UNIX)
;;; (scheme-implementation-type) should return the name of the scheme
;;; implementation loading this file.
(define (scheme-implementation-type) 'elk)
;;; (scheme-implementation-version) should return a string describing
;;; the version the scheme implementation loading this file.
(define (scheme-implementation-version) "3.0")
;;; (implementation-vicinity) should be defined to be the pathname of
;;; the directory where any auxillary files to your Scheme
;;; implementation reside.
(define (implementation-vicinity) "/usr/lib/elk/scm")
;;; (library-vicinity) should be defined to be the pathname of the
;;; directory where files of Scheme library functions reside.
;(define library-vicinity
; (let ((library-path
; (or (getenv "SCHEME_LIBRARY_PATH")
; ;; Uses this path if SCHEME_LIBRARY_PATH is not defined.
; (case (software-type)
; ((UNIX) "/usr/local/lib/slib/")
; ((VMS) "lib$scheme:")
; ((MS-DOS) "C:\\SLIB\\")
; (else "")))))
; (lambda () library-path)))
(define (library-vicinity) "/usr/lib/slib/")
;;; *features* should be set to a list of symbols describing features
;;; of this implementation. Suggestions for features are:
(define *features*
'(
; source ;can load scheme source files
;(slib:load-source "filename")
; compiled ;can load compiled files
;(slib:load-compiled "filename")
rev4-report
ieee-p1178
sicp
rev4-optional-procedures
rev3-procedures
rev2-procedures
multiarg/and-
multiarg-apply
delay
transcript
full-continuation
; sort
format
system
; getenv <------- does elk 3.0 really have getenv? couldn't find it
program-arguments
string-port
))
;------------
(define program-arguments
(lambda ()
(cons "undefined-program-name" (command-line-args))))
; EXACT? appears to always return #f which isn't very useful.
; Approximating it with INTEGER? at least means that some
; of the code in the library will work correctly
(define exact? integer?) ; WARNING: redefining EXACT?
(define (inexact? arg)
(not (exact? arg)))
;;; (TMPNAM) makes a temporary file name.
(define tmpnam
(let ((cntr 100))
(lambda () (set! cntr (+ 1 cntr))
(let ((tmp (string-append "slib_" (number->string cntr))))
(if (file-exists? tmp) (tmpnam) tmp)))))
(require 'unix)
; Pull in GENTENV and SYSTEM
;;; (FILE-EXISTS? <string>) already here.
;;; (DELETE-FILE <string>)
(define (delete-file f) (system (string-append "rm " f)))
;------------
;;; (OUTPUT-PORT-WIDTH <port>)
(define (output-port-width . arg) 79)
;;; (OUTPUT-PORT-HEIGHT <port>)
(define (output-port-height . arg) 24)
;;; (CURRENT-ERROR-PORT)
;;; is already defined in Elk 2.1
;;; FORCE-OUTPUT flushes any pending output on optional arg output port
;;; use this definition if your system doesn't have such a procedure.
(define force-output flush-output-port)
;;; CALL-WITH-INPUT-STRING and CALL-WITH-OUTPUT-STRING are the string
;;; port versions of CALL-WITH-*PUT-FILE.
(define (call-with-output-string f)
(let ((outsp (open-output-string)))
(f outsp)
(let ((s (get-output-string outsp)))
(close-output-port outsp)
s)))
(define (call-with-input-string s f)
(let* ((insp (open-input-string s))
(res (f insp)))
(close-input-port insp)
res))
;;; CHAR-CODE-LIMIT is one greater than the largest integer which can
;;; be returned by CHAR->INTEGER.
(define char-code-limit 256)
;;; MOST-POSITIVE-FIXNUM is used in modular.scm
(define most-positive-fixnum 8388608) ; 23 bit integers ?
;;; Return argument
(define (identity x) x)
;;; If your implementation provides eval SLIB:EVAL is single argument
;;; eval using the top-level (user) environment.
(define slib:eval eval)
(define *macros* '())
(define (defmacro? m) (and (assq m *macros*) #t))
(define-macro (defmacro key pattern . body)
`(begin
(define-macro ,(cons key pattern) ,@body)
(set! *macros* (cons (cons ',key (lambda ,pattern ,@body)) *macros*))))
(define (macroexpand-1 e)
(if (pair? e) (let ((a (car e)))
(cond ((symbol? a) (set! a (assq a *macros*))
(if a (apply (cdr a) (cdr e)) e))
(else e)))
e))
(define (macroexpand e)
(if (pair? e) (let ((a (car e)))
(cond ((symbol? a)
(set! a (assq a *macros*))
(if a (macroexpand (apply (cdr a) (cdr e))) e))
(else e)))
e))
(define gentemp
(let ((*gensym-counter* -1))
(lambda ()
(set! *gensym-counter* (+ *gensym-counter* 1))
(string->symbol
(string-append "slib:G" (number->string *gensym-counter*))))))
(define defmacro:eval slib:eval)
(define defmacro:load load)
;;; If your implementation provides R4RS macros:
;(define macro:eval slib:eval)
;(define macro:load load)
(define (slib:eval-load <pathname> evl)
(if (not (file-exists? <pathname>))
(set! <pathname> (string-append <pathname> (scheme-file-suffix))))
(call-with-input-file <pathname>
(lambda (port)
(let ((old-load-pathname *load-pathname*))
(set! *load-pathname* <pathname>)
(do ((o (read port) (read port)))
((eof-object? o))
(evl o))
(set! *load-pathname* old-load-pathname)))))
;;; define an error procedure for the library
(define slib:error error)
;;; define these as appropriate for your system.
(define slib:tab #\tab)
(define slib:form-feed #\formfeed)
;;; Define these if your implementation's syntax can support it and if
;;; they are not already defined.
;(define (1+ n) (+ n 1))
;(define (-1+ n) (+ n -1))
;(define 1- -1+)
(define in-vicinity string-append)
;;; Define SLIB:EXIT to be the implementation procedure to exit or
;;; return if exitting not supported.
(define slib:exit
(lambda args
(exit (cond ((null? args) 0)
((eqv? #t (car args)) 0)
((and (number? (car args)) (integer? (car args))) (car args))
(else 1)))))
;;; Here for backward compatability
(define scheme-file-suffix
(let ((suffix (case (software-type)
((NOSVE) "_scm")
(else ".scm"))))
(lambda () suffix)))
;;; (SLIB:LOAD-SOURCE "foo") should load "foo.scm" or with whatever
;;; suffix all the module files in SLIB have. See feature 'SOURCE.
; Modify the already modified _load_ so that it copes with
; environments correctly. The change involves using
; _(global-environment)_ if none is explicitly specified.
; If this is not done, definitions in files loaded by other files will
; not be loaded in the correct environment.
(define slib:load-source
(let ((primitive-load load))
(lambda (<pathname> . rest)
(let ((env (if (null? rest) (list (global-environment)) rest)))
(apply primitive-load (string-append <pathname> ".scm") env)))))
;;; (SLIB:LOAD-COMPILED "foo") should load the file that was produced
;;; by compiling "foo.scm" if this implementation can compile files.
;;; See feature 'COMPILED.
(define slib:load-compiled
(let ((primitive-load load))
(lambda (<pathname> . rest)
(apply primitive-load (string->symbol (string-append name ".o")) rest))))
;;; At this point SLIB:LOAD must be able to load SLIB files.
(define slib:load slib:load-source) ;WARNING: redefining LOAD
(slib:load (in-vicinity (library-vicinity) "require"))

8
debian/elk.postinst vendored Normal file
View File

@ -0,0 +1,8 @@
#!/bin/sh -
if [ "$1" = "configure" ]; then
update-alternatives --install /usr/bin/scheme scheme \
/usr/bin/scheme-warning-elk 20 > /dev/null
fi
#DEBHELPER#

7
debian/elk.prerm vendored Normal file
View File

@ -0,0 +1,7 @@
#!/bin/sh
if [ "$1" = "remove" ]; then
update-alternatives --remove scheme /usr/bin/scheme-warning-elk > /dev/null
fi
#DEBHELPER#

7
debian/elkdoc.docs vendored Normal file
View File

@ -0,0 +1,7 @@
BUGS
CONTRIBUTORS
MIGRATE
MACHINES
README
TODO
doc

9
debian/ldflags-elk.1 vendored Normal file
View File

@ -0,0 +1,9 @@
.TH LDFLAGS-ELK 1
.SH NAME
ldflags-elk \- echo the LDFLAGS required for linking the Elk
interpreter kernel.
.SH SYNOPSIS
.B ldflags-elk
.SH AUTHOR
This manual page was written by E. Zanardi,
for the Debian GNU/Linux system.

16
debian/linkscheme.1 vendored Normal file
View File

@ -0,0 +1,16 @@
.TH LINKSCHEME 1
.SH NAME
linkscheme \- links ELK Scheme interpreter with your application
.SH SYNOPSIS
.B linkscheme
.I "output-file [object-file ...]"
.SH "DESCRIPTION"
This script creates an interpreter that is linked statically with your
extensions and/or application-specific object files (usually on platforms
that don't support incremental linking).
The first argument is the executable to be created, the remaining
arguments are the object files and optional libraries.
.SH AUTHOR
This manual page was written by E. Zanardi,
for the Debian GNU/Linux system.

14
debian/makedl.1 vendored Normal file
View File

@ -0,0 +1,14 @@
.TH MAKEDL 1
.SH NAME
makedl \- create dynamically loadable extension
.SH SYNOPSIS
.B makedl
.I "output-file object-file ... [library ...]"
.SH "DESCRIPTION"
.B makedl
can be used to link one dynamically loadable extension (an object file); or
combine several object files into one dynamically loadable extension
and resolve against libraries.
.SH AUTHOR
This manual page was written by E. Zanardi,
for the Debian GNU/Linux system.

6
debian/manpages vendored Normal file
View File

@ -0,0 +1,6 @@
doc/man/elk.1
debian/ldflags-elk.1
debian/linkscheme.1
debian/makedl.1
debian/scheme-elk.1
debian/scheme-warning-elk.1

2
debian/menu vendored Normal file
View File

@ -0,0 +1,2 @@
?package(elk):needs=text section=Apps/Programming\
title="elk" command="/usr/bin/scheme-elk"

119
debian/rules vendored Normal file
View File

@ -0,0 +1,119 @@
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 by Joey Hess.
#
# This version is for a hypothetical package that builds an
# architecture-dependant package, as well as an architecture-independent
# package.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This is the debhelper compatability version to use.
export DH_COMPAT=3
# This has to be exported to make some magic below work.
export DH_OPTIONS
build: build-stamp
build-stamp:
dh_testdir
# Add here commands to compile the package.
ifeq ($(shell dpkg-architecture -qDEB_BUILD_ARCH),alpha)
echo "cflags='-O0 -I/usr/include/libelf'" > debian/arch-config
else
echo "# empty" > debian/arch-config
endif
$(MAKE) SUBDIRS='include scripts src scm lib/misc lib/unix\
lib/xlib lib/xt lib/xaw lib/xm lib/xm/xt'
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
-$(MAKE) -i distclean
rm -f debian/arch-config
dh_clean
install: DH_OPTIONS=
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/elk.
$(MAKE) install DESTDIR=$(CURDIR)/debian/elk
mv $(CURDIR)/debian/elk/usr/bin/scheme \
$(CURDIR)/debian/elk/usr/bin/scheme-elk
install -m 755 debian/scheme-warning-elk $(CURDIR)/debian/elk/usr/bin/
install -m 644 debian/elk.ini $(CURDIR)/debian/elk/usr/lib/elk/scm
# dh_movefiles
# Build architecture-independent files here.
# Pass -i to all debhelper commands in this target to reduce clutter.
binary-indep: DH_OPTIONS=-i
binary-indep: build install
dh_testdir
dh_testroot
# dh_installdebconf
dh_installdocs
dh_installexamples examples/*
# dh_installmenu
# dh_installemacsen
# dh_installpam
# dh_installinit
# dh_installcron
# dh_installmanpages
# dh_installinfo
# dh_undocumented
dh_installchangelogs CHANGES
# dh_link
dh_compress
dh_fixperms
dh_installdeb
# dh_perl
dh_gencontrol
dh_md5sums
dh_builddeb
# Build architecture-dependent files here.
# Pass -a to all debhelper commands in this target to reduce clutter.
binary-arch: DH_OPTIONS=-a
binary-arch: build install
dh_testdir
dh_testroot
# dh_installdebconf
dh_installdocs
# dh_installexamples
dh_installmenu
# dh_installemacsen
# dh_installpam
# dh_installinit
# dh_installcron
# dh_installmanpages
dh_installman
# dh_installinfo
# dh_undocumented
dh_installchangelogs CHANGES
dh_strip
# dh_link
dh_compress
dh_fixperms
dh_installdeb
# dh_makeshlibs
# dh_perl
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure

1
debian/scheme-elk.1 vendored Normal file
View File

@ -0,0 +1 @@
.so man1/elk.1

13
debian/scheme-warning-elk vendored Normal file
View File

@ -0,0 +1,13 @@
#!/bin/sh
echo "As there are a few scheme interpeters in Debian, you should invoke
the one you want by using its full name. If you want to use elk, invoke
'scheme-elk'. You may also define elk as the default scheme interpreter.
To do so, run (as root) the following command:
update-alternatives --install /usr/bin/scheme scheme /usr/bin/scheme-elk 20 \
--slave /usr/share/man/man1/scheme.1.gz scheme.1.gz /usr/share/man/man1/elk.1.gz
Press any key to continue."
read foo

11
debian/scheme-warning-elk.1 vendored Normal file
View File

@ -0,0 +1,11 @@
.TH SCHEME-WARNING-ELK 1
.SH NAME
scheme-warning-elk
.SH SYNOPSIS
.B scheme-warning-elk
.SH "DESCRIPTION"
.B scheme-warning-elk
displays a warning showing how to choose a scheme interpreter in Debian
.SH AUTHOR
This manual page was written by E. Zanardi,
for the Debian GNU/Linux system.

View File

@ -26,7 +26,7 @@ usenix/ A paper about Elk that has appeared in USENIX Computing
Systems (vol. 7, no. 4, pp. 419-449, 1994).
man/ This directory holds a brief online manual page for the Scheme
interpreter component. You may want to install in `/usr/man'
interpreter component. You may want to install in `/usr/share/man'
on your system. The manual page essentially describes the
command line options of the interpreter.

View File

@ -29,10 +29,14 @@ install: \$(FILES)
echo mkdir $install_dir/include; \\
mkdir $install_dir/include; \\
fi
-@if [ ! -d $install_dir/include/elk ]; then \\
echo mkdir $install_dir/include/elk; \\
mkdir $install_dir/include/elk; \\
fi
@for i in \$(FILES) ;\\
do \\
echo cp \$\$i $install_dir/include; \\
cp \$\$i $install_dir/include; \\
echo cp \$\$i $install_dir/include/elk; \\
cp \$\$i $install_dir/include/elk; \\
done
localize: config.h

View File

@ -321,8 +321,8 @@ $def_bcopy
$def_bzero
$def_bcmp
#define AOUT_H $aout_h
#define SCM_DIR "$install_dir/runtime/scm"
#define OBJ_DIR "$install_dir/runtime/obj"
#define SCM_DIR "$final_dir/lib/elk/scm"
#define OBJ_DIR "$final_dir/lib/elk/obj"
#define HEAP_SIZE $default_heap_size
#define FIND_AOUT defined(USE_LD) || defined(CAN_DUMP)\\
|| defined(INIT_OBJECTS)

View File

@ -88,7 +88,8 @@ extern Object General_Assoc P_((Object, Object, int));
*/
extern char *stkbase, *A_Out_Name;
extern int Stack_Grows_Down;
extern int Max_Stack, Interpreter_Initialized, Was_Dumped;
extern unsigned int Max_Stack;
extern int Interpreter_Initialized, Was_Dumped;
extern char *Brk_On_Dump;
extern int Verb_Load, Verb_Init, Case_Insensitive;
extern SYMTAB *The_Symbols;

View File

@ -72,18 +72,22 @@ struct.o: \$(H) struct.c
$gdbm_rule
install: \$(O)
-@if [ ! -d $install_dir/runtime ]; then \\
echo mkdir $install_dir/runtime; \\
mkdir $install_dir/runtime; \\
-@if [ ! -d $install_dir/lib ]; then \\
echo mkdir $install_dir/lib; \\
mkdir $install_dir/lib; \\
fi
-@if [ ! -d $install_dir/runtime/obj ]; then \\
echo mkdir $install_dir/runtime/obj; \\
mkdir $install_dir/runtime/obj; \\
-@if [ ! -d $install_dir/lib/elk ]; then \\
echo mkdir $install_dir/lib/elk; \\
mkdir $install_dir/lib/elk; \\
fi
-@if [ ! -d $install_dir/lib/elk/obj ]; then \\
echo mkdir $install_dir/lib/elk/obj; \\
mkdir $install_dir/lib/elk/obj; \\
fi
@for i in \$(O) ;\\
do \\
echo cp \$\$i $install_dir/runtime/obj; \\
cp \$\$i $install_dir/runtime/obj; \\
echo cp \$\$i $install_dir/lib/elk/obj; \\
cp \$\$i $install_dir/lib/elk/obj; \\
done
lint:

View File

@ -78,24 +78,32 @@ unix.pre: \$(O)
../../scripts/makedl \$@ \$(O)
install: unix.pre
-@if [ ! -d $install_dir/runtime ]; then \\
echo mkdir $install_dir/runtime; \\
mkdir $install_dir/runtime; \\
-@if [ ! -d $install_dir/lib ]; then \\
echo mkdir $install_dir/lib; \\
mkdir $install_dir/lib; \\
fi
-@if [ ! -d $install_dir/runtime/obj ]; then \\
echo mkdir $install_dir/runtime/obj; \\
mkdir $install_dir/runtime/obj; \\
-@if [ ! -d $install_dir/lib/elk ]; then \\
echo mkdir $install_dir/lib/elk; \\
mkdir $install_dir/lib/elk; \\
fi
cp unix.pre $install_dir/runtime/obj/unix.o
-@if [ ! -d $install_dir/lib/elk/obj ]; then \\
echo mkdir $install_dir/lib/elk/obj; \\
mkdir $install_dir/lib/elk/obj; \\
fi
cp unix.pre $install_dir/lib/elk/obj/unix.o
-@if [ ! -d $install_dir/include ]; then \\
echo mkdir $install_dir/include; \\
mkdir $install_dir/include; \\
fi
-@if [ ! -d $install_dir/include/extensions ]; then \\
echo mkdir $install_dir/include/extensions; \\
mkdir $install_dir/include/extensions; \\
-@if [ ! -d $install_dir/include/elk ]; then \\
echo mkdir $install_dir/include/elk; \\
mkdir $install_dir/include/elk; \\
fi
cp unix.h $install_dir/include/extensions
-@if [ ! -d $install_dir/include/elk/extensions ]; then \\
echo mkdir $install_dir/include/elk/extensions; \\
mkdir $install_dir/include/elk/extensions; \\
fi
cp unix.h $install_dir/include/elk/extensions
lint:
lint \$(LINTFLAGS) -I\$(INC) \$(C)

View File

@ -96,22 +96,26 @@ tree.o: \$(H) tree.d
viewport.o: \$(H) viewport.d
install: \$(O)
-@if [ ! -d $install_dir/runtime ]; then \\
echo mkdir $install_dir/runtime; \\
mkdir $install_dir/runtime; \\
-@if [ ! -d $install_dir/lib ]; then \\
echo mkdir $install_dir/lib; \\
mkdir $install_dir/lib; \\
fi
-@if [ ! -d $install_dir/runtime/obj ]; then \\
echo mkdir $install_dir/runtime/obj; \\
mkdir $install_dir/runtime/obj; \\
-@if [ ! -d $install_dir/lib/elk ]; then \\
echo mkdir $install_dir/lib/elk; \\
mkdir $install_dir/lib/elk; \\
fi
-@if [ ! -d $install_dir/runtime/obj/xaw ]; then \\
echo mkdir $install_dir/runtime/obj/xaw; \\
mkdir $install_dir/runtime/obj/xaw; \\
-@if [ ! -d $install_dir/lib/elk/obj ]; then \\
echo mkdir $install_dir/lib/elk/obj; \\
mkdir $install_dir/lib/elk/obj; \\
fi
-@if [ ! -d $install_dir/lib/elk/obj/xaw ]; then \\
echo mkdir $install_dir/lib/elk/obj/xaw; \\
mkdir $install_dir/lib/elk/obj/xaw; \\
fi
@for i in \$(O) ALIASES ;\\
do \\
echo cp \$\$i $install_dir/runtime/obj/xaw; \\
cp \$\$i $install_dir/runtime/obj/xaw; \\
echo cp \$\$i $install_dir/lib/elk/obj/xaw; \\
cp \$\$i $install_dir/lib/elk/obj/xaw; \\
done
lint:

View File

@ -108,24 +108,32 @@ xlib.pre: \$(O)
../../scripts/makedl \$@ \$(O)
install: xlib.pre
-@if [ ! -d $install_dir/runtime ]; then \\
echo mkdir $install_dir/runtime; \\
mkdir $install_dir/runtime; \\
-@if [ ! -d $install_dir/lib ]; then \\
echo mkdir $install_dir/lib; \\
mkdir $install_dir/lib; \\
fi
-@if [ ! -d $install_dir/runtime/obj ]; then \\
echo mkdir $install_dir/runtime/obj; \\
mkdir $install_dir/runtime/obj; \\
-@if [ ! -d $install_dir/lib/elk ]; then \\
echo mkdir $install_dir/lib/elk; \\
mkdir $install_dir/lib/elk; \\
fi
cp xlib.pre $install_dir/runtime/obj/xlib.o
-@if [ ! -d $install_dir/lib/elk/obj ]; then \\
echo mkdir $install_dir/lib/elk/obj; \\
mkdir $install_dir/lib/elk/obj; \\
fi
cp xlib.pre $install_dir/lib/elk/obj/xlib.o
-@if [ ! -d $install_dir/include ]; then \\
echo mkdir $install_dir/include; \\
mkdir $install_dir/include; \\
fi
-@if [ ! -d $install_dir/include/extensions ]; then \\
echo mkdir $install_dir/include/extensions; \\
mkdir $install_dir/include/extensions; \\
-@if [ ! -d $install_dir/include/elk ]; then \\
echo mkdir $install_dir/include/elk; \\
mkdir $install_dir/include/elk; \\
fi
cp xlib.h $install_dir/include/extensions
-@if [ ! -d $install_dir/include/elk/extensions ]; then \\
echo mkdir $install_dir/include/elk/extensions; \\
mkdir $install_dir/include/elk/extensions; \\
fi
cp xlib.h $install_dir/include/elk/extensions
lint:
lint \$(LINTFLAGS) -I\$(INC) $x11_incl \$(C)

View File

@ -102,22 +102,26 @@ text.o: \$(H) text.d
toggle-btn.o: \$(H) toggle-btn.d
install: \$(O)
-@if [ ! -d $install_dir/runtime ]; then \\
echo mkdir $install_dir/runtime; \\
mkdir $install_dir/runtime; \\
-@if [ ! -d $install_dir/lib ]; then \\
echo mkdir $install_dir/lib; \\
mkdir $install_dir/lib; \\
fi
-@if [ ! -d $install_dir/runtime/obj ]; then \\
echo mkdir $install_dir/runtime/obj; \\
mkdir $install_dir/runtime/obj; \\
-@if [ ! -d $install_dir/lib/elk ]; then \\
echo mkdir $install_dir/lib/elk; \\
mkdir $install_dir/lib/elk; \\
fi
-@if [ ! -d $install_dir/runtime/obj/xm ]; then \\
echo mkdir $install_dir/runtime/obj/xm; \\
mkdir $install_dir/runtime/obj/xm; \\
-@if [ ! -d $install_dir/lib/elk/obj ]; then \\
echo mkdir $install_dir/lib/elk/obj; \\
mkdir $install_dir/lib/elk/obj; \\
fi
-@if [ ! -d $install_dir/lib/elk/obj/xm ]; then \\
echo mkdir $install_dir/lib/elk/obj/xm; \\
mkdir $install_dir/lib/elk/obj/xm; \\
fi
@for i in \$(O) ALIASES ;\\
do \\
echo cp \$\$i $install_dir/runtime/obj/xm; \\
cp \$\$i $install_dir/runtime/obj/xm; \\
echo cp \$\$i $install_dir/lib/elk/obj/xm; \\
cp \$\$i $install_dir/lib/elk/obj/xm; \\
done
lint:

View File

@ -49,15 +49,19 @@ xt-motif.pre: \$(O) ../../xlib/xlib.pre
../../../scripts/makedl \$@ \$(O) ../../xlib/*.o $motif_link_libs
install: xt-motif.pre
-@if [ ! -d $install_dir/runtime ]; then \\
echo mkdir $install_dir/runtime; \\
mkdir $install_dir/runtime; \\
-@if [ ! -d $install_dir/lib ]; then \\
echo mkdir $install_dir/lib; \\
mkdir $install_dir/lib; \\
fi
-@if [ ! -d $install_dir/runtime/obj ]; then \\
echo mkdir $install_dir/runtime/obj; \\
mkdir $install_dir/runtime/obj; \\
-@if [ ! -d $install_dir/lib/elk ]; then \\
echo mkdir $install_dir/lib/elk; \\
mkdir $install_dir/lib/elk; \\
fi
cp xt-motif.pre $install_dir/runtime/obj/xt-motif.o
-@if [ ! -d $install_dir/lib/elk/obj ]; then \\
echo mkdir $install_dir/lib/elk/obj; \\
mkdir $install_dir/lib/elk/obj; \\
fi
cp xt-motif.pre $install_dir/lib/elk/obj/xt-motif.o
lint:

View File

@ -88,24 +88,32 @@ xt.pre: \$(O) ../xlib/xlib.pre
../../scripts/makedl \$@ \$(O) ../xlib/*.o
install: xt.pre
-@if [ ! -d $install_dir/runtime ]; then \\
echo mkdir $install_dir/runtime; \\
mkdir $install_dir/runtime; \\
-@if [ ! -d $install_dir/lib ]; then \\
echo mkdir $install_dir/lib; \\
mkdir $install_dir/lib; \\
fi
-@if [ ! -d $install_dir/runtime/obj ]; then \\
echo mkdir $install_dir/runtime/obj; \\
mkdir $install_dir/runtime/obj; \\
-@if [ ! -d $install_dir/lib/elk ]; then \\
echo mkdir $install_dir/lib/elk; \\
mkdir $install_dir/lib/elk; \\
fi
cp xt.pre $install_dir/runtime/obj/xt.o
-@if [ ! -d $install_dir/lib/elk/obj ]; then \\
echo mkdir $install_dir/lib/elk/obj; \\
mkdir $install_dir/lib/elk/obj; \\
fi
cp xt.pre $install_dir/lib/elk/obj/xt.o
-@if [ ! -d $install_dir/include ]; then \\
echo mkdir $install_dir/include; \\
mkdir $install_dir/include; \\
fi
-@if [ ! -d $install_dir/include/extensions ]; then \\
echo mkdir $install_dir/include/extensions; \\
mkdir $install_dir/include/extensions; \\
-@if [ ! -d $install_dir/include/elk ]; then \\
echo mkdir $install_dir/include/elk; \\
mkdir $install_dir/include/elk; \\
fi
cp xt.h $install_dir/include/extensions
-@if [ ! -d $install_dir/include/elk/extensions ]; then \\
echo mkdir $install_dir/include/elk/extensions; \\
mkdir $install_dir/include/elk/extensions; \\
fi
cp xt.h $install_dir/include/elk/extensions
lint:
lint \$(LINTFLAGS) -I\$(INC) -I../xlib $x11_incl \$(C)

View File

@ -43,18 +43,22 @@ siteinfo.scm: ../config/system ../config/site
\$(SHELL) ./build-siteinfo
install: \$(TARGETS)
-@if [ ! -d $install_dir/runtime ]; then \\
echo mkdir $install_dir/runtime; \\
mkdir $install_dir/runtime; \\
-@if [ ! -d $install_dir/lib ]; then \\
echo mkdir $install_dir/lib; \\
mkdir $install_dir/lib; \\
fi
-@if [ ! -d $install_dir/runtime/scm ]; then \\
echo mkdir $install_dir/runtime/scm; \\
mkdir $install_dir/runtime/scm; \\
-@if [ ! -d $install_dir/lib/elk ]; then \\
echo mkdir $install_dir/lib/elk; \\
mkdir $install_dir/lib/elk; \\
fi
-@if [ ! -d $install_dir/lib/elk/scm ]; then \\
echo mkdir $install_dir/lib/elk/scm; \\
mkdir $install_dir/lib/elk/scm; \\
fi
@for i in \$(FILES) ;\\
do \\
echo cp \$\$i $install_dir/runtime/scm; \\
cp \$\$i $install_dir/runtime/scm; \\
echo cp \$\$i $install_dir/lib/elk/scm; \\
cp \$\$i $install_dir/lib/elk/scm; \\
done
lint:

View File

@ -30,13 +30,17 @@ ldflags: src/ldflags ../config/system ../config/site
chmod +x \$@
install: \$(FILES)
-@if [ ! -d $install_dir/lib ]; then \\
echo mkdir $install_dir/lib; \\
mkdir $install_dir/lib; \\
-@if [ ! -d $install_dir/bin ]; then \\
echo mkdir $install_dir/bin; \\
mkdir $install_dir/bin; \\
fi
cp linkscheme $install_dir/lib
cp makedl $install_dir/lib
cp ldflags $install_dir/lib
cp linkscheme $install_dir/bin
cp makedl $install_dir/bin
-@if [ ! -d $install_dir/lib/elk ]; then \\
echo mkdir $install_dir/lib/elk; \\
mkdir -p $install_dir/lib/elk; \\
fi
cp ldflags $install_dir/lib/elk
distclean:
rm -f \$(FILES) Makefile.local

View File

@ -2,6 +2,7 @@
. ../config/site
cat <<HERE
#!/bin/sh
# Echo the LDFLAGS required for linking the Elk interpreter kernel.
echo $ldflags

View File

@ -19,7 +19,7 @@ then
echo Usage: "\$0: output-file [object-files]"
exit 1
fi
ofile=$install_dir/lib/standalone.o
ofile=$final_dir/lib/elk/standalone.o
aout=\$1
if [ -f \$aout ]
then

View File

@ -1,5 +1,6 @@
. ../config/system
. ../config/site
. ../debian/arch-config
case _$aout_format in
_coff) dump=dump-vanilla.c; stab=stab-coff.c;;
@ -190,8 +191,12 @@ install: scheme standalone.o module.o
echo mkdir $install_dir/lib; \\
mkdir $install_dir/lib; \\
fi
cp standalone.o $install_dir/lib
cp module.o $install_dir/lib
-@if [ ! -d $install_dir/lib/elk ]; then \\
echo mkdir $install_dir/lib/elk; \\
mkdir $install_dir/lib/elk; \\
fi
cp standalone.o $install_dir/lib/elk
cp module.o $install_dir/lib/elk
lint:
lint \$(LINTFLAGS) -I\$(INC) \$(C)

View File

@ -76,7 +76,7 @@ Check_Stack_Grows_Down () {
* It works independent of the direction into which the stack grows
* (the stack grows upwards on HP-PA based machines and Pyramids).
*/
int Stack_Size () {
unsigned int Stack_Size () {
char foo;
return Stack_Grows_Down ? stkbase-&foo : &foo-stkbase;

View File

@ -3,7 +3,6 @@
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <syms.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>

View File

@ -39,7 +39,7 @@ char *Temp_Name (seq) int seq; {
tmpdir = "/tmp";
tempname = Safe_Malloc (tmplen = strlen (tmpdir) + 20);
sprintf (tempname, "%s/ldXXXXXX", tmpdir);
(void)mktemp (tempname);
(void)mkstemp (tempname);
strcat (tempname, ".");
}
sprintf (strrchr (tempname, '.'), ".%d", seq);
@ -55,7 +55,7 @@ void Fork_Load () {
Disable_Interrupts;
newtemp = Safe_Malloc (tmplen);
sprintf (newtemp, "%s/ldXXXXXX", tmpdir);
(void)mktemp (newtemp);
(void)mkstemp (newtemp);
strcat (newtemp, ".");
for (i = 0; i < Seq_Num; i++) {
sprintf (strrchr (newtemp, '.'), ".%d", i);

View File

@ -48,7 +48,7 @@ Load_Object (names) Object names; {
Loader_Output = Safe_Malloc (strlen (tmpdir) + 20);
}
sprintf (Loader_Output, "%s/ldXXXXXX", tmpdir);
(void)mktemp (Loader_Output);
(void)mkstemp (Loader_Output);
port = tail = fullnames = Null;
GC_Link3 (port, tail, fullnames);
@ -159,7 +159,7 @@ void Fork_Load () {
Disable_Interrupts;
newlink = Safe_Malloc (strlen (tmpdir) + 20);
sprintf (newlink, "%s/ldXXXXXX", tmpdir);
(void)mktemp (newlink);
(void)mkstemp (newlink);
(void)link (Loader_Input, newlink);
free (Loader_Input);
Loader_Input = newlink;

View File

@ -1,6 +1,7 @@
#include "kernel.h"
#include <errno.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
@ -21,7 +22,7 @@ extern char *getenv();
char *stkbase;
int Stack_Grows_Down;
int Max_Stack;
unsigned int Max_Stack;
int Interpreter_Initialized;
int GC_Debug = 0;
int Case_Insensitive;
@ -320,6 +321,7 @@ Get_Stack_Limit () {
perror ("getrlimit");
exit (1);
}
Max_Stack = rl.rlim_cur;
#endif
Max_Stack -= STACK_MARGIN;

View File

@ -3,6 +3,7 @@
#include "kernel.h"
#include <string.h>
#include <errno.h>
#include <ctype.h>
#include <varargs.h>
@ -557,7 +558,9 @@ Format (port, fmt, len, argc, argv) Object port; const char *fmt;
char buf[256];
extern sys_nerr;
#ifndef __bsdi__
#ifndef __linux__
extern char *sys_errlist[];
#endif
#endif
GC_Node;
Alloca_Begin;
@ -573,13 +576,9 @@ Format (port, fmt, len, argc, argv) Object port; const char *fmt;
} else if (c == '%') {
Print_Char (port, '\n');
} else if (c == 'e' || c == 'E') {
if (Saved_Errno > 0 && Saved_Errno < sys_nerr) {
s = sys_errlist[Saved_Errno];
s = strerror(Saved_Errno);
sprintf (buf, "%c%s", isupper (*s) ? tolower (*s) :
*s, s+1);
} else {
sprintf (buf, "error %d", Saved_Errno);
}
*s, *s ? "" : s+1);
Print_Object (Make_String (buf, strlen (buf)), port,
c == 'E', 0, 0);
} else {