* Imported original elk 3.0 tree.
git-svn-id: svn://svn.zoy.org/elk/trunk@1 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
commit
3132f65611
|
|
@ -0,0 +1,35 @@
|
|||
Generational/Incremental Garbage Collector
|
||||
|
||||
The generational, incremental garbage collector still is considered
|
||||
experimental, although it stands up well in some real applications.
|
||||
Here is a list of known problems:
|
||||
|
||||
o On a Sun (Sun-4/SunOS4 or 5) when compiling Elk with gcc (2.6.3
|
||||
or older), the generational garbage collector sometimes loops
|
||||
(when working in non-incremental mode). This can be circumvented
|
||||
by compiling src/proc.c (yes, proc.c, not heap.c) without the -O
|
||||
option. We are not sure yet whether this is a bug in Elk or in gcc.
|
||||
|
||||
o Running out of memory when expanding the heap shouldn't be handled
|
||||
as a fatal error. Instead, the garbage collector should clean up
|
||||
and then invoke Uncatchable_Error() to return control to the Scheme
|
||||
program.
|
||||
|
||||
o The return value of ExpandHeap() is sometimes ignored.
|
||||
|
||||
o When running the program
|
||||
|
||||
(garbage-collect-status 'generational 'incremental)
|
||||
(define (f) (make-list 10000 'a) (f))
|
||||
(f)
|
||||
|
||||
the pairs in the lists become stable quickly and aren't reclaimed,
|
||||
as the current algorithm favors heap expansions over full collections.
|
||||
|
||||
o With the same test program, the GC sometimes crashes with SIGSEGV
|
||||
after having expanded the heap to 9MB.
|
||||
|
||||
o Under HP-UX 9.0 and AIX 4.1, the GC doesn't work in incremental mode
|
||||
(a broken-heart is passed to Memoize_Frame() after an ExpandHeap()).
|
||||
|
||||
o The percentage displayed at the end of a GC run is sometimes wrong.
|
||||
|
|
@ -0,0 +1,508 @@
|
|||
Changes from release 2.2 to release 3.0
|
||||
|
||||
General:
|
||||
|
||||
o A new C/C++ Programmer's Manual for Elk is now available
|
||||
(60+ pages with many examples). See doc/README (item `cprog')
|
||||
and doc/cprog.
|
||||
|
||||
o The documentation has been prepared for translation to HTML
|
||||
using the (Elk-based) `unroff' package.
|
||||
|
||||
o Elk now uses a new Scheme object representation (a `struct' rather
|
||||
than an `unsigned long') to make it work on 64-bit architectures
|
||||
and to allow for larger heaps, a wider range of fixnums, and more
|
||||
first-class Scheme types.
|
||||
o As a consequence, the `pointer_constant_high_bits' are gone, as
|
||||
is util/pchb.c.
|
||||
|
||||
o Elk has been ported to and tested on these new platforms (config
|
||||
files are included in the distribution):
|
||||
|
||||
DEC/Alpha, OSF/1
|
||||
HP 9000, HP-UX 10.0
|
||||
i386/486, BSDI BSD/OS
|
||||
i386/486, Linux
|
||||
IBM PowerPC, AIX 4.1
|
||||
|
||||
o A number of config files for obsolete platforms have been removed
|
||||
from the distribution; config files for platforms where Elk 3.0
|
||||
could not be tested are in config/untested. util/sgihack.c is gone.
|
||||
|
||||
o Extension initialization and finalization functions now begin
|
||||
with `elk_init_' rather than just `init_' to avoid name conflicts.
|
||||
|
||||
o The directory `contrib' has been removed from the distribution,
|
||||
as most of the contributions either were no longer maintained
|
||||
or have been made an official part of the distribution.
|
||||
contrib/eval-string is now available as lib/misc/elk-eval.c.
|
||||
|
||||
o Site/platform-specific information such as the various X11 `load
|
||||
libraries', machine name, operating system name, as well as the
|
||||
Elk version number are now available as Scheme variables in
|
||||
scm/siteinfo.scm. The file is created automatically and can be
|
||||
loaded via `(require 'siteinfo)'.
|
||||
|
||||
o Most of the improvements in scm/debug-new.scm have been merged
|
||||
into the baseline debug.scm and the former has been removed.
|
||||
The inspector now starts at the correct frame when called after
|
||||
an error.
|
||||
|
||||
o examples/CC/class.c is a simple Elk extension demonstrating
|
||||
encapsulation of a C++ class in a Scheme type.
|
||||
|
||||
o The file README has been renamed ROADMAP; RELEASE is now README.
|
||||
|
||||
Interpreter kernel:
|
||||
|
||||
o Many bugs have been fixed, and the code has been made `64-bit clean'.
|
||||
|
||||
o New functions for application writers to read/set the `error tag'
|
||||
displayed in error messages and the application name (Get_Error_Tag,
|
||||
Set_Error_Tag, Set_App_Name).
|
||||
|
||||
o When dynamically loading objects, the C++ static constructors are
|
||||
now called _before_ all extension initializers. Ditto for C++
|
||||
destructors and extension finalizers.
|
||||
|
||||
o New function for application/extension writers to load a file
|
||||
whose name is given as a C string (Load_File).
|
||||
o Load_Source_Port has been made `official' and may be used from
|
||||
outside the interpreter.
|
||||
|
||||
o New functions for application/extension writers to convert
|
||||
Scheme numbers to C unsigned int/long: Get_Unsigned,
|
||||
Get_Unsigned_Long, Get_Exact_Unsigned, Get_Exact_Unsigned_Long.
|
||||
New function Get_Exact_Long.
|
||||
|
||||
o The `round' primitive now rounds to even for numbers halfway
|
||||
between two integers.
|
||||
|
||||
o The reader doesn't impose a limit on the length of strings and
|
||||
symbols any longer.
|
||||
|
||||
o The dynamic loading implementations now use the environment
|
||||
variable TMPDIR if present.
|
||||
|
||||
o `dump' now works under SGI Irix 5.x.
|
||||
|
||||
o New constants ELK_MINOR and ELK_MAJOR for application/extension
|
||||
writers.
|
||||
|
||||
o Symbols containing special characters now print correctly when
|
||||
output with `write'.
|
||||
|
||||
o Various optimizations in the interpreter's inner loop to compensate
|
||||
for the performance loss caused by the struct-based object
|
||||
representation on some platforms.
|
||||
|
||||
Extensions:
|
||||
|
||||
o The X11 extensions now work with X11 Release 6, Sun OpenWindows 3.x,
|
||||
and Sun Motif.
|
||||
|
||||
o Extension-specific include files (unix.h, xlib.h, xt.h) are now
|
||||
installed in a subdirectory $install_dir/include/extensions
|
||||
for use by applications.
|
||||
|
||||
o The object files for Athena or Motif widgets are now loaded
|
||||
by means of `require'.
|
||||
|
||||
o New regular expression extension (see doc/regexp and
|
||||
examples/regexp).
|
||||
|
||||
o The file hunk.c has been removed from lib/misc, as it no longer
|
||||
serves any purpose.
|
||||
|
||||
o Several bugs have been fixed in the UNIX and X11 extensions.
|
||||
|
||||
|
||||
|
||||
Changes from release 2.1 to release 2.2
|
||||
|
||||
General:
|
||||
|
||||
o Elk ported to new platforms: SGI Irix 5.1, HP-UX 9.0
|
||||
|
||||
o All Scheme files now end with the suffix `.scm'
|
||||
o Introduced new symbols in the config files to be used by the
|
||||
UNIX extension
|
||||
o Reorganized the include files. Split external declarations
|
||||
into `private' (intern.h) and `public' (extern.h) declarations
|
||||
to be used by extensions
|
||||
|
||||
o It's no longer necessary to specify multiple destination
|
||||
directories in the site file (only install_dir; subdirectories
|
||||
are created automatically)
|
||||
o `init_objects' is gone from the site file, see INSTALL for a
|
||||
new, simpler way to link extensions or an application with Elk
|
||||
statically
|
||||
o New directory $install_dir/lib is created with files module.o,
|
||||
standalone.o and shell scripts linkscheme, makedl, and ldflags
|
||||
(see INSTALL)
|
||||
|
||||
o Elk can now be used by applications that must have their own
|
||||
main() function. See INSTALL for details.
|
||||
|
||||
Interpreter kernel:
|
||||
|
||||
o New primitives to allow blocking of signals from within Scheme
|
||||
code: disable-interrupts, enable-interrupts
|
||||
o Changed Disable_Interrupts and Enable_Interrupts macros to
|
||||
allow nesting and to handle signals used by extensions
|
||||
(specifically by the new UNIX extension)
|
||||
o Extended representation of continuations to carry current
|
||||
interrupt nesting level and restore it when being called
|
||||
o (Re-)enable interrupts in toplevel on error
|
||||
o Added default signal handlers for SIGPIPE and SIGHUP to clean
|
||||
up temporary files
|
||||
|
||||
o New primitive: `features'
|
||||
o `require' now appends .scm to feature name to obtain file name
|
||||
(if no file name has been specified and if the feature name
|
||||
doesn't have a suffix yet)
|
||||
o Features elk:dump and elk:load-object are provided by the
|
||||
interpreter if dump and dynamic loading are supported
|
||||
|
||||
o Implemented Register_Onfork() and Call_Onfork() to provide
|
||||
`fork handlers' (used, for instance, by the UNIX extension)
|
||||
o Added fork handlers to the dynamic loading implementations to
|
||||
create links for the temporary files
|
||||
|
||||
o Added a close function to I/O ports to allow for pipe-based ports
|
||||
o New primitive: char-ready?
|
||||
|
||||
o Added a check to the code that restarts a dumped interpreter
|
||||
to detect that the start address of the stack has been moved
|
||||
with respect to the original invocation (this happens between
|
||||
Sun-4c and Sun-4m architectures, for instance)
|
||||
|
||||
o Modified math.c to implement the distinction between exact and
|
||||
inexact numbers as required by the language definition
|
||||
o New primitives: exact->inexact, inexact->exact
|
||||
o The number prefixes #e and #i are now supported
|
||||
o Floating point numbers are no longer automatically reduced to
|
||||
integers; new conversion function Make_Flonum(double) in
|
||||
addition to Make_Reduced_Flonum(double)
|
||||
o Added new conversion functions to cleanly distinguish between
|
||||
C ints and longs: Get_Long(Object), Make_Long(long),
|
||||
Make_Unsigned_Long(unsigned long), and functions to convert
|
||||
bignums from/to C longs
|
||||
o New conversion functions for exact integers:
|
||||
Get_Exact_Integer(Object) and Get_Exact_Long(Object)
|
||||
|
||||
o Removed the unique `void' type; #v is now converted into the empty
|
||||
symbol by the reader; void? remains for compatibility
|
||||
|
||||
o Implemented reader table for #-syntax
|
||||
o New function Define_Reader() to allow extensions to register
|
||||
their own read syntaxes (used by the new bitstring extension)
|
||||
o Exported parts of the reader to simplify writing new reader
|
||||
functions in extensions
|
||||
|
||||
o New functions/macros to convert Scheme strings and/or symbols
|
||||
into C strings (to be used by extension writers): Get_String,
|
||||
Get_Strsym, Get_String_Stack, Get_Strsym_Stack; see src/cstring.c
|
||||
o Now obsolete: Declare_C_Strings, Dispose_C_Strings, Make_C_String
|
||||
|
||||
o Bug fixes:
|
||||
o fixed a few bugs in the implementation of continuations and
|
||||
tail call optimization and in the generational, incremental
|
||||
garbage collector
|
||||
o there was a bug in the interaction between the garbage
|
||||
collector and `dump'
|
||||
o identified additional critical sections to be protected
|
||||
from delivery of signals
|
||||
o initscheme.scm wasn't resolved against the load-path
|
||||
o quasiquotation now also works for vectors (kudos to
|
||||
Tor Lillqvist for suggesting a simple fix)
|
||||
o a bug in src/load-ld.c could cause the first static variable
|
||||
in a dynamically loaded .o file to not be zeroed
|
||||
|
||||
Extensions:
|
||||
|
||||
o New UNIX extension; see doc/unix for the reference manual and
|
||||
examples/unix for a few demonstration programs
|
||||
|
||||
o New record extension; see doc/record for the reference manual.
|
||||
The `struct' extension is now obsolete
|
||||
|
||||
o New arbitrary-length bitstring extension; see doc/bitstring
|
||||
for the manual
|
||||
|
||||
|
||||
Changes from release 2.0 to release 2.1
|
||||
|
||||
General:
|
||||
|
||||
o New configuration files for the 386/486-PC running 386BSD and
|
||||
DOS/DJGPP, for Suns running Solaris 2.1 (SunOS 5.1, and for
|
||||
the Convex C230 running ConvexOS.
|
||||
o Reorganized the config files and the site file to allow for
|
||||
configuration of the generational, incremental garbage collector
|
||||
o Introduced several new symbols in the config files to simplify
|
||||
installation on several systems
|
||||
o Added new targets to all Makefiles to allow `cross-localization'
|
||||
of the source tree (see comments in DOS section in MACHINES)
|
||||
|
||||
Interpreter kernel:
|
||||
|
||||
o Added a generational, incremental garbage collector
|
||||
o New primitives: garbage-collect-status, collect-incremental
|
||||
o Reorganized the source files to accommodate the new garbage
|
||||
collector and to separate garbage collector specific code
|
||||
from code common to both garbage collectors
|
||||
|
||||
o Empty list no longer counts as false; added primitive
|
||||
`empty-list-is-false-for-backward-compatibility'
|
||||
|
||||
o Changed delimiter character in load-path argument of -p option
|
||||
from comma to colon
|
||||
o Initialize load-path from ELK_LOADPATH environment variable
|
||||
(if present)
|
||||
|
||||
o Added argument to -v option to control which messages to print
|
||||
(linker command, init/finit functions)
|
||||
o It's no longer considered an error if an object file contains
|
||||
no initializers
|
||||
|
||||
o Completely rewritten implementations of `dump' for ELF (SysVR4,
|
||||
Solaris 2.x), ECOFF (Ultrix, Irix), and HP9000 a.out formats;
|
||||
the HP version now correctly handles shared libraries
|
||||
o Added support for dynamic loading under SysVR4 and Solaris 2.x
|
||||
(see comments in MACHINES)
|
||||
o Added code to read symbol table of object files on the Convex
|
||||
|
||||
o Bug fixes:
|
||||
o dynamic-wind was completely broken; fixed it
|
||||
o fixed a bug in the code that checks for the stack growing
|
||||
direction (caused dumped images to crash on startup)
|
||||
o fixed a bug in the equal? predicate (could enter an
|
||||
infinite loop when applied to environments)
|
||||
o Fixed a number of portability problems, among them:
|
||||
o added O_BINARY flag to open() calls and "b" mode to fopen()
|
||||
calls where necessary
|
||||
o added support for the many different ways to purge a file
|
||||
pointer and tty file descriptor (src/read.c, src/print.c)
|
||||
|
||||
o Integrated the functionality of the `libutil.a' library from
|
||||
older releases into the interpreter kernel (conversion of
|
||||
symbols and lists of symbols to bit masks and vice versa;
|
||||
routines to manage a pool of weak pointers to objects, used
|
||||
mainly by the Elk X extensions
|
||||
|
||||
Extensions:
|
||||
|
||||
o Removed libutil.a (lib/util/*); moved the code into the
|
||||
interpreter kernel (src/terminate.c; src/symbol.c); removed
|
||||
libutil.a from the default load-libraries
|
||||
o Renamed lib/misc/c++.[co] to lib/misc/newhandler.[co] (c++.c isn't
|
||||
a valid filename under DOS)
|
||||
o Added finit function to lib/misc/monitor.c to switch off
|
||||
monitoring and write mon.out on exit
|
||||
|
||||
Elk/X:
|
||||
|
||||
o The X extensions are no longer pre-linked against the required
|
||||
X libraries (by means of ld -r); resolving against system libs
|
||||
now always takes place at load time
|
||||
o make-gcontext and copy-gcontext now can be called with a drawable
|
||||
(i.e. pixmap or window)
|
||||
o New primitives: alloc-color alloc-named-color
|
||||
o Removed window-unique-id primitive
|
||||
o Fixed a few bugs in the Xt extension (editres now works with
|
||||
Scheme programs); removed an artificial limitation
|
||||
o Defined a GC visit function for widgets that visits each widget's
|
||||
parents and the children of composite widgets
|
||||
o Added support for Motif gadgets
|
||||
|
||||
|
||||
Changes from release 1.5 to release 2.0
|
||||
|
||||
General:
|
||||
|
||||
o The build and install process has been improved significantly (see
|
||||
file INSTALL)
|
||||
o Added a new directory "config" that holds the system-specific
|
||||
configuration files and the site-file
|
||||
o Added a build shell script and a unified Makefile to all
|
||||
directories; "build" creates the ``real'' Makefiles containing
|
||||
system- and site-specific details during the make process
|
||||
o Added install, lint, clean, and distclean targets to all
|
||||
Makefiles
|
||||
o Placed files that are needed during runtime (dynamically loadable
|
||||
object files, Scheme files, the interpreter itself) into separate
|
||||
directories; added "make install" to put files there
|
||||
|
||||
o Simplified porting Elk to new systems (assembly language support
|
||||
and a stack-extending version of "alloca" are no longer required)
|
||||
o Tested on several new systems (IBM RS/6000, HP9000/700, SGI,
|
||||
Sony; see the file MACHINES)
|
||||
|
||||
o Placed new files CONTRIBUTORS, MIGRATE, and TODO into the toplevel
|
||||
directory of the distribution
|
||||
o Added a directory "util" that contains tools to simplify porting
|
||||
Elk to new environments and other utilities that are useful on
|
||||
some systems
|
||||
o Added a directory "scripts" that holds the shell scripts used
|
||||
to link instances of the interpreter and extensions.
|
||||
o Removed "stk" directory with test programs (no longer needed)
|
||||
|
||||
o Added ANSI C prototypes and C++ "extern C" to all include files
|
||||
|
||||
Interpreter kernel:
|
||||
|
||||
o Placed include files into a separate directory (include)
|
||||
o Reorganized the source files (separate source files for different
|
||||
a.out formats and different dynamic loading mechanisms)
|
||||
o Changed the way new Scheme objects are allocated to support the
|
||||
generational garbage collector (not yet present in Elk)
|
||||
o Rewrote the code implementing continuations to support full
|
||||
call/cc on all machines
|
||||
o Fixed tail recursion optimization
|
||||
o Added support for POSIX signals (as alternative to BSD reliable
|
||||
signals)
|
||||
o Removed several artificial limitations (such as max. number of
|
||||
before-GC and after-GC functions and statically GC-linked objects)
|
||||
o Removed code that depended on max. number of open files per process
|
||||
o Added bi-directional ports (input-output-ports); new primitive:
|
||||
open-input-output-port
|
||||
o New primitive: port-line-number
|
||||
o Reader now prints line number on syntax error
|
||||
o Max. length of a pathname is now determined correctly (using the
|
||||
POSIX incantations if applicable)
|
||||
o Added code to support dynamic loading under HP-UX (src/load-shl.c)
|
||||
o Added code to call extension finalization functions and C++
|
||||
destructors on termination
|
||||
o Fixed and improved the code to call extension initialization
|
||||
functions and C++ constructors on startup or when loading
|
||||
extensions
|
||||
o Improved the mechanism to suppress initialization of statically
|
||||
linked extensions on startup ("dont_init_if_name" in config/site)
|
||||
o Can use ANSI "atexit" as alternative to redefining "exit"
|
||||
o Added option -p to specify load path
|
||||
o Scheme file "initscheme" is now loaded before the toplevel is
|
||||
loaded
|
||||
o Changed "rand" to use rand() if random() isn't there
|
||||
o re-entrant-continuations? primitive is no longer needed (returns
|
||||
always #t now)
|
||||
o Added a general mechanism to register termination functions for
|
||||
individual objects (e.g. to close files on GC); see src/terminate.c
|
||||
o linkscheme shell script improved; added code to support the
|
||||
stupid AIX linker
|
||||
o Fixed numerous things that caused lint or "gcc -ansi" to complain
|
||||
o Changed the dynamic loading, "dump", and a.out symbol table reading
|
||||
code in numerous places to make it work on new systems and to make
|
||||
it more readable and maintainable
|
||||
|
||||
Extensions:
|
||||
|
||||
o Combined lib/util/symbol.o and lib/util/objects.o into new library
|
||||
libutil.a; put this library into the default "load-libraries"
|
||||
o Moved lib/util/string.c and lib/util/string.h into the interpreter
|
||||
o Moved files from lib directory into new subdirectory "misc"
|
||||
o Added POSIX sysconf stuff to unix.c to determine max. number of
|
||||
open files per process
|
||||
|
||||
Elk/X:
|
||||
|
||||
o Made the code mostly "lint clean" and "gcc -ansi clean"
|
||||
o Fixed bogus variable definitions in xlib.h and xt.h
|
||||
o Xlib: added support for client-message event
|
||||
o Xt: added code to avoid a bug in Motif 1.1.4
|
||||
o Xt: added optional "mask" argument to context-add-input
|
||||
o Removed site-dependent information from scm/xwidgets (file is
|
||||
now created from scm/xwidgets.src during the build process)
|
||||
o Renamed widget .d files that were longer than 14 characters;
|
||||
added ALIASES file for each widget set containing mappings from
|
||||
real widget names to short names
|
||||
|
||||
Documentation:
|
||||
|
||||
o Added sub-directory "paper" containing a draft version of a
|
||||
paper about Elk
|
||||
|
||||
User-contributed extensions:
|
||||
|
||||
o A foreign function interface, an Elk Shell, and a vector extension
|
||||
have been contributed by J. P. Lewis (contrib/zelk).
|
||||
|
||||
|
||||
Changes from release 1.4 to release 1.5
|
||||
|
||||
General:
|
||||
o Added a "contrib" directory for user-contributed extensions
|
||||
that I have not fully tested and/or integrated into Elk
|
||||
o Renamed ORIGIN to COPYRIGHT
|
||||
|
||||
Interpreter kernel:
|
||||
o Added support for the Amiga, A/UX and System V Release 4
|
||||
(ELF a.out format)
|
||||
o Added special load-library for MIPS (-lc_G0)
|
||||
o Extension-interface: replaced Val() by Var_Set()/Var_Get()
|
||||
o Modified load, autoload, and require so that multiple .o-files
|
||||
can be loaded simultaneously
|
||||
o Added -1+ as a synonym for 1-
|
||||
o Bug fixes:
|
||||
o fixed a GC-related bug
|
||||
o fixed a bug that occurred when allocating a very large heap
|
||||
o fixed a bug in case-insensitive string comparison
|
||||
o fixed a bug in macro "when"
|
||||
o changed and clarified semantics of print-depth/print-length
|
||||
o IEEE 1178/R^4RS compatibility:
|
||||
o replaced close-port by close-input-port and close-output-port
|
||||
o added primitives caaaar .. cddddr
|
||||
o added peek-char primitive
|
||||
o added -i option for case-insensitive operation
|
||||
o Removed -bc option
|
||||
o Removed CBREAK-hack in read-char
|
||||
|
||||
Elk/X:
|
||||
o Fixed several GC-related bugs (objects belonging to Xlib/Xt are
|
||||
no longer terminated by garbage collector when unreferenced)
|
||||
o Fixed a bug in the interface to the Grip widget
|
||||
o Modified code to load widgets to make use of new capability to
|
||||
load multiple .o-files
|
||||
|
||||
Documentation:
|
||||
o Interpreter kernel: documented new functions, clarified
|
||||
some sections
|
||||
o Xlib/Xt: documented X-related behavior of garbage collector,
|
||||
pointed out GC-related pitfalls
|
||||
|
||||
|
||||
Changes from release 1.3 to release 1.4
|
||||
|
||||
Interpreter kernel:
|
||||
o Support for the NeXT machines added
|
||||
o New primitive list? provided
|
||||
o Two bugs in the tail recursion code fixed
|
||||
o -v option to trace /bin/ld-calls
|
||||
o man-page written
|
||||
|
||||
Elk/X:
|
||||
o Tested under X11R5
|
||||
o X11R3 and earlier versions are no longer supported
|
||||
o The HP-widget code has been removed from the distribution
|
||||
|
||||
o New Xlib-primitives: install-colormap uninstall-colormap
|
||||
list-installed-colormaps xlib-release-5-or-later?
|
||||
|
||||
o Xt interface now supports actions and accelerator tables
|
||||
o Bug in set-context-fallback-resources! fixed
|
||||
o New Xt-functions: widget-name widget-translate-coordinates
|
||||
application-initialize context-add-action install-accelerators
|
||||
install-all-accelerators xt-release-5-or-later?
|
||||
|
||||
o Support for new widget classes: menubutton panner porthole repeater
|
||||
simplemenu sme smebsb smeline stripchart tree
|
||||
o vpaned renamed to paned
|
||||
|
||||
o Example programs have been moved into a new examples directory
|
||||
with sub-directories for Scheme, Xlib, Xaw, Motif
|
||||
|
||||
o New Xaw example programs that demonstrate the new widget classes,
|
||||
accelerators, actions, etc.
|
||||
|
||||
Other extensions:
|
||||
o Interface to the GNU gdbm-library
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
Numerous users of the Extension Language Kit (too many to mention them
|
||||
all) have contributed ideas, suggestions for improvements, bug reports,
|
||||
source code, useful feedback, as well as other kinds of support to this
|
||||
and earlier releases. Their help has made the present version of Elk
|
||||
Extension Language Kit a genuinely collective effort.
|
||||
|
||||
I'm especially obliged to my former colleague Carsten Bormann, who
|
||||
has significantly influenced the design of Elk since the beginning
|
||||
of the project in 1987. Carsten also wrote most of the bignum code.
|
||||
|
||||
I also would like to thank Claus Bathe of NME Berlin for securing the
|
||||
permission from his management to publish Elk 1.2 (from which the
|
||||
present version has been derived), and Prof. Dr. Sigram Schindler for
|
||||
providing the work environment for my research work at Technische
|
||||
Universitaet Berlin.
|
||||
|
||||
In addition, I would like to thank Nick Betteridge, Stephen Bevan,
|
||||
Alan Bishop, Tim Bradshaw, Paul Breslaw, Dennis Brueni, Thomas Dickey,
|
||||
Ted Dunning, Gerhard Eckel, Walter Eder, Joe Esch, Mikel Evins,
|
||||
Ed Ferguson, Ram Firestone, Robert Forsman, Ken Fox, Thomas Gellekum,
|
||||
Robert Glickstein, George Hartzell, Robert Henry, Don Hopkins,
|
||||
Xiaoli Huang, Bill Janssen, Rob Jellinghaus, Robert Joop, Kazuhiko Kato,
|
||||
Doo-Hwan Kim, Bengt Kleberg, Richard Kreutzer, Richard Kuhns, Dinh Le,
|
||||
John Lewis, Tor Lillqvist, Christopher Maeda, Steven Majewski,
|
||||
Craig McPheeters, Zdzislaw Meglicki, Perry Metzger, Lars Nyman,
|
||||
Richard O'Keefe, Bob Pendelton, Flip Phillips, Norbert Preining,
|
||||
Dave Richards, Robert Sanders, Supreet Singh, Martin Stut, Brian Taylor,
|
||||
Scott Watson, and Mike Wray. I apologize for any omissions from
|
||||
this--necessarily incomplete--list.
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
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>
|
||||
|
|
@ -0,0 +1,168 @@
|
|||
Compilation and Installation Instructions for Elk
|
||||
-------------------------------------------------
|
||||
|
||||
|
||||
1. Change to the directory "config" and choose the configuration file for
|
||||
your type of system.
|
||||
|
||||
The names of the config files have three parts separated by dashes:
|
||||
machine-os-compiler. "machine" identifies the type of hardware, "os" is
|
||||
the operating system name and version, and "compiler" identifies the C
|
||||
compiler to be used to compile Elk.
|
||||
|
||||
When you have selected a config file, make a symbolic link "system" to
|
||||
it (or a hard link, or copy it), for example:
|
||||
|
||||
ln -s alpha-osf1-cc system
|
||||
|
||||
If you can't find a suitable config file for your system, create a new
|
||||
one by copying one of the existing files (preferably one that resembles
|
||||
your platform). Edit the new file and change the definitions that need
|
||||
to be changed for your type of platform.
|
||||
|
||||
Alternatively, you may find a suitable config file in config/untested.
|
||||
These config files have been provided by users of earlier Elk releases,
|
||||
or they are for platforms to which I don't have access any longer. In
|
||||
any case, they may or may not work, as the current Elk release has not
|
||||
been tested with any of these.
|
||||
|
||||
|
||||
2. Edit the file config/site and have a look at the definitions. Change
|
||||
"install_dir" to point to the directory under which the Elk runtime
|
||||
system will be installed on your system. Also, remove -L/usr/X11/lib
|
||||
from all definitions if the X libraries reside in a standard location.
|
||||
|
||||
config/sites holds a few locally used site files for different
|
||||
operating systems; you may find these useful (in particular the libx*
|
||||
definitions).
|
||||
|
||||
|
||||
3. Change back to the directory where you unpacked the distribution and
|
||||
have a look at the SUBDIRS definition in the Makefile. Delete any
|
||||
components that you don't want to install (for example, delete
|
||||
lib/xm and lib/xm/xt if you don't have Motif and/or don't want the
|
||||
Motif extension).
|
||||
|
||||
|
||||
4. You may want to look up your type of platform in the file MACHINES for
|
||||
further information and potential pitfalls with specific compilers and
|
||||
operating system versions.
|
||||
|
||||
|
||||
5. Run "make install" (or just "make" and then "make install").
|
||||
|
||||
|
||||
6. Invoke the Scheme interpreter ($install_dir/scheme) and test it by
|
||||
typing a few Scheme expressions or by loading some of the example
|
||||
programs from the "examples" directory tree.
|
||||
|
||||
If your platform supports dynamic loading of object files, test it by
|
||||
loading, for example, one of the programs from examples/unix. You
|
||||
may also want to run some of the X11 demonstration programs to check
|
||||
whether the X11 extensions work.
|
||||
|
||||
If freezing of a running program into a new executable ("dump") is
|
||||
supported, test it by typing "(dump 'newelk)", then quit the interpreter,
|
||||
and finally invoke newelk and see if it works.
|
||||
|
||||
|
||||
7. If your system does not support dynamic loading of object files, you
|
||||
may want to create an instance of the interpreter that is linked
|
||||
with a number of extensions statically. For example, to create an
|
||||
interpreter with the UNIX extension, you can change to $install_dir and
|
||||
type:
|
||||
|
||||
lib/linkscheme unixelk runtime/obj/unix.o runtime/obj/record.o
|
||||
|
||||
(see below for more information). Invoke the newly created unixelk
|
||||
interpreter and test it with the examples programs in examples/unix.
|
||||
|
||||
|
||||
|
||||
Roadmap for $install_dir (files that are created by running "make install")
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
|
||||
+-- bin ---- scheme The Scheme interpreter proper
|
||||
|
|
||||
|
|
||||
+-- include -- The include files to be included by Elk extensions and by
|
||||
| applications using Elk (actually, only "scheme.h" is used;
|
||||
| scheme.h then includes the right files). config.h is created
|
||||
| automatically; do not edit it. The include files may or may
|
||||
| not use function prototypes, depending on the config file you
|
||||
| used for building Elk.
|
||||
|
|
||||
|
|
||||
+-- runtime --+-- scm -- The Scheme files used by Elk during runtime, such
|
||||
| | as the interactive toplevel and the debugger
|
||||
| |
|
||||
| `-- obj -- The dynamically loadable objects used at runtime.
|
||||
| The directory may be empty if your platform does
|
||||
| not support dynamic loading. There are sub-
|
||||
| directories for the Athena widgets and Motif
|
||||
| extensions holding one object per widget class
|
||||
|
|
||||
|
|
||||
+-- lib --+-- standalone.o The Scheme interpreter as an object file. This
|
||||
| file can be linked with extensions or with your
|
||||
| application to produce a runnable executable.
|
||||
| On startup the executable automatically invokes
|
||||
| extension initializers (beginning with elk_init_)
|
||||
| and C++ static constructors by scanning its own
|
||||
| symbol table (ditto for finalizers/destructors).
|
||||
| You may want to use the script linkscheme to link
|
||||
| with standalone.o, as additional libraries may
|
||||
| be required.
|
||||
|
|
||||
+-- module.o Like standalone.o, except that it doesn't have
|
||||
| a main() function. main() must be provided by
|
||||
| your application and must call Elk_Init():
|
||||
|
|
||||
| Elk_Init(int argv, char **argv, int initflag,
|
||||
| char *file);
|
||||
|
|
||||
| argc/argv are the arguments of your main(). You
|
||||
| may change them, but argv[0] MUST be the original
|
||||
| argv[0] (Elk_Init takes its address to determine
|
||||
| the stackbase. If initflag is non-zero, Elk_Init
|
||||
| calls the extension initializers as described
|
||||
| above. file is zero or the name of a Scheme file
|
||||
| to be loaded by Elk_Init.
|
||||
|
|
||||
+-- linkscheme Shell script to link standalone.o with a number
|
||||
| of object files (extensions or your application)
|
||||
| and libraries. The first argument is the name of
|
||||
| the output file; all other arguments are passed
|
||||
| to the linker.
|
||||
|
|
||||
+-- makedl Shell script to create a dynamically loadable
|
||||
| object from one or more .o files. The first
|
||||
| argument is the output file name.
|
||||
|
|
||||
`-- ldflags Prints the flags to be used when linking files
|
||||
with Elk (with standalone.o or module.o). You
|
||||
may use this in your Makefiles.
|
||||
|
||||
For more details, read the C/C++ Programmer's Manual (doc/cprog).
|
||||
|
||||
|
||||
|
||||
How the Makefiles in the Elk distribution are organized
|
||||
-------------------------------------------------------
|
||||
|
||||
Each source directory contains a small Makefile with a few standard rules;
|
||||
all these Makefiles are basically identical. The actual rules are in
|
||||
Makefile.local in each directory; Makefile.local is automatically created
|
||||
on the fly by a shell script `build' in each directory whenever
|
||||
Makefile.local is out-of-date with respect to config/system or config/site.
|
||||
|
||||
The `build' scripts "localize" the information in each Makefile.local by
|
||||
performing variable substitutions based on the definitions in config/system
|
||||
and config/site. `build' also localizes a few other files that contain
|
||||
site-specific information, such as include/config.h and scm/siteinfo.scm.
|
||||
|
||||
`make clean' causes everything to be rebuilt the next time `make' is invoked.
|
||||
`make distclean' also deletes the Makefile.local instances, causing each
|
||||
Makefile.local and all other files with site-specific contents to be rebuilt
|
||||
as well.
|
||||
|
|
@ -0,0 +1,245 @@
|
|||
Sun-3 and Sun-4, SunOS 4.1
|
||||
|
||||
o Tested with /bin/cc, various gcc versions, and with the Sun
|
||||
SPARCompiler 2.0.1 (acc).
|
||||
|
||||
o For compiling Elk with gcc and the generational garbage collector,
|
||||
see the remark in the file BUGS.
|
||||
|
||||
o Dumped executables created on a Sun-4m (SPARCstation 10 or
|
||||
SPARCstation 600) do not run on other Sun-4 architectures and
|
||||
vice versa.
|
||||
|
||||
|
||||
Sun-4, SunOS 5.2 (Solaris 2.2)
|
||||
|
||||
o Tested with various gcc versions and with ANSI SPARCompiler 2.0.1.
|
||||
If you have gcc, however, you should use it rather than the Sun
|
||||
compiler. gcc produces much faster code.
|
||||
|
||||
o The Motif extension has been tested with both vanilla OSF Motif 1.2
|
||||
as well as Sun's version of Motif (which usually lives in /usr/dt).
|
||||
The X11 extensions have been tested with OpenWindows in addition
|
||||
to X Consortium X11R6.
|
||||
|
||||
o Certain versions of gcc complain about syntax errors in code that
|
||||
uses sigset_t (from <signal.h>), although this should not happen
|
||||
unless -ansi is given. A possible fix is to add add -D__STDC__=0
|
||||
to the cflags in the config file.
|
||||
|
||||
o "dump" works, but it doesn't know anything about shared objects
|
||||
(the dl library doesn't support a way to get hold of the text and
|
||||
data segments of dlopen()ed shared objects). Thus it's a bad idea
|
||||
to invoke "dump" if any object files have been loaded into the
|
||||
interpreter.
|
||||
|
||||
o Dynamic loading is based on the dlopen() function of the "dl"
|
||||
library. Here is a short overview of the implementation of
|
||||
dlopen-based dynamic loading:
|
||||
|
||||
To load an object file, the linker is called by the interpreter
|
||||
to produce a shared object from the .o file. This shared object
|
||||
is then loaded by means of dlopen().
|
||||
|
||||
To allow object files to reference symbols defined by object
|
||||
files loaded earlier (the standard dynamic loading semantics
|
||||
of Elk), the interpreter keeps tmp the output files (shared
|
||||
objects) of all previous linker invocations in /tmp and uses
|
||||
these as input to a each linker invocation. As a result, one
|
||||
new temp file is created each time an object file is loaded.
|
||||
|
||||
As the linker combines dynamically loadable object files and
|
||||
(optional) libraries into shared objects, all dynamically loadable
|
||||
files must have been compiled with -fpic or -K PIC (to create
|
||||
position independent code). Also, all involved libraries must
|
||||
either be shared libraries or must contain position independent
|
||||
code as well. For example, if you want to use the Motif extension,
|
||||
your Xm library must have been compiled with -fpic.
|
||||
|
||||
A bug in Solaris 2.1 causes dlopen() to fail if more than
|
||||
8 shared objects are loaded (which in turn causes the "load"
|
||||
primitive of Elk to signal an error). This restriction doesn't
|
||||
exit in newer versions of Solaris 2.
|
||||
|
||||
You can use the -v option of Elk to see the actual linker options
|
||||
when an object file is loaded.
|
||||
|
||||
|
||||
DECstation 5100, Ultrix 4.2
|
||||
|
||||
o Prototypes have been disabled in the config file, as cc has trouble
|
||||
with certain forms of prototype declarations (this looks like a bug).
|
||||
|
||||
o The LDFLAGS "-Wl,-D,800000" are required for dynamic loading to work.
|
||||
|
||||
o You have to create "-G 0" versions of all X libraries to be able to
|
||||
dynamically load the X11 extensions of Elk (the MIPS linker requires
|
||||
this).
|
||||
|
||||
|
||||
DEC/Alpha, OSF/1
|
||||
|
||||
o This platform uses ELF and the dlopen()-style linker interface.
|
||||
See the section on Solaris 2 above for remarks on dynamic loading.
|
||||
|
||||
|
||||
SGI IRIS Indy, Irix 5.3
|
||||
|
||||
o See SunOS 5.x above for information about dynamic loading and dump.
|
||||
|
||||
o examples/unix/calc.scm doesn't work, because /usr/bin/dc uses
|
||||
buffered output if stdout is not a terminal.
|
||||
|
||||
o For Irix 5.2, -lSM and -lICE must be removed from the libx*
|
||||
definitions in config/site (the X11 version seems to be X11R5).
|
||||
|
||||
|
||||
HP 9000/700, HP-UX 9.0 and HP-UX 10.0
|
||||
|
||||
o Dynamic loading is based on the shl_load() interface to the dynamic
|
||||
linker of HP-UX. If you are writing your own extensions, compile
|
||||
them with the option +z and use $install_dir/lib/makedl to link them.
|
||||
The load-libraries are simply shl_loaded before the files passed to
|
||||
the "load" primitives. Each load-library is only loaded once.
|
||||
|
||||
o wait3 has been set to `no' in the system file, because this function
|
||||
has a non-standard third argument in HP-UX 9.0.
|
||||
|
||||
o The "dump" implementation for HP-UX which used to work well under
|
||||
HP-UX 8.x doesn't really work any longer, because HP in their
|
||||
infinite wisdom have removed the MAP_REPLACE flag for mmap() in
|
||||
HP-UX 9.x.
|
||||
|
||||
o HP-UX 10 does have a stack-extending alloca() (in contrast to
|
||||
HP-UX 9.0), but it has a serious bug and therefore is not used
|
||||
by Elk (the function overwrites its argument if it is a register
|
||||
variable).
|
||||
|
||||
o The incremental garbage collector doesn't work (see the file BUGS).
|
||||
|
||||
o The Athena widgets are not included with HP-UX 9.0; delete "lib/xaw"
|
||||
from the Makefile.
|
||||
|
||||
o You may want to use the HP-UX site file from config/sites.
|
||||
|
||||
|
||||
IBM RS/6000, AIX 3.2
|
||||
|
||||
o Neither "dump" nor dynamic loading work. It is not clear whether
|
||||
the dynamic loading semantics of Elk can be implemented with the
|
||||
dynamic linker interface of AIX at all.
|
||||
|
||||
o To support linking the interpreter with extensions statically,
|
||||
you *have* to use the $install_dir/lib/linkscheme shell script;
|
||||
it contains special code to build an `export list' to prevent
|
||||
the AIX linker from `garbage collecting' the extensions.
|
||||
|
||||
o -O has been omitted from the CFLAGS, as the optimizer seems to
|
||||
have bugs.
|
||||
|
||||
|
||||
PowerPC, AIX 4.1 (xlc and gcc)
|
||||
|
||||
o No dynamic loading, no dump (see AIX 3.2 above).
|
||||
|
||||
o The incremental garbage collector doesn't work (see the file BUGS).
|
||||
|
||||
o If you are using gcc, and if your gcc uses the AIX linker, the
|
||||
linker prints tons of bogus messages about duplicate symbols; they
|
||||
can be ignored safely. You may also have to change the `*-aix4*-cc'
|
||||
in the shell script `linkscheme' into `*-aix4*-gcc' to enable the
|
||||
hack involving the linker export list.
|
||||
|
||||
|
||||
NeXT workstation, MACH/NeXT-OS 3.3
|
||||
|
||||
o Dynamic loading is implemented by means of the rld_load() library
|
||||
function. Due to what looks like a bug in rld_load(), it only
|
||||
works sometimes. In particular, it is not possible to load the
|
||||
UNIX extension.
|
||||
|
||||
The source of the problem seems to be that sometimes the string table
|
||||
of the newly loaded object file gets truncated when being mapped into
|
||||
memory by rld_load(). You can observe the problem by inserting a
|
||||
statement like "write(1, strtab, sym_cmd->strsize);" right after
|
||||
the line beginning with "strtab =" in src/stab-macho.c.
|
||||
|
||||
o Linking extensions statically with the interpreter doesn't work
|
||||
either; there are no symbols in the symbol table when it is read
|
||||
on startup of the executable. This seems to be related to the
|
||||
bug described above.
|
||||
|
||||
These two problems render Elk virtually unusable on the NeXT.
|
||||
|
||||
|
||||
386/486-PC, Linux 1.2.8
|
||||
|
||||
o Dynamic loading does not work any longer, because the linker has
|
||||
changed. It doesn't seem to support incremental loading any more
|
||||
at all. dlopen() seems to exist now, but how does one create
|
||||
a shared object from an ordinary .o file? Someone who knows
|
||||
Linux well may want to look into this...
|
||||
|
||||
o `dump' doesn't work either. It did work in earlier Linux versions.
|
||||
|
||||
o Because of a bug in `make', all Makefiles had to be changed to
|
||||
explicitly run the shell for invoking the `build' shell scripts.
|
||||
|
||||
o examples/unix/calc.scm doesn't work, because /usr/bin/dc uses
|
||||
buffered output if stdout is not a terminal.
|
||||
|
||||
|
||||
386/486-PC, 32-bit gcc (DJGPP) and `go32' DOS extender
|
||||
|
||||
o Elk 3.0 has not been tested on this platform.
|
||||
|
||||
o As the typical DOS machine doesn't have a fully functional UNIX
|
||||
shell, sed, etc., you have to cross-localize the source tree on a
|
||||
UNIX machine (i.e. create all the localized Makefiles, create
|
||||
include/config.h, etc.). To do so, just copy the DOS config file
|
||||
to config/system (or make a link), edit config/site, and call
|
||||
|
||||
make localized.zip
|
||||
|
||||
This cleans the source tree, performs the necessary localizations,
|
||||
and packages a minimal distribution into a zip file. You can
|
||||
then FTP the zip file to the DOS machine and run `make' there.
|
||||
The zip file basically contains the interpreter sources, the Scheme
|
||||
files needed at runtime, the extensions in lib/misc, and the
|
||||
localized Makefiles and include files.
|
||||
|
||||
o There are a few trouble spots you should watch out for. Some versions
|
||||
of `make' under DOS (Ndmake?) can't handle the macro $(MAKE) that
|
||||
is defined at the beginning of all Makefiles. If this is the case
|
||||
on your system, forget the Makefiles and run "make -f Makefile.local"
|
||||
in each directory. You may have to replace $(O) in src/Makefile.local
|
||||
by *.o to avoid command lines that are too long for the DOS shell.
|
||||
You have to delete the line beginning with "../../scripts/makedl"
|
||||
in misc/Makefile.local.
|
||||
|
||||
|
||||
X Window System
|
||||
|
||||
o You need either X11R4, X11R5, X11R6, or (on Suns) OpenWindows 3.x to
|
||||
use the Elk/X11 extensions. The current release of Elk has been
|
||||
tested with X11R6 and OpenWindows.
|
||||
|
||||
If you are still running X11R4, edit the file lib/xaw/build and
|
||||
remove the lines referring to the Athena widgets that are new in
|
||||
X11R5 (panner, porthole, repeater, and tree).
|
||||
|
||||
If you are running X11R5 or older, you may want to edit lib/xaw/build
|
||||
and add lines for the `clock' widget. Also, remove -lSM and -lICE
|
||||
from the definitions in config/site. examples/xaw/porthole.scm
|
||||
and examples/xaw/viewport.scm don't work with X11R6, as they are
|
||||
using the clock widget which doesn't exist any longer.
|
||||
|
||||
|
||||
Motif Widgets
|
||||
|
||||
o You need at least Motif 1.1 to use the Elk/Motif extension.
|
||||
The current release of Elk has been tested with OSF/Motif 1.2
|
||||
and, under Solaris 2.4, with Sun Motif (/usr/dt).
|
||||
|
||||
Make sure that X11 has been compiled with the symbol MotifBC set
|
||||
to YES in site.def.
|
||||
|
|
@ -0,0 +1,209 @@
|
|||
This file lists changes in the interpreter kernel that affect the C/C++
|
||||
interface to applications using Elk and to Elk extensions, and (in
|
||||
rare cases) the Scheme level interface.
|
||||
|
||||
Changes in release 3.0:
|
||||
|
||||
o To avoid name conflicts, the names of extension initialization
|
||||
(finalization) functions now begin with elk_init_ (elk_finit_).
|
||||
You will have to edit your source and change the function names
|
||||
accordingly.
|
||||
|
||||
o The Scheme object representation ("Object") has been changed from
|
||||
an unsigned long to a struct. Although the changes are backwards
|
||||
compatible with the Elk 2.2 interface and should, in general, not
|
||||
affect your C/C++ code, you should be aware of a few potential
|
||||
trouble spots:
|
||||
|
||||
o Code can no longer assume sizeof(Object) == sizeof(int).
|
||||
Thus, all arguments and return values of type Object must
|
||||
be declared properly.
|
||||
|
||||
o You can no longer cast an `int' into an Object or vice versa.
|
||||
|
||||
o You cannot compare Objects directly; use the EQ macro.
|
||||
|
||||
o POINTER_CONSTANT_HIGH_BITS is gone (but you weren't supposed
|
||||
to use this anyway...)
|
||||
|
||||
o Initializing a local (auto) Object variable in the declaration
|
||||
doesn't work any longer if you are using a K&R C compiler.
|
||||
|
||||
o You can no longer enforce allocation of a specific type slot
|
||||
by Define_Type(). The first argument to Define_Type() now _must_
|
||||
be zero.
|
||||
|
||||
o The constant MAX_TYPE has become meaningless and will be removed
|
||||
in the future. Also, SETFIXNUM and SETTYPE do not exist any
|
||||
longer (SET can be used instead); SETPOINTER is obsolete.
|
||||
|
||||
o There are a few new interface functions that your code may benefit
|
||||
from (such as Set_App_Name); see CHANGES and the new C/C++
|
||||
Programmer's Manual (doc/cprog).
|
||||
|
||||
o A few `P_*' functions have been renamed in the interpreter for
|
||||
consistency. See include/compat.h.
|
||||
|
||||
o In Elk 2.2, the primitives c[ad]*r and cxr just returned ()
|
||||
if the list was too short. Proper error checking has been
|
||||
added. If your Scheme code suddenly produces errors in calls
|
||||
to c[ad]*r, check the arguments.
|
||||
|
||||
o All the names of converters for callbacks in lib/xaw/*.d and
|
||||
lib/xm/*.d now have a prefix `callback:'. This was required
|
||||
to resolve name conflicts with the converters for ordinary
|
||||
resources. If you are using custom widgets or have added your
|
||||
own converters to existing widgets, you will have to add the
|
||||
prefix.
|
||||
|
||||
|
||||
Changes in release 2.2:
|
||||
|
||||
o All Scheme files in the distribution now end with the suffix .scm;
|
||||
`require' now appends .scm to the feature name if no file name has
|
||||
been specified. You should rename your Scheme files accordingly
|
||||
(if you haven't done yet anyway).
|
||||
|
||||
o Declarations that are private to the interpreter (and are not
|
||||
supposed to be used by extensions) have been moved from
|
||||
include/extern.h into include/intern.h. You should make sure
|
||||
that extensions only use functions and variables defined in
|
||||
the new include/extern.h.
|
||||
|
||||
o If you have an extension that invokes fork() and that may execute
|
||||
Scheme primitives in the child process, make sure that the new
|
||||
function `Call_Onfork()' is invoked in the child process to call
|
||||
the `fork handlers' which may have been registered by the
|
||||
interpreter or by other extensions.
|
||||
|
||||
o The interpreter kernel now exports functions to convert C longs
|
||||
into Scheme numbers and vice versa. See CHANGES for the list of
|
||||
new functions.
|
||||
|
||||
o The new function Define_Reader() may be used by extensions to
|
||||
define their own `#' read syntaxes. See lib/bitstring.c for an
|
||||
example.
|
||||
|
||||
o The macros Make_C_String, Declare_C_String, and Dispose_C_String
|
||||
are now obsolete (but are retained for compatibility for a
|
||||
limited time). You should use the new, improved functions/macros
|
||||
mentioned in CHANGES and in src/cstring.c.
|
||||
|
||||
o Get_Integer() and the new Get_Long() can be called with inexact
|
||||
integers (such as the result of truncate). If you are writing
|
||||
a Scheme primitive that requires its argument(s) to be *exact*
|
||||
integers, use Get_Exact_Integer() or Get_Exact_Long().
|
||||
|
||||
o Elk 2.2 now correctly supports inexact integers. This may cause
|
||||
Scheme code such as
|
||||
|
||||
(vector-ref '#(a b c) (truncate 1.5))
|
||||
|
||||
which used to work in earlier versions of Elk to fail, as
|
||||
truncate returns an inexact integer in this example. One simple
|
||||
way to fix this is to use inexact->exact to convert the inexact
|
||||
integer into an exact one.
|
||||
|
||||
o As extensions (such as the new UNIX extension) are now allowed
|
||||
to use signals, it is important that you protect critical code
|
||||
sections by calls to Disable_Interrupts/Enable_Interrupts (in C)
|
||||
or disable-interrupts/enable-interrupts (in Scheme).
|
||||
|
||||
o The representation of Void has changed-- it is no longer a
|
||||
separate, pointer-less type (like Null), but a symbol with
|
||||
an empty name. As a result you now have to GC_Link variables
|
||||
holding Void.
|
||||
|
||||
o The old (undocumented) `struct' extension is obsolete; you
|
||||
should use the new record extension (see doc/record).
|
||||
|
||||
o The primitives `file-status' and `getenv' have been removed.
|
||||
file-status can be approximated by functions from the new UNIX
|
||||
extension like this:
|
||||
|
||||
(require 'unix)
|
||||
|
||||
(define (file-status file)
|
||||
(let ((stat (unix-errval (unix-stat file))))
|
||||
(if (unix-error? stat)
|
||||
'non-existent
|
||||
(stat-type stat))))
|
||||
|
||||
Use unix-getenv from the UNIX extension in place of the old
|
||||
getenv primitive (note, though, that unix-getenv must be called
|
||||
with a string; it doesn't accept a symbol).
|
||||
|
||||
o The `linkscheme' shell script gets installed into a different
|
||||
directory (lib) now and works in a slightly different way.
|
||||
The `linkext' script is now called lib/makedl. `init_objects'
|
||||
is gone; see INSTALL for a new mechanism to link extensions
|
||||
with the interpreter statically.
|
||||
|
||||
|
||||
Changes in release 2.1:
|
||||
|
||||
o The library libutil.a (which was part of the default libraries
|
||||
in earlier versions) has been removed; the code has been
|
||||
integrated into the interpreter kernel.
|
||||
|
||||
If you have pre-linked dynamically loadable extensions against
|
||||
this library or against object files in lib/misc, just remove
|
||||
the relevant commands from your Makefiles.
|
||||
|
||||
o The semantics of the Truep() macro have changed; the empty
|
||||
list no longer counts as false (see comment in CHANGES).
|
||||
|
||||
|
||||
Changes in release 2.0:
|
||||
|
||||
o The Elk include file "scheme.h" now is in a different directory
|
||||
(include), so you have to change the -I option in your Makefiles.
|
||||
|
||||
o <errno.h> is no longer included by "scheme.h", so you have
|
||||
to include it in your extensions if it is required.
|
||||
|
||||
o lib/string.h is included automatically if you include scheme.h.
|
||||
|
||||
o It is no longer necessary to pre-link extensions against
|
||||
lib/util/objects.o or lib/util/symbol.o. The files now are in
|
||||
a library (libutil.a); extensions are linked against this
|
||||
library automatically when they are loaded into Elk.
|
||||
|
||||
o The way new Scheme objects are allocated has changed as a
|
||||
side-effect of adding the necessary hooks for the generational
|
||||
garbage collector (which is not yet present in Elk 2.0).
|
||||
|
||||
The function Get_Bytes has been replaced by the new function
|
||||
Alloc_Object. Alloc_Object already returns a Scheme `Object';
|
||||
there is no need to use SET any longer. The arguments are the
|
||||
object's size in bytes, the type, and a flag indicating whether
|
||||
the object is constant (constant objects may be placed into a
|
||||
read-only portion of the memory in later versions of Elk).
|
||||
|
||||
So you have to replace old code to allocate an object of type
|
||||
T_Foo that looked like this:
|
||||
|
||||
Object o; char *p;
|
||||
|
||||
p = Get_Bytes (sizeof (struct S_Foo));
|
||||
SET(o, T_Foo, (struct S_Foo *)p);
|
||||
|
||||
by this:
|
||||
|
||||
Object o = Alloc_Object (sizeof (struct S_Foo), T_Foo, 0);
|
||||
|
||||
(use 1 instead of 0 if the new object is considered immutable).
|
||||
|
||||
o If you store weak pointers to objects and forward the pointers
|
||||
explicitly in an after-GC function, you are now required to use
|
||||
a set of new macros. See src/terminate.c and lib/util/objects.c
|
||||
for examples.
|
||||
|
||||
o The empty list is no longer regarded as false. To simplify
|
||||
testing, you can evaluate
|
||||
|
||||
(empty-list-is-false-for-backward-compatibility #t)
|
||||
|
||||
to enable the old (no longer standard-conforming) semantics.
|
||||
A call to this function with an argument of #f reverts to
|
||||
the default behavior.
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
# SUBDIRS lists the components of Elk that are compiled and installed by
|
||||
# running "make" and "make install". The subdirectory "src" holds the
|
||||
# interpreter proper; a mininum configuration requires the SUBDIRS include,
|
||||
# scripts, src, and scm.
|
||||
#
|
||||
# Subdirectories if lib/ hold the standard extensions. Delete them or
|
||||
# parts of them from SUBDIRS if you don't want them to be compiled and
|
||||
# installed; delete lib/xm and lib/xm/xt if you don't have Motif on your
|
||||
# system.
|
||||
|
||||
SUBDIRS= include\
|
||||
scripts\
|
||||
src\
|
||||
scm\
|
||||
lib/misc\
|
||||
lib/unix\
|
||||
lib/xlib\
|
||||
lib/xt\
|
||||
lib/xaw\
|
||||
lib/xm\
|
||||
lib/xm/xt
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
SHELL= /bin/sh
|
||||
MAKE= make
|
||||
GTAR= gtar
|
||||
TAR= tar
|
||||
GZIP= gzip
|
||||
ZIP= zip
|
||||
|
||||
default:
|
||||
@for i in $(SUBDIRS) ;\
|
||||
do \
|
||||
echo Making $$i...; \
|
||||
( cd $$i ; $(MAKE) ) || exit $$?; \
|
||||
done
|
||||
|
||||
install:
|
||||
@for i in $(SUBDIRS) ;\
|
||||
do \
|
||||
echo Installing $$i...; \
|
||||
( cd $$i ; $(MAKE) install ) || exit $$?; \
|
||||
done
|
||||
|
||||
localize:
|
||||
@for i in $(SUBDIRS) ;\
|
||||
do \
|
||||
echo Localizing $$i...; \
|
||||
( cd $$i ; $(MAKE) localize ) || exit $$?; \
|
||||
done
|
||||
|
||||
lint:
|
||||
@for i in $(SUBDIRS) ;\
|
||||
do \
|
||||
echo Linting $$i...; \
|
||||
( cd $$i ; $(MAKE) lint ) || exit $$?; \
|
||||
done
|
||||
|
||||
clean:
|
||||
@for i in $(SUBDIRS) ;\
|
||||
do \
|
||||
echo Cleaning $$i...; \
|
||||
( cd $$i ; $(MAKE) clean ) || exit $$?; \
|
||||
done
|
||||
|
||||
distclean:
|
||||
@for i in $(SUBDIRS) ;\
|
||||
do \
|
||||
echo Cleaning $$i...; \
|
||||
( cd $$i ; $(MAKE) distclean ) || exit $$?; \
|
||||
done
|
||||
|
||||
|
||||
# Package up all localized files (Makefile.local, include files, etc.)
|
||||
# and source files into a zip file (to be compiled on a DOS system).
|
||||
# The X11 extensions are not included.
|
||||
|
||||
LOCALF= Makefile config/system config/site include/*.h lib/misc/Makefile*\
|
||||
lib/misc/*.c scm/[a-z]* src/Makefile* `ls -1 src/*.c |grep -v hp9k`
|
||||
|
||||
localized.zip:
|
||||
$(MAKE) distclean
|
||||
$(MAKE) localize
|
||||
$(ZIP) -kr $@ $(LOCALF)
|
||||
|
||||
|
||||
# Make a full distribution
|
||||
|
||||
DISTF= README ROADMAP CHANGES INSTALL MACHINES COPYRIGHT CONTRIBUTORS\
|
||||
PATCHLEVEL TODO BUGS MIGRATE Makefile config doc examples include lib\
|
||||
scm scripts src util
|
||||
|
||||
dist:
|
||||
echo elk-`util/getversion README'` > .rel
|
||||
rm -rf `cat .rel`
|
||||
mkdir `cat .rel`
|
||||
for i in $(DISTF) ;\
|
||||
do \
|
||||
(cd `cat .rel`; ln -s ../$$i) \
|
||||
done
|
||||
if [ -f config/site.dist ]; then \
|
||||
cp config/site config/site.old; \
|
||||
cp config/site.dist config/site; \
|
||||
fi
|
||||
if [ ! -f ExcludeFiles ]; then \
|
||||
$(TAR) -cvf `cat .rel`.tar -h `cat .rel`; \
|
||||
else \
|
||||
$(GTAR) -cvf `cat .rel`.tar -h -X ExcludeFiles `cat .rel`; \
|
||||
fi
|
||||
$(GZIP) -f `cat .rel`.tar
|
||||
rm -rf `cat .rel` .rel
|
||||
if [ -f config/site.old ]; then \
|
||||
mv config/site.old config/site; \
|
||||
fi
|
||||
|
|
@ -0,0 +1 @@
|
|||
3
|
||||
|
|
@ -0,0 +1,193 @@
|
|||
This is release 3.0 of Elk, the Extension Language Kit.
|
||||
|
||||
|
||||
What is Elk?
|
||||
------------
|
||||
|
||||
Elk is an implementation of the Scheme programming language.
|
||||
In contrast to existing, stand-alone Scheme systems Elk has been
|
||||
designed specifically as an embeddable, reusable extension language
|
||||
subsystem for applications written in C or C++.
|
||||
|
||||
Developers using Elk can deliver applications with different components
|
||||
written in different languages, such as an efficient core written in
|
||||
C or C++ and an extensible user interface layer implemented in Scheme.
|
||||
To help building hybrid application architectures, Elk supports a
|
||||
tightly-knit interworking of the C/C++ parts of applications with
|
||||
Scheme code.
|
||||
|
||||
Elk is also useful as a stand-alone Scheme implementation, in particular
|
||||
as a platform for rapid prototyping of X11-based Scheme programs.
|
||||
|
||||
The Elk project was started in 1987 to support ISOTEXT, a multimedia
|
||||
document editor that has been developed at the Technical University of
|
||||
Berlin. The first freely available version, Elk 1.0, was published in
|
||||
USENET in September 1989. Since then, Elk has been successfully used as
|
||||
the extension language framework for numerous applications (commercial
|
||||
products as well as free software projects).
|
||||
|
||||
|
||||
Getting Elk
|
||||
-----------
|
||||
|
||||
You can obtain the Elk 3.0 distribution as well as additional information
|
||||
about Elk in the World Wide Web at
|
||||
|
||||
http://www.informatik.uni-bremen.de/~net/elk
|
||||
|
||||
The distribution is also available for anonymous FTP from a number of
|
||||
servers including these:
|
||||
|
||||
ftp://ftp.x.org/contrib/devel_tools/elk-3.0.tar.gz
|
||||
ftp://ftp.uni-bremen.de/pub/programming/languages/scheme/elk/elk-3.0.tar.gz
|
||||
|
||||
|
||||
A non-trivial example application using Elk as its extension language
|
||||
is available as source and pre-compiled binaries (`unroff' is a troff
|
||||
translator with back-ends for HTML and the -ms and -man macros):
|
||||
|
||||
http://www.informatik.uni-bremen.de/~net/unroff
|
||||
|
||||
|
||||
What is new in Elk 3.0?
|
||||
-----------------------
|
||||
|
||||
The major improvements in Elk 3.0 are a new Scheme object representation
|
||||
and a new, completely rewritten C/C++ Programmer's Manual for Elk.
|
||||
|
||||
The new object representation has been suggested by Craig McPheeters,
|
||||
who also contributed an initial set of patches. Its advantages are:
|
||||
|
||||
o the heap size is no longer limited (except by the amount of
|
||||
virtual memory that can be addressed);
|
||||
o `fixnums' now occupy an entire C int;
|
||||
o the number of Scheme types is no longer limited to 128
|
||||
o the new format improves compile-time checking and eases debugging;
|
||||
o Elk now ports easily to 64-bit platforms such as the DEC/Alpha.
|
||||
|
||||
The new C/C++ Programmer's Manual is a complete specification of the
|
||||
C/C++ interface to Elk; it is intended for authors of extensible,
|
||||
Elk-based applications and for extension writers. Topics range from
|
||||
the general architecture of extensible applications and the use of
|
||||
dynamic loading to advanced techniques such as weak data structures and
|
||||
cooperation with the garbage collector.
|
||||
|
||||
Also new in Elk 3.0 is a POSIX-style regular expression extension.
|
||||
Elk has been ported to a number of new platforms (among them Linux,
|
||||
BSD/OS, AIX 4.1, and HP-UX 10.0). A full list of changes is in the
|
||||
distribution (see the files CHANGES and MIGRATE).
|
||||
|
||||
|
||||
Elk features
|
||||
------------
|
||||
|
||||
o Full incremental, dynamic loading
|
||||
|
||||
This facility enables Scheme code to load compiled Scheme extensions
|
||||
into the running interpreter (or into the application) on demand.
|
||||
Complex Elk-based applications can be decomposed into dynamically
|
||||
loadable components to avoid large, monolithic executables.
|
||||
Furthermore, user-supplied extension need not be written entirely in
|
||||
Scheme; they may include an efficient, low-level layer written in C
|
||||
or C++.
|
||||
|
||||
Dynamic loading in Elk is supported on many platforms and is not
|
||||
restricted to a dlopen() interface. Elk provides automatic
|
||||
initialization of dynamically loaded extensions and takes care of
|
||||
C++ static constructors/destructors embedded in object files.
|
||||
|
||||
o Freezing of fully customized applications into executable files
|
||||
|
||||
Elk provides a new Scheme primitive `dump' which freezes the dynamic
|
||||
runtime image of the Scheme interpreter into an executable file
|
||||
(including an enclosing application if present). This facility
|
||||
resembles unexec() in Emacs, but the new executable resumes execution
|
||||
by returning from the call to `dump' by which that executable was
|
||||
created (not unlike fork() in UNIX). Dynamic loading and `dump'
|
||||
increase the usability of Elk as the backbone of complex applications.
|
||||
|
||||
o Powerful C/C++ interface for language interoperability
|
||||
|
||||
Elk provides for a tight integration of the C/C++ core of applications
|
||||
(or extensions) with the extension language. Applications can define
|
||||
their own Scheme primitives (three calling disciplines are supported),
|
||||
define application-specific first-class Scheme types with customized
|
||||
print and read functions, convert objects between Scheme types and
|
||||
C/C++ types in various ways, implement weak data structures, raise
|
||||
Scheme errors, define Scheme variables and symbols, evaluate
|
||||
S-expressions encoded as C strings, and utilize the garbage collector.
|
||||
|
||||
o Full Scheme bindings for X11 and Motif
|
||||
|
||||
Several dynamically loadable extensions provide full Scheme access to
|
||||
the X11/OpenWindows Xlib, to the application programmer interface of
|
||||
the Xt intrinsics, and to the Athena and OSF/Motif widget sets.
|
||||
Using these extensions, the graphical user-interfaces of Elk-based
|
||||
applications can be built entirely in the extension language.
|
||||
|
||||
o UNIX interface
|
||||
|
||||
Elk provides Scheme access to most UNIX system calls and common C
|
||||
library functions. The UNIX extension supports a wide range of
|
||||
different UNIX platforms without restricting its functionality to the
|
||||
lowest common denominator or to the POSIX 1003.1 functions.
|
||||
|
||||
o Stop-and-copy and generational, incremental garbage collection
|
||||
|
||||
Elk employs two garbage collection strategies selectable at compile
|
||||
time: a traditional stop-and-copy garbage collector and a generational
|
||||
garbage collector which is more efficient and thus reduces the time the
|
||||
application is disrupted by a garbage collection. On platforms with
|
||||
advanced memory management, `incremental' mode can be enabled for the
|
||||
generational garbage collector to further reduce wait times.
|
||||
|
||||
o Non-standard Scheme features
|
||||
|
||||
In addition to the standard Scheme core, Elk supports first-class
|
||||
environments, error handling, provide/require and autoloading,
|
||||
fluid bindings and dynamic-wind, simple `eval-twice'-style macros,
|
||||
property lists, string ports and bidirectional ports, shell-style
|
||||
`tilde expansion' in filenames, an interactive top-level written
|
||||
in Scheme, a Scheme debugger and a pretty printer, arbitrary length
|
||||
bitstrings, and Scheme records.
|
||||
|
||||
o Comprehensive documentation
|
||||
|
||||
The distribution includes 230+ pages of fully indexed documentation.
|
||||
All manuals exist as troff input files which can be translated to HTML
|
||||
(with `unroff') for online browsing in addition to producing typeset-
|
||||
quality printed versions.
|
||||
|
||||
o Distributed in legally unencumbered form
|
||||
|
||||
The copyright/license agreement permits free redistribution and use
|
||||
of Elk in commercial products.
|
||||
|
||||
|
||||
Why is Elk using Scheme?
|
||||
------------------------
|
||||
|
||||
As extensions can get as large and complex as freestanding programs,
|
||||
extension language programmers (usually the users of the application)
|
||||
deserve the same language features that other programmers are
|
||||
accustomed to. By using a general-purpose programming language rather
|
||||
than a specialized scripting language, non-trivial extensions can
|
||||
benefit from the structuring functionality inherent in real programming
|
||||
languages (such as Lisp).
|
||||
|
||||
Members of the Lisp language family are particularly suitable as an
|
||||
extension language: Lisp has a simple syntax but powerful semantics,
|
||||
it allows for small implementations, and its interactive nature
|
||||
supports rapid prototyping and encourages users to explore and test
|
||||
solutions to problems in an incremental way.
|
||||
|
||||
Consequently, Lisp has become increasingly popular for this purpose, to
|
||||
the point where the abundance of different dialects has grown into a
|
||||
problem. Of the standardized dialects of Lisp, only Scheme is suitably
|
||||
modest, yet sufficiently general, to serve as a reusable extension
|
||||
language for a wide range of applications. Scheme is orthogonal and
|
||||
well-defined, and it is small enough to not dominate the application it
|
||||
serves and to be fully understood with acceptable effort.
|
||||
|
||||
|
||||
Oliver Laumann <net@informatik.uni-bremen.de>
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
This directory holds the source code and documentation for the latest
|
||||
release of Elk, the Extension Language Kit. See the file README for
|
||||
an overview of Elk.
|
||||
|
||||
Here is a brief roadmap for the subdirectories and files included in
|
||||
the distribution.
|
||||
|
||||
|
||||
elk-3.0 --+-- README Explains the purpose and release status of Elk
|
||||
|
|
||||
+-- CHANGES Lists the changes between this and earlier releases
|
||||
| of Elk
|
||||
|
|
||||
+-- MIGRATE Explains how C/C++ code (applications or extensions)
|
||||
| written for older versions of Elk may have to be
|
||||
| modified to make it work with this version
|
||||
|
|
||||
+-- INSTALL Instructions for configuring, compiling, and
|
||||
| installing Elk; a brief description of the files that
|
||||
| get installed in the process; and a description of
|
||||
| the structure of the Makefiles and the purpose of
|
||||
| Makefile.local and `build' in each source directory
|
||||
|
|
||||
+-- MACHINES Additional, platform-specific advice for installing
|
||||
| and using Elk, such as compiler bugs, unsupported
|
||||
| features, problems with older OS versions and other
|
||||
| pitfalls
|
||||
|
|
||||
+-- BUGS Information about known problems with this release
|
||||
|
|
||||
+-- TODO Ideas, improvements and projects for future releases
|
||||
|
|
||||
+-- COPYRIGHT The copyright status of the distribution
|
||||
|
|
||||
+-- CONTRIBUTORS
|
||||
| A list of people who have contributed significantly
|
||||
| to Elk; acknowledgments and credits
|
||||
|
|
||||
+-- PATCHLEVEL The current patchlevel
|
||||
|
|
||||
+-- config/ Holds the configuration files with machine- and
|
||||
| site-specific information required for building
|
||||
| Elk. See INSTALL for details.
|
||||
|
|
||||
+-- include/ The include files to be #included by applications
|
||||
| that use Elk as their extension language, and by
|
||||
| extensions to Elk. Including scheme.h from this
|
||||
| directory causes all the other .h files to be
|
||||
| included in the right order. The include files may
|
||||
| or may not use ANSI/ISO-C prototypes, depending on
|
||||
| the config file you have chosen.
|
||||
|
|
||||
+-- scripts/ Shell scripts to link the Scheme interpreter with
|
||||
| extensions (useful on platforms that to not support
|
||||
| dynamic loading of objects), and to create
|
||||
| dynamically loadable objects from .o files. See
|
||||
| INSTALL and scripts/README for details.
|
||||
|
|
||||
+-- src/ The C source files of the Scheme interpreter
|
||||
|
|
||||
+-- scm/ Scheme files that are loaded during runtime. These
|
||||
| are copied to a destination directory specified in
|
||||
| config/site when Elk is installed.
|
||||
|
|
||||
+-- lib --, This directory tree holds the C source for various
|
||||
| | Elk extensions that can be loaded into the Scheme
|
||||
| | interpreter or linked with an application
|
||||
| |
|
||||
| +-- xlib/ The C source files of the X11 Xlib extension
|
||||
| |
|
||||
| +-- xt/ The C source files of the Xt (X11 Toolkit
|
||||
| | Intrinsics) extension
|
||||
| |
|
||||
| +-- xaw/ The Scheme interfaces to the X11 Athena widgets.
|
||||
| | There is one .d file for each widget class.
|
||||
| | Each of these is compiled into a C source file
|
||||
| | when running `make' and then compiled into a
|
||||
| | dynamically loadable object.
|
||||
| |
|
||||
| +-- xm/ The .d files for the Motif widgets
|
||||
| |
|
||||
| +-- unix/ The C source files of the UNIX extension
|
||||
| |
|
||||
| `-- misc/ The C source files of the record extension, the
|
||||
| bitstring extension, the regular expression
|
||||
| extension, and various other dynamically
|
||||
| loadable Elk extensions
|
||||
|
|
||||
+-- doc/ The directory tree holding the documentation for
|
||||
| Elk as troff input files and pre-generated
|
||||
| PostScript files. See doc/README for a roadmap
|
||||
| of the `doc' tree.
|
||||
|
|
||||
|
|
||||
+-- examples --, A collection of demonstration programs for Elk
|
||||
| | and the various extensions (mostly in Scheme)
|
||||
| |
|
||||
| +-- scheme Basic Scheme demos (collected from USENET
|
||||
| | and other sources)
|
||||
| |
|
||||
| +-- xlib Programs demonstrating the Xlib, Athena,
|
||||
| +-- xaw and Motif extensions
|
||||
| +-- xm
|
||||
| |
|
||||
| +-- unix Example programs for the UNIX extension
|
||||
| |
|
||||
| +-- regexp A demonstration of the regexp extension
|
||||
| |
|
||||
| `-- CC A few simple C++ programs demonstrating
|
||||
| use of Elk with C++ applications (see
|
||||
| README in this directory)
|
||||
|
|
||||
`-- util/ Various utilities, some of which may aid in preparing
|
||||
a config file for an as yet unsupported platform.
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
Interpreter kernel
|
||||
|
||||
o Documentation strings. Put them into an extra field in S_Compound.
|
||||
New primitives: procedure-documentation, macro-documentation.
|
||||
|
||||
o It should not matter to an extension writer whether a primitive is
|
||||
written in Scheme or in C -- primitives should not be invoked directly
|
||||
via the P_ functions. Instead, a more general mechanism is needed.
|
||||
|
||||
o include/misc.h: Reader_Tweak_Stream() should call Primitive_Error()
|
||||
if ferror() is true.
|
||||
|
||||
o Implement a pure heap for constant objects (should be placed into
|
||||
read-only text segment by "dump").
|
||||
|
||||
o Generic print, equal, etc. functions should be provided for
|
||||
extensions.
|
||||
|
||||
o Treat # as comment character if file starts with #! (hard to
|
||||
implement, as this requires the reader to detect beginning of line).
|
||||
|
||||
o map and for-each should also work for other data structures
|
||||
(such as vectors).
|
||||
|
||||
o Dump for NEXT-OS/MACH.
|
||||
|
||||
|
||||
Extensions
|
||||
|
||||
o Motif: add support for new widgets and new functions.
|
||||
|
||||
o A socket/networking extension.
|
||||
|
||||
o A UNIX process interface, like that in GNU Emacs.
|
||||
|
||||
o A foreign function interface generator as described in the CFI's
|
||||
``A Scheme-Based Extension Language Environment''.
|
||||
|
||||
|
||||
Projects
|
||||
|
||||
o Symbol completion would be very useful (but hard to implement).
|
||||
|
||||
o A reasonable debugger and a better trace facility are needed.
|
||||
|
||||
o An interface to Tcl/Tk.
|
||||
|
||||
o The error-handler should be invoked with a symbol identifying the
|
||||
error as an argument. The symbol has an error text property
|
||||
holding the full text.
|
||||
|
||||
o Ports: the accessor functions should be part of the port object.
|
||||
|
||||
o Hash tables. Need to be rehashed on each GC. Table object
|
||||
holds hash function, compare function, etc.
|
||||
|
||||
o It should be possible to define new types in Scheme (not only in
|
||||
extensions). New primitive: define-type (similar to define-structure?).
|
||||
|
|
@ -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=386pc-bsdi-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='<sys/ioctl.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=bsd
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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=ld
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
# The libraries against which dynamically loaded files are resolved
|
||||
# at the time they are loaded.
|
||||
|
||||
load_libraries='-lc'
|
||||
|
||||
# Additional flags to be passed to the linker for an incremental
|
||||
# linker run (ld -A). Ignored unless load_obj=ld.
|
||||
|
||||
incremental_ldflags=-x
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=
|
||||
file_text_start='N_TXTOFF(hdr)'
|
||||
mem_text_start='N_TXTADDR(hdr)'
|
||||
text_length_adj=0
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=fpurge
|
||||
flush_tty=tiocflush
|
||||
|
||||
|
||||
# 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=yes
|
||||
|
||||
|
||||
# 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=arg4
|
||||
|
||||
|
||||
# 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=no
|
||||
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=yes
|
||||
|
||||
|
||||
# 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'
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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='-lm'
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=
|
||||
vfork=yes
|
||||
gethostname=yes
|
||||
uname=
|
||||
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=int
|
||||
|
|
@ -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=alpha-osf1-cc
|
||||
|
||||
|
||||
# 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=no-standard-return-type
|
||||
|
||||
|
||||
# Does the system have the index library function? If not, strchr
|
||||
# will be used.
|
||||
|
||||
index=no
|
||||
|
||||
|
||||
# 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='<sys/ioctl.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=yes
|
||||
|
||||
|
||||
# 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=ecoff
|
||||
|
||||
|
||||
# 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 -expect_unresolved '*'"
|
||||
|
||||
# The libraries against which dynamically loaded files are resolved
|
||||
# at the time they are loaded.
|
||||
|
||||
load_libraries='-lc'
|
||||
|
||||
# Additional flags to be passed to the linker for an incremental
|
||||
# linker run (ld -A). Ignored unless load_obj=ld.
|
||||
|
||||
incremental_ldflags=
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=1024
|
||||
mem_text_start=0
|
||||
text_length_adj=0
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=bsd
|
||||
flush_tty=tiocflush
|
||||
|
||||
|
||||
# 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=yes
|
||||
|
||||
|
||||
# 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=siginfo
|
||||
|
||||
|
||||
# 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=yes
|
||||
|
||||
|
||||
# The C compiler used to compile the source code.
|
||||
|
||||
cc=cc
|
||||
|
||||
|
||||
# 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='-std1'
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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='-lm'
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=no
|
||||
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
|
||||
|
|
@ -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=dec5100-ultrix4.2-cc
|
||||
|
||||
|
||||
# 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='<sys/ioctl.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=no
|
||||
|
||||
# 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=bsd
|
||||
|
||||
|
||||
# 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=ecoff
|
||||
|
||||
|
||||
# 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=ld
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
# The libraries against which dynamically loaded files are resolved
|
||||
# at the time they are loaded.
|
||||
|
||||
load_libraries='-lc_G0'
|
||||
|
||||
# Additional flags to be passed to the linker for an incremental
|
||||
# linker run (ld -A). Ignored unless load_obj=ld.
|
||||
|
||||
incremental_ldflags=
|
||||
|
||||
# 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='<mips/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=SEGSIZ
|
||||
file_text_start='sizeof(struct exec)'
|
||||
mem_text_start='(PAGSIZ+sizeof(struct exec))'
|
||||
text_length_adj='sizeof(struct exec)'
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=bsd
|
||||
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=yes
|
||||
|
||||
|
||||
# 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=sigcontext
|
||||
|
||||
|
||||
# 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=cc
|
||||
|
||||
|
||||
# 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='-O'
|
||||
|
||||
|
||||
# Are extra C compiler flags (such as -D_NO_PROTO) required to compile
|
||||
# Motif applications?
|
||||
|
||||
motif_cflags=-D_NO_PROTO
|
||||
|
||||
|
||||
# Are extra C compiler flags (such as -G 0) required to compile
|
||||
# dynamically loadable files?
|
||||
|
||||
obj_cflags='-G 0'
|
||||
|
||||
|
||||
# Are extra linker flags (such as -G 0) required to link several object
|
||||
# files together to one dynamically loadable file?
|
||||
|
||||
obj_ldflags='-G 0'
|
||||
|
||||
|
||||
# The linker flags used to link the interpreter.
|
||||
|
||||
ldflags='-lm -Wl,-D,800000'
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# Does your C preprocessor support the ANSI-C ## operator, although
|
||||
# __STDC__ is not defined?
|
||||
|
||||
ansi_cpp=no
|
||||
|
||||
|
||||
# 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=no
|
||||
utime_h=yes
|
||||
regcomp=no
|
||||
|
||||
|
||||
# Element type of the gidset argument of getgroups(); typically int
|
||||
# or gid_t. Only needed by the UNIX extension.
|
||||
|
||||
getgroups_type=int
|
||||
|
|
@ -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=hp9k700-hpux10.0-cc
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# Does the system have the bcopy, bzero, and bcmp library functions?
|
||||
# If not, memcpy/memset/memcmp will be used.
|
||||
|
||||
bstring=no
|
||||
|
||||
|
||||
# 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='<sys/ioctl.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=no
|
||||
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=no
|
||||
sysconf_pagesize=yes
|
||||
|
||||
|
||||
# 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=hp9k
|
||||
|
||||
|
||||
# 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=shl
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
# 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
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=
|
||||
file_text_start='sizeof(struct exec)'
|
||||
mem_text_start='(PAGSIZ+sizeof(struct exec))'
|
||||
text_length_adj='sizeof(struct exec)'
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=bsd
|
||||
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='(1024*1024)'
|
||||
|
||||
|
||||
# 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=yes
|
||||
|
||||
|
||||
# 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=hpux
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# Must <alloca.h> be included to use alloca? Is "#pragma alloca" required?
|
||||
|
||||
include_alloca_h=
|
||||
pragma_alloca=
|
||||
|
||||
|
||||
# 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=yes
|
||||
|
||||
|
||||
# The C compiler used to compile the source code.
|
||||
|
||||
cc=cc
|
||||
|
||||
|
||||
# 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='-Ae -O -DARRAY_BROKEN'
|
||||
|
||||
|
||||
# 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=+z
|
||||
|
||||
|
||||
# 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='-Wl,-E -lm -ldld'
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=no
|
||||
wait4=no
|
||||
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
|
||||
|
|
@ -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=hp9k700-hpux9.0-cc
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# Does the system have the index library function? If not, strchr
|
||||
# will be used.
|
||||
|
||||
index=no
|
||||
|
||||
|
||||
# Does the system have the bcopy, bzero, and bcmp library functions?
|
||||
# If not, memcpy/memset/memcmp will be used.
|
||||
|
||||
bstring=no
|
||||
|
||||
|
||||
# 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='<sys/ioctl.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=no
|
||||
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=no
|
||||
sysconf_pagesize=yes
|
||||
|
||||
|
||||
# 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=hp9k
|
||||
|
||||
|
||||
# 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=shl
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
# 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
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=
|
||||
file_text_start='sizeof(struct exec)'
|
||||
mem_text_start='(PAGSIZ+sizeof(struct exec))'
|
||||
text_length_adj='sizeof(struct exec)'
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=bsd
|
||||
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='(1024*1024)'
|
||||
|
||||
|
||||
# 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=yes
|
||||
|
||||
|
||||
# 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=hpux
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# Must <alloca.h> be included to use alloca? Is "#pragma alloca" required?
|
||||
|
||||
include_alloca_h=
|
||||
pragma_alloca=
|
||||
|
||||
|
||||
# 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=yes
|
||||
|
||||
|
||||
# The C compiler used to compile the source code.
|
||||
|
||||
cc=cc
|
||||
|
||||
|
||||
# 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='-Ae -O -DARRAY_BROKEN'
|
||||
|
||||
|
||||
# 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=+z
|
||||
|
||||
|
||||
# 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='-Wl,-E -lm -ldld'
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=no
|
||||
rename=yes
|
||||
waitpid=yes
|
||||
wait3=no
|
||||
wait4=no
|
||||
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
|
||||
|
|
@ -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=no
|
||||
|
||||
|
||||
# Does the system have the index library function? If not, strchr
|
||||
# will be used.
|
||||
|
||||
index=no
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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=no
|
||||
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=
|
||||
|
||||
|
||||
# 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=ld
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
# The libraries against which dynamically loaded files are resolved
|
||||
# at the time they are loaded.
|
||||
|
||||
load_libraries='-lc -lgcc -lc'
|
||||
|
||||
# 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'
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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='-static -lm'
|
||||
|
||||
|
||||
# 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=no
|
||||
uname=yes
|
||||
mktemp=yes
|
||||
tmpnam=yes
|
||||
tempnam=
|
||||
getcwd=yes
|
||||
getwd=
|
||||
rename=yes
|
||||
waitpid=yes
|
||||
wait3=
|
||||
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
|
||||
|
|
@ -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=next-mach3.3-cc
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# If the FIONREAD ioctl command is defined, which file must be included?
|
||||
|
||||
fionread_include='<sys/ioctl.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=no
|
||||
|
||||
# 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=no
|
||||
|
||||
# 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=bsd
|
||||
|
||||
|
||||
# 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=macho
|
||||
|
||||
|
||||
# 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=rld
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
# The libraries against which dynamically loaded files are resolved
|
||||
# at the time they are loaded.
|
||||
|
||||
load_libraries='/lib/libsys_s.a'
|
||||
|
||||
# Additional flags to be passed to the linker for an incremental
|
||||
# linker run (ld -A). Ignored unless load_obj=ld.
|
||||
|
||||
incremental_ldflags=-x
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=SEGSIZ
|
||||
file_text_start='sizeof(struct exec)'
|
||||
mem_text_start='(PAGSIZ+sizeof(struct exec))'
|
||||
text_length_adj='sizeof(struct exec)'
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=bsd
|
||||
flush_tty=tiocflush
|
||||
|
||||
|
||||
# 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=no
|
||||
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=cc
|
||||
|
||||
|
||||
# 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='-O'
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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='-seglinkedit -lm'
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=no
|
||||
mktemp=yes
|
||||
tmpnam=yes
|
||||
tempnam=no
|
||||
getcwd=no
|
||||
getwd=yes
|
||||
rename=yes
|
||||
waitpid=no
|
||||
wait3=yes
|
||||
wait4=yes
|
||||
utime_h=no
|
||||
regcomp=no
|
||||
|
||||
|
||||
# Element type of the gidset argument of getgroups(); typically int
|
||||
# or gid_t. Only needed by the UNIX extension.
|
||||
|
||||
getgroups_type=int
|
||||
|
|
@ -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=power-aix4.1-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='<sys/ioctl.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=
|
||||
|
||||
|
||||
# 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=xcoff
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
# The libraries against which dynamically loaded files are resolved
|
||||
# at the time they are loaded.
|
||||
|
||||
load_libraries='-lc'
|
||||
|
||||
# Additional flags to be passed to the linker for an incremental
|
||||
# linker run (ld -A). Ignored unless load_obj=ld.
|
||||
|
||||
incremental_ldflags=-x
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=SEGSIZ
|
||||
file_text_start='sizeof(struct exec)'
|
||||
mem_text_start='(PAGSIZ+sizeof(struct exec))'
|
||||
text_length_adj='sizeof(struct exec)'
|
||||
|
||||
# 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=bsd
|
||||
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=yes
|
||||
|
||||
|
||||
# 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=aix
|
||||
|
||||
|
||||
# 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=no
|
||||
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=-O
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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='-lld -lm'
|
||||
|
||||
|
||||
# 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=no
|
||||
gethostname=yes
|
||||
uname=yes
|
||||
mktemp=yes
|
||||
tmpnam=yes
|
||||
tempnam=yes
|
||||
getcwd=yes
|
||||
getwd=yes
|
||||
rename=yes
|
||||
waitpid=yes
|
||||
wait3=yes
|
||||
wait4=no
|
||||
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
|
||||
|
|
@ -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=power-aix4.1-xlc
|
||||
|
||||
|
||||
# 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='<sys/ioctl.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=
|
||||
|
||||
|
||||
# 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=xcoff
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
# The libraries against which dynamically loaded files are resolved
|
||||
# at the time they are loaded.
|
||||
|
||||
load_libraries='-lc'
|
||||
|
||||
# Additional flags to be passed to the linker for an incremental
|
||||
# linker run (ld -A). Ignored unless load_obj=ld.
|
||||
|
||||
incremental_ldflags=-x
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=SEGSIZ
|
||||
file_text_start='sizeof(struct exec)'
|
||||
mem_text_start='(PAGSIZ+sizeof(struct exec))'
|
||||
text_length_adj='sizeof(struct exec)'
|
||||
|
||||
# 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=bsd
|
||||
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=yes
|
||||
|
||||
|
||||
# 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=aix
|
||||
|
||||
|
||||
# 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=no
|
||||
pragma_alloca=yes
|
||||
|
||||
|
||||
# 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=cc
|
||||
|
||||
|
||||
# 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=-O
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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='-lld -lm'
|
||||
|
||||
|
||||
# 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=no
|
||||
gethostname=yes
|
||||
uname=yes
|
||||
mktemp=yes
|
||||
tmpnam=yes
|
||||
tempnam=yes
|
||||
getcwd=yes
|
||||
getwd=yes
|
||||
rename=yes
|
||||
waitpid=yes
|
||||
wait3=yes
|
||||
wait4=no
|
||||
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
|
||||
|
|
@ -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=powerpc-solaris2.5-cc
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# Does the system have the bcopy, bzero, and bcmp library functions?
|
||||
# If not, memcpy/memset/memcmp will be used.
|
||||
|
||||
bstring=no
|
||||
|
||||
|
||||
# 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='<sys/filio.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=yes
|
||||
|
||||
|
||||
# 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="-G -z text"
|
||||
|
||||
# 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=
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=SEGSIZ
|
||||
file_text_start='sizeof(struct exec)'
|
||||
mem_text_start='(PAGSIZ+sizeof(struct exec))'
|
||||
text_length_adj='sizeof(struct exec)'
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=bsd
|
||||
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=yes
|
||||
|
||||
|
||||
# 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=siginfo
|
||||
|
||||
|
||||
# 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=yes
|
||||
|
||||
|
||||
# The C compiler used to compile the source code.
|
||||
|
||||
cc=/opt/SUNWspro/bin/cc
|
||||
|
||||
|
||||
# The name of the linker. This is usually just "ld", or /usr/ccs/bin/ld
|
||||
# in SVR4-based systems.
|
||||
|
||||
ld=/usr/ccs/bin/ld
|
||||
|
||||
|
||||
# The C compiler flags used for all files.
|
||||
|
||||
cflags='-O'
|
||||
|
||||
|
||||
# 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='-K PIC'
|
||||
|
||||
|
||||
# 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='-lm -lelf -ldl'
|
||||
|
||||
|
||||
# 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=no
|
||||
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
|
||||
|
|
@ -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=rs6000-aix3.2-cc
|
||||
|
||||
|
||||
# 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='<sys/ioctl.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=
|
||||
|
||||
|
||||
# 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=bsd
|
||||
|
||||
|
||||
# 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=xcoff
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
# The libraries against which dynamically loaded files are resolved
|
||||
# at the time they are loaded.
|
||||
|
||||
load_libraries='-lc'
|
||||
|
||||
# Additional flags to be passed to the linker for an incremental
|
||||
# linker run (ld -A). Ignored unless load_obj=ld.
|
||||
|
||||
incremental_ldflags=-x
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=SEGSIZ
|
||||
file_text_start='sizeof(struct exec)'
|
||||
mem_text_start='(PAGSIZ+sizeof(struct exec))'
|
||||
text_length_adj='sizeof(struct exec)'
|
||||
|
||||
# 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=bsd
|
||||
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=
|
||||
|
||||
|
||||
# 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=aix
|
||||
|
||||
|
||||
# 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=no
|
||||
pragma_alloca=yes
|
||||
|
||||
|
||||
# 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=cc
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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='-lld -lm'
|
||||
|
||||
|
||||
# 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=no
|
||||
gethostname=yes
|
||||
uname=yes
|
||||
mktemp=yes
|
||||
tmpnam=yes
|
||||
tempnam=yes
|
||||
getcwd=yes
|
||||
getwd=yes
|
||||
rename=yes
|
||||
waitpid=yes
|
||||
wait3=yes
|
||||
wait4=no
|
||||
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
|
||||
|
|
@ -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=sgi-irix5.3-cc
|
||||
|
||||
|
||||
# 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='<sys/ioctl.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=
|
||||
|
||||
# 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=no
|
||||
sysconf_pagesize=yes
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=SEGSIZ
|
||||
file_text_start='sizeof(struct exec)'
|
||||
mem_text_start='(PAGSIZ+sizeof(struct exec))'
|
||||
text_length_adj='sizeof(struct exec)'
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=bsd
|
||||
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=yes
|
||||
|
||||
|
||||
# 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=siginfo
|
||||
|
||||
|
||||
# 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=cc
|
||||
|
||||
|
||||
# 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='-O'
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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='-lm -lelf'
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=no
|
||||
vfork=no
|
||||
gethostname=yes
|
||||
uname=yes
|
||||
mktemp=yes
|
||||
tmpnam=yes
|
||||
tempnam=yes
|
||||
getcwd=yes
|
||||
getwd=yes
|
||||
rename=yes
|
||||
waitpid=yes
|
||||
wait3=yes
|
||||
wait4=no
|
||||
utime_h=yes
|
||||
regcomp=no
|
||||
|
||||
|
||||
# Element type of the gidset argument of getgroups(); typically int
|
||||
# or gid_t. Only needed by the UNIX extension.
|
||||
|
||||
getgroups_type=gid_t
|
||||
|
|
@ -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=sgi-irix6.2-cc
|
||||
|
||||
|
||||
# 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='<sys/ioctl.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=
|
||||
|
||||
# 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=yes
|
||||
|
||||
|
||||
# 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 -dont_warn_unused"
|
||||
|
||||
# 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=
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=SEGSIZ
|
||||
file_text_start='sizeof(struct exec)'
|
||||
mem_text_start='(PAGSIZ+sizeof(struct exec))'
|
||||
text_length_adj='sizeof(struct exec)'
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=bsd
|
||||
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=yes
|
||||
|
||||
|
||||
# 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=siginfo
|
||||
|
||||
|
||||
# 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=cc
|
||||
|
||||
|
||||
# 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='-O'
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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='-lm -lelf'
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=no
|
||||
vfork=no
|
||||
gethostname=yes
|
||||
uname=yes
|
||||
mktemp=yes
|
||||
tmpnam=yes
|
||||
tempnam=yes
|
||||
getcwd=yes
|
||||
getwd=yes
|
||||
rename=yes
|
||||
waitpid=yes
|
||||
wait3=yes
|
||||
wait4=no
|
||||
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
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
# This is a shell script. It is sourced by the build scripts in the
|
||||
# various subdirectories to gather site- and installation-specific
|
||||
# information required for building the Makefiles.
|
||||
#
|
||||
# This script is read after the "system" file, therefore you can place
|
||||
# variable settings here to override those from "system".
|
||||
#
|
||||
# Some 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.
|
||||
#
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
|
||||
# The directory where all files are installed by running "make install".
|
||||
# The subdirectories bin, lib, include, and runtime (with various
|
||||
# subdirectories) are created automatically, but $install_dir isn't.
|
||||
# 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
|
||||
|
||||
|
||||
# Libraries against which to link the X11 extension (typically -lX11).
|
||||
#
|
||||
# Any of the following library lists may be prefixed by something like
|
||||
# -L/usr/X11/lib if the X-libraries do not reside in a standard directory;
|
||||
# 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'
|
||||
|
||||
|
||||
# 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'
|
||||
|
||||
|
||||
# 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'
|
||||
|
||||
|
||||
# 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'
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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"
|
||||
|
||||
|
||||
# Do you want to use the generational garbage collector? If not, the
|
||||
# stop-and-copy garbage collector will be used.
|
||||
|
||||
generational_gc=yes
|
||||
|
||||
|
||||
# The default heap size of the Scheme interpreter in KBytes (if the
|
||||
# stop-and-copy garbage collector is used).
|
||||
|
||||
default_heap_size=1024
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
# This is a shell script. It is sourced by the build scripts in the
|
||||
# various subdirectories to gather site- and installation-specific
|
||||
# information required for building the Makefiles.
|
||||
#
|
||||
# This script is read after the "system" file, therefore you can place
|
||||
# variable settings here to override those from "system".
|
||||
#
|
||||
# Some 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.
|
||||
#
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
|
||||
# The directory where all files are installed by running "make install".
|
||||
# The subdirectories bin, lib, include, and runtime (with various
|
||||
# subdirectories) are created automatically, but $install_dir isn't.
|
||||
# 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=/user/net/elk
|
||||
|
||||
|
||||
# Libraries against which to link the X11 extension (typically -lX11).
|
||||
#
|
||||
# Any of the following library lists may be prefixed by something like
|
||||
# -L/usr/X11/lib if the X-libraries do not reside in a standard directory;
|
||||
# an additional -R/usr/X11/lib and -lsocket may be required in case of
|
||||
# SunOS 5.x/SysVR4).
|
||||
|
||||
libxlib='-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='-lXaw -lXmu -lXt -lXext -lX11'
|
||||
|
||||
|
||||
# Libraries against which to link the Athena widgets extension (typically
|
||||
# identical to libxt above)
|
||||
|
||||
libxaw='-lXaw -lXmu -lXt -lXext -lX11'
|
||||
|
||||
|
||||
# Libraries against which to link the Motif extension (typically like
|
||||
# libaw above with Xaw replaced by Xm)
|
||||
|
||||
libxmotif='-lXm -lXmu -lXt -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=
|
||||
motif_incl=
|
||||
|
||||
|
||||
# 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"
|
||||
|
||||
|
||||
# Do you want to use the generational garbage collector? If not, the
|
||||
# stop-and-copy garbage collector will be used.
|
||||
|
||||
generational_gc=yes
|
||||
|
||||
|
||||
# The default heap size of the Scheme interpreter in KBytes (if the
|
||||
# stop-and-copy garbage collector is used).
|
||||
|
||||
default_heap_size=1024
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
# This is a shell script. It is sourced by the build scripts in the
|
||||
# various subdirectories to gather site- and installation-specific
|
||||
# information required for building the Makefiles.
|
||||
#
|
||||
# This script is read after the "system" file, therefore you can place
|
||||
# variable settings here to override those from "system".
|
||||
#
|
||||
# Some 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.
|
||||
#
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
|
||||
# The directory where all files are installed by running "make install".
|
||||
# The subdirectories bin, lib, include, and runtime (with various
|
||||
# subdirectories) are created automatically, but $install_dir isn't.
|
||||
# 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
|
||||
|
||||
|
||||
# Libraries against which to link the X11 extension (typically -lX11).
|
||||
#
|
||||
# Any of the following library lists may be prefixed by something like
|
||||
# -L/usr/X11/lib if the X-libraries do not reside in a standard directory;
|
||||
# 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_G0'
|
||||
|
||||
|
||||
# Libraries against which to link the Xt extension (typically
|
||||
# -lXaw -lXmu -lXt -lXext -lX11). -lXaw is needed to get the correct
|
||||
# definition of the vendor shell widget class
|
||||
|
||||
libxt='-L/usr/local/X11/lib -lXaw_G0 -lXmu_G0 -lXt_G0 -lXext_G0 -lX11_G0'
|
||||
|
||||
|
||||
# Libraries against which to link the Athena widgets extension (typically
|
||||
# identical to libxt above)
|
||||
|
||||
libxaw='-L/usr/local/X11/lib -lXaw_G0 -lXmu_G0 -lXt_G0 -lXext_G0 -lX11_G0'
|
||||
|
||||
|
||||
# Libraries against which to link the Motif extension (typically like
|
||||
# libaw above with Xaw replaced by Xm)
|
||||
|
||||
libxmotif='-L/usr/local/X11/lib -lXm_G0 -lXmu_G0 -lXt_G0 -lXext_G0 -lX11_G0'
|
||||
|
||||
|
||||
# Additional flags (typically -Isomething) to be supplied to the C
|
||||
# compiler when compiling an X11 application, or a Motif application,
|
||||
# respectively.
|
||||
|
||||
x11_incl=
|
||||
motif_incl=
|
||||
|
||||
|
||||
# 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"
|
||||
|
||||
|
||||
# Do you want to use the generational garbage collector? If not, the
|
||||
# stop-and-copy garbage collector will be used.
|
||||
|
||||
generational_gc=yes
|
||||
|
||||
|
||||
# The default heap size of the Scheme interpreter in KBytes (if the
|
||||
# stop-and-copy garbage collector is used).
|
||||
|
||||
default_heap_size=1024
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
# This is a shell script. It is sourced by the build scripts in the
|
||||
# various subdirectories to gather site- and installation-specific
|
||||
# information required for building the Makefiles.
|
||||
#
|
||||
# This script is read after the "system" file, therefore you can place
|
||||
# variable settings here to override those from "system".
|
||||
#
|
||||
# Some 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.
|
||||
#
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
|
||||
# The directory where all files are installed by running "make install".
|
||||
# The subdirectories bin, lib, include, and runtime (with various
|
||||
# subdirectories) are created automatically, but $install_dir isn't.
|
||||
# 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
|
||||
|
||||
|
||||
# Libraries against which to link the X11 extension (typically -lX11).
|
||||
#
|
||||
# Any of the following library lists may be prefixed by something like
|
||||
# -L/usr/X11/lib if the X-libraries do not reside in a standard directory;
|
||||
# an additional -R/usr/X11/lib and -lsocket may be required in case of
|
||||
# SunOS 5.x/SysVR4).
|
||||
|
||||
libxlib=/usr/lib/X11R5/libX11.sl
|
||||
|
||||
|
||||
# Libraries against which to link the Xt extension (typically
|
||||
# -lXaw -lXmu -lXt -lXext -lX11). -lXaw is needed to get the correct
|
||||
# definition of the vendor shell widget class
|
||||
|
||||
libxt='/usr/lib/X11R5/libXt.sl /usr/lib/X11R5/libX11.sl'
|
||||
|
||||
|
||||
# Libraries against which to link the Athena widgets extension (typically
|
||||
# identical to libxt above)
|
||||
|
||||
libxaw=
|
||||
|
||||
|
||||
# Libraries against which to link the Motif extension (typically like
|
||||
# libaw above with Xaw replaced by Xm)
|
||||
|
||||
libxmotif='/usr/lib/Motif1.2/libXm.sl /usr/lib/X11R5/libXt.sl /usr/lib/X11R5/libX11.sl'
|
||||
|
||||
|
||||
# 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/include/X11R5
|
||||
motif_incl=-I/usr/include/Motif1.2
|
||||
|
||||
|
||||
# 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"
|
||||
|
||||
|
||||
# Do you want to use the generational garbage collector? If not, the
|
||||
# stop-and-copy garbage collector will be used.
|
||||
|
||||
generational_gc=yes
|
||||
|
||||
|
||||
# The default heap size of the Scheme interpreter in KBytes (if the
|
||||
# stop-and-copy garbage collector is used).
|
||||
|
||||
default_heap_size=1024
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
# This is a shell script. It is sourced by the build scripts in the
|
||||
# various subdirectories to gather site- and installation-specific
|
||||
# information required for building the Makefiles.
|
||||
#
|
||||
# This script is read after the "system" file, therefore you can place
|
||||
# variable settings here to override those from "system".
|
||||
#
|
||||
# Some 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.
|
||||
#
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
|
||||
# The directory where all files are installed by running "make install".
|
||||
# The subdirectories bin, lib, include, and runtime (with various
|
||||
# subdirectories) are created automatically, but $install_dir isn't.
|
||||
# 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
|
||||
|
||||
|
||||
# Libraries against which to link the X11 extension (typically -lX11).
|
||||
#
|
||||
# Any of the following library lists may be prefixed by something like
|
||||
# -L/usr/X11/lib if the X-libraries do not reside in a standard directory;
|
||||
# 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'
|
||||
|
||||
|
||||
# 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'
|
||||
|
||||
|
||||
# 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'
|
||||
|
||||
|
||||
# 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'
|
||||
|
||||
|
||||
# Additional flags (typically -Isomething) to be supplied to the C
|
||||
# compiler when compiling an X11 application, or a Motif application,
|
||||
# respectively.
|
||||
|
||||
x11_incl=
|
||||
motif_incl=
|
||||
|
||||
|
||||
# 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"
|
||||
|
||||
|
||||
# Do you want to use the generational garbage collector? If not, the
|
||||
# stop-and-copy garbage collector will be used.
|
||||
|
||||
generational_gc=yes
|
||||
|
||||
|
||||
# The default heap size of the Scheme interpreter in KBytes (if the
|
||||
# stop-and-copy garbage collector is used).
|
||||
|
||||
default_heap_size=1024
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
# This is a shell script. It is sourced by the build scripts in the
|
||||
# various subdirectories to gather site- and installation-specific
|
||||
# information required for building the Makefiles.
|
||||
#
|
||||
# This script is read after the "system" file, therefore you can place
|
||||
# variable settings here to override those from "system".
|
||||
#
|
||||
# Some 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.
|
||||
#
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
|
||||
# The directory where all files are installed by running "make install".
|
||||
# The subdirectories bin, lib, include, and runtime (with various
|
||||
# subdirectories) are created automatically, but $install_dir isn't.
|
||||
# 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
|
||||
|
||||
|
||||
# Libraries against which to link the X11 extension (typically -lX11).
|
||||
#
|
||||
# Any of the following library lists may be prefixed by something like
|
||||
# -L/usr/X11/lib if the X-libraries do not reside in a standard directory;
|
||||
# an additional -R/usr/X11/lib and -lsocket may be required in case of
|
||||
# SunOS 5.x/SysVR4).
|
||||
|
||||
libxlib='-R/usr/local/X11/lib -L/usr/local/X11/lib -lX11 -lsocket'
|
||||
|
||||
|
||||
# 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='-R/usr/local/X11/lib -L/usr/local/X11/lib -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 -lsocket'
|
||||
|
||||
|
||||
# Libraries against which to link the Athena widgets extension (typically
|
||||
# identical to libxt above)
|
||||
|
||||
libxaw='-R/usr/local/X11/lib -L/usr/local/X11/lib -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 -lsocket'
|
||||
|
||||
|
||||
# Libraries against which to link the Motif extension (typically like
|
||||
# libaw above with Xaw replaced by Xm)
|
||||
|
||||
libxmotif='-R/usr/local/X11/lib -L/usr/local/X11/lib -lXm -lXmu -lXt -lXext -lSM -lICE -lX11 -lsocket'
|
||||
|
||||
|
||||
# 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=-I/usr/local/X11/include
|
||||
|
||||
|
||||
# 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"
|
||||
|
||||
|
||||
# Do you want to use the generational garbage collector? If not, the
|
||||
# stop-and-copy garbage collector will be used.
|
||||
|
||||
generational_gc=yes
|
||||
|
||||
|
||||
# The default heap size of the Scheme interpreter in KBytes (if the
|
||||
# stop-and-copy garbage collector is used).
|
||||
|
||||
default_heap_size=1024
|
||||
|
|
@ -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=sun-sunos4.1-acc
|
||||
|
||||
|
||||
# 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='<sys/filio.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=bsd
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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=ld
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
# The libraries against which dynamically loaded files are resolved
|
||||
# at the time they are loaded.
|
||||
|
||||
load_libraries='-lc'
|
||||
|
||||
# Additional flags to be passed to the linker for an incremental
|
||||
# linker run (ld -A). Ignored unless load_obj=ld.
|
||||
|
||||
incremental_ldflags=-x
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=SEGSIZ
|
||||
file_text_start='sizeof(struct exec)'
|
||||
mem_text_start='(PAGSIZ+sizeof(struct exec))'
|
||||
text_length_adj='sizeof(struct exec)'
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=bsd
|
||||
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=yes
|
||||
|
||||
|
||||
# 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=arg4
|
||||
|
||||
|
||||
# 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=yes
|
||||
|
||||
|
||||
# The C compiler used to compile the source code.
|
||||
|
||||
cc=acc
|
||||
|
||||
|
||||
# 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='-O -Xa'
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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='-lm -Bstatic'
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# Element type of the gidset argument of getgroups(); typically int
|
||||
# or gid_t. Only needed by the UNIX extension.
|
||||
|
||||
getgroups_type=int
|
||||
|
|
@ -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=sun-sunos4.1-cc
|
||||
|
||||
|
||||
# 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='<sys/filio.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=bsd
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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=ld
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
# The libraries against which dynamically loaded files are resolved
|
||||
# at the time they are loaded.
|
||||
|
||||
load_libraries='-lc'
|
||||
|
||||
# Additional flags to be passed to the linker for an incremental
|
||||
# linker run (ld -A). Ignored unless load_obj=ld.
|
||||
|
||||
incremental_ldflags=-x
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=SEGSIZ
|
||||
file_text_start='sizeof(struct exec)'
|
||||
mem_text_start='(PAGSIZ+sizeof(struct exec))'
|
||||
text_length_adj='sizeof(struct exec)'
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=bsd
|
||||
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=yes
|
||||
|
||||
|
||||
# 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=arg4
|
||||
|
||||
|
||||
# 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=cc
|
||||
|
||||
|
||||
# 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='-O'
|
||||
|
||||
|
||||
# Are extra C compiler flags (such as -D_NO_PROTO) required to compile
|
||||
# Motif applications?
|
||||
|
||||
motif_cflags=-D_NO_PROTO
|
||||
|
||||
|
||||
# Are extra C compiler flags (such as -G 0) required to compile
|
||||
# dynamically loadable files?
|
||||
|
||||
obj_cflags=
|
||||
|
||||
|
||||
# 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='-lm -Bstatic'
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# Does your C preprocessor support the ANSI-C ## operator, although
|
||||
# __STDC__ is not defined?
|
||||
|
||||
ansi_cpp=no
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# Element type of the gidset argument of getgroups(); typically int
|
||||
# or gid_t. Only needed by the UNIX extension.
|
||||
|
||||
getgroups_type=int
|
||||
|
|
@ -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=sun-sunos4.1-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='<sys/filio.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=bsd
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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=ld
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
# The libraries against which dynamically loaded files are resolved
|
||||
# at the time they are loaded.
|
||||
|
||||
load_libraries='-lc'
|
||||
|
||||
# Additional flags to be passed to the linker for an incremental
|
||||
# linker run (ld -A). Ignored unless load_obj=ld.
|
||||
|
||||
incremental_ldflags=-x
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=SEGSIZ
|
||||
file_text_start='sizeof(struct exec)'
|
||||
mem_text_start='(PAGSIZ+sizeof(struct exec))'
|
||||
text_length_adj='sizeof(struct exec)'
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=bsd
|
||||
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=yes
|
||||
|
||||
|
||||
# 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=arg4
|
||||
|
||||
|
||||
# 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=yes
|
||||
|
||||
|
||||
# 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='-ansi -O -fschedule-insns2'
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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='-lm -static'
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# Element type of the gidset argument of getgroups(); typically int
|
||||
# or gid_t. Only needed by the UNIX extension.
|
||||
|
||||
getgroups_type=int
|
||||
|
|
@ -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=sun-sunos5-acc
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# Does the system have the index library function? If not, strchr
|
||||
# will be used.
|
||||
|
||||
index=no
|
||||
|
||||
|
||||
# Does the system have the bcopy, bzero, and bcmp library functions?
|
||||
# If not, memcpy/memset/memcmp will be used.
|
||||
|
||||
bstring=no
|
||||
|
||||
|
||||
# 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='<sys/filio.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=no
|
||||
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=no
|
||||
sysconf_pagesize=yes
|
||||
|
||||
|
||||
# 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="-G -z text"
|
||||
|
||||
# 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=
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=SEGSIZ
|
||||
file_text_start='sizeof(struct exec)'
|
||||
mem_text_start='(PAGSIZ+sizeof(struct exec))'
|
||||
text_length_adj='sizeof(struct exec)'
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=bsd
|
||||
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=yes
|
||||
|
||||
|
||||
# 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=siginfo
|
||||
|
||||
|
||||
# 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=yes
|
||||
|
||||
|
||||
# The C compiler used to compile the source code.
|
||||
|
||||
cc=cc
|
||||
|
||||
|
||||
# The name of the linker. This is usually just "ld", or /usr/ccs/bin/ld
|
||||
# in SVR4-based systems.
|
||||
|
||||
ld=/usr/ccs/bin/ld
|
||||
|
||||
|
||||
# The C compiler flags used for all files.
|
||||
|
||||
cflags='-O -Xa -D__svr4__'
|
||||
|
||||
|
||||
# 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='-K PIC'
|
||||
|
||||
|
||||
# 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='-lm -lelf -ldl'
|
||||
|
||||
|
||||
# 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=no
|
||||
vfork=yes
|
||||
gethostname=no
|
||||
uname=yes
|
||||
mktemp=yes
|
||||
tmpnam=yes
|
||||
tempnam=yes
|
||||
getcwd=yes
|
||||
getwd=no
|
||||
rename=yes
|
||||
waitpid=yes
|
||||
wait3=no
|
||||
wait4=no
|
||||
utime_h=yes
|
||||
regcomp=no
|
||||
|
||||
|
||||
# Element type of the gidset argument of getgroups(); typically int
|
||||
# or gid_t. Only needed by the UNIX extension.
|
||||
|
||||
getgroups_type=gid_t
|
||||
|
|
@ -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=sun-sunos5-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=no
|
||||
|
||||
|
||||
# Does the system have the index library function? If not, strchr
|
||||
# will be used.
|
||||
|
||||
index=no
|
||||
|
||||
|
||||
# Does the system have the bcopy, bzero, and bcmp library functions?
|
||||
# If not, memcpy/memset/memcmp will be used.
|
||||
|
||||
bstring=no
|
||||
|
||||
|
||||
# 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='<sys/filio.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=no
|
||||
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=no
|
||||
sysconf_pagesize=yes
|
||||
|
||||
|
||||
# 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="-G -z text"
|
||||
|
||||
# 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=
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=SEGSIZ
|
||||
file_text_start='sizeof(struct exec)'
|
||||
mem_text_start='(PAGSIZ+sizeof(struct exec))'
|
||||
text_length_adj='sizeof(struct exec)'
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=bsd
|
||||
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=yes
|
||||
|
||||
|
||||
# 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=siginfo
|
||||
|
||||
|
||||
# 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=yes
|
||||
|
||||
|
||||
# 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=/usr/ccs/bin/ld
|
||||
|
||||
|
||||
# The C compiler flags used for all files.
|
||||
|
||||
cflags='-O -fschedule-insns2'
|
||||
|
||||
|
||||
# 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='-lm -lelf -ldl'
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=no
|
||||
vfork=yes
|
||||
gethostname=no
|
||||
uname=yes
|
||||
mktemp=yes
|
||||
tmpnam=yes
|
||||
tempnam=yes
|
||||
getcwd=yes
|
||||
getwd=no
|
||||
rename=yes
|
||||
waitpid=yes
|
||||
wait3=no
|
||||
wait4=no
|
||||
utime_h=yes
|
||||
regcomp=no
|
||||
|
||||
|
||||
# Element type of the gidset argument of getgroups(); typically int
|
||||
# or gid_t. Only needed by the UNIX extension.
|
||||
|
||||
getgroups_type=gid_t
|
||||
|
|
@ -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=386pc-386bsd-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='<sys/ioctl.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=bsd
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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=ld
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
# The libraries against which dynamically loaded files are resolved
|
||||
# at the time they are loaded.
|
||||
|
||||
load_libraries='-lc'
|
||||
|
||||
# Additional flags to be passed to the linker for an incremental
|
||||
# linker run (ld -A). Ignored unless load_obj=ld.
|
||||
|
||||
incremental_ldflags=-x
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=4096
|
||||
file_text_start=4096
|
||||
mem_text_start=0
|
||||
text_length_adj=0
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=fpurge
|
||||
flush_tty=tiocflush
|
||||
|
||||
|
||||
# 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=yes
|
||||
|
||||
|
||||
# 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=arg4
|
||||
|
||||
|
||||
# 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=no
|
||||
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=yes
|
||||
|
||||
|
||||
# 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='-Di386 -O'
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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='-lm'
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=
|
||||
vfork=yes
|
||||
gethostname=yes
|
||||
uname=
|
||||
mktemp=yes
|
||||
tmpnam=yes
|
||||
tempnam=yes
|
||||
getcwd=yes
|
||||
getwd=yes
|
||||
rename=yes
|
||||
waitpid=yes
|
||||
wait3=yes
|
||||
wait4=yes
|
||||
utime_h=yes
|
||||
regcomp=no
|
||||
|
||||
|
||||
# Element type of the gidset argument of getgroups(); typically int
|
||||
# or gid_t. Only needed by the UNIX extension.
|
||||
|
||||
getgroups_type=int
|
||||
|
|
@ -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=386pc-dos-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=
|
||||
|
||||
|
||||
# What is the name of the a.out include file?
|
||||
|
||||
aout_h='<aout.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=
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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=ld
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
# The libraries against which dynamically loaded files are resolved
|
||||
# at the time they are loaded.
|
||||
|
||||
load_libraries='-lc'
|
||||
|
||||
# Additional flags to be passed to the linker for an incremental
|
||||
# linker run (ld -A). Ignored unless load_obj=ld.
|
||||
|
||||
incremental_ldflags=-x
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=yes
|
||||
|
||||
# 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=SEGMENT_SIZE
|
||||
file_text_start='sizeof(struct exec)'
|
||||
mem_text_start='(4096+sizeof(struct exec))'
|
||||
text_length_adj=0
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=bsd
|
||||
flush_tty=
|
||||
|
||||
|
||||
# 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='(512*1024)'
|
||||
|
||||
|
||||
# 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=arg4
|
||||
|
||||
|
||||
# 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=no
|
||||
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='-O'
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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='-lm'
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# The UNIX extension likes to know which of the following system calls,
|
||||
# library functions, and include files are supported by the system.
|
||||
|
||||
gettimeofday=
|
||||
ftime=
|
||||
vfork=no
|
||||
gethostname=
|
||||
uname=
|
||||
mktemp=
|
||||
tmpnam=
|
||||
tempnam=
|
||||
getcwd=
|
||||
getwd=
|
||||
rename=
|
||||
waitpid=
|
||||
wait3=
|
||||
wait4=
|
||||
utime_h=
|
||||
regcomp=
|
||||
|
||||
|
||||
# Element type of the gidset argument of getgroups(); typically int
|
||||
# or gid_t. Only needed by the UNIX extension.
|
||||
|
||||
getgroups_type=int
|
||||
|
|
@ -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=convex230-convexos10-cc
|
||||
|
||||
|
||||
# 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='<sys/ioctl.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=bsd
|
||||
|
||||
|
||||
# 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=convex
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
# The libraries against which dynamically loaded files are resolved
|
||||
# at the time they are loaded.
|
||||
|
||||
load_libraries='-lc'
|
||||
|
||||
# Additional flags to be passed to the linker for an incremental
|
||||
# linker run (ld -A). Ignored unless load_obj=ld.
|
||||
|
||||
incremental_ldflags=
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=1024
|
||||
mem_text_start=0
|
||||
text_length_adj=0
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=bsd
|
||||
flush_tty=tiocflush
|
||||
|
||||
|
||||
# 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=no
|
||||
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=cc
|
||||
|
||||
|
||||
# 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='-O'
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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='-lm'
|
||||
|
||||
|
||||
# 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=no
|
||||
getcwd=yes
|
||||
getwd=yes
|
||||
rename=yes
|
||||
waitpid=yes
|
||||
wait3=yes
|
||||
wait4=no
|
||||
utime_h=yes
|
||||
regcomp=
|
||||
|
||||
|
||||
# Element type of the gidset argument of getgroups(); typically int
|
||||
# or gid_t. Only needed by the UNIX extension.
|
||||
|
||||
getgroups_type=gid_t
|
||||
|
|
@ -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=cray-unicos-cc
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
# 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=no
|
||||
sysconf_pagesize=yes
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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="-G -z text"
|
||||
|
||||
# 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=
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=SEGSIZ
|
||||
file_text_start='sizeof(struct exec)'
|
||||
mem_text_start='(PAGSIZ+sizeof(struct exec))'
|
||||
text_length_adj='sizeof(struct exec)'
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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=2000000
|
||||
|
||||
|
||||
# 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=yes
|
||||
|
||||
|
||||
# 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=siginfo
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=yes
|
||||
|
||||
|
||||
# The C compiler used to compile the source code.
|
||||
|
||||
cc=cc
|
||||
|
||||
|
||||
# The name of the linker. This is usually just "ld", or /usr/ccs/bin/ld
|
||||
# in SVR4-based systems.
|
||||
|
||||
ld=/usr/ccs/bin/ld
|
||||
|
||||
|
||||
# The C compiler flags used for all files.
|
||||
|
||||
cflags='-O '
|
||||
|
||||
|
||||
# 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='-K PIC'
|
||||
|
||||
|
||||
# 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='-lm -lelf -ldl'
|
||||
|
||||
|
||||
# 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=no
|
||||
vfork=yes
|
||||
gethostname=no
|
||||
uname=yes
|
||||
mktemp=yes
|
||||
tmpnam=yes
|
||||
tempnam=yes
|
||||
getcwd=yes
|
||||
getwd=yes
|
||||
rename=yes
|
||||
waitpid=yes
|
||||
wait3=no
|
||||
wait4=no
|
||||
utime_h=yes
|
||||
regcomp=
|
||||
|
||||
|
||||
# Element type of the gidset argument of getgroups(); typically int
|
||||
# or gid_t. Only needed by the UNIX extension.
|
||||
|
||||
getgroups_type=gid_t
|
||||
|
|
@ -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=mx300i-svr4-cc
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# Does the system have the index library function? If not, strchr
|
||||
# will be used.
|
||||
|
||||
index=no
|
||||
|
||||
|
||||
# Does the system have the bcopy, bzero, and bcmp library functions?
|
||||
# If not, memcpy/memset/memcmp will be used.
|
||||
|
||||
bstring=no
|
||||
|
||||
|
||||
# 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='<sys/filio.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=no
|
||||
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=no
|
||||
sysconf_pagesize=yes
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
# The libraries against which dynamically loaded files are resolved
|
||||
# at the time they are loaded.
|
||||
|
||||
load_libraries='-lc'
|
||||
|
||||
# Additional flags to be passed to the linker for an incremental
|
||||
# linker run (ld -A). Ignored unless load_obj=ld.
|
||||
|
||||
incremental_ldflags=
|
||||
|
||||
# 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=unused
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=SEGSIZ
|
||||
file_text_start='sizeof(struct exec)'
|
||||
mem_text_start='(PAGSIZ+sizeof(struct exec))'
|
||||
text_length_adj='sizeof(struct exec)'
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=bsd
|
||||
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=no
|
||||
|
||||
|
||||
# Must <alloca.h> be included to use alloca? Is "#pragma alloca" required?
|
||||
|
||||
include_alloca_h=
|
||||
pragma_alloca=
|
||||
|
||||
|
||||
# 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=/usr/ccs/bin/cc
|
||||
|
||||
|
||||
# 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='-O'
|
||||
|
||||
|
||||
# Are extra C compiler flags (such as -D_NO_PROTO) required to compile
|
||||
# Motif applications?
|
||||
|
||||
motif_cflags=-D_NO_PROTO
|
||||
|
||||
|
||||
# Are extra C compiler flags (such as -G 0) required to compile
|
||||
# dynamically loadable files?
|
||||
|
||||
obj_cflags=
|
||||
|
||||
|
||||
# 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='-dn -lm -lelf'
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=no
|
||||
vfork=yes
|
||||
gethostname=no
|
||||
uname=yes
|
||||
mktemp=yes
|
||||
tmpnam=yes
|
||||
tempnam=yes
|
||||
getcwd=yes
|
||||
getwd=no
|
||||
rename=yes
|
||||
waitpid=yes
|
||||
wait3=no
|
||||
wait4=no
|
||||
utime_h=yes
|
||||
regcomp=
|
||||
|
||||
|
||||
# Element type of the gidset argument of getgroups(); typically int
|
||||
# or gid_t. Only needed by the UNIX extension.
|
||||
|
||||
getgroups_type=gid_t
|
||||
|
|
@ -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=sony3200-news4-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=no
|
||||
|
||||
|
||||
# If the FIONREAD ioctl command is defined, which file must be included?
|
||||
|
||||
fionread_include='<sys/ioctl.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=no
|
||||
|
||||
# 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=no
|
||||
|
||||
# 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=bsd
|
||||
|
||||
|
||||
# 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=ecoff
|
||||
|
||||
|
||||
# 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=ld
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
# The libraries against which dynamically loaded files are resolved
|
||||
# at the time they are loaded.
|
||||
|
||||
load_libraries='-lc'
|
||||
|
||||
# Additional flags to be passed to the linker for an incremental
|
||||
# linker run (ld -A). Ignored unless load_obj=ld.
|
||||
|
||||
incremental_ldflags=
|
||||
|
||||
# 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=
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# 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=SEGSIZ
|
||||
file_text_start='sizeof(struct exec)'
|
||||
mem_text_start='(PAGSIZ+sizeof(struct exec))'
|
||||
text_length_adj='sizeof(struct exec)'
|
||||
|
||||
# Only relevant if "aout_format=coff": the system's pagesize.
|
||||
|
||||
coff_pagesize=
|
||||
|
||||
# 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=bsd
|
||||
flush_tty=tiocflush
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# Must <alloca.h> be included to use alloca? Is "#pragma alloca" required?
|
||||
|
||||
include_alloca_h=
|
||||
pragma_alloca=
|
||||
|
||||
|
||||
# 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='-O -DSEEK_SET=1'
|
||||
|
||||
|
||||
# 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=
|
||||
|
||||
|
||||
# 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='-lm'
|
||||
|
||||
|
||||
# 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=no
|
||||
|
||||
|
||||
# Does your C preprocessor support the ANSI-C ## operator, although
|
||||
# __STDC__ is not defined?
|
||||
|
||||
ansi_cpp=no
|
||||
|
||||
|
||||
# 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=no
|
||||
mktemp=yes
|
||||
tmpnam=no
|
||||
tempnam=no
|
||||
getcwd=yes
|
||||
getwd=yes
|
||||
rename=yes
|
||||
waitpid=no
|
||||
wait3=yes
|
||||
wait4=yes
|
||||
utime_h=no
|
||||
regcomp=
|
||||
|
||||
|
||||
# Element type of the gidset argument of getgroups(); typically int
|
||||
# or gid_t. Only needed by the UNIX extension.
|
||||
|
||||
getgroups_type=int
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
This directory tree contains the documentation for Elk as troff source
|
||||
and PostScript hardcopy files.
|
||||
|
||||
You need a troff and the ms macro package to build the documentation
|
||||
from the troff source (see the Makefile in each subdirectory). The
|
||||
files ending in .ps are pre-generated PostScript files; you can send
|
||||
them directly to a PostScript printer or browse them with a PostScript
|
||||
previewer. The PostScript file have been generated with GNU groff.
|
||||
|
||||
As a courtesy to our US audience, the PostScript files are in US
|
||||
letter format. If you don't like this (and your groff default is A4),
|
||||
deactivate the ".pl 11i" directives in util/tmac.scheme,
|
||||
usenix/usenix.ms, and man/elk.1 (i.e. insert a comment token before it)
|
||||
and rebuild the document(s).
|
||||
|
||||
All the documents have been prepared for translation to HTML using
|
||||
the Elk-based `unroff' package (see ../README for availability
|
||||
information).
|
||||
|
||||
|
||||
kernel/ The Scheme Reference for Elk. It describes the Scheme language
|
||||
dialect implemented by the Scheme interpreter included in
|
||||
Elk (a superset of the official language).
|
||||
|
||||
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'
|
||||
on your system. The manual page essentially describes the
|
||||
command line options of the interpreter.
|
||||
|
||||
xlib/ The reference manual for the Xlib extension to Elk.
|
||||
|
||||
xt/ The reference manual for the Xt (X11 Toolkit Intrinsics)
|
||||
extension to Elk.
|
||||
|
||||
unix/ The reference manual for the UNIX extension.
|
||||
|
||||
record/ The reference manual for the record extension.
|
||||
|
||||
bitstring/ The reference manual for the bit string extension.
|
||||
|
||||
regexp/ The reference manual for the regular expression extension.
|
||||
|
||||
oops/ A manual for the simple Scheme-based object oriented programming
|
||||
tool included in Elk (oops.scm).
|
||||
|
||||
cprog/ The C/C++ Programmer's Manual for Elk. This comprehensive
|
||||
manual describes the facilities of the C/C++ interface of
|
||||
Elk. Topics range from the general architecture of Elk-based
|
||||
applications and defining application-specific Scheme types
|
||||
and primitives, to more advanced subjects such as interacting
|
||||
with the garbage collector. The audience are authors of
|
||||
Elk-based applications and extension writers.
|
||||
|
||||
This manual is a replacement for the document that lived in
|
||||
a subdirectory `ex' in earlier version of Elk.
|
||||
|
||||
util/ A collection of troff macro files and other utilities needed
|
||||
for typesetting the documentation in the above directories.
|
||||
|
||||
There is a small C program `mkindex.c' that is required to
|
||||
build the C/C++ Programmer's Manual (cprog/cprog.ms); you
|
||||
will have to compile it by calling "make" if you must typeset
|
||||
the manual. See the comment at the beginning of util/mkindex.c
|
||||
for a brief explanation of what it does.
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
MANUAL= bitstring
|
||||
TROFF= groff -ms -t
|
||||
UNROFF= unroff -ms
|
||||
|
||||
$(MANUAL).ps: $(MANUAL).ms index.ms
|
||||
(cat $(MANUAL).ms ../util/tmac.index index.ms; echo ".Tc")\
|
||||
| $(TROFF) 2> /dev/null > $(MANUAL).ps
|
||||
|
||||
$(MANUAL).html: $(MANUAL).ms
|
||||
(cat $?; echo ".Tc") | $(UNROFF) document=$(MANUAL)
|
||||
|
||||
index.ms: $(MANUAL).ms index.raw
|
||||
sort -f -t# +1 -3 +0n index.raw | awk -f ../util/fixindex.awk\
|
||||
| awk -f ../util/block.awk >index.ms
|
||||
|
||||
index.raw: $(MANUAL).ms
|
||||
$(TROFF) $(MANUAL).ms 2> index.raw >/dev/null
|
||||
|
||||
check:
|
||||
checknr -c.Ul.Pr.Sy.Va.Sh.Ix.Id.Ch -a.Ss.Se.[[.]] $(MANUAL).ms |\
|
||||
grep -v "Empty command"
|
||||
|
||||
clean:
|
||||
rm -f index.raw index.ms $(MANUAL).ps $(MANUAL).html
|
||||
|
|
@ -0,0 +1,209 @@
|
|||
.so ../util/tmac.scheme
|
||||
.Ul
|
||||
.TL
|
||||
Reference Manual for the
|
||||
.sp .5
|
||||
Elk Bit String Extension
|
||||
.AU
|
||||
Oliver Laumann
|
||||
.
|
||||
.Ch "Introduction"
|
||||
.
|
||||
.PP
|
||||
The bit string extension to Elk defines a new data type \f2bitstring\fP
|
||||
(a sequence of zero or more bits) and functions to create and
|
||||
manipulate bit strings.
|
||||
The bits in a bit string are numbered beginning from zero up to the
|
||||
number of bits minus one; bit number 0 is the
|
||||
.Ix "least significant bit"
|
||||
.Ix LSB
|
||||
least significant bit (LSB), and the highest numbered bit is the
|
||||
.Ix "most significant bit"
|
||||
.Ix MSB
|
||||
most significant bit (MSB).
|
||||
.PP
|
||||
The
|
||||
.Ix "print representation"
|
||||
print representation of bit strings is introduced by the sequence
|
||||
`#*'; the bits are printed starting with the most significant bit.
|
||||
Likewise, in the reader the sequence `#*' introduces a bit string
|
||||
constant.
|
||||
.LP
|
||||
Example:
|
||||
.Ss
|
||||
#*0100110111
|
||||
.sp .5
|
||||
#* \f2(empty bit string)\fP
|
||||
.Se
|
||||
.
|
||||
.Ch "Using the Bit String Extension"
|
||||
.
|
||||
.PP
|
||||
To load the bit string extension, evaluate the expression
|
||||
.Ss
|
||||
(require 'bitstring)
|
||||
.Se
|
||||
.PP
|
||||
This causes the files
|
||||
.Ix bitstring.scm
|
||||
\f2bitstring.scm\fP and
|
||||
.Ix bitstring.o
|
||||
\f2bitstring.o\fP to be loaded (\f2bitstring.o\fP must be statically
|
||||
linked with the interpreter on platforms that do not support dynamic
|
||||
loading of object files).
|
||||
.PP
|
||||
Loading the bit string extension causes the
|
||||
.Ix feature
|
||||
features \f2bitstring\fP and \f2bitstring.o\fP to be provided.
|
||||
.
|
||||
.Ch "Creating Bit Strings"
|
||||
.
|
||||
.Pr make-bitstring length init
|
||||
.LP
|
||||
\f2make-bitstring\fP returns a new bit string of the given length.
|
||||
If init is #t, all bits are initialized to 1; if init is #f, all
|
||||
bits are initialized to 0.
|
||||
.
|
||||
.Pr bitstring-copy bitstring
|
||||
.LP
|
||||
This procedure returns a copy of the specified bit string.
|
||||
.
|
||||
.Pr bitstring-append bitstring\*1 bitstring\*2
|
||||
.LP
|
||||
\f2bitstring-append\fP returns a new bit string holding the
|
||||
.Ix concatenation
|
||||
concatenation of the specified bit string arguments.
|
||||
.
|
||||
.Ch "Bit String Predicates"
|
||||
.
|
||||
.Pr bitstring? obj
|
||||
.LP
|
||||
This
|
||||
.Ix "type predicate"
|
||||
type predicate returns #t if \f2obj\fP is a bit string, #f otherwise.
|
||||
.
|
||||
.Pr bitstring=? bitstring\*1 bitstring\*2
|
||||
.LP
|
||||
This procedure returns #t if the bit string arguments are of the same
|
||||
length and contain the same bits, #f otherwise.
|
||||
.
|
||||
.Pr bitstring-zero? bitstring
|
||||
.LP
|
||||
\f2bitstring-zero?\fP returns #t if the specified bit string
|
||||
contains only 0 bits, #f otherwise.
|
||||
.
|
||||
.Ch "Integer Conversions"
|
||||
.
|
||||
.[[
|
||||
.Pr unsigned-integer\(mi>bitstring length i
|
||||
.Pr signed-integer\(mi>bitstring length i
|
||||
.]]
|
||||
.LP
|
||||
Both procedures convert the exact integer argument \f2i\fP into a bit
|
||||
string of \f2length\fP bits and return the bit string.
|
||||
\f2length\fP must be large enough to hold the bit string
|
||||
representation of \f2i\fP.
|
||||
The integer argument to \f2unsigned-integer->bitstring\fP must be
|
||||
non-negative.
|
||||
\f2signed-integer->bitstring\fP uses
|
||||
.Ix "two's complement"
|
||||
two's complement representation for negative integers.
|
||||
.
|
||||
.[[
|
||||
.Pr bitstring\(mi>unsigned-integer bitstring
|
||||
.Pr bitstring\(mi>signed-integer bitstring
|
||||
.]]
|
||||
.LP
|
||||
Both procedures convert the given bit string into an integer.
|
||||
\f2bitstring->signed-integer\fP interprets the bit string as the
|
||||
.Ix "two's complement"
|
||||
two's complement representation of a signed integer.
|
||||
.
|
||||
.Ch "Selecting Components of Bit Strings"
|
||||
.
|
||||
.Pr bitstring-length bitstring
|
||||
.LP
|
||||
This procedure returns the number of bits in the specified bit string.
|
||||
.
|
||||
.Pr bitstring-ref bitstring index
|
||||
.LP
|
||||
\f2bitstring-ref\fP returns #t if the \f2index\fP-th bit in the
|
||||
given bit string is 1, #f otherwise.
|
||||
.
|
||||
.Pr bitstring-substring bitstring from to
|
||||
.LP
|
||||
This procedure returns a new bit string initialized with the bits
|
||||
of \f2bitstring\fP starting at the index \f2from\fP (inclusive)
|
||||
and ending at the index \f2to\fP (exclusive).
|
||||
.
|
||||
.Ch "Modifying Bit Strings"
|
||||
.
|
||||
.Pr bitstring-fill! bitstring init
|
||||
.LP
|
||||
This procedure sets all bits in the specified bit string to 1 if
|
||||
\f2init\fP is #t, or to 0 if \f2init\fP is #f.
|
||||
It returns the non-printing object.
|
||||
.
|
||||
.Pr bitstring-set! bitstring index init
|
||||
.LP
|
||||
\f2bitstring-set!\fP sets the \f2index\fP-th bit in the specified
|
||||
bit string to 1 if \f2init\fP is #t, or to 0 if \f2init\fP is #f.
|
||||
It returns the non-printing object.
|
||||
.
|
||||
.Pr bitstring-move! dst-bitstring src-bitstring
|
||||
.LP
|
||||
\f2bitstring-move!\fP destructively copies the contents of the
|
||||
bit string \f2src-bitstring\fP into \f2dst-bitstring\fP.
|
||||
Both bit strings must have the same length.
|
||||
It returns the non-printing object.
|
||||
.
|
||||
.Pr bitstring-substring-move! src-bitstring from\*1 to\*1 dst-bitstring from\*2
|
||||
.LP
|
||||
This procedure destructively copies the bits from \f2src-bitstring\fP
|
||||
starting at index \f2from\*1\fP (inclusive) and ending at index \f2to\*1\fP
|
||||
(exclusive) into \f2dst-bitstring\fP starting at index \f2from\*2\fP
|
||||
(inclusive).
|
||||
.Ix overlapping
|
||||
Overlapping is handled correctly.
|
||||
The procedure returns the non-printing object.
|
||||
.
|
||||
.Ch "Bitwise Logical Operations"
|
||||
.
|
||||
.Pr bitstring-not bitstring
|
||||
.LP
|
||||
This procedure returns a new bit string initialized to the
|
||||
bitwise logical negation of the given bit string.
|
||||
.
|
||||
.Pr bitstring-not! dst-bitstring src-bitstring
|
||||
.LP
|
||||
This procedure destructively overwrites the contents of \f2dst-bitstring\fP
|
||||
with the bitwise logical negation of the bits in \f2src-bitstring\fP.
|
||||
Both bit strings must have the same length.
|
||||
\f2bitstring-not!\fP returns the non-printing object.
|
||||
.
|
||||
.[[
|
||||
.Pr bitstring-and bitstring\*1 bitstring\*2
|
||||
.Pr bitstring-andnot bitstring\*1 bitstring\*2
|
||||
.Pr bitstring-or bitstring\*1 bitstring\*2
|
||||
.Pr bitstring-xor bitstring\*1 bitstring\*2
|
||||
.]]
|
||||
.LP
|
||||
These procedures return a new bit string initialized to the bitwise logical
|
||||
\f2and\fP (logical \f2and\fP with the negation, logical \f2or\fP,
|
||||
logical exclusive \f2or\fP, respectively) of the two bit string arguments.
|
||||
The two bit strings must have the same length.
|
||||
.
|
||||
.[[
|
||||
.Pr bitstring-and! dst-bitstring src-bitstring
|
||||
.Pr bitstring-or! dst-bitstring src-bitstring
|
||||
.Pr bitstring-andnot! dst-bitstring src-bitstring
|
||||
.Pr bitstring-xor! dst-bitstring src-bitstring
|
||||
.]]
|
||||
.LP
|
||||
These procedures are the destructive versions of the four bitwise
|
||||
logical procedures described above.
|
||||
They perform the corresponding logical operation on the two bit string
|
||||
arguments and overwrite the contents of \f2dst-bitstring\fP with the
|
||||
result.
|
||||
Both bit strings must have the same length.
|
||||
These procedures return the non-printing object.
|
||||
|
|
@ -0,0 +1,533 @@
|
|||
%!PS-Adobe-3.0
|
||||
%%Creator: groff version 1.08
|
||||
%%DocumentNeededResources: font Times-Bold
|
||||
%%+ font Times-Italic
|
||||
%%+ font Times-Roman
|
||||
%%+ font Courier
|
||||
%%+ font Symbol
|
||||
%%DocumentSuppliedResources: procset grops 1.08 0
|
||||
%%Pages: 6
|
||||
%%PageOrder: Ascend
|
||||
%%Orientation: Portrait
|
||||
%%EndComments
|
||||
%%BeginProlog
|
||||
%%BeginResource: procset grops 1.08 0
|
||||
/setpacking where{
|
||||
pop
|
||||
currentpacking
|
||||
true setpacking
|
||||
}if
|
||||
/grops 120 dict dup begin
|
||||
/SC 32 def
|
||||
/A/show load def
|
||||
/B{0 SC 3 -1 roll widthshow}bind def
|
||||
/C{0 exch ashow}bind def
|
||||
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/E{0 rmoveto show}bind def
|
||||
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/G{0 rmoveto 0 exch ashow}bind def
|
||||
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/I{0 exch rmoveto show}bind def
|
||||
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/K{0 exch rmoveto 0 exch ashow}bind def
|
||||
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/M{rmoveto show}bind def
|
||||
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/O{rmoveto 0 exch ashow}bind def
|
||||
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/Q{moveto show}bind def
|
||||
/R{moveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/S{moveto 0 exch ashow}bind def
|
||||
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/SF{
|
||||
findfont exch
|
||||
[exch dup 0 exch 0 exch neg 0 0]makefont
|
||||
dup setfont
|
||||
[exch/setfont cvx]cvx bind def
|
||||
}bind def
|
||||
/MF{
|
||||
findfont
|
||||
[5 2 roll
|
||||
0 3 1 roll
|
||||
neg 0 0]makefont
|
||||
dup setfont
|
||||
[exch/setfont cvx]cvx bind def
|
||||
}bind def
|
||||
/level0 0 def
|
||||
/RES 0 def
|
||||
/PL 0 def
|
||||
/LS 0 def
|
||||
/PLG{
|
||||
gsave newpath clippath pathbbox grestore
|
||||
exch pop add exch pop
|
||||
}bind def
|
||||
/BP{
|
||||
/level0 save def
|
||||
1 setlinecap
|
||||
1 setlinejoin
|
||||
72 RES div dup scale
|
||||
LS{
|
||||
90 rotate
|
||||
}{
|
||||
0 PL translate
|
||||
}ifelse
|
||||
1 -1 scale
|
||||
}bind def
|
||||
/EP{
|
||||
level0 restore
|
||||
showpage
|
||||
}bind def
|
||||
/DA{
|
||||
newpath arcn stroke
|
||||
}bind def
|
||||
/SN{
|
||||
transform
|
||||
.25 sub exch .25 sub exch
|
||||
round .25 add exch round .25 add exch
|
||||
itransform
|
||||
}bind def
|
||||
/DL{
|
||||
SN
|
||||
moveto
|
||||
SN
|
||||
lineto stroke
|
||||
}bind def
|
||||
/DC{
|
||||
newpath 0 360 arc closepath
|
||||
}bind def
|
||||
/TM matrix def
|
||||
/DE{
|
||||
TM currentmatrix pop
|
||||
translate scale newpath 0 0 .5 0 360 arc closepath
|
||||
TM setmatrix
|
||||
}bind def
|
||||
/RC/rcurveto load def
|
||||
/RL/rlineto load def
|
||||
/ST/stroke load def
|
||||
/MT/moveto load def
|
||||
/CL/closepath load def
|
||||
/FL{
|
||||
currentgray exch setgray fill setgray
|
||||
}bind def
|
||||
/BL/fill load def
|
||||
/LW/setlinewidth load def
|
||||
/RE{
|
||||
findfont
|
||||
dup maxlength 1 index/FontName known not{1 add}if dict begin
|
||||
{
|
||||
1 index/FID ne{def}{pop pop}ifelse
|
||||
}forall
|
||||
/Encoding exch def
|
||||
dup/FontName exch def
|
||||
currentdict end definefont pop
|
||||
}bind def
|
||||
/DEFS 0 def
|
||||
/EBEGIN{
|
||||
moveto
|
||||
DEFS begin
|
||||
}bind def
|
||||
/EEND/end load def
|
||||
/CNT 0 def
|
||||
/level1 0 def
|
||||
/PBEGIN{
|
||||
/level1 save def
|
||||
translate
|
||||
div 3 1 roll div exch scale
|
||||
neg exch neg exch translate
|
||||
0 setgray
|
||||
0 setlinecap
|
||||
1 setlinewidth
|
||||
0 setlinejoin
|
||||
10 setmiterlimit
|
||||
[]0 setdash
|
||||
/setstrokeadjust where{
|
||||
pop
|
||||
false setstrokeadjust
|
||||
}if
|
||||
/setoverprint where{
|
||||
pop
|
||||
false setoverprint
|
||||
}if
|
||||
newpath
|
||||
/CNT countdictstack def
|
||||
userdict begin
|
||||
/showpage{}def
|
||||
}bind def
|
||||
/PEND{
|
||||
clear
|
||||
countdictstack CNT sub{end}repeat
|
||||
level1 restore
|
||||
}bind def
|
||||
end def
|
||||
/setpacking where{
|
||||
pop
|
||||
setpacking
|
||||
}if
|
||||
%%EndResource
|
||||
%%IncludeResource: font Times-Bold
|
||||
%%IncludeResource: font Times-Italic
|
||||
%%IncludeResource: font Times-Roman
|
||||
%%IncludeResource: font Courier
|
||||
%%IncludeResource: font Symbol
|
||||
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL
|
||||
841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron
|
||||
/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef/.notdef/.notdef
|
||||
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
|
||||
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/space
|
||||
/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright/parenleft
|
||||
/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four
|
||||
/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C
|
||||
/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash
|
||||
/bracketright/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q
|
||||
/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase
|
||||
/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger
|
||||
/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
|
||||
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
|
||||
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar
|
||||
/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus
|
||||
/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu
|
||||
/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright
|
||||
/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde
|
||||
/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute
|
||||
/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
|
||||
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
|
||||
/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute
|
||||
/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve
|
||||
/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex
|
||||
/udieresis/yacute/thorn/ydieresis]def/Courier@0 ENC0/Courier RE/Times-Roman@0
|
||||
ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0
|
||||
/Times-Bold RE
|
||||
%%EndProlog
|
||||
%%Page: 1 1
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 12/Times-Bold@0 SF(Refer)222.444 120 Q(ence Manual f)-.216 E(or the)-.3 E
|
||||
(Elk Bit String Extension)225.486 138 Q/F1 10/Times-Italic@0 SF(Oliver Laumann)
|
||||
255.085 162 Q/F2 11/Times-Bold@0 SF 2.75(1. Intr)72 234 R(oduction)-.198 E/F3
|
||||
11/Times-Roman@0 SF .192(The bit string e)97 252.6 R .192
|
||||
(xtension to Elk de\214nes a ne)-.165 F 2.942(wd)-.275 G .191(ata type)302.69
|
||||
252.6 R/F4 11/Times-Italic@0 SF(bitstring)2.941 E F3 .191
|
||||
(\(a sequence of zero or more)2.941 F 1.565
|
||||
(bits\) and functions to create and manipulate bit strings.)72 267.6 R 1.566
|
||||
(The bits in a bit string are numbered)7.065 F(be)72 282.6 Q .652(ginning from\
|
||||
zero up to the number of bits minus one; bit number 0 is the least signi\214c\
|
||||
ant bit)-.165 F
|
||||
(\(LSB\), and the highest numbered bit is the most signi\214cant bit \(MSB\).)
|
||||
72 297.6 Q .065(The print representation of bit strings is introduced by the s\
|
||||
equence `#*'; the bits are printed)97 316.2 R .922
|
||||
(starting with the most signi\214cant bit.)72 331.2 R(Lik)6.422 E -.275(ew)-.11
|
||||
G .921(ise, in the reader the sequence `#*' introduces a bit).275 F
|
||||
(string constant.)72 346.2 Q(Example:)72 364.8 Q/F5 10/Courier@0 SF
|
||||
(#*0100110111)100.346 387.303 Q(#*)100.346 408.303 Q F1(\(empty bit string\))
|
||||
190.346 408.303 Q F2 2.75(2. Using)72 445.303 R(the Bit String Extension)2.75 E
|
||||
F3 1.76 -.88(To l)97 463.903 T(oad the bit string e).88 E(xtension, e)-.165 E
|
||||
-.275(va)-.275 G(luate the e).275 E(xpression)-.165 E F5
|
||||
(\(require 'bitstring\))100.346 486.406 Q F3 .319(This causes the \214les)97
|
||||
512.006 R F4(bitstring)3.07 E(.scm)-.165 E F3(and)3.07 E F4(bitstring)3.07 E
|
||||
(.o)-.165 E F3 .32(to be loaded \()3.07 F F4(bitstring)A(.o)-.165 E F3 .32
|
||||
(must be statically)3.07 F(link)72 527.006 Q(ed with the interpreter on platfo\
|
||||
rms that do not support dynamic loading of object \214les\).)-.11 E
|
||||
(Loading the bit string e)97 545.606 Q(xtension causes the features)-.165 E F4
|
||||
(bitstring)2.75 E F3(and)2.75 E F4(bitstring)2.75 E(.o)-.165 E F3(to be pro)
|
||||
2.75 E(vided.)-.165 E F2 2.75(3. Cr)72 575.606 R(eating Bit Strings)-.198 E
|
||||
(\(mak)72 605.606 Q(e-bitstring)-.11 E F4(length init)4.583 E F2 257.742(\)p)C
|
||||
-.198(ro)462.244 605.606 S(cedur).198 E(e)-.198 E F4(mak)72 624.206 Q
|
||||
(e-bitstring)-.11 E F3 .203(returns a ne)2.953 F 2.953(wb)-.275 G .203
|
||||
(it string of the gi)206.847 624.206 R -.165(ve)-.275 G 2.953(nl).165 G 2.952
|
||||
(ength. If)302.451 624.206 R .202(init is #t, all bits are initialized to 1;)
|
||||
2.952 F(if init is #f, all bits are initialized to 0.)72 639.206 Q F2
|
||||
(\(bitstring-copy)72 669.206 Q F4(bitstring)4.583 E F2 268.929(\)p)C -.198(ro)
|
||||
462.244 669.206 S(cedur).198 E(e)-.198 E F3(This procedure returns a cop)72
|
||||
687.806 Q 2.75(yo)-.11 G 2.75(ft)211.491 687.806 S(he speci\214ed bit string.)
|
||||
220.962 687.806 Q EP
|
||||
%%Page: 2 2
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 11/Times-Roman@0 SF 2.75(-2-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57
|
||||
75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL
|
||||
108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130
|
||||
57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57
|
||||
146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57
|
||||
168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57
|
||||
190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57
|
||||
212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57
|
||||
234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57
|
||||
256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57
|
||||
278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57
|
||||
300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57
|
||||
322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57
|
||||
344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57
|
||||
366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57
|
||||
388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57
|
||||
410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57
|
||||
432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57
|
||||
454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57
|
||||
476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57
|
||||
498.5 57 DL/F1 11/Times-Bold@0 SF(\(bitstring-append)72 87 Q/F2 11
|
||||
/Times-Italic@0 SF(bitstring)4.583 E/F3 10/Times-Italic@0 SF(1)3.3 I F2
|
||||
(bitstring)2.75 -3.3 M F3(2)3.3 I F1 206.041(\)p)-3.3 K -.198(ro)462.244 87 S
|
||||
(cedur).198 E(e)-.198 E F2(bitstring-append)72 105.6 Q F0 .032(returns a ne)
|
||||
2.782 F 2.783(wb)-.275 G .033
|
||||
(it string holding the concatenation of the speci\214ed bit string ar)215.448
|
||||
105.6 R(gu-)-.198 E(ments.)72 120.6 Q F1 2.75(4. Bit)72 150.6 R(String Pr)2.75
|
||||
E(edicates)-.198 E(\(bitstring?)72 180.6 Q F2(obj)4.583 E F1 312.324(\)p)C
|
||||
-.198(ro)462.244 180.6 S(cedur).198 E(e)-.198 E F0
|
||||
(This type predicate returns #t if)72 199.2 Q F2(obj)2.75 E F0
|
||||
(is a bit string, #f otherwise.)2.75 E F1(\(bitstring=?)72 229.2 Q F2
|
||||
(bitstring)4.583 E F3(1)3.3 I F2(bitstring)2.75 -3.3 M F3(2)3.3 I F1 232.782
|
||||
(\)p)-3.3 K -.198(ro)462.244 229.2 S(cedur).198 E(e)-.198 E F0 .57
|
||||
(This procedure returns #t if the bit string ar)72 247.8 R .57
|
||||
(guments are of the same length and contain the same)-.198 F
|
||||
(bits, #f otherwise.)72 262.8 Q F1(\(bitstring-zer)72 292.8 Q(o?)-.198 E F2
|
||||
(bitstring)4.583 E F1 265.475(\)p)C -.198(ro)462.244 292.8 S(cedur).198 E(e)
|
||||
-.198 E F2(bitstring-zer)72 311.4 Q(o?)-.495 E F0
|
||||
(returns #t if the speci\214ed bit string contains only 0 bits, #f otherwise.)
|
||||
2.75 E F1 2.75(5. Integer)72 341.4 R(Con)2.75 E -.11(ve)-.44 G(rsions).11 E
|
||||
(\(unsigned-integer)72 371.4 Q/F4 11/Symbol SF(-)A F1(>bitstring)A F2(length i)
|
||||
4.583 E F1 207.428(\)p)C -.198(ro)462.244 371.4 S(cedur).198 E(e)-.198 E
|
||||
(\(signed-integer)72 386.4 Q F4(-)A F1(>bitstring)A F2(length i)4.583 E F1
|
||||
219.66(\)p)C -.198(ro)462.244 386.4 S(cedur).198 E(e)-.198 E F0 .3
|
||||
(Both procedures con)72 405 R -.165(ve)-.44 G .3(rt the e).165 F .3(xact inte)
|
||||
-.165 F .301(ger ar)-.165 F(gument)-.198 E F2(i)3.051 E F0 .301
|
||||
(into a bit string of)3.051 F F2(length)3.051 E F0 .301(bits and return the)
|
||||
3.051 F .051(bit string.)72 420 R F2(length)5.551 E F0 .051(must be lar)2.801 F
|
||||
.05(ge enough to hold the bit string representation of)-.198 F F2(i)2.8 E F0
|
||||
5.55(.T)C .05(he inte)434.622 420 R .05(ger ar)-.165 F(gu-)-.198 E 1.176
|
||||
(ment to)72 435 R F2(unsigned-inte)3.926 E -.11(ge)-.44 G -.22(r-).11 G
|
||||
(>bitstring).22 E F0 1.177(must be non-ne)3.926 F -.055(ga)-.165 G(ti).055 E
|
||||
-.165(ve)-.275 G(.).165 E F2(signed-inte)6.677 E -.11(ge)-.44 G -.22(r-).11 G
|
||||
(>bitstring).22 E F0 1.177(uses tw)3.927 F(o')-.11 E(s)-.605 E
|
||||
(complement representation for ne)72 450 Q -.055(ga)-.165 G(ti).055 E .33 -.165
|
||||
(ve i)-.275 H(nte).165 E(gers.)-.165 E F1(\(bitstring)72 480 Q F4(-)A F1
|
||||
(>unsigned-integer)A F2(bitstring)4.583 E F1 203.446(\)p)C -.198(ro)462.244 480
|
||||
S(cedur).198 E(e)-.198 E(\(bitstring)72 495 Q F4(-)A F1(>signed-integer)A F2
|
||||
(bitstring)4.583 E F1 215.678(\)p)C -.198(ro)462.244 495 S(cedur).198 E(e)-.198
|
||||
E F0 .9(Both procedures con)72 513.6 R -.165(ve)-.44 G .9(rt the gi).165 F
|
||||
-.165(ve)-.275 G 3.65(nb).165 G .9(it string into an inte)235.23 513.6 R(ger)
|
||||
-.165 E(.)-.605 E F2(bitstring->signed-inte)6.399 E -.11(ge)-.44 G(r).11 E F0
|
||||
(interprets)3.649 E(the bit string as the tw)72 528.6 Q(o')-.11 E 2.75(sc)-.605
|
||||
G(omplement representation of a signed inte)189.832 528.6 Q(ger)-.165 E(.)-.605
|
||||
E F1 2.75(6. Selecting)72 558.6 R(Components of Bit Strings)2.75 E
|
||||
(\(bitstring-length)72 588.6 Q F2(bitstring)4.583 E F1 261.592(\)p)C -.198(ro)
|
||||
462.244 588.6 S(cedur).198 E(e)-.198 E F0
|
||||
(This procedure returns the number of bits in the speci\214ed bit string.)72
|
||||
607.2 Q F1(\(bitstring-r)72 637.2 Q(ef)-.198 E F2(bitstring inde)4.583 E(x)-.22
|
||||
E F1 251.34(\)p)C -.198(ro)462.244 637.2 S(cedur).198 E(e)-.198 E F2
|
||||
(bitstring-r)72 655.8 Q(ef)-.407 E F0(returns #t if the)2.75 E F2(inde)2.75 E
|
||||
(x)-.22 E F0(-th bit in the gi)A -.165(ve)-.275 G 2.75(nb).165 G
|
||||
(it string is 1, #f otherwise.)310.48 655.8 Q F1(\(bitstring-substring)72 685.8
|
||||
Q F2(bitstring fr)4.583 E(om to)-.495 E F1 212.576(\)p)C -.198(ro)462.244 685.8
|
||||
S(cedur).198 E(e)-.198 E F0 1.018(This procedure returns a ne)72 704.4 R 3.768
|
||||
(wb)-.275 G 1.019(it string initialized with the bits of)213.358 704.4 R F2
|
||||
(bitstring)3.769 E F0 1.019(starting at the inde)3.769 F(x)-.165 E F2(fr)72
|
||||
719.4 Q(om)-.495 E F0(\(inclusi)2.75 E -.165(ve)-.275 G 2.75(\)a).165 G
|
||||
(nd ending at the inde)149.275 719.4 Q(x)-.165 E F2(to)2.75 E F0(\(e)2.75 E
|
||||
(xclusi)-.165 E -.165(ve)-.275 G(\).).165 E EP
|
||||
%%Page: 3 3
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 11/Times-Roman@0 SF 2.75(-3-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57
|
||||
75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL
|
||||
108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130
|
||||
57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57
|
||||
146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57
|
||||
168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57
|
||||
190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57
|
||||
212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57
|
||||
234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57
|
||||
256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57
|
||||
278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57
|
||||
300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57
|
||||
322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57
|
||||
344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57
|
||||
366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57
|
||||
388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57
|
||||
410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57
|
||||
432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57
|
||||
454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57
|
||||
476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57
|
||||
498.5 57 DL/F1 11/Times-Bold@0 SF 2.75(7. Modifying)72 87 R(Bit Strings)2.75 E
|
||||
(\(bitstring-\214ll!)72 117 Q/F2 11/Times-Italic@0 SF(bitstring init)4.583 E F1
|
||||
257.61(\)p)C -.198(ro)462.244 117 S(cedur).198 E(e)-.198 E F0 .138
|
||||
(This procedure sets all bits in the speci\214ed bit string to 1 if)72 135.6 R
|
||||
F2(init)2.888 E F0 .138(is #t, or to 0 if)2.888 F F2(init)2.888 E F0 .137
|
||||
(is #f.)2.887 F .137(It returns)5.637 F(the non-printing object.)72 150.6 Q F1
|
||||
(\(bitstring-set!)72 180.6 Q F2(bitstring inde)4.583 E 2.75(xi)-.22 G(nit)
|
||||
210.189 180.6 Q F1 230.66(\)p)C -.198(ro)462.244 180.6 S(cedur).198 E(e)-.198 E
|
||||
F2(bitstring-set!)72 199.2 Q F0 .405(sets the)3.154 F F2(inde)3.155 E(x)-.22 E
|
||||
F0 .405(-th bit in the speci\214ed bit string to 1 if)B F2(init)3.155 E F0 .405
|
||||
(is #t, or to 0 if)3.155 F F2(init)3.155 E F0 .405(is #f.)3.155 F(It)5.905 E
|
||||
(returns the non-printing object.)72 214.2 Q F1(\(bitstring-mo)72 244.2 Q -.11
|
||||
(ve)-.11 G(!).11 E F2(dst-bitstring sr)4.583 E(c-bitstring)-.407 E F1 189.201
|
||||
(\)p)C -.198(ro)462.244 244.2 S(cedur).198 E(e)-.198 E F2(bitstring-mo)72 262.8
|
||||
Q(ve!)-.11 E F0(destructi)3.888 E -.165(ve)-.275 G 1.138
|
||||
(ly copies the contents of the bit string).165 F F2(sr)3.887 E(c-bitstring)
|
||||
-.407 E F0(into)3.887 E F2(dst-bitstring)3.887 E F0(.)A
|
||||
(Both bit strings must ha)72 277.8 Q .33 -.165(ve t)-.22 H(he same length.).165
|
||||
E(It returns the non-printing object.)5.5 E F1(\(bitstring-substring-mo)72
|
||||
307.8 Q -.11(ve)-.11 G(!).11 E F2(sr)4.583 E(c-bitstring fr)-.407 E(om)-.495 E
|
||||
/F3 10/Times-Italic@0 SF(1)3.3 I F2(to)2.75 -3.3 M F3(1)3.3 I F2
|
||||
(dst-bitstring fr)2.75 -3.3 M(om)-.495 E F3(2)3.3 I F1 69.151(\)p)-3.3 K -.198
|
||||
(ro)462.244 307.8 S(cedur).198 E(e)-.198 E F0 .762(This procedure destructi)72
|
||||
326.4 R -.165(ve)-.275 G .763(ly copies the bits from).165 F F2(sr)3.513 E
|
||||
(c-bitstring)-.407 E F0 .763(starting at inde)3.513 F(x)-.165 E F2(fr)3.513 E
|
||||
(om)-.495 E F3(1)3.3 I F0(\(inclusi)3.513 -3.3 M -.165(ve)-.275 G(\)).165 E
|
||||
.303(and ending at inde)72 341.4 R(x)-.165 E F2(to)3.053 E F3(1)3.3 I F0(\(e)
|
||||
3.053 -3.3 M(xclusi)-.165 E -.165(ve)-.275 G 3.053(\)i).165 G(nto)233.247 341.4
|
||||
Q F2(dst-bitstring)3.053 E F0 .302(starting at inde)3.053 F(x)-.165 E F2(fr)
|
||||
3.052 E(om)-.495 E F3(2)3.3 I F0(\(inclusi)3.052 -3.3 M -.165(ve)-.275 G 3.052
|
||||
(\). Ov).165 F(erlap-)-.165 E(ping is handled correctly)72 356.4 Q 5.5(.T)-.715
|
||||
G(he procedure returns the non-printing object.)195.321 356.4 Q F1 2.75
|
||||
(8. Bitwise)72 386.4 R(Logical Operations)2.75 E(\(bitstring-not)72 416.4 Q F2
|
||||
(bitstring)4.583 E F1 275.65(\)p)C -.198(ro)462.244 416.4 S(cedur).198 E(e)
|
||||
-.198 E F0 .668(This procedure returns a ne)72 435 R 3.419(wb)-.275 G .669
|
||||
(it string initialized to the bitwise logical ne)211.609 435 R -.055(ga)-.165 G
|
||||
.669(tion of the gi).055 F -.165(ve)-.275 G 3.419(nb).165 G(it)497.884 435 Q
|
||||
(string.)72 450 Q F1(\(bitstring-not!)72 480 Q F2(dst-bitstring sr)4.583 E
|
||||
(c-bitstring)-.407 E F1 198.749(\)p)C -.198(ro)462.244 480 S(cedur).198 E(e)
|
||||
-.198 E F0 2.541(This procedure destructi)72 498.6 R -.165(ve)-.275 G 2.541
|
||||
(ly o).165 F -.165(ve)-.165 G 2.541(rwrites the contents of).165 F F2
|
||||
(dst-bitstring)5.291 E F0 2.54(with the bitwise logical)5.291 F(ne)72 513.6 Q
|
||||
-.055(ga)-.165 G 1.246(tion of the bits in).055 F F2(sr)3.996 E(c-bitstring)
|
||||
-.407 E F0 6.746(.B)C 1.246(oth bit strings must ha)247.522 513.6 R 1.576 -.165
|
||||
(ve t)-.22 H 1.246(he same length.).165 F F2(bitstring-not!)6.746 E F0
|
||||
(returns the non-printing object.)72 528.6 Q F1(\(bitstring-and)72 558.6 Q F2
|
||||
(bitstring)4.583 E F3(1)3.3 I F2(bitstring)2.75 -3.3 M F3(2)3.3 I F1 223.157
|
||||
(\)p)-3.3 K -.198(ro)462.244 558.6 S(cedur).198 E(e)-.198 E(\(bitstring-andnot)
|
||||
72 573.6 Q F2(bitstring)4.583 E F3(1)3.3 I F2(bitstring)2.75 -3.3 M F3(2)3.3 I
|
||||
F1 207.878(\)p)-3.3 K -.198(ro)462.244 573.6 S(cedur).198 E(e)-.198 E
|
||||
(\(bitstring-or)72 588.6 Q F2(bitstring)4.583 E F3(1)3.3 I F2(bitstring)2.75
|
||||
-3.3 M F3(2)3.3 I F1 230.505(\)p)-3.3 K -.198(ro)462.244 588.6 S(cedur).198 E
|
||||
(e)-.198 E(\(bitstring-xor)72 603.6 Q F2(bitstring)4.583 E F3(1)3.3 I F2
|
||||
(bitstring)2.75 -3.3 M F3(2)3.3 I F1 225.005(\)p)-3.3 K -.198(ro)462.244 603.6
|
||||
S(cedur).198 E(e)-.198 E F0 .017(These procedures return a ne)72 622.2 R 2.767
|
||||
(wb)-.275 G .017(it string initialized to the bitwise logical)215.063 622.2 R
|
||||
F2(and)2.767 E F0(\(logical)2.767 E F2(and)2.767 E F0 .017(with the)2.767 F(ne)
|
||||
72 637.2 Q -.055(ga)-.165 G .752(tion, logical).055 F F2(or)3.502 E F0 3.502
|
||||
(,l)C .752(ogical e)168.449 637.2 R(xclusi)-.165 E -.165(ve)-.275 G F2(or)3.667
|
||||
E F0 3.502(,r)C(especti)262.973 637.2 Q -.165(ve)-.275 G .753(ly\) of the tw)
|
||||
.165 F 3.503(ob)-.11 G .753(it string ar)374.191 637.2 R 3.503(guments. The)
|
||||
-.198 F(tw)3.503 E(o)-.11 E(bit strings must ha)72 652.2 Q .33 -.165(ve t)-.22
|
||||
H(he same length.).165 E F1(\(bitstring-and!)72 682.2 Q F2(dst-bitstring sr)
|
||||
4.583 E(c-bitstring)-.407 E F1 196.296(\)p)C -.198(ro)462.244 682.2 S(cedur)
|
||||
.198 E(e)-.198 E(\(bitstring-or!)72 697.2 Q F2(dst-bitstring sr)4.583 E
|
||||
(c-bitstring)-.407 E F1 203.644(\)p)C -.198(ro)462.244 697.2 S(cedur).198 E(e)
|
||||
-.198 E(\(bitstring-andnot!)72 712.2 Q F2(dst-bitstring sr)4.583 E(c-bitstring)
|
||||
-.407 E F1 181.017(\)p)C -.198(ro)462.244 712.2 S(cedur).198 E(e)-.198 E
|
||||
(\(bitstring-xor!)72 727.2 Q F2(dst-bitstring sr)4.583 E(c-bitstring)-.407 E F1
|
||||
198.144(\)p)C -.198(ro)462.244 727.2 S(cedur).198 E(e)-.198 E EP
|
||||
%%Page: 4 4
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 11/Times-Roman@0 SF 2.75(-4-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57
|
||||
75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL
|
||||
108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130
|
||||
57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57
|
||||
146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57
|
||||
168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57
|
||||
190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57
|
||||
212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57
|
||||
234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57
|
||||
256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57
|
||||
278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57
|
||||
300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57
|
||||
322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57
|
||||
344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57
|
||||
366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57
|
||||
388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57
|
||||
410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57
|
||||
432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57
|
||||
454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57
|
||||
476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57
|
||||
498.5 57 DL 1.685(These procedures are the destructi)72 87 R 2.015 -.165(ve ve)
|
||||
-.275 H 1.684(rsions of the four bitwise logical procedures described).165 F
|
||||
(abo)72 102 Q -.165(ve)-.165 G 7.043(.T).165 G(he)114.452 102 Q 4.293(yp)-.165
|
||||
G 1.543(erform the corresponding logical operation on the tw)139.964 102 R
|
||||
4.293(ob)-.11 G 1.543(it string ar)398.433 102 R 1.544(guments and)-.198 F
|
||||
-.165(ove)72 117 S .167(rwrite the contents of).165 F/F1 11/Times-Italic@0 SF
|
||||
(dst-bitstring)2.917 E F0 .167(with the result.)2.917 F .167
|
||||
(Both bit strings must ha)5.667 F .497 -.165(ve t)-.22 H .167(he same length.)
|
||||
.165 F(These procedures return the non-printing object.)72 132 Q EP
|
||||
%%Page: 5 5
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 11/Times-Roman@0 SF 2.75(-5-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57
|
||||
75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL
|
||||
108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130
|
||||
57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57
|
||||
146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57
|
||||
168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57
|
||||
190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57
|
||||
212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57
|
||||
234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57
|
||||
256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57
|
||||
278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57
|
||||
300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57
|
||||
322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57
|
||||
344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57
|
||||
366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57
|
||||
388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57
|
||||
410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57
|
||||
432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57
|
||||
454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57
|
||||
476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57
|
||||
498.5 57 DL/F1 13/Times-Bold@0 SF(Index)272.108 123 Q(B)72 174 Q F0
|
||||
(bitstring-and!,)72 204 Q/F2 12/Times-Bold@0 SF(3)2.75 E F0(bitstring-and,)72
|
||||
219 Q F2(3)2.75 E F0(bitstring-andnot!,)72 234 Q F2(3)2.75 E F0
|
||||
(bitstring-andnot,)72 249 Q F2(3)2.75 E F0(bitstring-append,)72 264 Q F2(2)2.75
|
||||
E F0(bitstring-cop)72 279 Q -.715(y,)-.11 G F2(1)3.465 E F0(bitstring-\214ll!,)
|
||||
72 294 Q F2(3)2.75 E F0(bitstring-length,)72 309 Q F2(2)2.75 E F0(bitstring-mo)
|
||||
72 324 Q -.165(ve)-.165 G(!,).165 E F2(3)2.75 E F0(bitstring-not!,)72 339 Q F2
|
||||
(3)2.75 E F0(bitstring-not,)72 354 Q F2(3)2.75 E F0(bitstring-or!,)72 369 Q F2
|
||||
(3)2.75 E F0(bitstring-or)72 384 Q(,)-.44 E F2(3)2.75 E F0(bitstring-ref,)72
|
||||
399 Q F2(2)2.75 E F0(bitstring-set!,)72 414 Q F2(3)2.75 E F0
|
||||
(bitstring-substring,)72 429 Q F2(2)2.75 E F0(bitstring-substring-mo)72 444 Q
|
||||
-.165(ve)-.165 G(!,).165 E F2(3)2.75 E F0(bitstring-xor!,)72 459 Q F2(4)2.75 E
|
||||
F0(bitstring-xor)72 474 Q(,)-.44 E F2(3)2.75 E F0(bitstring-zero?,)72 489 Q F2
|
||||
(2)2.75 E F0(bitstring.o, 1)72 504 Q(bitstring.scm, 1)72 519 Q(bitstring=?,)72
|
||||
534 Q F2(2)2.75 E F0(bitstring?,)72 549 Q F2(2)2.75 E F0(bitstring)72 564 Q/F3
|
||||
11/Symbol SF(-)A F0(>signed-inte)A(ger)-.165 E(,)-.44 E F2(2)2.75 E F0
|
||||
(bitstring)72 579 Q F3(-)A F0(>unsigned-inte)A(ger)-.165 E(,)-.44 E F2(2)2.75 E
|
||||
F1(C)72 609 Q F0(concatenation, 2)72 639 Q F1(F)72 669 Q F0(feature, 1)302.4
|
||||
174 Q F1(L)302.4 204 Q F0(least signi\214cant bit, 1)302.4 234 Q(LSB, 1)302.4
|
||||
249 Q F1(M)302.4 279 Q F0(mak)302.4 309 Q(e-bitstring,)-.11 E F2(1)2.75 E F0
|
||||
(most signi\214cant bit, 1)302.4 324 Q(MSB, 1)302.4 339 Q F1(O)302.4 369 Q F0
|
||||
-.165(ove)302.4 399 S(rlapping, 3).165 E F1(P)302.4 429 Q F0
|
||||
(print representation, 1)302.4 459 Q F1(S)302.4 489 Q F0(signed-inte)302.4 519
|
||||
Q(ger)-.165 E F3(-)A F0(>bitstring,)A F2(2)2.75 E F1(T)302.4 549 Q F0(tw)302.4
|
||||
579 Q(o')-.11 E 2.75(sc)-.605 G(omplement, 2)333.761 579 Q(type predicate, 2)
|
||||
302.4 594 Q F1(U)302.4 624 Q F0(unsigned-inte)302.4 654 Q(ger)-.165 E F3(-)A F0
|
||||
(>bitstring,)A F2(2)2.75 E EP
|
||||
%%Page: 6 6
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 13/Times-Bold@0 SF -1.196(Ta)239.127 123 S(ble of Contents)1.196 E/F1 11
|
||||
/Times-Roman@0 SF .866(Introduction ..........................................\
|
||||
..............................................................................\
|
||||
......)72 177.6 R(1)498.5 177.6 Q(Using the Bit String Extension)72 196.2 Q
|
||||
19.25(........................................................................\
|
||||
........................ 1)5.431 F(Creating Bit Strings)72 214.8 Q 19.25(.....\
|
||||
..............................................................................\
|
||||
............................... 1)2.989 F(Bit String Predicates)72 233.4 Q
|
||||
19.25(........................................................................\
|
||||
........................................ 2)5.442 F(Inte)72 252 Q(ger Con)-.165
|
||||
E -.165(ve)-.44 G .118(rsions ................................................\
|
||||
..................................................................).165 F(2)
|
||||
498.5 252 Q(Selecting Components of Bit Strings)72 270.6 Q 19.25(.............\
|
||||
.......................................................................... 2)
|
||||
3.902 F(Modifying Bit Strings)72 289.2 Q 19.25(...............................\
|
||||
..............................................................................\
|
||||
. 3)4.815 F(Bitwise Logical Operations)72 307.8 Q 19.25(......................\
|
||||
..............................................................................\
|
||||
.. 3)3.011 F(Inde)72 326.4 Q 2.868(x.)-.165 G 19.25(..........................\
|
||||
..............................................................................\
|
||||
................................ 5)102.5 326.4 R EP
|
||||
%%Trailer
|
||||
end
|
||||
%%EOF
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
TROFF= groff -ms -t
|
||||
UNROFF= unroff -ms
|
||||
MKINDEX= ../util/mkindex
|
||||
|
||||
cprog.ps: cprog.ms side.ref side.inx
|
||||
$(MKINDEX) cprog.ms | sed -f side.ref | $(TROFF) 2> /dev/null > $@
|
||||
|
||||
side.ref: side
|
||||
-cp side.ref side.ref.last
|
||||
egrep "^s" side | sed "s/\.\//\//" >side.ref
|
||||
|
||||
side.inx: side
|
||||
egrep -v "^s" side | sort -f -t# +1 -3 +0n | \
|
||||
awk -f ../util/fixindex.awk | awk -f ../util/block.awk \
|
||||
>side.inx
|
||||
|
||||
# | sed -e 's/[^"]*()/\\s-1\\f5&\\fP\\s0/' >side.inx
|
||||
|
||||
side: cprog.ms
|
||||
touch side.inx
|
||||
$(MKINDEX) $? | sed -f side.ref.last | $(TROFF) 2>side >/dev/null
|
||||
|
||||
cprog.html: cprog.ms side.ref
|
||||
$(MKINDEX) cprog.ms |sed -f side.ref | $(UNROFF) document=cprog
|
||||
|
||||
check:
|
||||
cknr -c.Tc -a.Es.Ee.Cs.Ce cprog.ms
|
||||
|
||||
clean:
|
||||
rm -f side side.ref side.inx cprog.ps cprog.html
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,24 @@
|
|||
MANUAL= kernel
|
||||
TROFF= groff -ms -t
|
||||
UNROFF= unroff -ms
|
||||
|
||||
$(MANUAL).ps: $(MANUAL).ms index.ms
|
||||
(cat $(MANUAL).ms ../util/tmac.index index.ms; echo ".Tc")\
|
||||
| $(TROFF) 2> /dev/null > $(MANUAL).ps
|
||||
|
||||
$(MANUAL).html: $(MANUAL).ms
|
||||
(cat $?; echo ".Tc") | $(UNROFF) document=$(MANUAL)
|
||||
|
||||
index.ms: $(MANUAL).ms index.raw
|
||||
sort -f -t# +1 -3 +0n index.raw | awk -f ../util/fixindex.awk\
|
||||
| awk -f ../util/block.awk >index.ms
|
||||
|
||||
index.raw: $(MANUAL).ms
|
||||
$(TROFF) $(MANUAL).ms 2> index.raw >/dev/null
|
||||
|
||||
check:
|
||||
checknr -c.Ul.Pr.Sy.Va.Sh.Ix.Id.Ch -a.Ss.Se.[[.]] $(MANUAL).ms |\
|
||||
grep -v "Empty command"
|
||||
|
||||
clean:
|
||||
rm -f index.raw index.ms $(MANUAL).ps $(MANUAL).html
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,11 @@
|
|||
TROFF= groff -man -t
|
||||
UNROFF= unroff -man
|
||||
|
||||
elk.ps: elk.1
|
||||
$(TROFF) $? > $@
|
||||
|
||||
elk.1.html: elk.1
|
||||
$(UNROFF) $?
|
||||
|
||||
clean:
|
||||
rm -f elk.ps elk.1.html
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
.pl 11i \" US letter format
|
||||
.TH ELK 1 "15 January 1991"
|
||||
.UC 4
|
||||
.SH NAME
|
||||
elk, scheme \- extensible Scheme interpreter
|
||||
.SH SYNOPSIS
|
||||
.B scheme
|
||||
[
|
||||
.B \-l \f2file\fP
|
||||
] [
|
||||
.B \-h \f2KBytes\fP
|
||||
] [
|
||||
.B \-p \f2load-path\fP
|
||||
] [
|
||||
.B \-g
|
||||
] [
|
||||
.B \-i
|
||||
] [
|
||||
.B \-v \f2type\fP
|
||||
] [[
|
||||
.B \-\^\-
|
||||
] \f2args\fP]
|
||||
.LP
|
||||
.BR elk .\|.\|.
|
||||
.SH DESCRIPTION
|
||||
.I Elk
|
||||
(Extension Language Kit) is a Scheme implementation designed
|
||||
as a general extension language for applications
|
||||
written in C or C++.
|
||||
Normally,
|
||||
.I Elk
|
||||
is linked with the application it serves, but a stand-alone version
|
||||
of the Scheme interpreter is installed as well (usually under
|
||||
the name
|
||||
.BR scheme ).
|
||||
This interpreter, together with the standard Scheme toplevel,
|
||||
.I Elk
|
||||
can be used as an ordinary, stand-alone implementation of the
|
||||
Scheme language.
|
||||
.LP
|
||||
When called without the
|
||||
.B \-l
|
||||
option,
|
||||
.I Elk
|
||||
loads the standard \*(lqtoplevel\*(rq to start an interactive session.
|
||||
When called with
|
||||
.BR "\-l \f2file\fP" ,
|
||||
the contents of the specified file is loaded instead.
|
||||
If a `\-' is given as a filename argument,
|
||||
.I Elk
|
||||
loads from standard input.
|
||||
.LP
|
||||
The option
|
||||
.B \-p \f2load-path\fP
|
||||
can be used to override the standard \f2load-path\fP.
|
||||
The argument is a colon-separated list of directories.
|
||||
If this option is not present and the environment variable
|
||||
ELK_LOADPATH is defined, the value of this variable is used
|
||||
to initialize the \f2load-path\fP.
|
||||
The value of ELK_LOADPATH has the same format as the argument
|
||||
to the
|
||||
.B -p
|
||||
option.
|
||||
.LP
|
||||
The
|
||||
.B \-h \f2KBytes\fP
|
||||
option is used to specify a non-standard heap size.
|
||||
The default heap size is 512 KBytes.
|
||||
.LP
|
||||
If the option
|
||||
.B \-i
|
||||
is specified, symbols are mapped to lower case.
|
||||
Normally,
|
||||
.I Elk
|
||||
is case-sensitive.
|
||||
.LP
|
||||
The
|
||||
.B \-g
|
||||
option causes the interpreter to run the garbage collector each
|
||||
time memory is allocated on the heap.
|
||||
This is useful for writers of extensions who want to test the
|
||||
garbage collect behavior of an extension.
|
||||
Running
|
||||
.I Elk
|
||||
with the
|
||||
.B \-g
|
||||
option is likely to reveal GC-related bugs in extensions (such as not
|
||||
properly protected local objects), as it triggers a garbage collection
|
||||
each time an object is allocated on the Scheme heap.
|
||||
A dot is written to standard output each time a garbage collection is
|
||||
performed when
|
||||
.B \-g
|
||||
has been specified.
|
||||
.LP
|
||||
When called with one or more
|
||||
.B \-v \f2type\fP
|
||||
(``verbose'') options, the interpreter prints additional
|
||||
informational messages to standard output, depending on the value
|
||||
of the \f2type\fP argument.
|
||||
If \f2type\fP is \f2load\fP, the linker command and options are
|
||||
printed each time an object file is loaded; if \f2type\fP is
|
||||
\f2init\fP, the names of extension initialization
|
||||
and finalization functions are printed as they are called.
|
||||
.LP
|
||||
The remaining
|
||||
.I args
|
||||
are put into a list of strings, and the Scheme variable
|
||||
.B command-line-args
|
||||
is bound to this list in the global environment.
|
||||
If arguments could be interpreted as options, `\-\^-\' can be
|
||||
used to indicate the end of the options.
|
||||
.SH FILES
|
||||
.nf
|
||||
$TMPDIR/ldXXXXXX Temporary files
|
||||
.fi
|
||||
.SH AUTHOR
|
||||
Oliver Laumann
|
||||
|
|
@ -0,0 +1,277 @@
|
|||
%!PS-Adobe-3.0
|
||||
%%Creator: groff version 1.08
|
||||
%%DocumentNeededResources: font Times-Roman
|
||||
%%+ font Times-Bold
|
||||
%%+ font Times-Italic
|
||||
%%DocumentSuppliedResources: procset grops 1.08 0
|
||||
%%Pages: 1
|
||||
%%PageOrder: Ascend
|
||||
%%Orientation: Portrait
|
||||
%%EndComments
|
||||
%%BeginProlog
|
||||
%%BeginResource: procset grops 1.08 0
|
||||
/setpacking where{
|
||||
pop
|
||||
currentpacking
|
||||
true setpacking
|
||||
}if
|
||||
/grops 120 dict dup begin
|
||||
/SC 32 def
|
||||
/A/show load def
|
||||
/B{0 SC 3 -1 roll widthshow}bind def
|
||||
/C{0 exch ashow}bind def
|
||||
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/E{0 rmoveto show}bind def
|
||||
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/G{0 rmoveto 0 exch ashow}bind def
|
||||
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/I{0 exch rmoveto show}bind def
|
||||
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/K{0 exch rmoveto 0 exch ashow}bind def
|
||||
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/M{rmoveto show}bind def
|
||||
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/O{rmoveto 0 exch ashow}bind def
|
||||
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/Q{moveto show}bind def
|
||||
/R{moveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/S{moveto 0 exch ashow}bind def
|
||||
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/SF{
|
||||
findfont exch
|
||||
[exch dup 0 exch 0 exch neg 0 0]makefont
|
||||
dup setfont
|
||||
[exch/setfont cvx]cvx bind def
|
||||
}bind def
|
||||
/MF{
|
||||
findfont
|
||||
[5 2 roll
|
||||
0 3 1 roll
|
||||
neg 0 0]makefont
|
||||
dup setfont
|
||||
[exch/setfont cvx]cvx bind def
|
||||
}bind def
|
||||
/level0 0 def
|
||||
/RES 0 def
|
||||
/PL 0 def
|
||||
/LS 0 def
|
||||
/PLG{
|
||||
gsave newpath clippath pathbbox grestore
|
||||
exch pop add exch pop
|
||||
}bind def
|
||||
/BP{
|
||||
/level0 save def
|
||||
1 setlinecap
|
||||
1 setlinejoin
|
||||
72 RES div dup scale
|
||||
LS{
|
||||
90 rotate
|
||||
}{
|
||||
0 PL translate
|
||||
}ifelse
|
||||
1 -1 scale
|
||||
}bind def
|
||||
/EP{
|
||||
level0 restore
|
||||
showpage
|
||||
}bind def
|
||||
/DA{
|
||||
newpath arcn stroke
|
||||
}bind def
|
||||
/SN{
|
||||
transform
|
||||
.25 sub exch .25 sub exch
|
||||
round .25 add exch round .25 add exch
|
||||
itransform
|
||||
}bind def
|
||||
/DL{
|
||||
SN
|
||||
moveto
|
||||
SN
|
||||
lineto stroke
|
||||
}bind def
|
||||
/DC{
|
||||
newpath 0 360 arc closepath
|
||||
}bind def
|
||||
/TM matrix def
|
||||
/DE{
|
||||
TM currentmatrix pop
|
||||
translate scale newpath 0 0 .5 0 360 arc closepath
|
||||
TM setmatrix
|
||||
}bind def
|
||||
/RC/rcurveto load def
|
||||
/RL/rlineto load def
|
||||
/ST/stroke load def
|
||||
/MT/moveto load def
|
||||
/CL/closepath load def
|
||||
/FL{
|
||||
currentgray exch setgray fill setgray
|
||||
}bind def
|
||||
/BL/fill load def
|
||||
/LW/setlinewidth load def
|
||||
/RE{
|
||||
findfont
|
||||
dup maxlength 1 index/FontName known not{1 add}if dict begin
|
||||
{
|
||||
1 index/FID ne{def}{pop pop}ifelse
|
||||
}forall
|
||||
/Encoding exch def
|
||||
dup/FontName exch def
|
||||
currentdict end definefont pop
|
||||
}bind def
|
||||
/DEFS 0 def
|
||||
/EBEGIN{
|
||||
moveto
|
||||
DEFS begin
|
||||
}bind def
|
||||
/EEND/end load def
|
||||
/CNT 0 def
|
||||
/level1 0 def
|
||||
/PBEGIN{
|
||||
/level1 save def
|
||||
translate
|
||||
div 3 1 roll div exch scale
|
||||
neg exch neg exch translate
|
||||
0 setgray
|
||||
0 setlinecap
|
||||
1 setlinewidth
|
||||
0 setlinejoin
|
||||
10 setmiterlimit
|
||||
[]0 setdash
|
||||
/setstrokeadjust where{
|
||||
pop
|
||||
false setstrokeadjust
|
||||
}if
|
||||
/setoverprint where{
|
||||
pop
|
||||
false setoverprint
|
||||
}if
|
||||
newpath
|
||||
/CNT countdictstack def
|
||||
userdict begin
|
||||
/showpage{}def
|
||||
}bind def
|
||||
/PEND{
|
||||
clear
|
||||
countdictstack CNT sub{end}repeat
|
||||
level1 restore
|
||||
}bind def
|
||||
end def
|
||||
/setpacking where{
|
||||
pop
|
||||
setpacking
|
||||
}if
|
||||
%%EndResource
|
||||
%%IncludeResource: font Times-Roman
|
||||
%%IncludeResource: font Times-Bold
|
||||
%%IncludeResource: font Times-Italic
|
||||
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL
|
||||
841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron
|
||||
/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef/.notdef/.notdef
|
||||
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
|
||||
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/space
|
||||
/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright/parenleft
|
||||
/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four
|
||||
/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C
|
||||
/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash
|
||||
/bracketright/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q
|
||||
/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase
|
||||
/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger
|
||||
/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
|
||||
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
|
||||
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar
|
||||
/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus
|
||||
/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu
|
||||
/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright
|
||||
/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde
|
||||
/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute
|
||||
/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
|
||||
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
|
||||
/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute
|
||||
/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve
|
||||
/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex
|
||||
/udieresis/yacute/thorn/ydieresis]def/Times-Italic@0 ENC0/Times-Italic RE
|
||||
/Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE
|
||||
%%EndProlog
|
||||
%%Page: 1 1
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 10/Times-Roman@0 SF 403.3(ELK\(1\) ELK\(1\))72 48 R/F1 9/Times-Bold@0 SF
|
||||
-.18(NA)72 84 S(ME).18 E F0(elk, scheme \255 e)108 96 Q
|
||||
(xtensible Scheme interpreter)-.15 E F1(SYNOPSIS)72 112.8 Q/F2 10/Times-Bold@0
|
||||
SF(scheme)108 124.8 Q F0([)2.5 E F2<ad6c>2.5 E/F3 10/Times-Italic@0 SF(\214le)
|
||||
2.5 E F0 2.5(][)2.5 G F2<ad68>A F3(KBytes)2.5 E F0 2.5(][)2.5 G F2<ad70>A F3
|
||||
(load-path)2.5 E F0 2.5(][)2.5 G F2<ad67>A F0 2.5(][)2.5 G F2<ad69>A F0 2.5(][)
|
||||
2.5 G F2<ad76>A F3(type)2.5 E F0 2.5(][)2.5 G([)396.87 124.8 Q F2 .833<adad>2.5
|
||||
G F0(])1.667 E F3(ar)2.5 E(gs)-.37 E F0(])A F2(elk)108 141.6 Q F0 1.666(...)C
|
||||
F1(DESCRIPTION)72 158.4 Q F3(Elk)108 170.4 Q F0 1.111
|
||||
(\(Extension Language Kit\) is a Scheme implementation designed as a general e)
|
||||
3.612 F 1.111(xtension language for)-.15 F .68
|
||||
(applications written in C or C++.)108 182.4 R(Normally)5.68 E(,)-.65 E F3(Elk)
|
||||
3.18 E F0 .681(is link)3.181 F .681(ed with the application it serv)-.1 F .681
|
||||
(es, b)-.15 F .681(ut a stand-alone)-.2 F -.15(ve)108 194.4 S 1.027
|
||||
(rsion of the Scheme interpreter is installed as well \(usually under the name)
|
||||
.15 F F2(scheme)3.527 E F0 3.527(\). This)B(interpreter)3.527 E(,)-.4 E .412
|
||||
(together with the standard Scheme tople)108 206.4 R -.15(ve)-.25 G(l,).15 E F3
|
||||
(Elk)2.912 E F0 .412(can be used as an ordinary)2.912 F 2.912(,s)-.65 G .412
|
||||
(tand-alone implementation of)420.856 206.4 R(the Scheme language.)108 218.4 Q
|
||||
.604(When called without the)108 235.2 R F2<ad6c>3.104 E F0(option,)3.104 E F3
|
||||
(Elk)3.104 E F0 .604(loads the standard \231tople)3.104 F -.15(ve)-.25 G .604
|
||||
(l\232 to start an interacti).15 F .903 -.15(ve s)-.25 H 3.103(ession. When).15
|
||||
F .644(called with)108 247.2 R F2<ad6c>3.144 E F3(\214le)3.144 E F0 3.144(,t)C
|
||||
.644(he contents of the speci\214ed \214le is loaded instead.)188.216 247.2 R
|
||||
.644(If a `\255' is gi)5.644 F -.15(ve)-.25 G 3.145(na).15 G 3.145(sa\214)
|
||||
466.875 247.2 S .645(lename ar)487.055 247.2 R(gu-)-.18 E(ment,)108 259.2 Q F3
|
||||
(Elk)2.5 E F0(loads from standard input.)2.5 E .047(The option)108 276 R F2
|
||||
<ad70>2.547 E F3(load-path)2.547 E F0 .046(can be used to o)2.547 F -.15(ve)
|
||||
-.15 G .046(rride the standard).15 F F3(load-path)2.546 E F0 5.046(.T)C .046
|
||||
(he ar)408.366 276 R .046(gument is a colon-separated)-.18 F .56
|
||||
(list of directories.)108 288 R .561(If this option is not present and the en)
|
||||
5.56 F .561(vironment v)-.4 F .561(ariable ELK_LO)-.25 F(ADP)-.35 E -1.11(AT)
|
||||
-.92 G 3.061(Hi)1.11 G 3.061(sd)501.109 288 S(e\214ned,)513.06 288 Q .583
|
||||
(the v)108 300 R .583(alue of this v)-.25 F .583
|
||||
(ariable is used to initialize the)-.25 F F3(load-path)3.083 E F0 5.583(.T)C
|
||||
.583(he v)360.283 300 R .583(alue of ELK_LO)-.25 F(ADP)-.35 E -1.11(AT)-.92 G
|
||||
3.083(Hh)1.11 G .583(as the same)492.735 300 R(format as the ar)108 312 Q
|
||||
(gument to the)-.18 E F2(-p)2.5 E F0(option.)2.5 E(The)108 328.8 Q F2<ad68>2.5
|
||||
E F3(KBytes)2.5 E F0(option is used to specify a non-standard heap size.)2.5 E
|
||||
(The def)5 E(ault heap size is 512 KBytes.)-.1 E(If the option)108 345.6 Q F2
|
||||
<ad69>2.5 E F0(is speci\214ed, symbols are mapped to lo)2.5 E(wer case.)-.25 E
|
||||
(Normally)5 E(,)-.65 E F3(Elk)2.5 E F0(is case-sensiti)2.5 E -.15(ve)-.25 G(.)
|
||||
.15 E(The)108 362.4 Q F2<ad67>3.875 E F0 1.375
|
||||
(option causes the interpreter to run the g)3.875 F 1.376
|
||||
(arbage collector each time memory is allocated on the)-.05 F 2.637(heap. This)
|
||||
108 374.4 R .136(is useful for writers of e)2.637 F .136(xtensions who w)-.15 F
|
||||
.136(ant to test the g)-.1 F .136(arbage collect beha)-.05 F .136(vior of an e)
|
||||
-.2 F(xtension.)-.15 E(Running)108 386.4 Q F3(Elk)2.806 E F0 .306(with the)
|
||||
2.806 F F2<ad67>2.806 E F0 .306(option is lik)2.806 F .307(ely to re)-.1 F -.15
|
||||
(ve)-.25 G .307(al GC-related b).15 F .307(ugs in e)-.2 F .307
|
||||
(xtensions \(such as not properly pro-)-.15 F .089
|
||||
(tected local objects\), as it triggers a g)108 398.4 R .088
|
||||
(arbage collection each time an object is allocated on the Scheme heap.)-.05 F
|
||||
2.625(Ad)108 410.4 S .125(ot is written to standard output each time a g)
|
||||
122.845 410.4 R .126(arbage collection is performed when)-.05 F F2<ad67>2.626 E
|
||||
F0 .126(has been speci\214ed.)2.626 F .592(When called with one or more)108
|
||||
427.2 R F2<ad76>3.092 E F3(type)3.092 E F0(\(`)3.092 E(`v)-.74 E(erbose')-.15 E
|
||||
.592('\) options, the interpreter prints additional informational)-.74 F .452
|
||||
(messages to standard output, depending on the v)108 439.2 R .453(alue of the)
|
||||
-.25 F F3(type)2.953 E F0(ar)2.953 E 2.953(gument. If)-.18 F F3(type)2.953 E F0
|
||||
(is)2.953 E F3(load)2.953 E F0 2.953(,t)C .453(he link)480.874 439.2 R .453
|
||||
(er com-)-.1 F .013
|
||||
(mand and options are printed each time an object \214le is loaded; if)108
|
||||
451.2 R F3(type)2.512 E F0(is)2.512 E F3(init)2.512 E F0 2.512(,t)C .012
|
||||
(he names of e)421.782 451.2 R .012(xtension initial-)-.15 F
|
||||
(ization and \214nalization functions are printed as the)108 463.2 Q 2.5(ya)
|
||||
-.15 G(re called.)322.26 463.2 Q .521(The remaining)108 480 R F3(ar)3.021 E(gs)
|
||||
-.37 E F0 .522(are put into a list of strings, and the Scheme v)3.021 F
|
||||
(ariable)-.25 E F2(command-line-ar)3.022 E(gs)-.1 E F0 .522(is bound to)3.022 F
|
||||
.666(this list in the global en)108 492 R 3.166(vironment. If)-.4 F(ar)3.166 E
|
||||
.666(guments could be interpreted as options, `\255)-.18 F .666
|
||||
(-\264 can be used to indi-).833 F(cate the end of the options.)108 504 Q F1
|
||||
(FILES)72 520.8 Q F0 25($TMPDIR/ldXXXXXX T)108 532.8 R(emporary \214les)-.7 E
|
||||
F1 -.45(AU)72 549.6 S(THOR).45 E F0(Oli)108 561.6 Q -.15(ve)-.25 G 2.5(rL).15 G
|
||||
(aumann)141.76 561.6 Q(15 January 1991)272.95 768 Q(1)535 768 Q EP
|
||||
%%Trailer
|
||||
end
|
||||
%%EOF
|
||||
|
|
@ -0,0 +1 @@
|
|||
.so man1/elk.1
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
MANUAL= oops
|
||||
TROFF= groff -ms -t
|
||||
UNROFF= unroff -ms
|
||||
|
||||
$(MANUAL).ps: $(MANUAL).ms index.ms
|
||||
(cat $(MANUAL).ms ../util/tmac.index index.ms; echo ".Tc")\
|
||||
| $(TROFF) 2> /dev/null > $(MANUAL).ps
|
||||
|
||||
$(MANUAL).html: $(MANUAL).ms
|
||||
(cat $?; echo ".Tc") | $(UNROFF) document=$(MANUAL)
|
||||
|
||||
index.ms: $(MANUAL).ms index.raw
|
||||
sort -f -t# +1 -3 +0n index.raw | awk -f ../util/fixindex.awk\
|
||||
| awk -f ../util/block.awk >index.ms
|
||||
|
||||
index.raw: $(MANUAL).ms
|
||||
$(TROFF) $(MANUAL).ms 2> index.raw >/dev/null
|
||||
|
||||
check:
|
||||
checknr -c.Ul.Pr.Sy.Va.Sh.Ix.Id.Ch -a.Ss.Se.[[.]] $(MANUAL).ms |\
|
||||
grep -v "Empty command"
|
||||
|
||||
clean:
|
||||
rm -f index.raw index.ms $(MANUAL).ps $(MANUAL).html
|
||||
|
|
@ -0,0 +1,409 @@
|
|||
.so ../util/tmac.scheme
|
||||
.Ul
|
||||
.TL
|
||||
The \s-1OOPS\s0 Package for Elk Scheme
|
||||
.AU
|
||||
Oliver Laumann
|
||||
.
|
||||
.Ch "Introduction"
|
||||
.
|
||||
.PP
|
||||
The \s-1OOPS\s0 package provides a minimal set of tools that enables
|
||||
a Scheme programmer to program in an object oriented style.
|
||||
The functionality of \s-1OOPS\s0 is similar to that of packages like
|
||||
\s-1CLOS\s0 and \s-1SCOOPS\s0, although the current version does
|
||||
not support multiple inheritance.
|
||||
The rest of this memo serves as a reference guide to the
|
||||
\s-1OOPS\s0 package; the reader is assumed to be familiar with
|
||||
the terminology of object oriented programming.
|
||||
.
|
||||
.Ch "Using \s-1OOPS\s0"
|
||||
.LP
|
||||
Programs that make use of the \s-1OOPS\s0 package should include
|
||||
the line
|
||||
.Ss
|
||||
(require 'oops)
|
||||
.Se
|
||||
.Ix oops
|
||||
Since this involves autoloading of an object file, it may be desirable
|
||||
to dump Scheme after the \s-1OOPS\s0 package has been loaded.
|
||||
.
|
||||
.Ch "Defining Classes"
|
||||
.PP
|
||||
New classes are defined by means of the
|
||||
.S define-class
|
||||
.Id define-class
|
||||
macro.
|
||||
The syntax of
|
||||
.S define-class
|
||||
is
|
||||
.Ss
|
||||
(define-class \f2class-name\fP . \f2options\fP)
|
||||
.Se
|
||||
where \f2class-name\fP is a symbol.
|
||||
\f2options\fP can be of the form
|
||||
.Ss
|
||||
(super-class \f2class-name\fP)
|
||||
.Se
|
||||
.Id super-class
|
||||
where \f2class-name\fP is the name of the super-class (a symbol),
|
||||
or
|
||||
.Ss
|
||||
(class-vars . \f2var-specs\fP)
|
||||
.Se
|
||||
.Id class-vars
|
||||
or
|
||||
.Ss
|
||||
(instance-vars . \f2var-specs\fP)
|
||||
.Se
|
||||
.Id instance-vars
|
||||
to specify the class variables
|
||||
.Ix "class variables"
|
||||
and instance variables
|
||||
.Ix "instance variables"
|
||||
of the newly defined class.
|
||||
Each \f2var-spec\fP is either a symbol (the name of the variable)
|
||||
or of the form
|
||||
.Ss
|
||||
(\f2symbol\fP \f2initializer\fP).
|
||||
.Se
|
||||
Variables for which no initializer has been specified are initialized
|
||||
to the empty list.
|
||||
The initializers
|
||||
.Ix initializers
|
||||
for class variables are evaluated immediately;
|
||||
initializers for instance variables are evaluated each time an
|
||||
instance of the newly defined class is created.
|
||||
Evaluation of initializers is performed in a way that the
|
||||
initializer of a variable can reference all variables appearing
|
||||
at the left of the variable being initialized; for instance
|
||||
.Ss
|
||||
(define-class foo (class-vars (a 10) (b (* a 2))))
|
||||
.Se
|
||||
would initialize the class variable
|
||||
.S b
|
||||
to 20.
|
||||
.PP
|
||||
A class inherits all class variables, instance variables, and
|
||||
methods of its super-class.
|
||||
When a class and its super-class each have an instance variable
|
||||
with the same name, the corresponding \f2var-specs\fP must either
|
||||
both have no initializer or initializers with the same value,
|
||||
otherwise an ``initializer mismatch'' error is signaled by
|
||||
.S define-class .
|
||||
.PP
|
||||
Each instance of a class has an instance variable named
|
||||
.S self .
|
||||
.Id self
|
||||
The value of
|
||||
.S self
|
||||
is the instance with respect to which
|
||||
.S self
|
||||
is evaluated.
|
||||
.S self
|
||||
can be used by methods as the argument to
|
||||
.S send
|
||||
.Ix send
|
||||
(see below) to invoke another method within the current instance.
|
||||
.PP
|
||||
.S define-class
|
||||
does not have a meaningful return value,
|
||||
instead it has a side-effect on the environment in which it
|
||||
is invoked.
|
||||
.
|
||||
.Ch "Creating Instances of a Class"
|
||||
.PP
|
||||
The macro
|
||||
.S make-instance
|
||||
.Id make-instance
|
||||
is used to create an instance of
|
||||
a class; it returns the instance as its value.
|
||||
The syntax is
|
||||
.Ss
|
||||
(make-instance \f2class\fP . \f2args\fP)
|
||||
.Se
|
||||
where \f2class\fP is the class of which an instance is to
|
||||
be created.
|
||||
Each \f2arg\fP of the form
|
||||
.Ss
|
||||
(\f2symbol\fP\ \f2initializer\fP)
|
||||
.Se
|
||||
where \f2symbol\fP is the name of an instance variable of the class,
|
||||
is used to initialize the specified instance variable in the
|
||||
newly created instance.
|
||||
In this case the \f2initializer\fP supersedes any initializer
|
||||
specified in the call to
|
||||
.S define-class .
|
||||
Thus it is possible to have instance variables with a \f2default
|
||||
initializer\fP that can be overridden for individual instances.
|
||||
The initializers are evaluated in the current environment.
|
||||
.PP
|
||||
.S make-instance
|
||||
initializes the newly created instance by
|
||||
invoking the
|
||||
.S initialize-instance
|
||||
.Id initialize-instance
|
||||
method for the class
|
||||
and all super-classes in super-class to sub-class order.
|
||||
That is, the
|
||||
.S initialize-instance
|
||||
method of the class specified in the call to
|
||||
.S make-instance
|
||||
is called after all other
|
||||
.S initialize-instance
|
||||
methods.
|
||||
The arguments passed to the
|
||||
.S initialize-instance
|
||||
method of a class are those arguments of the call to
|
||||
.S make-instance
|
||||
that do not represent an initialization form for an instance variable.
|
||||
These arguments are evaluated in the current environment.
|
||||
It is not required for a class to have an
|
||||
.S initialize-instance
|
||||
method.
|
||||
.PP
|
||||
Consider the following example:
|
||||
.Ss
|
||||
(require 'oops)
|
||||
.sp .5
|
||||
(define-class c (instance-vars a))
|
||||
(define-class d (instance-vars (b 10)) (super-class c))
|
||||
.sp .5
|
||||
(define-method c (initialize-instance . args)
|
||||
(print (cons 'c args)))
|
||||
.sp .5
|
||||
(define-method d (initialize-instance . args)
|
||||
(print (cons 'd args)))
|
||||
.sp .5
|
||||
.Se
|
||||
In this example evaluation of
|
||||
.Ss
|
||||
(define x 99)
|
||||
(define i (make-instance d (a 20) 'foo (b x) x))
|
||||
.Se
|
||||
would print
|
||||
.Ss
|
||||
(c foo 99)
|
||||
(d foo 99)
|
||||
.Se
|
||||
.PP
|
||||
Note that first the
|
||||
.S initialize-instance
|
||||
method of
|
||||
.S c
|
||||
is invoked and then that of the class
|
||||
.S d .
|
||||
The instance variables
|
||||
.S a
|
||||
and
|
||||
.S b
|
||||
would be initialized to 20 and 99, respectively.
|
||||
.
|
||||
.Ch "Defining Methods"
|
||||
.PP
|
||||
A new method can be defined by means of the
|
||||
.S define-method
|
||||
.Id define-method
|
||||
macro.
|
||||
The syntax is
|
||||
.Ss
|
||||
(define-method \f2class\fP \f2lambda-list\fP . \f2body\fP)
|
||||
.Se
|
||||
where \f2class\fP is the class to which the method is to be
|
||||
added, \f2lambda-list\fP is a list specifying the method's
|
||||
name and formal arguments (having the same syntax as the argument
|
||||
of
|
||||
.S define ).
|
||||
.PP
|
||||
.S define-method
|
||||
simply creates a class-variable with the name
|
||||
of the method, creates a lambda closure using the \f2lambda-list\fP
|
||||
and the \f2body\fP forms, and binds the resulting procedure to
|
||||
the newly-created variable.
|
||||
When a message with the name of the method is sent to an instance
|
||||
of the class, the method is invoked, and the \f2body\fP is evaluated
|
||||
in the scope of the instance (so that it can access all instance
|
||||
and class variables).
|
||||
.
|
||||
.Ch "Sending Messages"
|
||||
.PP
|
||||
A message can be sent to an instance by means of the function
|
||||
.S send .
|
||||
.Id send
|
||||
The syntax of
|
||||
.S send
|
||||
is
|
||||
.Ss
|
||||
(send \f2instance\fP \f2message\fP . \f2args\fP)
|
||||
.Se
|
||||
where \f2instance\fP is the instance to which the message is
|
||||
to be sent, \f2message\fP is the name of the method to be
|
||||
invoked (a symbol), and \f2args\fP are the arguments to be
|
||||
passed to the method.
|
||||
Example:
|
||||
.Ss
|
||||
(define-class c (instance-vars a) (class-vars (b 10)))
|
||||
.sp .5
|
||||
(define-method c (foo x)
|
||||
(cons (set! a x) b)) ; set! returns previous value
|
||||
.sp .5
|
||||
(define i (make-instance c (a 99)))
|
||||
.sp
|
||||
(send i 'foo 1) \f1returns (99 . 10)\fP
|
||||
(send i 'foo 2) \f1returns (1 . 10)\fP
|
||||
.Se
|
||||
.PP
|
||||
When a message is sent to an instance for which no method has
|
||||
been defined, a ``message not understood'' error is signaled.
|
||||
.PP
|
||||
The function
|
||||
.S send-if-handles
|
||||
.Id send-if-handles
|
||||
is identical to
|
||||
.S send ,
|
||||
except that it returns a list of one element, the return value
|
||||
of the method, or
|
||||
.S #f
|
||||
when the message is not understood by the instance.
|
||||
.
|
||||
.Ch "Evaluating Expressions within an Instance"
|
||||
.PP
|
||||
The macro
|
||||
.S with-instance
|
||||
.Id with-instance
|
||||
can be used to evaluate expressions within the scope of an instance.
|
||||
The syntax is
|
||||
.Ss
|
||||
(with-instance \f2instance\fP . \f2body\fP).
|
||||
.Se
|
||||
The \f2body\fP forms are evaluated in the same environment in
|
||||
which a method of \f2instance\fP would be evaluated,
|
||||
i.\|e. they can access all and class and instance variables
|
||||
(including
|
||||
.S self ).
|
||||
.S with-instance
|
||||
returns the value of the last \f2body\fP form.
|
||||
Example:
|
||||
.Ss
|
||||
(define-class c (class-vars (x 5)) (instance-vars y))
|
||||
.sp .5
|
||||
(define i (make-instance c (y 1)))
|
||||
.sp .5
|
||||
(define x 10)
|
||||
(with-instance i (cons x y)) \f1returns (5 . 1)\fP
|
||||
.Se
|
||||
.
|
||||
.Ch "Setting Instance and Class Variables"
|
||||
.PP
|
||||
Generally class and instance variables are manipulated by methods
|
||||
or, if applicable, from within a
|
||||
.S with-instance
|
||||
form.
|
||||
In addition, values can be assigned to class and instance variables
|
||||
without involving a message send by means of the
|
||||
.S instance-set!
|
||||
.Id instance-set!
|
||||
macro.
|
||||
The syntax of
|
||||
.S instance-set!
|
||||
is
|
||||
.Ss
|
||||
(instance-set! \f2instance\fP \f2variable\fP \f2value\fP)
|
||||
.Se
|
||||
where \f2variable\fP is a symbol, the name of the class or
|
||||
instance variable.
|
||||
.S instance-set!
|
||||
returns the previous value of the variable (like
|
||||
.S set! ).
|
||||
.PP
|
||||
Class variables can be modified without involving an instance
|
||||
of the class by means of the macro
|
||||
.S class-set! :
|
||||
.Id class-set!
|
||||
.Ss
|
||||
(class-set! \f2class\fP \f2variable\fP \f2value\fP).
|
||||
.Se
|
||||
\f2variable\fP must be the name of a class variable of \f2class\fP.
|
||||
Note that one difference between
|
||||
.Ss
|
||||
(instance-set! i 'var x)
|
||||
.Se
|
||||
and
|
||||
.Ss
|
||||
(with-instance i (set! var x))
|
||||
.Se
|
||||
is that in the former case
|
||||
.S x
|
||||
is evaluated in the current environment while in the latter case
|
||||
.S x
|
||||
is evaluated within the scope of the instance (here
|
||||
.S x
|
||||
might be a class or instance variable).
|
||||
.
|
||||
.Ch "Obtaining Information about Classes and Instances"
|
||||
.PP
|
||||
The function
|
||||
.S class-name
|
||||
.Id class-name
|
||||
returns the name of a class (a symbol) or, when applied to an instance,
|
||||
the name of the class of which it is an instance.
|
||||
.PP
|
||||
The predicate
|
||||
.S method-known?
|
||||
.Id method-known?
|
||||
can be used to check whether a method of a given name is known to a class.
|
||||
The syntax is
|
||||
.Ss
|
||||
(method-known? \f2method\fP \f2class\fP)
|
||||
.Se
|
||||
where \f2method\fP is a symbol.
|
||||
.PP
|
||||
The type predicates
|
||||
.S class?
|
||||
.Id class?
|
||||
and
|
||||
.S instance?
|
||||
.Id instance?
|
||||
can be used to check whether an object is a class or an instance,
|
||||
respectively.
|
||||
.PP
|
||||
The functions
|
||||
.Ss
|
||||
(check-class \f2symbol\fP \f2object\fP)
|
||||
.Se
|
||||
.Id check-class
|
||||
and
|
||||
.Ss
|
||||
(check-instance \f2symbol\fP \f2object\fP)
|
||||
.Se
|
||||
.Id check-instance
|
||||
check whether \f2object\fP is a class (i.\|e. satisfies the predicate
|
||||
.S class? )
|
||||
or an instance, respectively, and, if not, signal an error;
|
||||
in this case \f2symbol\fP is used as the first argument to
|
||||
.S error .
|
||||
.PP
|
||||
The functions
|
||||
.S describe-class
|
||||
.Id describe-class
|
||||
and
|
||||
.S describe-instance
|
||||
.Id describe-instance
|
||||
print the components (name, class/instance variables, etc.) of
|
||||
a class or instance, respectively.
|
||||
The function
|
||||
.S describe
|
||||
.Id describe
|
||||
has been extended in way that when
|
||||
.S "(feature? 'oops)"
|
||||
is true,
|
||||
.S describe-class
|
||||
or
|
||||
.S describe-instance
|
||||
are called when
|
||||
.S describe
|
||||
is applied to an object that satisfies
|
||||
.S class?
|
||||
or
|
||||
.S instance? ,
|
||||
respectively.
|
||||
|
|
@ -0,0 +1,624 @@
|
|||
%!PS-Adobe-3.0
|
||||
%%Creator: groff version 1.08
|
||||
%%DocumentNeededResources: font Times-Bold
|
||||
%%+ font Times-Italic
|
||||
%%+ font Times-Roman
|
||||
%%+ font Courier
|
||||
%%DocumentSuppliedResources: procset grops 1.08 0
|
||||
%%Pages: 7
|
||||
%%PageOrder: Ascend
|
||||
%%Orientation: Portrait
|
||||
%%EndComments
|
||||
%%BeginProlog
|
||||
%%BeginResource: procset grops 1.08 0
|
||||
/setpacking where{
|
||||
pop
|
||||
currentpacking
|
||||
true setpacking
|
||||
}if
|
||||
/grops 120 dict dup begin
|
||||
/SC 32 def
|
||||
/A/show load def
|
||||
/B{0 SC 3 -1 roll widthshow}bind def
|
||||
/C{0 exch ashow}bind def
|
||||
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/E{0 rmoveto show}bind def
|
||||
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/G{0 rmoveto 0 exch ashow}bind def
|
||||
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/I{0 exch rmoveto show}bind def
|
||||
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/K{0 exch rmoveto 0 exch ashow}bind def
|
||||
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/M{rmoveto show}bind def
|
||||
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/O{rmoveto 0 exch ashow}bind def
|
||||
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/Q{moveto show}bind def
|
||||
/R{moveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/S{moveto 0 exch ashow}bind def
|
||||
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/SF{
|
||||
findfont exch
|
||||
[exch dup 0 exch 0 exch neg 0 0]makefont
|
||||
dup setfont
|
||||
[exch/setfont cvx]cvx bind def
|
||||
}bind def
|
||||
/MF{
|
||||
findfont
|
||||
[5 2 roll
|
||||
0 3 1 roll
|
||||
neg 0 0]makefont
|
||||
dup setfont
|
||||
[exch/setfont cvx]cvx bind def
|
||||
}bind def
|
||||
/level0 0 def
|
||||
/RES 0 def
|
||||
/PL 0 def
|
||||
/LS 0 def
|
||||
/PLG{
|
||||
gsave newpath clippath pathbbox grestore
|
||||
exch pop add exch pop
|
||||
}bind def
|
||||
/BP{
|
||||
/level0 save def
|
||||
1 setlinecap
|
||||
1 setlinejoin
|
||||
72 RES div dup scale
|
||||
LS{
|
||||
90 rotate
|
||||
}{
|
||||
0 PL translate
|
||||
}ifelse
|
||||
1 -1 scale
|
||||
}bind def
|
||||
/EP{
|
||||
level0 restore
|
||||
showpage
|
||||
}bind def
|
||||
/DA{
|
||||
newpath arcn stroke
|
||||
}bind def
|
||||
/SN{
|
||||
transform
|
||||
.25 sub exch .25 sub exch
|
||||
round .25 add exch round .25 add exch
|
||||
itransform
|
||||
}bind def
|
||||
/DL{
|
||||
SN
|
||||
moveto
|
||||
SN
|
||||
lineto stroke
|
||||
}bind def
|
||||
/DC{
|
||||
newpath 0 360 arc closepath
|
||||
}bind def
|
||||
/TM matrix def
|
||||
/DE{
|
||||
TM currentmatrix pop
|
||||
translate scale newpath 0 0 .5 0 360 arc closepath
|
||||
TM setmatrix
|
||||
}bind def
|
||||
/RC/rcurveto load def
|
||||
/RL/rlineto load def
|
||||
/ST/stroke load def
|
||||
/MT/moveto load def
|
||||
/CL/closepath load def
|
||||
/FL{
|
||||
currentgray exch setgray fill setgray
|
||||
}bind def
|
||||
/BL/fill load def
|
||||
/LW/setlinewidth load def
|
||||
/RE{
|
||||
findfont
|
||||
dup maxlength 1 index/FontName known not{1 add}if dict begin
|
||||
{
|
||||
1 index/FID ne{def}{pop pop}ifelse
|
||||
}forall
|
||||
/Encoding exch def
|
||||
dup/FontName exch def
|
||||
currentdict end definefont pop
|
||||
}bind def
|
||||
/DEFS 0 def
|
||||
/EBEGIN{
|
||||
moveto
|
||||
DEFS begin
|
||||
}bind def
|
||||
/EEND/end load def
|
||||
/CNT 0 def
|
||||
/level1 0 def
|
||||
/PBEGIN{
|
||||
/level1 save def
|
||||
translate
|
||||
div 3 1 roll div exch scale
|
||||
neg exch neg exch translate
|
||||
0 setgray
|
||||
0 setlinecap
|
||||
1 setlinewidth
|
||||
0 setlinejoin
|
||||
10 setmiterlimit
|
||||
[]0 setdash
|
||||
/setstrokeadjust where{
|
||||
pop
|
||||
false setstrokeadjust
|
||||
}if
|
||||
/setoverprint where{
|
||||
pop
|
||||
false setoverprint
|
||||
}if
|
||||
newpath
|
||||
/CNT countdictstack def
|
||||
userdict begin
|
||||
/showpage{}def
|
||||
}bind def
|
||||
/PEND{
|
||||
clear
|
||||
countdictstack CNT sub{end}repeat
|
||||
level1 restore
|
||||
}bind def
|
||||
end def
|
||||
/setpacking where{
|
||||
pop
|
||||
setpacking
|
||||
}if
|
||||
%%EndResource
|
||||
%%IncludeResource: font Times-Bold
|
||||
%%IncludeResource: font Times-Italic
|
||||
%%IncludeResource: font Times-Roman
|
||||
%%IncludeResource: font Courier
|
||||
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL
|
||||
841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron
|
||||
/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef/.notdef/.notdef
|
||||
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
|
||||
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/space
|
||||
/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright/parenleft
|
||||
/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four
|
||||
/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C
|
||||
/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash
|
||||
/bracketright/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q
|
||||
/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase
|
||||
/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger
|
||||
/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
|
||||
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
|
||||
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar
|
||||
/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus
|
||||
/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu
|
||||
/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright
|
||||
/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde
|
||||
/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute
|
||||
/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
|
||||
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
|
||||
/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute
|
||||
/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve
|
||||
/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex
|
||||
/udieresis/yacute/thorn/ydieresis]def/Courier@0 ENC0/Courier RE/Times-Roman@0
|
||||
ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0
|
||||
/Times-Bold RE
|
||||
%%EndProlog
|
||||
%%Page: 1 1
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 12/Times-Bold@0 SF(The)198.071 120 Q/F1 11/Times-Bold@0 SF(OOPS)3 E F0 -.12
|
||||
(Pa)3 G(ckage f).12 E(or Elk Scheme)-.3 E/F2 10/Times-Italic@0 SF
|
||||
(Oliver Laumann)255.085 144 Q F1 2.75(1. Intr)72 216 R(oduction)-.198 E/F3 11
|
||||
/Times-Roman@0 SF(The)97 234.6 Q/F4 10/Times-Roman@0 SF(OOPS)3.866 E F3 1.116
|
||||
(package pro)3.866 F 1.115
|
||||
(vides a minimal set of tools that enables a Scheme programmer to)-.165 F .357
|
||||
(program in an object oriented style.)72 249.6 R .357(The functionality of)
|
||||
5.857 F F4(OOPS)3.107 E F3 .357(is similar to that of packages lik)3.107 F(e)
|
||||
-.11 E F4(CLOS)72 264.6 Q F3(and)3.342 E F4(SCOOPS)3.342 E F3 3.342(,a)C .592
|
||||
(lthough the current v)168.894 264.6 R .592
|
||||
(ersion does not support multiple inheritance.)-.165 F .592(The rest)6.092 F
|
||||
.261(of this memo serv)72 279.6 R .261(es as a reference guide to the)-.165 F
|
||||
F4(OOPS)3.012 E F3 .262(package; the reader is assumed to be f)3.012 F(amil-)
|
||||
-.11 E(iar with the terminology of object oriented programming.)72 294.6 Q F1
|
||||
2.75(2. Using)72 324.6 R/F5 10/Times-Bold@0 SF(OOPS)2.75 E F3
|
||||
(Programs that mak)72 343.2 Q 2.75(eu)-.11 G(se of the)168.129 343.2 Q F4(OOPS)
|
||||
2.75 E F3(package should include the line)2.75 E/F6 10/Courier@0 SF
|
||||
(\(require 'oops\))100.346 365.703 Q F3 1.178(Since this in)72 387.703 R -.22
|
||||
(vo)-.44 G(lv).22 E 1.177(es autoloading of an object \214le, it may be desira\
|
||||
ble to dump Scheme after the)-.165 F F4(OOPS)72 402.703 Q F3
|
||||
(package has been loaded.)2.75 E F1 2.75(3. De\214ning)72 432.703 R(Classes)
|
||||
2.75 E F3(Ne)97 451.303 Q 3.323(wc)-.275 G .573
|
||||
(lasses are de\214ned by means of the)125.7 451.303 R F6(define-class)3.324 E
|
||||
F3 3.324(macro. The)6.574 F .574(syntax of)3.324 F F6(define-)3.324 E(class)72
|
||||
466.303 Q F3(is)6 E F6(\(define-class)100.346 488.806 Q F2(class-name)6 E F6(.)
|
||||
6 E F2(options)6 E F6(\))A F3(where)72 510.806 Q/F7 11/Times-Italic@0 SF
|
||||
(class-name)2.75 E F3(is a symbol.)2.75 E F7(options)5.5 E F3
|
||||
(can be of the form)2.75 E F6(\(super-class)100.346 533.309 Q F2(class-name)6 E
|
||||
F6(\))A F3(where)72 555.309 Q F7(class-name)2.75 E F3(is the name of the super)
|
||||
2.75 E(-class \(a symbol\), or)-.22 E F6(\(class-vars .)100.346 577.812 Q F2
|
||||
(var)6 E(-specs)-.2 E F6(\))A F3(or)72 599.812 Q F6(\(instance-vars .)100.346
|
||||
622.315 Q F2(var)6 E(-specs)-.2 E F6(\))A F3 .623(to specify the class v)72
|
||||
644.315 R .623(ariables and instance v)-.275 F .622(ariables of the ne)-.275 F
|
||||
.622(wly de\214ned class.)-.275 F(Each)6.122 E F7(var)3.372 E(-spec)-.22 E F3
|
||||
(is)3.372 E(either a symbol \(the name of the v)72 659.315 Q
|
||||
(ariable\) or of the form)-.275 E F6(\()100.346 681.818 Q F2 3.5
|
||||
(symbol initializer)B F6(\).)A F3 -1.221(Va)72 703.818 S .143(riables for whic\
|
||||
h no initializer has been speci\214ed are initialized to the empty list.)1.221
|
||||
F .143(The initializ-)5.643 F .805(ers for class v)72 718.818 R .805
|
||||
(ariables are e)-.275 F -.275(va)-.275 G .804
|
||||
(luated immediately; initializers for instance v).275 F .804(ariables are e)
|
||||
-.275 F -.275(va)-.275 G(luated).275 E .059(each time an instance of the ne)72
|
||||
733.818 R .059(wly de\214ned class is created.)-.275 F(Ev)5.559 E .06
|
||||
(aluation of initializers is performed)-.275 F EP
|
||||
%%Page: 2 2
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 11/Times-Roman@0 SF 2.75(-2-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57
|
||||
75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL
|
||||
108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130
|
||||
57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57
|
||||
146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57
|
||||
168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57
|
||||
190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57
|
||||
212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57
|
||||
234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57
|
||||
256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57
|
||||
278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57
|
||||
300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57
|
||||
322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57
|
||||
344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57
|
||||
366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57
|
||||
388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57
|
||||
410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57
|
||||
432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57
|
||||
454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57
|
||||
476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57
|
||||
498.5 57 DL 1.161(in a w)72 87 R 1.161(ay that the initializer of a v)-.11 F
|
||||
1.161(ariable can reference all v)-.275 F 1.161
|
||||
(ariables appearing at the left of the)-.275 F -.275(va)72 102 S
|
||||
(riable being initialized; for instance).275 E/F1 10/Courier@0 SF
|
||||
(\(define-class foo \(class-vars \(a 10\) \(b \(* a 2\)\)\)\))100.346 124.503 Q
|
||||
F0 -.11(wo)72 146.503 S(uld initialize the class v).11 E(ariable)-.275 E F1(b)
|
||||
2.75 E F0(to 20.)6 E 2.979(Ac)97 165.103 S .229(lass inherits all class v)
|
||||
112.805 165.103 R .229(ariables, instance v)-.275 F .23
|
||||
(ariables, and methods of its super)-.275 F 2.98(-class. When)-.22 F 3.342(ac)
|
||||
72 180.103 S .592(lass and its super)85.11 180.103 R .592(-class each ha)-.22 F
|
||||
.922 -.165(ve a)-.22 H 3.342(ni).165 G .592(nstance v)253.913 180.103 R .591
|
||||
(ariable with the same name, the corresponding)-.275 F/F2 11/Times-Italic@0 SF
|
||||
(var)72 195.103 Q(-specs)-.22 E F0 1.525(must either both ha)4.275 F 1.855
|
||||
-.165(ve n)-.22 H 4.276(oi).165 G 1.526
|
||||
(nitializer or initializers with the same v)240.024 195.103 R 1.526
|
||||
(alue, otherwise an)-.275 F -.814(``)72 210.103 S(initializer mismatch').814 E
|
||||
2.75('e)-.814 G(rror is signaled by)180.35 210.103 Q F1(define-class)2.75 E F0
|
||||
(.)A 1.038(Each instance of a class has an instance v)97 228.703 R 1.038
|
||||
(ariable named)-.275 F F1(self)3.788 E F0 6.538(.T)C 1.038(he v)393.933 228.703
|
||||
R 1.038(alue of)-.275 F F1(self)3.788 E F0 1.038(is the)7.038 F 1.072
|
||||
(instance with respect to which)72 243.703 R F1(self)3.822 E F0 1.072(is e)
|
||||
7.072 F -.275(va)-.275 G(luated.).275 E F1(self)6.572 E F0 1.072
|
||||
(can be used by methods as the ar)7.072 F(gu-)-.198 E(ment to)72 258.703 Q F1
|
||||
(send)2.75 E F0(\(see belo)6 E(w\) to in)-.275 E -.22(vo)-.44 G .22 -.11(ke a)
|
||||
.22 H(nother method within the current instance.).11 E F1(define-class)97
|
||||
277.303 Q F0 .263(does not ha)6.263 F .593 -.165(ve a m)-.22 H .263
|
||||
(eaningful return v).165 F .262(alue, instead it has a side-ef)-.275 F .262
|
||||
(fect on the)-.275 F(en)72 292.303 Q(vironment in which it is in)-.44 E -.22
|
||||
(vo)-.44 G -.11(ke).22 G(d.).11 E/F3 11/Times-Bold@0 SF 2.75(4. Cr)72 322.303 R
|
||||
(eating Instances of a Class)-.198 E F0 .434(The macro)97 340.903 R F1
|
||||
(make-instance)3.184 E F0 .435
|
||||
(is used to create an instance of a class; it returns the instance)6.434 F
|
||||
(as its v)72 355.903 Q 2.75(alue. The)-.275 F(syntax is)2.75 E F1
|
||||
(\(make-instance)100.346 378.406 Q/F4 10/Times-Italic@0 SF(class)6 E F1(.)6 E
|
||||
F4(ar)6 E(gs)-.37 E F1(\))A F0(where)72 400.406 Q F2(class)2.75 E F0
|
||||
(is the class of which an instance is to be created.)2.75 E(Each)5.5 E F2(ar)
|
||||
2.75 E(g)-.407 E F0(of the form)2.75 E F1(\()100.346 422.909 Q F4 3.5
|
||||
(symbol initializer)B F1(\))A F0(where)72 444.909 Q F2(symbol)3.81 E F0 1.06
|
||||
(is the name of an instance v)3.81 F 1.059
|
||||
(ariable of the class, is used to initialize the speci\214ed)-.275 F .532
|
||||
(instance v)72 459.909 R .532(ariable in the ne)-.275 F .532
|
||||
(wly created instance.)-.275 F .533(In this case the)6.032 F F2(initializer)
|
||||
3.283 E F0 .533(supersedes an)3.283 F 3.283(yi)-.165 G(nitial-)477.721 459.909
|
||||
Q .506(izer speci\214ed in the call to)72 474.909 R F1(define-class)3.256 E F0
|
||||
6.006(.T)C .505(hus it is possible to ha)281.049 474.909 R .835 -.165(ve i)-.22
|
||||
H .505(nstance v).165 F .505(ariables with a)-.275 F F2 .253
|
||||
(default initializer)72 489.909 R F0 .253(that can be o)3.003 F -.165(ve)-.165
|
||||
G .254(rridden for indi).165 F .254(vidual instances.)-.275 F .254
|
||||
(The initializers are e)5.754 F -.275(va)-.275 G .254(luated in).275 F
|
||||
(the current en)72 504.909 Q(vironment.)-.44 E F1(make-instance)97 523.509 Q F0
|
||||
2.386(initializes the ne)8.386 F 2.385(wly created instance by in)-.275 F -.22
|
||||
(vo)-.44 G 2.385(king the).22 F F1(initialize-)5.135 E(instance)72 538.509 Q F0
|
||||
.889(method for the class and all super)6.889 F .889(-classes in super)-.22 F
|
||||
.889(-class to sub-class order)-.22 F 6.39(.T)-.605 G .89(hat is,)476.831
|
||||
538.509 R(the)72 553.509 Q F1(initialize-instance)4.183 E F0 1.432
|
||||
(method of the class speci\214ed in the call to)7.432 F F1(make-instance)4.182
|
||||
E F0(is)7.432 E 2.148(called after all other)72 568.509 R F1
|
||||
(initialize-instance)4.899 E F0 4.899(methods. The)8.149 F(ar)4.899 E 2.149
|
||||
(guments passed to the)-.198 F F1(ini-)4.899 E(tialize-instance)72 583.509 Q F0
|
||||
.115(method of a class are those ar)6.115 F .115(guments of the call to)-.198 F
|
||||
F1(make-instance)2.864 E F0(that)6.114 E .381
|
||||
(do not represent an initialization form for an instance v)72 598.509 R 3.132
|
||||
(ariable. These)-.275 F(ar)3.132 E .382(guments are e)-.198 F -.275(va)-.275 G
|
||||
.382(luated in).275 F 2.601(the current en)72 613.509 R 5.351(vironment. It)
|
||||
-.44 F 2.6(is not required for a class to ha)5.351 F 2.93 -.165(ve a)-.22 H(n)
|
||||
.165 E F1(initialize-instance)5.35 E F0(method.)72 628.509 Q
|
||||
(Consider the follo)97 647.109 Q(wing e)-.275 E(xample:)-.165 E EP
|
||||
%%Page: 3 3
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 11/Times-Roman@0 SF 2.75(-3-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57
|
||||
75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL
|
||||
108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130
|
||||
57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57
|
||||
146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57
|
||||
168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57
|
||||
190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57
|
||||
212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57
|
||||
234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57
|
||||
256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57
|
||||
278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57
|
||||
300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57
|
||||
322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57
|
||||
344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57
|
||||
366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57
|
||||
388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57
|
||||
410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57
|
||||
432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57
|
||||
454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57
|
||||
476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57
|
||||
498.5 57 DL/F1 10/Courier@0 SF(\(require 'oops\))100.346 94.503 Q
|
||||
(\(define-class c \(instance-vars a\)\))100.346 115.503 Q
|
||||
(\(define-class d \(instance-vars \(b 10\)\) \(super-class c\)\))100.346
|
||||
129.503 Q(\(define-method c \(initialize-instance . args\))100.346 150.503 Q
|
||||
(\(print \(cons 'c args\)\)\))112.346 164.503 Q
|
||||
(\(define-method d \(initialize-instance . args\))100.346 185.503 Q
|
||||
(\(print \(cons 'd args\)\)\))112.346 199.503 Q F0(In this e)72 228.503 Q
|
||||
(xample e)-.165 E -.275(va)-.275 G(luation of).275 E F1(\(define x 99\))100.346
|
||||
251.006 Q(\(define i \(make-instance d \(a 20\) 'foo \(b x\) x\)\))100.346
|
||||
265.006 Q F0 -.11(wo)72 287.006 S(uld print).11 E F1(\(c foo 99\))100.346
|
||||
309.509 Q(\(d foo 99\))100.346 323.509 Q F0 1.104(Note that \214rst the)97
|
||||
349.109 R F1(initialize-instance)3.854 E F0 1.104(method of)7.104 F F1(c)3.854
|
||||
E F0 1.104(is in)7.104 F -.22(vo)-.44 G -.11(ke).22 G 3.854(da).11 G 1.104
|
||||
(nd then that of the)419.537 349.109 R(class)72 364.109 Q F1(d)2.75 E F0 5.5
|
||||
(.T)C(he instance v)117.105 364.109 Q(ariables)-.275 E F1(a)2.75 E F0(and)6 E
|
||||
F1(b)2.75 E F0 -.11(wo)6 G(uld be initialized to 20 and 99, respecti).11 E
|
||||
-.165(ve)-.275 G(ly).165 E(.)-.715 E/F2 11/Times-Bold@0 SF 2.75(5. De\214ning)
|
||||
72 394.109 R(Methods)2.75 E F0 2.75(An)97 412.709 S .55 -.275(ew m)113.192
|
||||
412.709 T(ethod can be de\214ned by means of the).275 E F1(define-method)2.75 E
|
||||
F0 2.75(macro. The)6 F(syntax is)2.75 E F1(\(define-method)100.346 435.212 Q/F3
|
||||
10/Times-Italic@0 SF 3.5(class lambda-list)6 F F1(.)6 E F3(body)6 E F1(\))A F0
|
||||
(where)72 457.212 Q/F4 11/Times-Italic@0 SF(class)3.819 E F0 1.068
|
||||
(is the class to which the method is to be added,)3.818 F F4(lambda-list)3.818
|
||||
E F0 1.068(is a list specifying the)3.818 F(method')72 472.212 Q 2.75(sn)-.605
|
||||
G(ame and formal ar)120.587 472.212 Q(guments \(ha)-.198 E
|
||||
(ving the same syntax as the ar)-.22 E(gument of)-.198 E F1(define)2.75 E F0
|
||||
(\).)A F1(define-method)97 490.812 Q F0 1.381(simply creates a class-v)7.381 F
|
||||
1.381(ariable with the name of the method, creates a)-.275 F .163
|
||||
(lambda closure using the)72 505.812 R F4(lambda-list)2.913 E F0 .163(and the)
|
||||
2.913 F F4(body)2.913 E F0 .162
|
||||
(forms, and binds the resulting procedure to the)2.913 F(ne)72 520.812 Q .953
|
||||
(wly-created v)-.275 F 3.703(ariable. When)-.275 F 3.703(am)3.703 G .953
|
||||
(essage with the name of the method is sent to an instance of)229.207 520.812 R
|
||||
.504(the class, the method is in)72 535.812 R -.22(vo)-.44 G -.11(ke).22 G .504
|
||||
(d, and the).11 F F4(body)3.254 E F0 .504(is e)3.254 F -.275(va)-.275 G .503
|
||||
(luated in the scope of the instance \(so that it).275 F
|
||||
(can access all instance and class v)72 550.812 Q(ariables\).)-.275 E F2 2.75
|
||||
(6. Sending)72 580.812 R(Messages)2.75 E F0 3.327(Am)97 599.412 S .577
|
||||
(essage can be sent to an instance by means of the function)116.827 599.412 R
|
||||
F1(send)3.328 E F0 6.078(.T)C .578(he syntax of)421.748 599.412 R F1(send)3.328
|
||||
E F0(is)72 614.412 Q F1(\(send)100.346 636.915 Q F3 3.5(instance messa)6 F -.1
|
||||
(ge)-.1 G F1(.)6.1 E F3(ar)6 E(gs)-.37 E F1(\))A F0(where)72 658.915 Q F4
|
||||
(instance)4.138 E F0 1.388(is the instance to which the message is to be sent,)
|
||||
4.138 F F4(messa)4.137 E -.11(ge)-.11 G F0 1.387(is the name of the)4.247 F
|
||||
.332(method to be in)72 673.915 R -.22(vo)-.44 G -.11(ke).22 G 3.082(d\().11 G
|
||||
3.082(as)174.605 673.915 S .332(ymbol\), and)186.85 673.915 R F4(ar)3.082 E(gs)
|
||||
-.407 E F0 .332(are the ar)3.082 F .333(guments to be passed to the method.)
|
||||
-.198 F(Exam-)5.833 E(ple:)72 688.915 Q EP
|
||||
%%Page: 4 4
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 11/Times-Roman@0 SF 2.75(-4-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57
|
||||
75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL
|
||||
108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130
|
||||
57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57
|
||||
146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57
|
||||
168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57
|
||||
190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57
|
||||
212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57
|
||||
234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57
|
||||
256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57
|
||||
278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57
|
||||
300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57
|
||||
322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57
|
||||
344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57
|
||||
366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57
|
||||
388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57
|
||||
410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57
|
||||
432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57
|
||||
454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57
|
||||
476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57
|
||||
498.5 57 DL/F1 10/Courier@0 SF
|
||||
(\(define-class c \(instance-vars a\) \(class-vars \(b 10\)\)\))100.346 94.503
|
||||
Q(\(define-method c \(foo x\))100.346 115.503 Q(\(cons \(set! a x\) b\)\))
|
||||
112.346 129.503 Q 6(;s)262.346 129.503 S(et! returns previous value)280.346
|
||||
129.503 Q(\(define i \(make-instance c \(a 99\)\)\))100.346 150.503 Q
|
||||
(\(send i 'foo 1\))100.346 178.503 Q/F2 10/Times-Roman@0 SF 2.5(returns \(99)
|
||||
250.346 178.503 R 2.5(.1)2.5 G(0\))308.946 178.503 Q F1(\(send i 'foo 2\))
|
||||
100.346 192.503 Q F2 2.5(returns \(1)250.346 192.503 R 2.5(.1)2.5 G(0\))303.946
|
||||
192.503 Q F0 .725(When a message is sent to an instance for which no method ha\
|
||||
s been de\214ned, a `)97 218.103 R(`message)-.814 E(not understood')72 233.103
|
||||
Q 2.75('e)-.814 G(rror is signaled.)151.838 233.103 Q 1.132(The function)97
|
||||
251.703 R F1(send-if-handles)3.883 E F0 1.133(is identical to)7.133 F F1(send)
|
||||
3.883 E F0 3.883(,e)C 1.133(xcept that it returns a list of one)356.446 251.703
|
||||
R 2.197(element, the return v)72 266.703 R 2.196(alue of the method, or)-.275 F
|
||||
F1(#f)4.946 E F0 2.196(when the message is not understood by the)8.196 F
|
||||
(instance.)72 281.703 Q/F3 11/Times-Bold@0 SF 2.75(7. Ev)72 311.703 R
|
||||
(aluating Expr)-.11 E(essions within an Instance)-.198 E F0 1.355(The macro)97
|
||||
330.303 R F1(with-instance)4.105 E F0 1.355(can be used to e)7.355 F -.275(va)
|
||||
-.275 G 1.355(luate e).275 F 1.356(xpressions within the scope of an)-.165 F
|
||||
2.75(instance. The)72 345.303 R(syntax is)2.75 E F1(\(with-instance)100.346
|
||||
367.806 Q/F4 10/Times-Italic@0 SF(instance)6 E F1(.)6 E F4(body)6 E F1(\).)A F0
|
||||
(The)72 389.806 Q/F5 11/Times-Italic@0 SF(body)3.508 E F0 .758(forms are e)
|
||||
3.508 F -.275(va)-.275 G .758(luated in the same en).275 F .757
|
||||
(vironment in which a method of)-.44 F F5(instance)3.507 E F0 -.11(wo)3.507 G
|
||||
.757(uld be).11 F -.275(eva)72 404.806 S 2.035(luated, i.).275 F 2.035(e. the)
|
||||
1.833 F 4.786(yc)-.165 G 2.036(an access all and class and instance v)169.644
|
||||
404.806 R 2.036(ariables \(including)-.275 F F1(self)4.786 E F0(\).)A F1(with-)
|
||||
7.536 E(instance)72 419.806 Q F0(returns the v)6 E(alue of the last)-.275 E F5
|
||||
(body)2.75 E F0 2.75(form. Example:)2.75 F F1
|
||||
(\(define-class c \(class-vars \(x 5\)\) \(instance-vars y\)\))100.346 442.309
|
||||
Q(\(define i \(make-instance c \(y 1\)\)\))100.346 463.309 Q(\(define x 10\))
|
||||
100.346 484.309 Q(\(with-instance i \(cons x y\)\))100.346 498.309 Q F2 2.5
|
||||
(returns \(5)328.346 498.309 R 2.5(.1)2.5 G(\))381.946 498.309 Q F3 2.75
|
||||
(8. Setting)72 535.309 R(Instance and Class V)2.75 E(ariables)-1.012 E F0 1.187
|
||||
(Generally class and instance v)97 553.909 R 1.187
|
||||
(ariables are manipulated by methods or)-.275 F 3.937(,i)-.44 G 3.937(fa)
|
||||
423.119 553.909 S 1.187(pplicable, from)435.603 553.909 R .761(within a)72
|
||||
568.909 R F1(with-instance)3.511 E F0 3.511(form. In)6.761 F .762(addition, v)
|
||||
3.511 F .762(alues can be assigned to class and instance v)-.275 F(ari-)-.275 E
|
||||
.649(ables without in)72 583.909 R -.22(vo)-.44 G .648
|
||||
(lving a message send by means of the).22 F F1(instance-set!)3.398 E F0 3.398
|
||||
(macro. The)418.389 583.909 R(syntax)3.398 E(of)72 598.909 Q F1(instance-set!)
|
||||
2.75 E F0(is)173.913 598.909 Q F1(\(instance-set!)100.346 621.412 Q F4 3.5
|
||||
(instance variable value)6 F F1(\))A F0(where)72 643.412 Q F5(variable)5.844 E
|
||||
F0 3.094(is a symbol, the name of the class or instance v)5.844 F(ariable.)
|
||||
-.275 E F1(instance-set!)8.595 E F0(returns the pre)72 658.412 Q(vious v)-.275
|
||||
E(alue of the v)-.275 E(ariable \(lik)-.275 E(e)-.11 E F1(set!)2.75 E F0(\).)A
|
||||
.697(Class v)97 677.012 R .697(ariables can be modi\214ed without in)-.275 F
|
||||
-.22(vo)-.44 G .696(lving an instance of the class by means of the).22 F(macro)
|
||||
72 692.012 Q F1(class-set!)2.75 E F0(:)A EP
|
||||
%%Page: 5 5
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 11/Times-Roman@0 SF 2.75(-5-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57
|
||||
75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL
|
||||
108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130
|
||||
57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57
|
||||
146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57
|
||||
168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57
|
||||
190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57
|
||||
212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57
|
||||
234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57
|
||||
256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57
|
||||
278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57
|
||||
300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57
|
||||
322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57
|
||||
344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57
|
||||
366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57
|
||||
388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57
|
||||
410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57
|
||||
432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57
|
||||
454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57
|
||||
476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57
|
||||
498.5 57 DL/F1 10/Courier@0 SF(\(class-set!)100.346 94.503 Q/F2 10
|
||||
/Times-Italic@0 SF 3.5(class variable value)6 F F1(\).)A/F3 11/Times-Italic@0
|
||||
SF(variable)72 116.503 Q F0(must be the name of a class v)2.75 E(ariable of)
|
||||
-.275 E F3(class)2.75 E F0 5.5(.N)C(ote that one dif)323.152 116.503 Q
|
||||
(ference between)-.275 E F1(\(instance-set! i 'var x\))100.346 139.006 Q F0
|
||||
(and)72 161.006 Q F1(\(with-instance i \(set! var x\)\))100.346 183.509 Q F0
|
||||
.735(is that in the former case)72 205.509 R F1(x)3.486 E F0 .736(is e)6.736 F
|
||||
-.275(va)-.275 G .736(luated in the current en).275 F .736
|
||||
(vironment while in the latter case)-.44 F F1(x)3.486 E F0(is)6.736 E -.275
|
||||
(eva)72 220.509 S(luated within the scope of the instance \(here).275 E F1(x)
|
||||
2.75 E F0(might be a class or instance v)6 E(ariable\).)-.275 E/F4 11
|
||||
/Times-Bold@0 SF 2.75(9. Obtaining)72 250.509 R(Inf)2.75 E
|
||||
(ormation about Classes and Instances)-.275 E F0 .951(The function)97 269.109 R
|
||||
F1(class-name)3.701 E F0 .95(returns the name of a class \(a symbol\) or)6.951
|
||||
F 3.7(,w)-.44 G .95(hen applied to an)425.69 269.109 R
|
||||
(instance, the name of the class of which it is an instance.)72 284.109 Q .615
|
||||
(The predicate)97 302.709 R F1(method-known?)3.365 E F0 .615
|
||||
(can be used to check whether a method of a gi)251.765 302.709 R -.165(ve)-.275
|
||||
G 3.366(nn).165 G(ame)485.674 302.709 Q(is kno)72 317.709 Q(wn to a class.)
|
||||
-.275 E(The syntax is)5.5 E F1(\(method-known?)100.346 340.212 Q F2 3.5
|
||||
(method class)6 F F1(\))A F0(where)72 362.212 Q F3(method)2.75 E F0
|
||||
(is a symbol.)2.75 E .244(The type predicates)97 380.812 R F1(class?)2.994 E F0
|
||||
(and)234.867 380.812 Q F1(instance?)2.994 E F0 .244
|
||||
(can be used to check whether an object is)319.989 380.812 R 2.75(ac)72 395.812
|
||||
S(lass or an instance, respecti)84.518 395.812 Q -.165(ve)-.275 G(ly).165 E(.)
|
||||
-.715 E(The functions)97 414.412 Q F1(\(check-class)100.346 436.915 Q F2 3.5
|
||||
(symbol object)6 F F1(\))A F0(and)72 458.915 Q F1(\(check-instance)100.346
|
||||
481.418 Q F2 3.5(symbol object)6 F F1(\))A F0 .831(check whether)72 503.418 R
|
||||
F3(object)3.581 E F0 .831(is a class \(i.)3.581 F .832
|
||||
(e. satis\214es the predicate)1.833 F F1(class?)3.582 E F0 3.582(\)o)C 3.582
|
||||
(ra)385.663 503.418 S 3.582(ni)397.792 503.418 S .832(nstance, respecti)409.932
|
||||
503.418 R -.165(ve)-.275 G(ly).165 E(,)-.715 E
|
||||
(and, if not, signal an error; in this case)72 518.418 Q F3(symbol)2.75 E F0
|
||||
(is used as the \214rst ar)2.75 E(gument to)-.198 E F1(error)2.75 E F0(.)A .119
|
||||
(The functions)97 537.018 R F1(describe-class)2.869 E F0(and)6.118 E F1
|
||||
(describe-instance)2.868 E F0 .118(print the components \(name,)6.118 F 1.376
|
||||
(class/instance v)72 552.018 R 1.376
|
||||
(ariables, etc.\) of a class or instance, respecti)-.275 F -.165(ve)-.275 G(ly)
|
||||
.165 E 6.877(.T)-.715 G 1.377(he function)378.659 552.018 R F1(describe)4.127 E
|
||||
F0(has)7.377 E 4.931(been e)72 567.018 R 4.931(xtended in w)-.165 F 4.93
|
||||
(ay that when)-.11 F F1 4.93(\(feature? 'oops\))7.68 F F0 4.93(is true,)357.355
|
||||
567.018 R F1(describe-class)7.68 E F0(or)494.837 567.018 Q F1
|
||||
(describe-instance)72 582.018 Q F0 .507(are called when)6.507 F F1(describe)
|
||||
3.257 E F0 .508(is applied to an object that satis\214es)6.507 F F1(class?)
|
||||
3.258 E F0(or)72 597.018 Q F1(instance?)2.75 E F0 2.75(,r)C(especti)147.076
|
||||
597.018 Q -.165(ve)-.275 G(ly).165 E(.)-.715 E EP
|
||||
%%Page: 6 6
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 11/Times-Roman@0 SF 2.75(-6-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57
|
||||
75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL
|
||||
108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130
|
||||
57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57
|
||||
146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57
|
||||
168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57
|
||||
190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57
|
||||
212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57
|
||||
234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57
|
||||
256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57
|
||||
278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57
|
||||
300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57
|
||||
322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57
|
||||
344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57
|
||||
366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57
|
||||
388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57
|
||||
410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57
|
||||
432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57
|
||||
454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57
|
||||
476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57
|
||||
498.5 57 DL/F1 13/Times-Bold@0 SF(Index)272.108 123 Q(C)72 174 Q F0
|
||||
(check-class,)72 204 Q/F2 12/Times-Bold@0 SF(5)2.75 E F0(check-instance,)72 219
|
||||
Q F2(5)2.75 E F0(class v)72 234 Q(ariables, 1)-.275 E(class-name,)72 249 Q F2
|
||||
(5)2.75 E F0(class-set!,)72 264 Q F2(4)2.75 E F0(class-v)72 279 Q(ars,)-.275 E
|
||||
F2(1)2.75 E F0(class?,)72 294 Q F2(5)2.75 E F1(D)72 324 Q F0(de\214ne-class,)72
|
||||
354 Q F2(1)2.75 E F0(de\214ne-method,)72 369 Q F2(3)2.75 E F0(describe,)72 384
|
||||
Q F2(5)2.75 E F0(describe-class,)72 399 Q F2(5)2.75 E F0(describe-instance,)72
|
||||
414 Q F2(5)2.75 E F1(I)72 444 Q F0(initialize-instance,)72 474 Q F2(2)2.75 E F0
|
||||
(initializers, 1)72 489 Q(instance v)72 504 Q(ariables, 1)-.275 E
|
||||
(instance-set!,)72 519 Q F2(4)2.75 E F0(instance-v)72 534 Q(ars,)-.275 E F2(1)
|
||||
2.75 E F0(instance?,)72 549 Q F2(5)2.75 E F1(M)72 579 Q F0(mak)72 609 Q
|
||||
(e-instance,)-.11 E F2(2)2.75 E F0(method-kno)72 624 Q(wn?,)-.275 E F2(5)2.75 E
|
||||
F1(O)72 654 Q F0(oops, 1)302.4 174 Q F1(S)302.4 204 Q F0(self,)302.4 234 Q F2
|
||||
(2)2.75 E F0(send, 2,)302.4 249 Q F2(3)2.75 E F0(send-if-handles,)302.4 264 Q
|
||||
F2(4)2.75 E F0(super)302.4 279 Q(-class,)-.22 E F2(1)2.75 E F1(W)302.4 309 Q F0
|
||||
(with-instance,)302.4 339 Q F2(4)2.75 E EP
|
||||
%%Page: 7 7
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 13/Times-Bold@0 SF -1.196(Ta)239.127 123 S(ble of Contents)1.196 E/F1 11
|
||||
/Times-Roman@0 SF .866(Introduction ..........................................\
|
||||
..............................................................................\
|
||||
......)72 177.6 R(1)498.5 177.6 Q(Using)72 196.2 Q/F2 10/Times-Roman@0 SF(OOPS)
|
||||
2.75 E F1 19.25(..............................................................\
|
||||
................................................................ 1)3.411 F
|
||||
(De\214ning Classes)72 214.8 Q 19.25(.........................................\
|
||||
..............................................................................\
|
||||
1)3 F(Creating Instances of a Class)72 233.4 Q 19.25(........................\
|
||||
........................................................................... 2)
|
||||
4.551 F(De\214ning Methods)72 252 Q 19.25(....................................\
|
||||
..............................................................................\
|
||||
... 3)3 F(Sending Messages)72 270.6 Q 19.25(..................................\
|
||||
..............................................................................\
|
||||
.... 3)3.924 F(Ev)72 289.2 Q(aluating Expressions within an Instance)-.275 E
|
||||
19.25(........................................................................\
|
||||
...... 4)3.297 F(Setting Instance and Class V)72 307.8 Q .272(ariables .......\
|
||||
..............................................................................\
|
||||
...)-1.221 F(4)498.5 307.8 Q(Obtaining Information about Classes and Instances)
|
||||
72 326.4 Q 19.25
|
||||
(................................................................ 5)3.946 F
|
||||
(Inde)72 345 Q 2.868(x.)-.165 G 19.25(........................................\
|
||||
..............................................................................\
|
||||
.................. 6)102.5 345 R EP
|
||||
%%Trailer
|
||||
end
|
||||
%%EOF
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
MANUAL= record
|
||||
TROFF= groff -ms -t
|
||||
UNROFF= unroff -ms
|
||||
|
||||
$(MANUAL).ps: $(MANUAL).ms index.ms
|
||||
(cat $(MANUAL).ms ../util/tmac.index index.ms; echo ".Tc")\
|
||||
| $(TROFF) 2> /dev/null > $(MANUAL).ps
|
||||
|
||||
$(MANUAL).html: $(MANUAL).ms
|
||||
(cat $?; echo ".Tc") | $(UNROFF) document=$(MANUAL)
|
||||
|
||||
index.ms: $(MANUAL).ms index.raw
|
||||
sort -f -t# +1 -3 +0n index.raw | awk -f ../util/fixindex.awk\
|
||||
| awk -f ../util/block.awk >index.ms
|
||||
|
||||
index.raw: $(MANUAL).ms
|
||||
$(TROFF) $(MANUAL).ms 2> index.raw >/dev/null
|
||||
|
||||
check:
|
||||
checknr -c.Ul.Pr.Sy.Va.Sh.Ix.Id.Ch -a.Ss.Se.[[.]] $(MANUAL).ms |\
|
||||
grep -v "Empty command"
|
||||
|
||||
clean:
|
||||
rm -f index.raw index.ms $(MANUAL).ps $(MANUAL).html
|
||||
|
|
@ -0,0 +1,345 @@
|
|||
.so ../util/tmac.scheme
|
||||
.Ul
|
||||
.TL
|
||||
Reference Manual for the
|
||||
.sp .5
|
||||
Elk Record Extension
|
||||
.AU
|
||||
Oliver Laumann
|
||||
.
|
||||
.Ch "Introduction"
|
||||
.
|
||||
.PP
|
||||
The record extension to Elk allows Scheme applications to define
|
||||
.Ix "record data type"
|
||||
record data types (similar to, although less powerful than,
|
||||
Common Lisp
|
||||
.Ix structures
|
||||
\f2structures\fP).
|
||||
.PP
|
||||
A record type can be instantiated to obtain a new
|
||||
.Ix record
|
||||
record (a member of the given record type).
|
||||
Each record is a collection of named
|
||||
.Ix fields
|
||||
fields that can hold arbitrary Scheme objects.
|
||||
Records are first-class Scheme objects; they are members of the
|
||||
\f2record\fP data type that is disjoint from all other Scheme types.
|
||||
Record types are first-class objects as well; each record type is a
|
||||
member of the \f2record-type\fP Scheme data type.
|
||||
.PP
|
||||
The record extension provides facilities to define new record types,
|
||||
create
|
||||
.Ix instances
|
||||
instances of existing record types, define
|
||||
.Ix accessor
|
||||
accessor and
|
||||
.Ix modifier
|
||||
modifier functions to read and write the fields of records of a
|
||||
given type, and
|
||||
.Ix "type predicate"
|
||||
type predicates for the \f2record\fP and \f2record-type\fP data types.
|
||||
.PP
|
||||
In addition, the extension provides
|
||||
.Ix macros
|
||||
macros that simplify the definition of
|
||||
.Ix constructor
|
||||
constructor, accessor and modifier functions for a newly defined record type.
|
||||
.
|
||||
.Ch "Using the Record Extension"
|
||||
.
|
||||
.PP
|
||||
The record extension is loaded by evaluating
|
||||
.Ss
|
||||
(require 'record)
|
||||
.Se
|
||||
in the interactive toplevel or in a Scheme program.
|
||||
.PP
|
||||
This causes the files
|
||||
.Ix record.scm
|
||||
\f2record.scm\fP and
|
||||
.Ix record.o
|
||||
\f2record.o\fP to be loaded into the interpreter (\f2record.o\fP has to
|
||||
be linked with the interpreter on platforms that do not support dynamic
|
||||
loading of object files).
|
||||
.PP
|
||||
Loading the record extension causes the
|
||||
.Ix feature
|
||||
features \f2record\fP and \f2record.o\fP to be provided.
|
||||
.
|
||||
.Ch "Record Types"
|
||||
.
|
||||
.Pr make-record-type type-name fields
|
||||
.LP
|
||||
\f2make-record-type\fP creates a new
|
||||
.Ix "record type"
|
||||
record type.
|
||||
\f2type-name\fP (a string or a symbol) is the name of the record type;
|
||||
it is used in the printed representation of the record type and of
|
||||
records belonging to the new type.
|
||||
If \f2type-name\fP is a symbol, it is converted into a string first.
|
||||
.Ix fields
|
||||
\f2fields\fP is a list of symbols naming the fields of a record of
|
||||
the new type.
|
||||
An error is signaled of the list contains duplicate names.
|
||||
.LP
|
||||
\f2make-record-type\fP returns the new record type (an object of the
|
||||
Scheme type \f2record-type\fP).
|
||||
.LP
|
||||
Example:
|
||||
.Ss
|
||||
(define time-record
|
||||
(make-record-type 'time '(hours minutes seconds)))
|
||||
.Se
|
||||
.
|
||||
.Pr record-type? obj
|
||||
.LP
|
||||
This
|
||||
.Ix "type predicate"
|
||||
type predicate returns #t if \f2obj\fP is a \f2record-type\fP
|
||||
object (i.\|e.\& the return value of a call to \f2make-record-type\fP),
|
||||
#f otherwise.
|
||||
.
|
||||
.Pr record-type-name rt
|
||||
.LP
|
||||
This procedure returns the
|
||||
.Ix "type name"
|
||||
type name (a string) of the record type \f2rt\fP,
|
||||
i.\|e.\& the \f2type-name\fP argument that was supplied to the call
|
||||
to \f2make-record-type\fP that created the record type \f2rt\fP.
|
||||
.
|
||||
.Pr record-type-field-names rt
|
||||
.LP
|
||||
\f2record-type-field-names\fP returns the list of
|
||||
.Ix "field names"
|
||||
field names associated with the record type \f2rt\fP (a list of
|
||||
symbols), i.\|e.\& the \f2fields\fP argument that was given in the call to
|
||||
.Ix make-record-type
|
||||
\f2make-record-type\fP that created \f2rt\fP.
|
||||
.
|
||||
.[[
|
||||
.Pr record-constructor rt fields
|
||||
.Pr record-constructor rt
|
||||
.]]
|
||||
.LP
|
||||
\f2record-constructor\fP returns a procedure for creating
|
||||
.Ix instances
|
||||
instances of the record type \f2rt\fP.
|
||||
.LP
|
||||
The returned procedure accepts as many arguments as there are symbols
|
||||
in the list \f2fields\fP; these arguments are used as the initial
|
||||
values of those
|
||||
.Ix fields
|
||||
fields in the newly created record instance.
|
||||
The values of any fields for which no
|
||||
.Ix "initial value"
|
||||
initial value is specified (i.\|e.
|
||||
that are not present in \f2fields\fP) are undefined.
|
||||
If the \f2fields\fP argument is omitted, the field names that were given
|
||||
as an argument in the call to
|
||||
.Ix make-record-type
|
||||
\f2make-record-type\fP that created the record type \f2rt\fP are used instead.
|
||||
.LP
|
||||
Example:
|
||||
.Ss
|
||||
(define make-time
|
||||
(record-constructor time-record))
|
||||
(define noon (make-time 12 0 0))
|
||||
.sp .5
|
||||
(define make-uninitialized-time
|
||||
(record-constructor time-record '()))
|
||||
.Se
|
||||
.
|
||||
.Pr record-predicate rt
|
||||
.LP
|
||||
\f2record-predicate\fP returns a procedure for testing membership
|
||||
in the record type \f2rt\fP.
|
||||
The returned procedure accepts one argument and returns #t if the
|
||||
argument is a member of the record type \f2rt\fP (i.\|e.\& if it
|
||||
has been created by invoking a constructor returned by calling
|
||||
.Ix record constructor
|
||||
\f2record-constructor\fP with \f2rt\fP as an argument), #f otherwise.
|
||||
.
|
||||
.Pr record-accessor rt field
|
||||
.LP
|
||||
\f2record-accessor\fP returns a procedure for reading the value of the
|
||||
.Ix field
|
||||
field named by \f2field\fP of a member of the record type \f2rt\fP.
|
||||
The returned procedure accepts one argument, which must be a record
|
||||
of the record type \f2rt\fP; it returns the current value of the
|
||||
specified field in that record.
|
||||
\f2field\fP must be a member of the list of field names that was supplied
|
||||
to the call to
|
||||
.Ix make-record-type
|
||||
\f2make-record-type\fP that created \f2rt\fP.
|
||||
.LP
|
||||
Example:
|
||||
.Ss
|
||||
(define time-hours
|
||||
(record-accessor time-record 'hours))
|
||||
.sp .5
|
||||
(define noon ((record-constructor time-record) 12 0 0))
|
||||
(time-hours noon) \f2\(-> 12\fP
|
||||
.Se
|
||||
.
|
||||
.Pr record-modifier rt field
|
||||
.LP
|
||||
\f2record-modifier\fP returns a procedure for writing the value of the
|
||||
.Ix field
|
||||
field named by \f2field\fP of a member of the record type \f2rt\fP.
|
||||
The returned procedure accepts two arguments: a record
|
||||
of the record type \f2rt\fP and an arbitrary object; it stores the given
|
||||
object into the specified field in that record and returns the
|
||||
previous value of the field.
|
||||
\f2field\fP must be a member of the list of field names that was supplied
|
||||
to the call to
|
||||
.Ix make-record-type
|
||||
\f2make-record-type\fP that created \f2rt\fP.
|
||||
.LP
|
||||
Example
|
||||
.Ss
|
||||
(define set-time-hours!
|
||||
(record-modifier time-record 'hours))
|
||||
.Se
|
||||
.
|
||||
.Pr describe-record-type rt
|
||||
.LP
|
||||
This procedure prints the names of the
|
||||
.Ix fields
|
||||
fields associated with the record type \f2rt\fP; it is automatically
|
||||
invoked by the standard
|
||||
.Ix describe
|
||||
\f2describe\fP procedure of Elk if \f2describe\fP is invoked with a
|
||||
record type.
|
||||
.
|
||||
.Ch "Records"
|
||||
.
|
||||
.Pr record? obj
|
||||
.LP
|
||||
This
|
||||
.Ix "type predicate"
|
||||
type predicate returns #t if \f2obj\fP is an object of type \f2record\fP
|
||||
(i.\|e.\& the return value of a call to a record
|
||||
.Ix constructor
|
||||
constructor of any record type), #f otherwise.
|
||||
.
|
||||
.Pr record-type-descriptor record
|
||||
.LP
|
||||
This procedure returns the
|
||||
.Ix "record type"
|
||||
record type representing the type of the given record.
|
||||
The returned record type object is equal (in the sense of \f2eq?\fP)
|
||||
to the record type argument that was passed to
|
||||
.Ix record-constructor
|
||||
\f2record-constructor\fP in the call that created the constructor
|
||||
procedure that created \f2record\fP.
|
||||
.LP
|
||||
Example: evaluating the expression
|
||||
.Ss
|
||||
((record-predicate (record-type-descriptor r)) r)
|
||||
.Se
|
||||
always yields #t for any given record \f2r\fP.
|
||||
.
|
||||
.Pr record-values record
|
||||
.LP
|
||||
\f2record-values\fP returns the current contents of the fields of
|
||||
\f2record\fP as a
|
||||
.Ix vector
|
||||
vector.
|
||||
The \f2n\fPth element of the vector corresponds to the field with the
|
||||
name given as the \f2n\fPth element of the \f2fields\fP argument in
|
||||
the call to
|
||||
.Ix make-record-type
|
||||
\f2make-record-type\fP that created the type to which \f2record\fP belongs.
|
||||
.LP
|
||||
The returned vector is not a copy of the actual fields; i.\|e.\& modifying
|
||||
the contents of the vector directly writes the corresponding fields
|
||||
of the record.
|
||||
.
|
||||
.Pr describe-record record
|
||||
.LP
|
||||
This procedure prints the names and current values of the
|
||||
.Ix fields
|
||||
fields of the given record; it is automatically invoked by the standard
|
||||
.Ix describe
|
||||
\f2describe\fP procedure of Elk if \f2describe\fP is invoked with a record.
|
||||
.
|
||||
.Ch "Convenience Macros"
|
||||
.PP
|
||||
The
|
||||
.Ix macros
|
||||
macros described in this section are loaded by evaluating
|
||||
.Ss
|
||||
(require 'recordutil)
|
||||
.Se
|
||||
after having loaded the record extension.
|
||||
This causes the file
|
||||
.Ix recordutil.scm
|
||||
\f2recordutil.scm\fP to be loaded and defines the
|
||||
.Ix feature
|
||||
.Ix recordutil
|
||||
feature \f2recordutil\fP.
|
||||
.
|
||||
.Sy define-record-type name fields
|
||||
.LP
|
||||
This macro defines a variable \f2<name>-record\fP, invokes the procedure
|
||||
.Ix make-record-type
|
||||
\f2make-record-type\fP with the given \f2name\fP and
|
||||
\f2fields\fP, and assigns the result to this variable.
|
||||
In addition, \f2define-record-type\fP defines a
|
||||
.Ix "type predicate"
|
||||
type predicate for the new record type as \f2<name>\-record?\fP and a
|
||||
.Ix constructor
|
||||
constructor function as \f2make\-<name>\-record\fP.
|
||||
The constructor function accepts no arguments and returns an
|
||||
uninitialized record of the newly defined record type.
|
||||
.LP
|
||||
Example:
|
||||
.Ss
|
||||
(require 'record)
|
||||
(require 'recordutil)
|
||||
.sp .5
|
||||
(define-record-type
|
||||
time (hours minutes seconds))
|
||||
.sp .3
|
||||
(record-type? time-record) \f2\(-> #t\fP
|
||||
.sp .3
|
||||
(define t (make-time-record))
|
||||
.sp .3
|
||||
(time-record? t) \f2\(-> #t\fP
|
||||
.Se
|
||||
.
|
||||
.[[
|
||||
.Sy define-record-accessors rt
|
||||
.Sy define-record-modifiers rt
|
||||
.]]
|
||||
.LP
|
||||
The macro \f2define-record-accessors\fP (\f2define-record-modifiers\fP)
|
||||
defines
|
||||
.Ix accessor
|
||||
.Ix modifier
|
||||
accessor (modifier) functions for the fields of the record type \f2rt\fP.
|
||||
For each field named \f2field\fP, \f2define-record-accessors\fP
|
||||
(\f2define-record-modifiers\fP) defines a function \f2<name>\-<field>\fP
|
||||
(\f2set\-<name>\-<field>!\fP), where \f2name\fP is the type name of
|
||||
the given record type.
|
||||
Each of the functions is the result of a call to
|
||||
.Ix record-accessor
|
||||
.Ix record-modifier
|
||||
\f2record-accessor\fP (\f2record-modifier\fP) as described above, with
|
||||
the arguments \f2rt\fP and the name of the field.
|
||||
.LP
|
||||
Example:
|
||||
.Ss
|
||||
(define-record-type time (hours minutes seconds))
|
||||
(define-record-modifiers time-record)
|
||||
.sp .3
|
||||
(define noon (make-time-record))
|
||||
(set-time-hours! noon 12)
|
||||
(set-time-minutes! noon 0)
|
||||
(set-time-seconds! noon 0)
|
||||
.sp .5
|
||||
(define-record-accessors time-record)
|
||||
.sp .3
|
||||
(time-hours noon) \f2\(-> 12\fP
|
||||
.Se
|
||||
|
|
@ -0,0 +1,640 @@
|
|||
%!PS-Adobe-3.0
|
||||
%%Creator: groff version 1.08
|
||||
%%DocumentNeededResources: font Times-Bold
|
||||
%%+ font Times-Italic
|
||||
%%+ font Times-Roman
|
||||
%%+ font Courier
|
||||
%%+ font Symbol
|
||||
%%DocumentSuppliedResources: procset grops 1.08 0
|
||||
%%Pages: 7
|
||||
%%PageOrder: Ascend
|
||||
%%Orientation: Portrait
|
||||
%%EndComments
|
||||
%%BeginProlog
|
||||
%%BeginResource: procset grops 1.08 0
|
||||
/setpacking where{
|
||||
pop
|
||||
currentpacking
|
||||
true setpacking
|
||||
}if
|
||||
/grops 120 dict dup begin
|
||||
/SC 32 def
|
||||
/A/show load def
|
||||
/B{0 SC 3 -1 roll widthshow}bind def
|
||||
/C{0 exch ashow}bind def
|
||||
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/E{0 rmoveto show}bind def
|
||||
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/G{0 rmoveto 0 exch ashow}bind def
|
||||
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/I{0 exch rmoveto show}bind def
|
||||
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/K{0 exch rmoveto 0 exch ashow}bind def
|
||||
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/M{rmoveto show}bind def
|
||||
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/O{rmoveto 0 exch ashow}bind def
|
||||
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/Q{moveto show}bind def
|
||||
/R{moveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/S{moveto 0 exch ashow}bind def
|
||||
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/SF{
|
||||
findfont exch
|
||||
[exch dup 0 exch 0 exch neg 0 0]makefont
|
||||
dup setfont
|
||||
[exch/setfont cvx]cvx bind def
|
||||
}bind def
|
||||
/MF{
|
||||
findfont
|
||||
[5 2 roll
|
||||
0 3 1 roll
|
||||
neg 0 0]makefont
|
||||
dup setfont
|
||||
[exch/setfont cvx]cvx bind def
|
||||
}bind def
|
||||
/level0 0 def
|
||||
/RES 0 def
|
||||
/PL 0 def
|
||||
/LS 0 def
|
||||
/PLG{
|
||||
gsave newpath clippath pathbbox grestore
|
||||
exch pop add exch pop
|
||||
}bind def
|
||||
/BP{
|
||||
/level0 save def
|
||||
1 setlinecap
|
||||
1 setlinejoin
|
||||
72 RES div dup scale
|
||||
LS{
|
||||
90 rotate
|
||||
}{
|
||||
0 PL translate
|
||||
}ifelse
|
||||
1 -1 scale
|
||||
}bind def
|
||||
/EP{
|
||||
level0 restore
|
||||
showpage
|
||||
}bind def
|
||||
/DA{
|
||||
newpath arcn stroke
|
||||
}bind def
|
||||
/SN{
|
||||
transform
|
||||
.25 sub exch .25 sub exch
|
||||
round .25 add exch round .25 add exch
|
||||
itransform
|
||||
}bind def
|
||||
/DL{
|
||||
SN
|
||||
moveto
|
||||
SN
|
||||
lineto stroke
|
||||
}bind def
|
||||
/DC{
|
||||
newpath 0 360 arc closepath
|
||||
}bind def
|
||||
/TM matrix def
|
||||
/DE{
|
||||
TM currentmatrix pop
|
||||
translate scale newpath 0 0 .5 0 360 arc closepath
|
||||
TM setmatrix
|
||||
}bind def
|
||||
/RC/rcurveto load def
|
||||
/RL/rlineto load def
|
||||
/ST/stroke load def
|
||||
/MT/moveto load def
|
||||
/CL/closepath load def
|
||||
/FL{
|
||||
currentgray exch setgray fill setgray
|
||||
}bind def
|
||||
/BL/fill load def
|
||||
/LW/setlinewidth load def
|
||||
/RE{
|
||||
findfont
|
||||
dup maxlength 1 index/FontName known not{1 add}if dict begin
|
||||
{
|
||||
1 index/FID ne{def}{pop pop}ifelse
|
||||
}forall
|
||||
/Encoding exch def
|
||||
dup/FontName exch def
|
||||
currentdict end definefont pop
|
||||
}bind def
|
||||
/DEFS 0 def
|
||||
/EBEGIN{
|
||||
moveto
|
||||
DEFS begin
|
||||
}bind def
|
||||
/EEND/end load def
|
||||
/CNT 0 def
|
||||
/level1 0 def
|
||||
/PBEGIN{
|
||||
/level1 save def
|
||||
translate
|
||||
div 3 1 roll div exch scale
|
||||
neg exch neg exch translate
|
||||
0 setgray
|
||||
0 setlinecap
|
||||
1 setlinewidth
|
||||
0 setlinejoin
|
||||
10 setmiterlimit
|
||||
[]0 setdash
|
||||
/setstrokeadjust where{
|
||||
pop
|
||||
false setstrokeadjust
|
||||
}if
|
||||
/setoverprint where{
|
||||
pop
|
||||
false setoverprint
|
||||
}if
|
||||
newpath
|
||||
/CNT countdictstack def
|
||||
userdict begin
|
||||
/showpage{}def
|
||||
}bind def
|
||||
/PEND{
|
||||
clear
|
||||
countdictstack CNT sub{end}repeat
|
||||
level1 restore
|
||||
}bind def
|
||||
end def
|
||||
/setpacking where{
|
||||
pop
|
||||
setpacking
|
||||
}if
|
||||
%%EndResource
|
||||
%%IncludeResource: font Times-Bold
|
||||
%%IncludeResource: font Times-Italic
|
||||
%%IncludeResource: font Times-Roman
|
||||
%%IncludeResource: font Courier
|
||||
%%IncludeResource: font Symbol
|
||||
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL
|
||||
841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron
|
||||
/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef/.notdef/.notdef
|
||||
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
|
||||
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/space
|
||||
/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright/parenleft
|
||||
/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four
|
||||
/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C
|
||||
/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash
|
||||
/bracketright/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q
|
||||
/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase
|
||||
/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger
|
||||
/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
|
||||
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
|
||||
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar
|
||||
/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus
|
||||
/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu
|
||||
/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright
|
||||
/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde
|
||||
/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute
|
||||
/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
|
||||
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
|
||||
/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute
|
||||
/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve
|
||||
/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex
|
||||
/udieresis/yacute/thorn/ydieresis]def/Courier@0 ENC0/Courier RE/Times-Roman@0
|
||||
ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0
|
||||
/Times-Bold RE
|
||||
%%EndProlog
|
||||
%%Page: 1 1
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 12/Times-Bold@0 SF(Refer)222.444 120 Q(ence Manual f)-.216 E(or the)-.3 E
|
||||
(Elk Record Extension)231.996 138 Q/F1 10/Times-Italic@0 SF(Oliver Laumann)
|
||||
255.085 162 Q/F2 11/Times-Bold@0 SF 2.75(1. Intr)72 234 R(oduction)-.198 E/F3
|
||||
11/Times-Roman@0 SF .345(The record e)97 252.6 R .345(xtension to Elk allo)
|
||||
-.165 F .344(ws Scheme applications to de\214ne record data types \(similar)
|
||||
-.275 F(to, although less po)72 267.6 Q(werful than, Common Lisp)-.275 E/F4 11
|
||||
/Times-Italic@0 SF(structur)2.75 E(es)-.407 E F3(\).)A 4.329(Ar)97 286.2 S
|
||||
1.579(ecord type can be instantiated to obtain a ne)112.934 286.2 R 4.329(wr)
|
||||
-.275 G 1.579(ecord \(a member of the gi)334.297 286.2 R -.165(ve)-.275 G 4.33
|
||||
(nr).165 G(ecord)479.569 286.2 Q 5.568(type\). Each)72 301.2 R 2.817(record is\
|
||||
a collection of named \214elds that can hold arbitrary Scheme objects.)5.568 F
|
||||
.819(Records are \214rst-class Scheme objects; the)72 316.2 R 3.57(ya)-.165 G
|
||||
.82(re members of the)277.764 316.2 R F4 -.407(re)3.57 G(cor).407 E(d)-.407 E
|
||||
F3 .82(data type that is disjoint)3.57 F 1.072(from all other Scheme types.)72
|
||||
331.2 R 1.071
|
||||
(Record types are \214rst-class objects as well; each record type is a)6.572 F
|
||||
(member of the)72 346.2 Q F4 -.407(re)2.75 G(cor).407 E(d-type)-.407 E F3
|
||||
(Scheme data type.)2.75 E .075(The record e)97 364.8 R .075(xtension pro)-.165
|
||||
F .075(vides f)-.165 F .075(acilities to de\214ne ne)-.11 F 2.825(wr)-.275 G
|
||||
.076(ecord types, create instances of e)339.446 364.8 R(xist-)-.165 E .002(ing\
|
||||
record types, de\214ne accessor and modi\214er functions to read and write th\
|
||||
e \214elds of records of a)72 379.8 R(gi)72 394.8 Q -.165(ve)-.275 G 2.75(nt)
|
||||
.165 G(ype, and type predicates for the)101.81 394.8 Q F4 -.407(re)2.75 G(cor)
|
||||
.407 E(d)-.407 E F3(and)2.75 E F4 -.407(re)2.75 G(cor).407 E(d-type)-.407 E F3
|
||||
(data types.)2.75 E .322(In addition, the e)97 413.4 R .322(xtension pro)-.165
|
||||
F .323(vides macros that simplify the de\214nition of constructor)-.165 F 3.073
|
||||
(,a)-.44 G(cces-)481.406 413.4 Q(sor and modi\214er functions for a ne)72 428.4
|
||||
Q(wly de\214ned record type.)-.275 E F2 2.75(2. Using)72 458.4 R
|
||||
(the Record Extension)2.75 E F3(The record e)97 477 Q(xtension is loaded by e)
|
||||
-.165 E -.275(va)-.275 G(luating).275 E/F5 10/Courier@0 SF(\(require 'record\))
|
||||
100.346 499.503 Q F3(in the interacti)72 521.503 Q .33 -.165(ve t)-.275 H(ople)
|
||||
.165 E -.165(ve)-.275 G 2.75(lo).165 G 2.75(ri)191.493 521.503 S 2.75(naS)
|
||||
200.964 521.503 S(cheme program.)222.964 521.503 Q .551
|
||||
(This causes the \214les)97 540.103 R F4 -.407(re)3.301 G(cor).407 E(d.scm)
|
||||
-.407 E F3(and)3.301 E F4 -.407(re)3.301 G(cor).407 E(d.o)-.407 E F3 .551
|
||||
(to be loaded into the interpreter \()3.301 F F4 -.407(re)C(cor).407 E(d.o)
|
||||
-.407 E F3(has)3.3 E .215(to be link)72 555.103 R .216(ed with the interpreter\
|
||||
on platforms that do not support dynamic loading of object \214les\).)-.11 F
|
||||
(Loading the record e)97 573.703 Q(xtension causes the features)-.165 E F4
|
||||
-.407(re)2.75 G(cor).407 E(d)-.407 E F3(and)2.75 E F4 -.407(re)2.75 G(cor).407
|
||||
E(d.o)-.407 E F3(to be pro)2.75 E(vided.)-.165 E F2 2.75(3. Record)72 603.703 R
|
||||
-.814(Ty)2.75 G(pes).814 E(\(mak)72 633.703 Q(e-r)-.11 E(ecord-type)-.198 E F4
|
||||
(type-name \214elds)4.583 E F2 216.437(\)p)C -.198(ro)462.244 633.703 S(cedur)
|
||||
.198 E(e)-.198 E F4(mak)72 652.303 Q(e-r)-.11 E(ecor)-.407 E(d-type)-.407 E F3
|
||||
.5(creates a ne)3.25 F 3.25(wr)-.275 G .5(ecord type.)219.398 652.303 R F4
|
||||
(type-name)6 E F3 .499(\(a string or a symbol\) is the name of the)3.25 F .379
|
||||
(record type; it is used in the printed representation of the record type and \
|
||||
of records belonging to)72 667.303 R .731(the ne)72 682.303 R 3.481(wt)-.275 G
|
||||
3.481(ype. If)113.513 682.303 R F4(type-name)3.481 E F3 .73
|
||||
(is a symbol, it is con)3.481 F -.165(ve)-.44 G .73
|
||||
(rted into a string \214rst.).165 F F4(\214elds)6.23 E F3 .73
|
||||
(is a list of sym-)3.48 F .32(bols naming the \214elds of a record of the ne)72
|
||||
697.303 R 3.07(wt)-.275 G 3.07(ype. An)277.171 697.303 R .32
|
||||
(error is signaled of the list contains dupli-)3.07 F(cate names.)72 712.303 Q
|
||||
EP
|
||||
%%Page: 2 2
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 11/Times-Roman@0 SF 2.75(-2-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57
|
||||
75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL
|
||||
108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130
|
||||
57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57
|
||||
146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57
|
||||
168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57
|
||||
190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57
|
||||
212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57
|
||||
234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57
|
||||
256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57
|
||||
278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57
|
||||
300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57
|
||||
322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57
|
||||
344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57
|
||||
366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57
|
||||
388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57
|
||||
410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57
|
||||
432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57
|
||||
454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57
|
||||
476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57
|
||||
498.5 57 DL/F1 11/Times-Italic@0 SF(mak)72 87 Q(e-r)-.11 E(ecor)-.407 E(d-type)
|
||||
-.407 E F0(returns the ne)2.75 E 2.75(wr)-.275 G
|
||||
(ecord type \(an object of the Scheme type)225.967 87 Q F1 -.407(re)2.75 G(cor)
|
||||
.407 E(d-type)-.407 E F0(\).)A(Example:)72 105.6 Q/F2 10/Courier@0 SF
|
||||
(\(define time-record)100.346 128.103 Q
|
||||
(\(make-record-type 'time '\(hours minutes seconds\)\)\))112.346 142.103 Q/F3
|
||||
11/Times-Bold@0 SF(\(r)72 179.103 Q(ecord-type?)-.198 E F1(obj)4.583 E F3
|
||||
297.881(\)p)C -.198(ro)462.244 179.103 S(cedur).198 E(e)-.198 E F0 .211
|
||||
(This type predicate returns #t if)72 197.703 R F1(obj)2.96 E F0 .21(is a)2.96
|
||||
F F1 -.407(re)2.96 G(cor).407 E(d-type)-.407 E F0 .21(object \(i.)2.96 F .21
|
||||
(e. the return v)1.833 F .21(alue of a call to)-.275 F F1(mak)2.96 E(e-)-.11 E
|
||||
-.407(re)72 212.703 S(cor).407 E(d-type)-.407 E F0(\), #f otherwise.)A F3(\(r)
|
||||
72 242.703 Q(ecord-type-name)-.198 E F1(rt)4.583 E F3 280.776(\)p)C -.198(ro)
|
||||
462.244 242.703 S(cedur).198 E(e)-.198 E F0 .302
|
||||
(This procedure returns the type name \(a string\) of the record type)72
|
||||
261.303 R F1(rt)3.052 E F0 3.052(,i)C 1.833(.e)382.021 261.303 S 3.052(.t)
|
||||
-1.833 G(he)400.348 261.303 Q F1(type-name)3.052 E F0(ar)3.052 E(gument)-.198 E
|
||||
(that w)72 276.303 Q(as supplied to the call to)-.11 E F1(mak)2.75 E(e-r)-.11 E
|
||||
(ecor)-.407 E(d-type)-.407 E F0(that created the record type)2.75 E F1(rt)2.75
|
||||
E F0(.)A F3(\(r)72 306.303 Q(ecord-type-\214eld-names)-.198 E F1(rt)4.583 E F3
|
||||
252.66(\)p)C -.198(ro)462.244 306.303 S(cedur).198 E(e)-.198 E F1 -.407(re)72
|
||||
324.903 S(cor).407 E(d-type-\214eld-names)-.407 E F0 .524
|
||||
(returns the list of \214eld names associated with the record type)3.275 F F1
|
||||
(rt)3.274 E F0 .524(\(a list of)3.274 F(symbols\), i.)72 339.903 Q(e. the)1.833
|
||||
E F1(\214elds)2.75 E F0(ar)2.75 E(gument that w)-.198 E(as gi)-.11 E -.165(ve)
|
||||
-.275 G 2.75(ni).165 G 2.75(nt)290.929 339.903 S(he call to)302.237 339.903 Q
|
||||
F1(mak)2.75 E(e-r)-.11 E(ecor)-.407 E(d-type)-.407 E F0(that created)2.75 E F1
|
||||
(rt)2.75 E F0(.)A F3(\(r)72 369.903 Q(ecord-constructor)-.198 E F1(rt \214elds)
|
||||
4.583 E F3 249.921(\)p)C -.198(ro)462.244 369.903 S(cedur).198 E(e)-.198 E(\(r)
|
||||
72 384.903 Q(ecord-constructor)-.198 E F1(rt)4.583 E F3 275.892(\)p)C -.198(ro)
|
||||
462.244 384.903 S(cedur).198 E(e)-.198 E F1 -.407(re)72 403.503 S(cor).407 E
|
||||
(d-constructor)-.407 E F0
|
||||
(returns a procedure for creating instances of the record type)2.75 E F1(rt)
|
||||
2.75 E F0(.)A 1.065(The returned procedure accepts as man)72 422.103 R 3.815
|
||||
(ya)-.165 G -.198(rg)263.322 422.103 S 1.065
|
||||
(uments as there are symbols in the list).198 F F1(\214elds)3.816 E F0 3.816
|
||||
(;t)C(hese)484.453 422.103 Q(ar)72 437.103 Q .584
|
||||
(guments are used as the initial v)-.198 F .583
|
||||
(alues of those \214elds in the ne)-.275 F .583(wly created record instance.)
|
||||
-.275 F(The)6.083 E -.275(va)72 452.103 S .736(lues of an).275 F 3.486<798c>
|
||||
-.165 G .736(elds for which no initial v)141.286 452.103 R .736
|
||||
(alue is speci\214ed \(i.)-.275 F 3.487(e. that)1.833 F .737
|
||||
(are not present in)3.487 F F1(\214elds)3.487 E F0 3.487(\)a)C(re)495.453
|
||||
452.103 Q 2.836(unde\214ned. If)72 467.103 R(the)2.836 E F1(\214elds)2.836 E F0
|
||||
(ar)2.836 E .085(gument is omitted, the \214eld names that were gi)-.198 F
|
||||
-.165(ve)-.275 G 2.835(na).165 G 2.835(sa)414.648 467.103 S 2.835(na)426.646
|
||||
467.103 S -.198(rg)439.865 467.103 S .085(ument in the).198 F(call to)72
|
||||
482.103 Q F1(mak)2.75 E(e-r)-.11 E(ecor)-.407 E(d-type)-.407 E F0
|
||||
(that created the record type)2.75 E F1(rt)2.75 E F0(are used instead.)2.75 E
|
||||
(Example:)72 500.703 Q F2(\(define make-time)100.346 523.206 Q
|
||||
(\(record-constructor time-record\)\))118.346 537.206 Q
|
||||
(\(define noon \(make-time 12 0 0\)\))100.346 551.206 Q
|
||||
(\(define make-uninitialized-time)100.346 572.206 Q
|
||||
(\(record-constructor time-record '\(\)\)\))118.346 586.206 Q F3(\(r)72 623.206
|
||||
Q(ecord-pr)-.198 E(edicate)-.198 E F1(rt)4.583 E F3 286.474(\)p)C -.198(ro)
|
||||
462.244 623.206 S(cedur).198 E(e)-.198 E F1 -.407(re)72 641.806 S(cor).407 E
|
||||
(d-pr)-.407 E(edicate)-.407 E F0 .873
|
||||
(returns a procedure for testing membership in the record type)3.623 F F1(rt)
|
||||
3.623 E F0 6.373(.T)C .873(he returned)453.341 641.806 R .584
|
||||
(procedure accepts one ar)72 656.806 R .584(gument and returns #t if the ar)
|
||||
-.198 F .583(gument is a member of the record type)-.198 F F1(rt)3.333 E F0
|
||||
-.917(\(i. e.)72 671.806 R .038(if it has been created by in)2.788 F -.22(vo)
|
||||
-.44 G .038(king a constructor returned by calling).22 F F1 -.407(re)2.789 G
|
||||
(cor).407 E(d-constructor)-.407 E F0(with)2.789 E F1(rt)2.789 E F0(as an ar)72
|
||||
686.806 Q(gument\), #f otherwise.)-.198 E EP
|
||||
%%Page: 3 3
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 11/Times-Roman@0 SF 2.75(-3-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57
|
||||
75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL
|
||||
108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130
|
||||
57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57
|
||||
146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57
|
||||
168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57
|
||||
190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57
|
||||
212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57
|
||||
234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57
|
||||
256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57
|
||||
278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57
|
||||
300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57
|
||||
322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57
|
||||
344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57
|
||||
366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57
|
||||
388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57
|
||||
410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57
|
||||
432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57
|
||||
454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57
|
||||
476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57
|
||||
498.5 57 DL/F1 11/Times-Bold@0 SF(\(r)72 87 Q(ecord-accessor)-.198 E/F2 11
|
||||
/Times-Italic@0 SF(rt \214eld)4.583 E F1 269.479(\)p)C -.198(ro)462.244 87 S
|
||||
(cedur).198 E(e)-.198 E F2 -.407(re)72 105.6 S(cor).407 E(d-accessor)-.407 E F0
|
||||
.225(returns a procedure for reading the v)2.975 F .225
|
||||
(alue of the \214eld named by)-.275 F F2(\214eld)2.974 E F0 .224(of a member)
|
||||
2.974 F .914(of the record type)72 120.6 R F2(rt)3.664 E F0 6.414(.T)C .914
|
||||
(he returned procedure accepts one ar)179.519 120.6 R .914
|
||||
(gument, which must be a record of)-.198 F .45(the record type)72 135.6 R F2
|
||||
(rt)3.2 E F0 3.2(;i)C 3.2(tr)158.731 135.6 S .45(eturns the current v)168.652
|
||||
135.6 R .45(alue of the speci\214ed \214eld in that record.)-.275 F F2(\214eld)
|
||||
5.949 E F0 .449(must be a)3.199 F .205
|
||||
(member of the list of \214eld names that w)72 150.6 R .206
|
||||
(as supplied to the call to)-.11 F F2(mak)2.956 E(e-r)-.11 E(ecor)-.407 E
|
||||
(d-type)-.407 E F0 .206(that created)2.956 F F2(rt)2.956 E F0(.)A(Example:)72
|
||||
169.2 Q/F3 10/Courier@0 SF(\(define time-hours)100.346 191.703 Q
|
||||
(\(record-accessor time-record 'hours\)\))112.346 205.703 Q
|
||||
(\(define noon \(\(record-constructor time-record\) 12 0 0\)\))100.346 226.703
|
||||
Q(\(time-hours noon\))100.346 240.703 Q/F4 10/Symbol SF<ae>214.346 240.703 Q/F5
|
||||
10/Times-Italic@0 SF(12)2.5 E F1(\(r)72 277.703 Q(ecord-modi\214er)-.198 E F2
|
||||
(rt \214eld)4.583 E F1 268.852(\)p)C -.198(ro)462.244 277.703 S(cedur).198 E(e)
|
||||
-.198 E F2 -.407(re)72 296.303 S(cor).407 E(d-modi\214er)-.407 E F0 .415
|
||||
(returns a procedure for writing the v)3.165 F .414
|
||||
(alue of the \214eld named by)-.275 F F2(\214eld)3.164 E F0 .414(of a member)
|
||||
3.164 F .482(of the record type)72 311.303 R F2(rt)3.232 E F0 5.982(.T)C .482
|
||||
(he returned procedure accepts tw)177.359 311.303 R 3.233(oa)-.11 G -.198(rg)
|
||||
338.181 311.303 S .483(uments: a record of the record type).198 F F2(rt)72
|
||||
326.303 Q F0 1.734(and an arbitrary object; it stores the gi)4.484 F -.165(ve)
|
||||
-.275 G 4.483(no).165 G 1.733
|
||||
(bject into the speci\214ed \214eld in that record and)288.495 326.303 R .468
|
||||
(returns the pre)72 341.303 R .468(vious v)-.275 F .469(alue of the \214eld.)
|
||||
-.275 F F2(\214eld)5.969 E F0 .469
|
||||
(must be a member of the list of \214eld names that w)3.219 F(as)-.11 E
|
||||
(supplied to the call to)72 356.303 Q F2(mak)2.75 E(e-r)-.11 E(ecor)-.407 E
|
||||
(d-type)-.407 E F0(that created)2.75 E F2(rt)2.75 E F0(.)A(Example)72 374.903 Q
|
||||
F3(\(define set-time-hours!)100.346 397.406 Q
|
||||
(\(record-modifier time-record 'hours\)\))112.346 411.406 Q F1(\(describe-r)72
|
||||
448.406 Q(ecord-type)-.198 E F2(rt)4.583 E F1 267.334(\)p)C -.198(ro)462.244
|
||||
448.406 S(cedur).198 E(e)-.198 E F0 .153(This procedure prints the names of th\
|
||||
e \214elds associated with the record type)72 467.006 R F2(rt)2.902 E F0 2.902
|
||||
(;i)C 2.902(ti)427.917 467.006 S 2.902(sa)436.935 467.006 S(utomatically)449
|
||||
467.006 Q(in)72 482.006 Q -.22(vo)-.44 G -.11(ke).22 G 2.75(db).11 G 2.75(yt)
|
||||
114.922 482.006 S(he standard)126.23 482.006 Q F2(describe)2.75 E F0
|
||||
(procedure of Elk if)2.75 E F2(describe)2.75 E F0(is in)2.75 E -.22(vo)-.44 G
|
||||
-.11(ke).22 G 2.75(dw).11 G(ith a record type.)401.01 482.006 Q F1 2.75
|
||||
(4. Records)72 512.006 R(\(r)72 542.006 Q(ecord?)-.198 E F2(obj)4.583 E F1
|
||||
321.707(\)p)C -.198(ro)462.244 542.006 S(cedur).198 E(e)-.198 E F0 .417
|
||||
(This type predicate returns #t if)72 560.606 R F2(obj)3.167 E F0 .417
|
||||
(is an object of type)3.167 F F2 -.407(re)3.167 G(cor).407 E(d)-.407 E F0 -.917
|
||||
(\(i. e.)3.167 F .417(the return v)3.167 F .417(alue of a call to a)-.275 F
|
||||
(record constructor of an)72 575.606 Q 2.75(yr)-.165 G
|
||||
(ecord type\), #f otherwise.)189.128 575.606 Q F1(\(r)72 605.606 Q
|
||||
(ecord-type-descriptor)-.198 E F2 -.407(re)4.583 G(cor).407 E(d)-.407 E F1
|
||||
236.996(\)p)C -.198(ro)462.244 605.606 S(cedur).198 E(e)-.198 E F0 1.302
|
||||
(This procedure returns the record type representing the type of the gi)72
|
||||
624.206 R -.165(ve)-.275 G 4.051(nr).165 G 4.051(ecord. The)412.21 624.206 R
|
||||
(returned)4.051 E .817(record type object is equal \(in the sense of)72 639.206
|
||||
R F2(eq?)3.567 E F0 6.317(\)t)C 3.567(ot)296.758 639.206 S .817
|
||||
(he record type ar)308.883 639.206 R .817(gument that w)-.198 F .817
|
||||
(as passed to)-.11 F F2 -.407(re)72 654.206 S(cor).407 E(d-constructor)-.407 E
|
||||
F0(in the call that created the constructor procedure that created)2.75 E F2
|
||||
-.407(re)2.75 G(cor).407 E(d)-.407 E F0(.)A(Example: e)72 672.806 Q -.275(va)
|
||||
-.275 G(luating the e).275 E(xpression)-.165 E F3
|
||||
(\(\(record-predicate \(record-type-descriptor r\)\) r\))100.346 695.309 Q F0
|
||||
(al)72 717.309 Q -.11(wa)-.11 G(ys yields #t for an).11 E 2.75(yg)-.165 G
|
||||
-2.365 -.275(iv e)184.959 717.309 T 2.75(nr).275 G(ecord)209.874 717.309 Q F2
|
||||
(r)2.75 E F0(.)A EP
|
||||
%%Page: 4 4
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 11/Times-Roman@0 SF 2.75(-4-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57
|
||||
75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL
|
||||
108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130
|
||||
57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57
|
||||
146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57
|
||||
168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57
|
||||
190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57
|
||||
212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57
|
||||
234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57
|
||||
256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57
|
||||
278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57
|
||||
300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57
|
||||
322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57
|
||||
344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57
|
||||
366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57
|
||||
388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57
|
||||
410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57
|
||||
432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57
|
||||
454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57
|
||||
476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57
|
||||
498.5 57 DL/F1 11/Times-Bold@0 SF(\(r)72 87 Q(ecord-v)-.198 E(alues)-.11 E/F2
|
||||
11/Times-Italic@0 SF -.407(re)4.583 G(cor).407 E(d)-.407 E F1 279.863(\)p)C
|
||||
-.198(ro)462.244 87 S(cedur).198 E(e)-.198 E F2 -.407(re)72 105.6 S(cor).407 E
|
||||
(d-values)-.407 E F0 .649(returns the current contents of the \214elds of)3.399
|
||||
F F2 -.407(re)3.399 G(cor).407 E(d)-.407 E F0 .649(as a v)3.399 F(ector)-.165 E
|
||||
6.149(.T)-.605 G(he)425.375 105.6 Q F2(n)3.398 E F0 .648(th element of)B .604
|
||||
(the v)72 120.6 R .605(ector corresponds to the \214eld with the name gi)-.165
|
||||
F -.165(ve)-.275 G 3.355(na).165 G 3.355(st)326.735 120.6 S(he)337.427 120.6 Q
|
||||
F2(n)3.355 E F0 .605(th element of the)B F2(\214elds)3.355 E F0(ar)3.355 E
|
||||
(gument)-.198 E(in the call to)72 135.6 Q F2(mak)2.75 E(e-r)-.11 E(ecor)-.407 E
|
||||
(d-type)-.407 E F0(that created the type to which)2.75 E F2 -.407(re)2.75 G
|
||||
(cor).407 E(d)-.407 E F0(belongs.)2.75 E 1.159(The returned v)72 154.2 R 1.159
|
||||
(ector is not a cop)-.165 F 3.909(yo)-.11 G 3.909(ft)233.497 154.2 S 1.159
|
||||
(he actual \214elds; i.)244.127 154.2 R 1.159
|
||||
(e. modifying the contents of the v)1.833 F(ector)-.165 E
|
||||
(directly writes the corresponding \214elds of the record.)72 169.2 Q F1
|
||||
(\(describe-r)72 199.2 Q(ecord)-.198 E F2 -.407(re)4.583 G(cor).407 E(d)-.407 E
|
||||
F1 269.985(\)p)C -.198(ro)462.244 199.2 S(cedur).198 E(e)-.198 E F0 .025
|
||||
(This procedure prints the names and current v)72 217.8 R .025
|
||||
(alues of the \214elds of the gi)-.275 F -.165(ve)-.275 G 2.775(nr).165 G .025
|
||||
(ecord; it is automati-)412.569 217.8 R(cally in)72 232.8 Q -.22(vo)-.44 G -.11
|
||||
(ke).22 G 2.75(db).11 G 2.75(yt)139.056 232.8 S(he standard)150.364 232.8 Q F2
|
||||
(describe)2.75 E F0(procedure of Elk if)2.75 E F2(describe)2.75 E F0(is in)2.75
|
||||
E -.22(vo)-.44 G -.11(ke).22 G 2.75(dw).11 G(ith a record.)425.144 232.8 Q F1
|
||||
2.75(5. Con)72 262.8 R -.11(ve)-.44 G(nience Macr).11 E(os)-.198 E F0
|
||||
(The macros described in this section are loaded by e)97 281.4 Q -.275(va)-.275
|
||||
G(luating).275 E/F3 10/Courier@0 SF(\(require 'recordutil\))100.346 303.903 Q
|
||||
F0 1.594(after ha)72 325.903 R 1.594(ving loaded the record e)-.22 F 4.343
|
||||
(xtension. This)-.165 F 1.593(causes the \214le)4.343 F F2 -.407(re)4.343 G
|
||||
(cor).407 E(dutil.scm)-.407 E F0 1.593(to be loaded and)4.343 F
|
||||
(de\214nes the feature)72 340.903 Q F2 -.407(re)2.75 G(cor).407 E(dutil)-.407 E
|
||||
F0(.)A F1(\(de\214ne-r)72 370.903 Q(ecord-type)-.198 E F2(name \214elds)4.583 E
|
||||
F1 253.177(\)s)C(yntax)477.721 370.903 Q F0 .796(This macro de\214nes a v)72
|
||||
389.503 R(ariable)-.275 E F2(<name>-r)3.547 E(ecor)-.407 E(d)-.407 E F0 3.547
|
||||
(,i)C -2.09 -.44(nv o)288.188 389.503 T -.11(ke).44 G 3.547(st).11 G .797
|
||||
(he procedure)325.186 389.503 R F2(mak)3.547 E(e-r)-.11 E(ecor)-.407 E(d-type)
|
||||
-.407 E F0 .797(with the)3.547 F(gi)72 404.503 Q -.165(ve)-.275 G(n).165 E F2
|
||||
(name)4.866 E F0(and)4.866 E F2(\214elds)4.866 E F0 4.866(,a)C 2.116
|
||||
(nd assigns the result to this v)186.031 404.503 R 4.866(ariable. In)-.275 F
|
||||
(addition,)4.866 E F2(de\214ne-r)4.866 E(ecor)-.407 E(d-type)-.407 E F0 .76
|
||||
(de\214nes a type predicate for the ne)72 419.503 R 3.51(wr)-.275 G .76
|
||||
(ecord type as)239.856 419.503 R F2(<name>\255r)3.511 E(ecor)-.407 E(d?)-.407 E
|
||||
F0 .761(and a constructor function)3.511 F(as)72 434.503 Q F2(mak)3.35 E
|
||||
(e\255<name>\255r)-.11 E(ecor)-.407 E(d)-.407 E F0 6.1(.T)C .6
|
||||
(he constructor function accepts no ar)205.222 434.503 R .599
|
||||
(guments and returns an unini-)-.198 F(tialized record of the ne)72 449.503 Q
|
||||
(wly de\214ned record type.)-.275 E(Example:)72 468.103 Q F3
|
||||
(\(require 'record\))100.346 490.606 Q(\(require 'recordutil\))100.346 504.606
|
||||
Q(\(define-record-type)100.346 525.606 Q(time \(hours minutes seconds\)\))
|
||||
112.346 539.606 Q(\(record-type? time-record\))100.346 557.806 Q/F4 10/Symbol
|
||||
SF<ae>268.346 557.806 Q/F5 10/Times-Italic@0 SF(#t)2.5 E F3
|
||||
(\(define t \(make-time-record\)\))100.346 576.006 Q(\(time-record? t\))100.346
|
||||
594.206 Q F4<ae>208.346 594.206 Q F5(#t)2.5 E F1(\(de\214ne-r)72 631.206 Q
|
||||
(ecord-accessors)-.198 E F2(rt)4.583 E F1 272.427(\)s)C(yntax)477.721 631.206 Q
|
||||
(\(de\214ne-r)72 646.206 Q(ecord-modi\214ers)-.198 E F2(rt)4.583 E F1 271.8
|
||||
(\)s)C(yntax)477.721 646.206 Q F0 2.413(The macro)72 664.806 R F2(de\214ne-r)
|
||||
5.163 E(ecor)-.407 E(d-accessor)-.407 E(s)-.11 E F0(\()5.163 E F2(de\214ne-r)A
|
||||
(ecor)-.407 E(d-modi\214er)-.407 E(s)-.11 E F0 5.163(\)d)C 2.414
|
||||
(e\214nes accessor \(modi\214er\) func-)357.774 664.806 R 2.066
|
||||
(tions for the \214elds of the record type)72 679.806 R F2(rt)4.815 E F0 7.565
|
||||
(.F)C 2.065(or each \214eld named)275.27 679.806 R F2(\214eld)4.815 E F0(,)A F2
|
||||
(de\214ne-r)4.815 E(ecor)-.407 E(d-accessor)-.407 E(s)-.11 E F0(\()72 694.806 Q
|
||||
F2(de\214ne-r)A(ecor)-.407 E(d-modi\214er)-.407 E(s)-.11 E F0 4.83(\)d)C 2.08
|
||||
(e\214nes a function)192.594 694.806 R F2(<name>\255<\214eld>)4.83 E F0(\()
|
||||
4.831 E F2(set\255<name>\255<\214eld>!)A F0 2.081(\), where)B F2(name)72
|
||||
709.806 Q F0 1.062(is the type name of the gi)3.812 F -.165(ve)-.275 G 3.812
|
||||
(nr).165 G 1.062(ecord type.)240.139 709.806 R 1.062
|
||||
(Each of the functions is the result of a call to)6.562 F F2 -.407(re)72
|
||||
724.806 S(cor).407 E(d-accessor)-.407 E F0(\()3.342 E F2 -.407(re)C(cor).407 E
|
||||
(d-modi\214er)-.407 E F0 3.342(\)a)C 3.342(sd)230.396 724.806 S .592
|
||||
(escribed abo)243.517 724.806 R -.165(ve)-.165 G 3.342(,w).165 G .592
|
||||
(ith the ar)323.483 724.806 R(guments)-.198 E F2(rt)3.342 E F0 .592
|
||||
(and the name of the)3.342 F EP
|
||||
%%Page: 5 5
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 11/Times-Roman@0 SF 2.75(-5-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57
|
||||
75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL
|
||||
108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130
|
||||
57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57
|
||||
146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57
|
||||
168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57
|
||||
190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57
|
||||
212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57
|
||||
234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57
|
||||
256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57
|
||||
278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57
|
||||
300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57
|
||||
322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57
|
||||
344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57
|
||||
366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57
|
||||
388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57
|
||||
410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57
|
||||
432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57
|
||||
454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57
|
||||
476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57
|
||||
498.5 57 DL(\214eld.)72 87 Q(Example:)72 105.6 Q/F1 10/Courier@0 SF
|
||||
(\(define-record-type time \(hours minutes seconds\)\))100.346 128.103 Q
|
||||
(\(define-record-modifiers time-record\))100.346 142.103 Q
|
||||
(\(define noon \(make-time-record\)\))100.346 160.303 Q
|
||||
(\(set-time-hours! noon 12\))100.346 174.303 Q(\(set-time-minutes! noon 0\))
|
||||
100.346 188.303 Q(\(set-time-seconds! noon 0\))100.346 202.303 Q
|
||||
(\(define-record-accessors time-record\))100.346 223.303 Q(\(time-hours noon\))
|
||||
100.346 241.503 Q/F2 10/Symbol SF<ae>214.346 241.503 Q/F3 10/Times-Italic@0 SF
|
||||
(12)2.5 E EP
|
||||
%%Page: 6 6
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 11/Times-Roman@0 SF 2.75(-6-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57
|
||||
75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL
|
||||
108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130
|
||||
57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57
|
||||
146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57
|
||||
168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57
|
||||
190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57
|
||||
212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57
|
||||
234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57
|
||||
256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57
|
||||
278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57
|
||||
300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57
|
||||
322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57
|
||||
344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57
|
||||
366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57
|
||||
388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57
|
||||
410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57
|
||||
432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57
|
||||
454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57
|
||||
476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57
|
||||
498.5 57 DL/F1 13/Times-Bold@0 SF(Index)272.108 123 Q(A)72 174 Q F0(accessor)72
|
||||
204 Q 2.75(,1)-.44 G 2.75(,4)119.817 204 S F1(C)72 234 Q F0(constructor)72 264
|
||||
Q 2.75(,1)-.44 G 2.75(,3)132.049 264 S 2.75(,4)143.049 264 S F1(D)72 294 Q F0
|
||||
(de\214ne-record-accessors,)72 324 Q/F2 12/Times-Bold@0 SF(4)2.75 E F0
|
||||
(de\214ne-record-modi\214ers,)72 339 Q F2(4)2.75 E F0(de\214ne-record-type,)72
|
||||
354 Q F2(4)2.75 E F0(describe, 3, 4)72 369 Q(describe-record,)72 384 Q F2(4)
|
||||
2.75 E F0(describe-record-type,)72 399 Q F2(3)2.75 E F1(F)72 429 Q F0
|
||||
(feature, 1, 4)72 459 Q(\214eld names, 2)72 474 Q(\214eld, 3)72 489 Q
|
||||
(\214elds, 1, 2, 3, 4)72 504 Q F1(I)72 534 Q F0(initial v)72 564 Q(alue, 2)
|
||||
-.275 E(instances, 1, 2)72 579 Q F1(M)72 609 Q F0(macros, 1, 4)72 639 Q(mak)72
|
||||
654 Q(e-record-type,)-.11 E F2(1)2.75 E F0 2.75(,2)C 2.75(,3)172.578 654 S 2.75
|
||||
(,4)183.578 654 S(modi\214er)302.4 174 Q 2.75(,1)-.44 G 2.75(,4)350.239 174 S
|
||||
F1(R)302.4 204 Q F0(record data type, 1)302.4 234 Q(record type, 1, 3)302.4 249
|
||||
Q(record, 1)302.4 264 Q(constructor)310.65 279 Q 2.75(,2)-.44 G
|
||||
(record-accessor)302.4 294 Q(,)-.44 E F2(3)2.75 E F0 2.75(,4)C
|
||||
(record-constructor)302.4 309 Q(,)-.44 E F2(2)2.75 E F0 2.75(,3)C
|
||||
(record-modi\214er)302.4 324 Q(,)-.44 E F2(3)2.75 E F0 2.75(,4)C
|
||||
(record-predicate,)302.4 339 Q F2(2)2.75 E F0(record-type-descriptor)302.4 354
|
||||
Q(,)-.44 E F2(3)2.75 E F0(record-type-\214eld-names,)302.4 369 Q F2(2)2.75 E F0
|
||||
(record-type-name,)302.4 384 Q F2(2)2.75 E F0(record-type?,)302.4 399 Q F2(2)
|
||||
2.75 E F0(record-v)302.4 414 Q(alues,)-.275 E F2(4)2.75 E F0(record.o, 1)302.4
|
||||
429 Q(record.scm, 1)302.4 444 Q(record?,)302.4 459 Q F2(3)2.75 E F0
|
||||
(recordutil, 4)302.4 474 Q(recordutil.scm, 4)302.4 489 Q F1(S)302.4 519 Q F0
|
||||
(structures, 1)302.4 549 Q F1(T)302.4 579 Q F0(type name, 2)302.4 609 Q
|
||||
(type predicate, 1, 2, 3, 4)302.4 624 Q F1(V)302.4 654 Q F0 -.165(ve)302.4 684
|
||||
S(ctor).165 E 2.75(,4)-.44 G EP
|
||||
%%Page: 7 7
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 13/Times-Bold@0 SF -1.196(Ta)239.127 123 S(ble of Contents)1.196 E/F1 11
|
||||
/Times-Roman@0 SF .866(Introduction ..........................................\
|
||||
..............................................................................\
|
||||
......)72 177.6 R(1)498.5 177.6 Q(Using the Record Extension)72 196.2 Q 19.25(\
|
||||
..............................................................................\
|
||||
....................... 1)3.011 F(Record T)72 214.8 Q .228(ypes ..............\
|
||||
..............................................................................\
|
||||
................................)-.88 F(1)498.5 214.8 Q 2.703(Records ........\
|
||||
..............................................................................\
|
||||
..............................................)72 233.4 R(3)498.5 233.4 Q(Con)
|
||||
72 252 Q -.165(ve)-.44 G(nience Macros).165 E 19.25(..........................\
|
||||
..............................................................................\
|
||||
........ 4)3.935 F(Inde)72 270.6 Q 2.868(x.)-.165 G 19.25(....................\
|
||||
..............................................................................\
|
||||
...................................... 6)102.5 270.6 R EP
|
||||
%%Trailer
|
||||
end
|
||||
%%EOF
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
MANUAL= regexp
|
||||
TROFF= groff -ms -t
|
||||
UNROFF= unroff -ms
|
||||
|
||||
$(MANUAL).ps: $(MANUAL).ms index.ms
|
||||
(cat $(MANUAL).ms ../util/tmac.index index.ms; echo ".Tc")\
|
||||
| $(TROFF) 2> /dev/null > $(MANUAL).ps
|
||||
|
||||
$(MANUAL).html: $(MANUAL).ms
|
||||
(cat $?; echo ".Tc") | $(UNROFF) document=$(MANUAL)
|
||||
|
||||
index.ms: $(MANUAL).ms index.raw
|
||||
sort -f -t# +1 -3 +0n index.raw | awk -f ../util/fixindex.awk\
|
||||
| awk -f ../util/block.awk >index.ms
|
||||
|
||||
index.raw: $(MANUAL).ms
|
||||
$(TROFF) $(MANUAL).ms 2> index.raw >/dev/null
|
||||
|
||||
check:
|
||||
checknr -c.Ul.Pr.Sy.Va.Sh.Ix.Id.Ch -a.Ss.Se.[[.]] $(MANUAL).ms |\
|
||||
grep -v "Empty command"
|
||||
|
||||
clean:
|
||||
rm -f index.raw index.ms $(MANUAL).ps $(MANUAL).html
|
||||
|
|
@ -0,0 +1,181 @@
|
|||
.so ../util/tmac.scheme
|
||||
.Ul
|
||||
.TL
|
||||
Reference Manual for the
|
||||
.sp .5
|
||||
Elk Regular Expression Extension
|
||||
.AU
|
||||
Oliver Laumann
|
||||
.
|
||||
.Ch "Introduction"
|
||||
.
|
||||
.PP
|
||||
The regular expression extension defines Scheme language bindings
|
||||
for the
|
||||
.Ix POSIX
|
||||
POSIX regular expression functions that are provided by most
|
||||
modern
|
||||
.Ix UNIX
|
||||
UNIX
|
||||
versions (\f2regcomp()\fP and \f2regexec()\fP).
|
||||
You may want to refer to your UNIX system's
|
||||
.Ix regcomp
|
||||
\f2regcomp(3)\fP manual for details.
|
||||
The Scheme interface to the regular expression functions makes
|
||||
the entire functionality of the usual C language interface
|
||||
available to the Scheme programmer.
|
||||
To load the regular expression extension, evaluate the expression
|
||||
.Ss
|
||||
(require 'regexp)
|
||||
.Se
|
||||
.PP
|
||||
This causes the files
|
||||
.Ix regexp.scm
|
||||
\f2regexp.scm\fP and
|
||||
.Ix regexp.o
|
||||
\f2regexp.o\fP to be loaded (\f2regexp.o\fP must be statically
|
||||
linked with the interpreter on platforms that do not support dynamic
|
||||
loading of object files).
|
||||
.PP
|
||||
Loading the extension provides the
|
||||
.Ix feature
|
||||
features \f2regexp\fP and \f2regexp.o\fP.
|
||||
On systems that do not support the regular expression library
|
||||
functions, loading the extension succeeds, but no further primitives
|
||||
or features are defined.
|
||||
Otherwise, the additional feature
|
||||
.Ix :regular-expressions
|
||||
\f2:regular-expressions\fP is provided, so that the expression
|
||||
.Ss
|
||||
(feature? ':regular-expressions)
|
||||
.Se
|
||||
can be used in Scheme programs to check whether regular
|
||||
expressions are available on the local platform.
|
||||
.
|
||||
.Ch "Creating Regular Expressions"
|
||||
.
|
||||
.[[
|
||||
.Pr make-regexp pattern
|
||||
.Pr make-regexp pattern flags
|
||||
.]]
|
||||
.LP
|
||||
\f2make-regexp\fP returns an object of the new Scheme type \f2regexp\fP
|
||||
representing the regular expression specified by the string
|
||||
argument \f2pattern\fP.
|
||||
An error is signaled if the underlying call to the C library function
|
||||
.Ix regcomp
|
||||
\f2regcomp(3)\fP fails.
|
||||
The optional
|
||||
.Ix flags
|
||||
\f2flags\fP argument is a list of zero or more of the
|
||||
symbols \f2extended, ignore-case, no-subexpr,\fP and \f2newline\fP;
|
||||
these correspond to the C constants \s-1\f2REG_EXTENDED, REG_ICASE,
|
||||
REG_NOSUB,\fP\s0 and \s-1\f2REG_NEWLINE\fP\s0.
|
||||
.PP
|
||||
.Ix equality
|
||||
Two objects of the type \f2regexp\fP are equal in the sense of
|
||||
\f2equal?\fP if their flags are identical and if their patterns
|
||||
are equal in the sense of \f2string=?\fP.
|
||||
Two regular expressions are \f2eq?\fP if their flags are identical
|
||||
and if they share the same pattern string.
|
||||
.
|
||||
.Pr regexp? obj
|
||||
.LP
|
||||
This
|
||||
.Ix "type predicate"
|
||||
type predicate returns #t if \f2obj\fP is a regular expression, #f otherwise.
|
||||
.
|
||||
.[[
|
||||
.Pr regexp-pattern regexp
|
||||
.Pr regexp-flags regexp
|
||||
.]]
|
||||
.LP
|
||||
These primitives return the pattern (or
|
||||
.Ix flags
|
||||
flags, respectively) specified
|
||||
in the call to
|
||||
.Ix make-regexp
|
||||
\f2make-regexp\fP that has created the regular expression object.
|
||||
.
|
||||
.Ch "Matching Regular Expressions"
|
||||
.
|
||||
.[[
|
||||
.Pr regexp-exec regexp string offset
|
||||
.Pr regexp-exec regexp string offset flags
|
||||
.]]
|
||||
.LP
|
||||
This primitive applies the specified regular expression to the
|
||||
given string starting at the given offset.
|
||||
\f2offset\fP is an integer larger than or equal to zero and less than
|
||||
or equal to the length of \f2string\fP.
|
||||
If the match succeeds, \f2regexp-exec\fP returns an object of the
|
||||
new Scheme type
|
||||
.Ix regexp-match
|
||||
\f2regexp-match\fP, otherwise #f.
|
||||
The optional
|
||||
.Ix flags
|
||||
\f2flags\fP argument is a list of zero or more of the symbols
|
||||
\f2not-bol\fP and \f2not-eol\fP which correspond to the constants
|
||||
\s-1\f2REG_NOTBOL\fP\s0 and \s-1\f2NOT_EOL\fP\s0 in the C language
|
||||
interface.
|
||||
.
|
||||
.Pr regexp-match? obj
|
||||
.LP
|
||||
This
|
||||
.Ix "type predicate"
|
||||
type predicate returns #t if \f2obj\fP is a regular expression match
|
||||
(that is, the return value of a successful call to \f2regexp-match\fP),
|
||||
#f otherwise.
|
||||
.
|
||||
.Pr regexp-match-number match
|
||||
.LP
|
||||
This primitive returns the number of substrings that matched parenthetic
|
||||
.Ix subexpression
|
||||
subexpressions in the original pattern when the given match was created,
|
||||
plus one (the first substring corresponds to the entire regular
|
||||
expression rather than a subexpression; see
|
||||
.Ix regexec
|
||||
\f2regexec(3)\fP for details).
|
||||
A value of zero is returned if the match has been created by applying
|
||||
a regular expression with the
|
||||
.Ix no-subexpr
|
||||
\f2no-subexpr\fP flag set.
|
||||
.
|
||||
.[[
|
||||
.Pr regexp-match-start match number
|
||||
.Pr regexp-match-end match number
|
||||
.]]
|
||||
.LP
|
||||
These primitives return the start offset (or end offset, respectively)
|
||||
of the substring denoted by the integer \f2number\fP.
|
||||
A \f2number\fP argument of zero refers to the substring corresponding to
|
||||
the entire pattern.
|
||||
The offsets returned by these primitives can be directly used as
|
||||
arguments to the
|
||||
.Ix "substring primitive"
|
||||
\f2\%substring\fP primitive of Elk.
|
||||
.
|
||||
.KS
|
||||
.Ch "Example"
|
||||
.
|
||||
.PP
|
||||
The following program demonstrates a simple Scheme procedure
|
||||
\f2matches\fP that returns a list of substrings of a given
|
||||
string that match a given pattern.
|
||||
An error message is displayed if regular expressions are
|
||||
not supported by the local platform.
|
||||
.Ss
|
||||
.in
|
||||
(require 'regexp)
|
||||
.sp .4
|
||||
(define (matches str pat)
|
||||
(let loop ((r (make-regexp pat '(extended))) (result '()) (from 0))
|
||||
(let ((m (regexp-exec r str from)))
|
||||
(if (regexp-match? m)
|
||||
(loop r (cons (substring str (+ from (regexp-match-start m 0))
|
||||
(+ from (regexp-match-end m 0)))
|
||||
result)
|
||||
(+ from (regexp-match-end m 0)))
|
||||
(reverse result)))))
|
||||
.Se
|
||||
.KE
|
||||
|
|
@ -0,0 +1,460 @@
|
|||
%!PS-Adobe-3.0
|
||||
%%Creator: groff version 1.08
|
||||
%%DocumentNeededResources: font Times-Bold
|
||||
%%+ font Times-Italic
|
||||
%%+ font Times-Roman
|
||||
%%+ font Courier
|
||||
%%DocumentSuppliedResources: procset grops 1.08 0
|
||||
%%Pages: 5
|
||||
%%PageOrder: Ascend
|
||||
%%Orientation: Portrait
|
||||
%%EndComments
|
||||
%%BeginProlog
|
||||
%%BeginResource: procset grops 1.08 0
|
||||
/setpacking where{
|
||||
pop
|
||||
currentpacking
|
||||
true setpacking
|
||||
}if
|
||||
/grops 120 dict dup begin
|
||||
/SC 32 def
|
||||
/A/show load def
|
||||
/B{0 SC 3 -1 roll widthshow}bind def
|
||||
/C{0 exch ashow}bind def
|
||||
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/E{0 rmoveto show}bind def
|
||||
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/G{0 rmoveto 0 exch ashow}bind def
|
||||
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/I{0 exch rmoveto show}bind def
|
||||
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/K{0 exch rmoveto 0 exch ashow}bind def
|
||||
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/M{rmoveto show}bind def
|
||||
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/O{rmoveto 0 exch ashow}bind def
|
||||
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/Q{moveto show}bind def
|
||||
/R{moveto 0 SC 3 -1 roll widthshow}bind def
|
||||
/S{moveto 0 exch ashow}bind def
|
||||
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
|
||||
/SF{
|
||||
findfont exch
|
||||
[exch dup 0 exch 0 exch neg 0 0]makefont
|
||||
dup setfont
|
||||
[exch/setfont cvx]cvx bind def
|
||||
}bind def
|
||||
/MF{
|
||||
findfont
|
||||
[5 2 roll
|
||||
0 3 1 roll
|
||||
neg 0 0]makefont
|
||||
dup setfont
|
||||
[exch/setfont cvx]cvx bind def
|
||||
}bind def
|
||||
/level0 0 def
|
||||
/RES 0 def
|
||||
/PL 0 def
|
||||
/LS 0 def
|
||||
/PLG{
|
||||
gsave newpath clippath pathbbox grestore
|
||||
exch pop add exch pop
|
||||
}bind def
|
||||
/BP{
|
||||
/level0 save def
|
||||
1 setlinecap
|
||||
1 setlinejoin
|
||||
72 RES div dup scale
|
||||
LS{
|
||||
90 rotate
|
||||
}{
|
||||
0 PL translate
|
||||
}ifelse
|
||||
1 -1 scale
|
||||
}bind def
|
||||
/EP{
|
||||
level0 restore
|
||||
showpage
|
||||
}bind def
|
||||
/DA{
|
||||
newpath arcn stroke
|
||||
}bind def
|
||||
/SN{
|
||||
transform
|
||||
.25 sub exch .25 sub exch
|
||||
round .25 add exch round .25 add exch
|
||||
itransform
|
||||
}bind def
|
||||
/DL{
|
||||
SN
|
||||
moveto
|
||||
SN
|
||||
lineto stroke
|
||||
}bind def
|
||||
/DC{
|
||||
newpath 0 360 arc closepath
|
||||
}bind def
|
||||
/TM matrix def
|
||||
/DE{
|
||||
TM currentmatrix pop
|
||||
translate scale newpath 0 0 .5 0 360 arc closepath
|
||||
TM setmatrix
|
||||
}bind def
|
||||
/RC/rcurveto load def
|
||||
/RL/rlineto load def
|
||||
/ST/stroke load def
|
||||
/MT/moveto load def
|
||||
/CL/closepath load def
|
||||
/FL{
|
||||
currentgray exch setgray fill setgray
|
||||
}bind def
|
||||
/BL/fill load def
|
||||
/LW/setlinewidth load def
|
||||
/RE{
|
||||
findfont
|
||||
dup maxlength 1 index/FontName known not{1 add}if dict begin
|
||||
{
|
||||
1 index/FID ne{def}{pop pop}ifelse
|
||||
}forall
|
||||
/Encoding exch def
|
||||
dup/FontName exch def
|
||||
currentdict end definefont pop
|
||||
}bind def
|
||||
/DEFS 0 def
|
||||
/EBEGIN{
|
||||
moveto
|
||||
DEFS begin
|
||||
}bind def
|
||||
/EEND/end load def
|
||||
/CNT 0 def
|
||||
/level1 0 def
|
||||
/PBEGIN{
|
||||
/level1 save def
|
||||
translate
|
||||
div 3 1 roll div exch scale
|
||||
neg exch neg exch translate
|
||||
0 setgray
|
||||
0 setlinecap
|
||||
1 setlinewidth
|
||||
0 setlinejoin
|
||||
10 setmiterlimit
|
||||
[]0 setdash
|
||||
/setstrokeadjust where{
|
||||
pop
|
||||
false setstrokeadjust
|
||||
}if
|
||||
/setoverprint where{
|
||||
pop
|
||||
false setoverprint
|
||||
}if
|
||||
newpath
|
||||
/CNT countdictstack def
|
||||
userdict begin
|
||||
/showpage{}def
|
||||
}bind def
|
||||
/PEND{
|
||||
clear
|
||||
countdictstack CNT sub{end}repeat
|
||||
level1 restore
|
||||
}bind def
|
||||
end def
|
||||
/setpacking where{
|
||||
pop
|
||||
setpacking
|
||||
}if
|
||||
%%EndResource
|
||||
%%IncludeResource: font Times-Bold
|
||||
%%IncludeResource: font Times-Italic
|
||||
%%IncludeResource: font Times-Roman
|
||||
%%IncludeResource: font Courier
|
||||
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL
|
||||
841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron
|
||||
/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef/.notdef/.notdef
|
||||
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
|
||||
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/space
|
||||
/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright/parenleft
|
||||
/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four
|
||||
/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C
|
||||
/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash
|
||||
/bracketright/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q
|
||||
/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase
|
||||
/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger
|
||||
/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
|
||||
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
|
||||
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar
|
||||
/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus
|
||||
/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu
|
||||
/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright
|
||||
/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde
|
||||
/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute
|
||||
/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
|
||||
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
|
||||
/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute
|
||||
/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve
|
||||
/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex
|
||||
/udieresis/yacute/thorn/ydieresis]def/Courier@0 ENC0/Courier RE/Times-Roman@0
|
||||
ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0
|
||||
/Times-Bold RE
|
||||
%%EndProlog
|
||||
%%Page: 1 1
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 12/Times-Bold@0 SF(Refer)222.444 120 Q(ence Manual f)-.216 E(or the)-.3 E
|
||||
(Elk Regular Expr)200.262 138 Q(ession Extension)-.216 E/F1 10/Times-Italic@0
|
||||
SF(Oliver Laumann)255.085 162 Q/F2 11/Times-Bold@0 SF 2.75(1. Intr)72 234 R
|
||||
(oduction)-.198 E/F3 11/Times-Roman@0 SF .65(The re)97 252.6 R .65(gular e)
|
||||
-.165 F .65(xpression e)-.165 F .65
|
||||
(xtension de\214nes Scheme language bindings for the POSIX re)-.165 F(gular)
|
||||
-.165 E -.165(ex)72 267.6 S .086(pression functions that are pro).165 F .087
|
||||
(vided by most modern UNIX v)-.165 F .087(ersions \()-.165 F/F4 11
|
||||
/Times-Italic@0 SF -.407(re)C(gcomp\(\))-.033 E F3(and)2.837 E F4 -.407(re)
|
||||
2.837 G -.11(ge)-.033 G(xec\(\))-.11 E F3(\).)A -1.21(Yo)72 282.6 S 3.014(um)
|
||||
1.21 G .263(ay w)101.304 282.6 R .263(ant to refer to your UNIX system')-.11 F
|
||||
(s)-.605 E F4 -.407(re)3.013 G(gcomp\(3\))-.033 E F3 .263(manual for details.)
|
||||
3.013 F .263(The Scheme inter)5.763 F(-)-.22 E -.11(fa)72 297.6 S 1.35
|
||||
(ce to the re).11 F 1.35(gular e)-.165 F 1.35(xpression functions mak)-.165 F
|
||||
1.351(es the entire functionality of the usual C language)-.11 F(interf)72
|
||||
312.6 Q .24(ace a)-.11 F -.275(va)-.22 G .24(ilable to the Scheme programmer)
|
||||
.275 F 5.74(.T)-.605 G 2.99(ol)289.458 312.6 S .24(oad the re)301.006 312.6 R
|
||||
.24(gular e)-.165 F .24(xpression e)-.165 F .239(xtension, e)-.165 F -.275(va)
|
||||
-.275 G(luate).275 E(the e)72 327.6 Q(xpression)-.165 E/F5 10/Courier@0 SF
|
||||
(\(require 'regexp\))100.346 350.103 Q F3 2.251(This causes the \214les)97
|
||||
375.703 R F4 -.407(re)5.001 G -.11(ge)-.033 G(xp.scm)-.11 E F3(and)5.001 E F4
|
||||
-.407(re)5.002 G -.11(ge)-.033 G(xp.o)-.11 E F3 2.252(to be loaded \()5.002 F
|
||||
F4 -.407(re)C -.11(ge)-.033 G(xp.o)-.11 E F3 2.252(must be statically)5.002 F
|
||||
(link)72 390.703 Q(ed with the interpreter on platforms that do not support dy\
|
||||
namic loading of object \214les\).)-.11 E 1.246(Loading the e)97 409.303 R
|
||||
1.246(xtension pro)-.165 F 1.246(vides the features)-.165 F F4 -.407(re)3.996 G
|
||||
-.11(ge)-.033 G(xp)-.11 E F3(and)3.996 E F4 -.407(re)3.995 G -.11(ge)-.033 G
|
||||
(xp.o)-.11 E F3 6.745(.O)C 3.995(ns)406.125 409.303 S 1.245(ystems that do not)
|
||||
419.899 409.303 R 1.384(support the re)72 424.303 R 1.385(gular e)-.165 F 1.385
|
||||
(xpression library functions, loading the e)-.165 F 1.385(xtension succeeds, b)
|
||||
-.165 F 1.385(ut no further)-.22 F(primiti)72 439.303 Q -.165(ve)-.275 G 3.725
|
||||
(so).165 G 3.725(rf)125.401 439.303 S .975(eatures are de\214ned.)136.452
|
||||
439.303 R .975(Otherwise, the additional feature)6.475 F F4(:r)3.724 E -.44(eg)
|
||||
-.407 G(ular).44 E(-e)-.22 E(xpr)-.22 E(essions)-.407 E F3 .974(is pro-)3.724 F
|
||||
(vided, so that the e)72 454.303 Q(xpression)-.165 E F5
|
||||
(\(feature? ':regular-expressions\))100.346 476.806 Q F3 .649
|
||||
(can be used in Scheme programs to check whether re)72 498.806 R .65(gular e)
|
||||
-.165 F .65(xpressions are a)-.165 F -.275(va)-.22 G .65(ilable on the local)
|
||||
.275 F(platform.)72 513.806 Q F2 2.75(2. Cr)72 543.806 R(eating Regular Expr)
|
||||
-.198 E(essions)-.198 E(\(mak)72 573.806 Q(e-r)-.11 E(egexp)-.198 E F4(pattern)
|
||||
4.583 E F2 279.654(\)p)C -.198(ro)462.244 573.806 S(cedur).198 E(e)-.198 E
|
||||
(\(mak)72 588.806 Q(e-r)-.11 E(egexp)-.198 E F4(pattern \215a)4.583 E(gs)-.11 E
|
||||
F2 256.235(\)p)C -.198(ro)462.244 588.806 S(cedur).198 E(e)-.198 E F4(mak)72
|
||||
607.406 Q(e-r)-.11 E -1.98 -.44(eg e)-.407 H(xp).22 E F3 .312
|
||||
(returns an object of the ne)3.062 F 3.062(wS)-.275 G .312(cheme type)263.538
|
||||
607.406 R F4 -.407(re)3.062 G -.11(ge)-.033 G(xp)-.11 E F3 .312
|
||||
(representing the re)3.062 F .312(gular e)-.165 F(xpression)-.165 E 1.806
|
||||
(speci\214ed by the string ar)72 622.406 R(gument)-.198 E F4(pattern)4.556 E F3
|
||||
7.306(.A)C 4.556(ne)274.511 622.406 S 1.807
|
||||
(rror is signaled if the underlying call to the C)289.451 622.406 R 1.494
|
||||
(library function)72 637.406 R F4 -.407(re)4.243 G(gcomp\(3\))-.033 E F3 -.11
|
||||
(fa)4.243 G 4.243(ils. The).11 F(optional)4.243 E F4<8d61>4.243 E(gs)-.11 E F3
|
||||
(ar)4.243 E 1.493(gument is a list of zero or more of the)-.198 F(symbols)72
|
||||
652.406 Q F4 -.22(ex)4.907 G 2.157(tended, ignor).22 F(e-case)-.407 E 4.907(,n)
|
||||
-.11 G(o-sube)224.683 652.406 Q(xpr)-.22 E(,)-1.221 E F3(and)4.908 E F4(ne)
|
||||
4.908 E(wline)-.165 E F3 4.908(;t)C 2.158(hese correspond to the C constants)
|
||||
340.761 652.406 R F1(REG_EXTENDED, REG_ICASE, REG_NOSUB,)72 667.406 Q F3(and)
|
||||
2.75 E F1(REG_NEWLINE)2.75 E F3(.)A -1.1 -.88(Tw o)97 686.006 T 1.085
|
||||
(objects of the type)4.716 F F4 -.407(re)3.835 G -.11(ge)-.033 G(xp)-.11 E F3
|
||||
1.085(are equal in the sense of)3.835 F F4(equal?)3.835 E F3 1.085
|
||||
(if their \215ags are identical)3.835 F .811
|
||||
(and if their patterns are equal in the sense of)72 701.006 R F4(string=?)3.561
|
||||
E F3 6.311(.T)C 1.031 -.11(wo r)330.951 701.006 T -.165(eg).11 G .811(ular e)
|
||||
.165 F .812(xpressions are)-.165 F F4(eq?)3.562 E F3 .812(if their)3.562 F
|
||||
(\215ags are identical and if the)72 716.006 Q 2.75(ys)-.165 G
|
||||
(hare the same pattern string.)206.255 716.006 Q EP
|
||||
%%Page: 2 2
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 11/Times-Roman@0 SF 2.75(-2-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57
|
||||
75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL
|
||||
108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130
|
||||
57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57
|
||||
146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57
|
||||
168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57
|
||||
190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57
|
||||
212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57
|
||||
234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57
|
||||
256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57
|
||||
278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57
|
||||
300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57
|
||||
322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57
|
||||
344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57
|
||||
366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57
|
||||
388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57
|
||||
410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57
|
||||
432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57
|
||||
454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57
|
||||
476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57
|
||||
498.5 57 DL/F1 11/Times-Bold@0 SF(\(r)72 87 Q(egexp?)-.198 E/F2 11
|
||||
/Times-Italic@0 SF(obj)4.583 E F1 321.091(\)p)C -.198(ro)462.244 87 S(cedur)
|
||||
.198 E(e)-.198 E F0(This type predicate returns #t if)72 105.6 Q F2(obj)2.75 E
|
||||
F0(is a re)2.75 E(gular e)-.165 E(xpression, #f otherwise.)-.165 E F1(\(r)72
|
||||
135.6 Q(egexp-patter)-.198 E(n)-.165 E F2 -.407(re)4.583 G -.11(ge)-.033 G(xp)
|
||||
-.11 E F1 273.571(\)p)C -.198(ro)462.244 135.6 S(cedur).198 E(e)-.198 E(\(r)72
|
||||
150.6 Q(egexp-\215ags)-.198 E F2 -.407(re)4.583 G -.11(ge)-.033 G(xp)-.11 E F1
|
||||
286.837(\)p)C -.198(ro)462.244 150.6 S(cedur).198 E(e)-.198 E F0 .179
|
||||
(These primiti)72 169.2 R -.165(ve)-.275 G 2.929(sr).165 G .179
|
||||
(eturn the pattern \(or \215ags, respecti)151.965 169.2 R -.165(ve)-.275 G .179
|
||||
(ly\) speci\214ed in the call to).165 F F2(mak)2.929 E(e-r)-.11 E -1.98 -.44
|
||||
(eg e)-.407 H(xp).22 E F0(that)2.928 E(has created the re)72 184.2 Q(gular e)
|
||||
-.165 E(xpression object.)-.165 E F1 2.75(3. Matching)72 214.2 R(Regular Expr)
|
||||
2.75 E(essions)-.198 E(\(r)72 244.2 Q(egexp-exec)-.198 E F2 -.407(re)4.583 G
|
||||
-.11(ge)-.033 G(xp string of)-.11 E(fset)-.198 E F1 233.267(\)p)C -.198(ro)
|
||||
462.244 244.2 S(cedur).198 E(e)-.198 E(\(r)72 259.2 Q(egexp-exec)-.198 E F2
|
||||
-.407(re)4.583 G -.11(ge)-.033 G(xp string of)-.11 E(fset \215a)-.198 E(gs)-.11
|
||||
E F1 209.848(\)p)C -.198(ro)462.244 259.2 S(cedur).198 E(e)-.198 E F0 .27
|
||||
(This primiti)72 277.8 R .6 -.165(ve a)-.275 H .27(pplies the speci\214ed re)
|
||||
.165 F .27(gular e)-.165 F .27(xpression to the gi)-.165 F -.165(ve)-.275 G
|
||||
3.021(ns).165 G .271(tring starting at the gi)373.516 277.8 R -.165(ve)-.275 G
|
||||
3.021(no).165 G -.275(ff)493.286 277.8 S(-).275 E(set.)72 292.8 Q F2(of)6.064 E
|
||||
(fset)-.198 E F0 .563(is an inte)3.313 F .563(ger lar)-.165 F .563
|
||||
(ger than or equal to zero and less than or equal to the length of)-.198 F F2
|
||||
(string)3.313 E F0(.)A .149(If the match succeeds,)72 307.8 R F2 -.407(re)2.9 G
|
||||
-.11(ge)-.033 G(xp-e)-.11 E(xec)-.22 E F0 .15(returns an object of the ne)2.9 F
|
||||
2.9(wS)-.275 G .15(cheme type)359.714 307.8 R F2 -.407(re)2.9 G -.11(ge)-.033 G
|
||||
(xp-matc)-.11 E(h)-.165 E F0 2.9(,o)C(ther)483.452 307.8 Q(-)-.22 E .492
|
||||
(wise #f.)72 322.8 R .492(The optional)5.992 F F2<8d61>3.242 E(gs)-.11 E F0(ar)
|
||||
3.242 E .492(gument is a list of zero or more of the symbols)-.198 F F2
|
||||
(not-bol)3.241 E F0(and)3.241 E F2(not-eol)3.241 E F0
|
||||
(which correspond to the constants)72 337.8 Q/F3 10/Times-Italic@0 SF(REG_NO)
|
||||
2.75 E(TBOL)-.4 E F0(and)2.75 E F3(NO)2.75 E(T_EOL)-.4 E F0
|
||||
(in the C language interf)2.75 E(ace.)-.11 E F1(\(r)72 367.8 Q(egexp-match?)
|
||||
-.198 E F2(obj)4.583 E F1 288.102(\)p)C -.198(ro)462.244 367.8 S(cedur).198 E
|
||||
(e)-.198 E F0 1.07(This type predicate returns #t if)72 386.4 R F2(obj)3.82 E
|
||||
F0 1.07(is a re)3.82 F 1.071(gular e)-.165 F 1.071
|
||||
(xpression match \(that is, the return v)-.165 F 1.071(alue of a)-.275 F
|
||||
(successful call to)72 401.4 Q F2 -.407(re)2.75 G -.11(ge)-.033 G(xp-matc)-.11
|
||||
E(h)-.165 E F0(\), #f otherwise.)A F1(\(r)72 431.4 Q(egexp-match-number)-.198 E
|
||||
F2(matc)4.583 E(h)-.165 E F1 239.999(\)p)C -.198(ro)462.244 431.4 S(cedur).198
|
||||
E(e)-.198 E F0 1.425(This primiti)72 450 R 1.755 -.165(ve r)-.275 H 1.424
|
||||
(eturns the number of substrings that matched parenthetic sube).165 F 1.424
|
||||
(xpressions in the)-.165 F .159(original pattern when the gi)72 465 R -.165(ve)
|
||||
-.275 G 2.909(nm).165 G .16(atch w)221.141 465 R .16
|
||||
(as created, plus one \(the \214rst substring corresponds to the)-.11 F .407
|
||||
(entire re)72 480 R .407(gular e)-.165 F .407(xpression rather than a sube)
|
||||
-.165 F .407(xpression; see)-.165 F F2 -.407(re)3.157 G -.11(ge)-.033 G
|
||||
(xec\(3\))-.11 E F0 .407(for details\).)3.157 F 3.156(Av)5.907 G .406
|
||||
(alue of zero)451.268 480 R 1.2
|
||||
(is returned if the match has been created by applying a re)72 495 R 1.201
|
||||
(gular e)-.165 F 1.201(xpression with the)-.165 F F2(no-sube)3.951 E(xpr)-.22 E
|
||||
F0(\215ag set.)72 510 Q F1(\(r)72 540 Q(egexp-match-start)-.198 E F2(matc)4.583
|
||||
E 2.75(hn)-.165 G(umber)205.426 540 Q F1 218.934(\)p)C -.198(ro)462.244 540 S
|
||||
(cedur).198 E(e)-.198 E(\(r)72 555 Q(egexp-match-end)-.198 E F2(matc)4.583 E
|
||||
2.75(hn)-.165 G(umber)200.553 555 Q F1 223.807(\)p)C -.198(ro)462.244 555 S
|
||||
(cedur).198 E(e)-.198 E F0 .138(These primiti)72 573.6 R -.165(ve)-.275 G 2.888
|
||||
(sr).165 G .138(eturn the start of)151.883 573.6 R .138(fset \(or end of)-.275
|
||||
F .138(fset, respecti)-.275 F -.165(ve)-.275 G .137
|
||||
(ly\) of the substring denoted by the).165 F(inte)72 588.6 Q(ger)-.165 E F2
|
||||
(number)3.869 E F0 6.619(.A)C F2(number)161.036 588.6 Q F0(ar)3.869 E 1.12
|
||||
(gument of zero refers to the substring corresponding to the entire)-.198 F
|
||||
5.654(pattern. The)72 603.6 R(of)5.654 E 2.904(fsets returned by these primiti)
|
||||
-.275 F -.165(ve)-.275 G 5.654(sc).165 G 2.904(an be directly used as ar)
|
||||
313.098 603.6 R 2.903(guments to the)-.198 F F2(substring)72 618.6 Q F0
|
||||
(primiti)2.75 E .33 -.165(ve o)-.275 H 2.75(fE).165 G(lk.)176.984 618.6 Q EP
|
||||
%%Page: 3 3
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 11/Times-Roman@0 SF 2.75(-3-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57
|
||||
75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL
|
||||
108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130
|
||||
57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57
|
||||
146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57
|
||||
168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57
|
||||
190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57
|
||||
212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57
|
||||
234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57
|
||||
256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57
|
||||
278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57
|
||||
300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57
|
||||
322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57
|
||||
344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57
|
||||
366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57
|
||||
388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57
|
||||
410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57
|
||||
432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57
|
||||
454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57
|
||||
476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57
|
||||
498.5 57 DL/F1 11/Times-Bold@0 SF 2.75(4. Example)72 102 R F0 .398(The follo)97
|
||||
120.6 R .399(wing program demonstrates a simple Scheme procedure)-.275 F/F2 11
|
||||
/Times-Italic@0 SF(matc)3.149 E(hes)-.165 E F0 .399(that returns a list)3.149 F
|
||||
.045(of substrings of a gi)72 135.6 R -.165(ve)-.275 G 2.795(ns).165 G .045
|
||||
(tring that match a gi)182.082 135.6 R -.165(ve)-.275 G 2.794(np).165 G 2.794
|
||||
(attern. An)294.604 135.6 R .044(error message is displayed if re)2.794 F
|
||||
(gular)-.165 E -.165(ex)72 149.6 S
|
||||
(pressions are not supported by the local platform.).165 E/F3 10/Courier@0 SF
|
||||
(\(require 'regexp\))72 172.103 Q(\(define \(matches str pat\))72 191.703 Q(\(\
|
||||
let loop \(\(r \(make-regexp pat '\(extended\)\)\) \(result '\(\)\) \(from 0\)\
|
||||
\))84 205.703 Q(\(let \(\(m \(regexp-exec r str from\)\)\))114 219.703 Q
|
||||
(\(if \(regexp-match? m\))126 233.703 Q
|
||||
(\(loop r \(cons \(substring str \(+ from \(regexp-match-start m 0\)\))150
|
||||
247.703 Q(\(+ from \(regexp-match-end m 0\)\)\))324 261.703 Q(result\))234
|
||||
275.703 Q(\(+ from \(regexp-match-end m 0\)\)\))186 289.703 Q
|
||||
(\(reverse result\)\)\)\)\))150 303.703 Q EP
|
||||
%%Page: 4 4
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 11/Times-Roman@0 SF 2.75(-4-)278.837 51 S .44 LW 77.5 57 72 57 DL 80.5 57
|
||||
75 57 DL 86 57 80.5 57 DL 91.5 57 86 57 DL 97 57 91.5 57 DL 102.5 57 97 57 DL
|
||||
108 57 102.5 57 DL 113.5 57 108 57 DL 119 57 113.5 57 DL 124.5 57 119 57 DL 130
|
||||
57 124.5 57 DL 135.5 57 130 57 DL 141 57 135.5 57 DL 146.5 57 141 57 DL 152 57
|
||||
146.5 57 DL 157.5 57 152 57 DL 163 57 157.5 57 DL 168.5 57 163 57 DL 174 57
|
||||
168.5 57 DL 179.5 57 174 57 DL 185 57 179.5 57 DL 190.5 57 185 57 DL 196 57
|
||||
190.5 57 DL 201.5 57 196 57 DL 207 57 201.5 57 DL 212.5 57 207 57 DL 218 57
|
||||
212.5 57 DL 223.5 57 218 57 DL 229 57 223.5 57 DL 234.5 57 229 57 DL 240 57
|
||||
234.5 57 DL 245.5 57 240 57 DL 251 57 245.5 57 DL 256.5 57 251 57 DL 262 57
|
||||
256.5 57 DL 267.5 57 262 57 DL 273 57 267.5 57 DL 278.5 57 273 57 DL 284 57
|
||||
278.5 57 DL 289.5 57 284 57 DL 295 57 289.5 57 DL 300.5 57 295 57 DL 306 57
|
||||
300.5 57 DL 311.5 57 306 57 DL 317 57 311.5 57 DL 322.5 57 317 57 DL 328 57
|
||||
322.5 57 DL 333.5 57 328 57 DL 339 57 333.5 57 DL 344.5 57 339 57 DL 350 57
|
||||
344.5 57 DL 355.5 57 350 57 DL 361 57 355.5 57 DL 366.5 57 361 57 DL 372 57
|
||||
366.5 57 DL 377.5 57 372 57 DL 383 57 377.5 57 DL 388.5 57 383 57 DL 394 57
|
||||
388.5 57 DL 399.5 57 394 57 DL 405 57 399.5 57 DL 410.5 57 405 57 DL 416 57
|
||||
410.5 57 DL 421.5 57 416 57 DL 427 57 421.5 57 DL 432.5 57 427 57 DL 438 57
|
||||
432.5 57 DL 443.5 57 438 57 DL 449 57 443.5 57 DL 454.5 57 449 57 DL 460 57
|
||||
454.5 57 DL 465.5 57 460 57 DL 471 57 465.5 57 DL 476.5 57 471 57 DL 482 57
|
||||
476.5 57 DL 487.5 57 482 57 DL 493 57 487.5 57 DL 498.5 57 493 57 DL 504 57
|
||||
498.5 57 DL/F1 13/Times-Bold@0 SF(Index)272.108 123 Q(:)72 174 Q F0(:re)72 204
|
||||
Q(gular)-.165 E(-e)-.22 E(xpressions, 1)-.165 E F1(E)72 234 Q F0(equality)72
|
||||
264 Q 2.75(,1)-.715 G F1(F)72 294 Q F0(feature, 1)72 324 Q(\215ags, 1, 2)72 339
|
||||
Q F1(M)72 369 Q F0(mak)72 399 Q(e-re)-.11 E(ge)-.165 E(xp,)-.165 E/F2 12
|
||||
/Times-Bold@0 SF(1)2.75 E F0 2.75(,2)C F1(N)72 429 Q F0(no-sube)72 459 Q(xpr)
|
||||
-.165 E 2.75(,2)-.44 G F1(P)72 489 Q F0(POSIX, 1)72 519 Q F1(R)72 549 Q F0(re)
|
||||
72 579 Q(gcomp, 1)-.165 E(re)72 594 Q(ge)-.165 E -.165(xe)-.165 G(c, 2).165 E
|
||||
(re)72 609 Q(ge)-.165 E(xp-e)-.165 E -.165(xe)-.165 G(c,).165 E F2(2)2.75 E F0
|
||||
(re)72 624 Q(ge)-.165 E(xp-\215ags,)-.165 E F2(2)2.75 E F0(re)72 639 Q(ge)-.165
|
||||
E(xp-match, 2)-.165 E(re)72 654 Q(ge)-.165 E(xp-match-end,)-.165 E F2(2)2.75 E
|
||||
F0(re)72 669 Q(ge)-.165 E(xp-match-number)-.165 E(,)-.44 E F2(2)2.75 E F0(re)72
|
||||
684 Q(ge)-.165 E(xp-match-start,)-.165 E F2(2)2.75 E F0(re)72 699 Q(ge)-.165 E
|
||||
(xp-match?,)-.165 E F2(2)2.75 E F0(re)72 714 Q(ge)-.165 E(xp-pattern,)-.165 E
|
||||
F2(2)2.75 E F0(re)72 729 Q(ge)-.165 E(xp.o, 1)-.165 E(re)302.4 174 Q(ge)-.165 E
|
||||
(xp.scm, 1)-.165 E(re)302.4 189 Q(ge)-.165 E(xp?,)-.165 E F2(2)2.75 E F1(S)
|
||||
302.4 219 Q F0(sube)302.4 249 Q(xpression, 2)-.165 E(substring primiti)302.4
|
||||
264 Q -.165(ve)-.275 G 2.75(,2).165 G F1(T)302.4 294 Q F0(type predicate, 2)
|
||||
302.4 324 Q F1(U)302.4 354 Q F0(UNIX, 1)302.4 384 Q EP
|
||||
%%Page: 5 5
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 13/Times-Bold@0 SF -1.196(Ta)239.127 123 S(ble of Contents)1.196 E/F1 11
|
||||
/Times-Roman@0 SF .866(Introduction ..........................................\
|
||||
..............................................................................\
|
||||
......)72 177.6 R(1)498.5 177.6 Q(Creating Re)72 196.2 Q(gular Expressions)
|
||||
-.165 E 19.25(................................................................\
|
||||
.................................. 1)3.792 F(Matching Re)72 214.8 Q
|
||||
(gular Expressions)-.165 E 19.25(.............................................\
|
||||
................................................... 2)5.013 F 2.395(Example ..\
|
||||
..............................................................................\
|
||||
...................................................)72 233.4 R(2)498.5 233.4 Q
|
||||
(Inde)72 252 Q 2.868(x.)-.165 G 19.25(........................................\
|
||||
..............................................................................\
|
||||
.................. 4)102.5 252 R EP
|
||||
%%Trailer
|
||||
end
|
||||
%%EOF
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
MANUAL= unix
|
||||
TROFF= groff -ms -t
|
||||
UNROFF= unroff -ms
|
||||
|
||||
$(MANUAL).ps: $(MANUAL).ms index.ms
|
||||
(cat $(MANUAL).ms ../util/tmac.index index.ms; echo ".Tc")\
|
||||
| $(TROFF) 2> /dev/null > $(MANUAL).ps
|
||||
|
||||
$(MANUAL).html: $(MANUAL).ms
|
||||
(cat $?; echo ".Tc") | $(UNROFF) document=$(MANUAL)
|
||||
|
||||
index.ms: $(MANUAL).ms index.raw
|
||||
sort -f -t# +1 -3 +0n index.raw | awk -f ../util/fixindex.awk\
|
||||
| awk -f ../util/block.awk >index.ms
|
||||
|
||||
index.raw: $(MANUAL).ms
|
||||
$(TROFF) $(MANUAL).ms 2> index.raw >/dev/null
|
||||
|
||||
check:
|
||||
checknr -c.Ul.Pr.Sy.Va.Sh.Ix.Id.Ch -a.Ss.Se.[[.]] $(MANUAL).ms |\
|
||||
grep -v "Empty command"
|
||||
|
||||
clean:
|
||||
rm -f index.raw index.ms $(MANUAL).ps $(MANUAL).html
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,15 @@
|
|||
TROFF= groff -ms
|
||||
UNROFF= unroff -ms
|
||||
|
||||
usenix.ps: usenix.ms tmp.ref
|
||||
sed -f tmp.ref usenix.ms | $(TROFF) 2> /dev/null > usenix.ps
|
||||
|
||||
usenix.html: usenix.ms tmp.ref
|
||||
sed -f tmp.ref usenix.ms | $(UNROFF) document=usenix
|
||||
|
||||
tmp.ref: usenix.ms
|
||||
$(TROFF) usenix.ms 2> tmp.ref >/dev/null
|
||||
|
||||
clean:
|
||||
rm -f tmp.ref usenix.ps
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,2 @@
|
|||
mkindex: mkindex.c
|
||||
$(CC) $(CFLAGS) -o $@ $?
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
BEGIN {
|
||||
firstchar = "@";
|
||||
a["a"] = "A"; a["b"] = "B"; a["c"] = "C";
|
||||
a["d"] = "D"; a["e"] = "E"; a["f"] = "F";
|
||||
a["g"] = "G"; a["h"] = "H"; a["i"] = "I";
|
||||
a["j"] = "J"; a["k"] = "K"; a["l"] = "L";
|
||||
a["m"] = "M"; a["n"] = "N"; a["o"] = "O";
|
||||
a["p"] = "P"; a["q"] = "Q"; a["r"] = "R";
|
||||
a["s"] = "S"; a["t"] = "T"; a["u"] = "U";
|
||||
a["v"] = "V"; a["w"] = "W"; a["x"] = "X";
|
||||
a["y"] = "Y"; a["z"] = "Z";
|
||||
}
|
||||
|
||||
{
|
||||
c = substr($2,2,1);
|
||||
if (c >= "a" && c <= "z")
|
||||
c = a[c];
|
||||
if (c != firstchar)
|
||||
printf(".LB %s\n", c);
|
||||
firstchar = c;
|
||||
print;
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
BEGIN {
|
||||
FS = "#";
|
||||
BD = "\\s+1\\f3";
|
||||
ED = "\\fP\\s-1";
|
||||
}
|
||||
|
||||
NR == 1 {
|
||||
if ($3 != "")
|
||||
printf(".Ib \"%s\"\n", $2);
|
||||
major = $2;
|
||||
minor = $3;
|
||||
if ($4 == "@DEF@") {
|
||||
pagelist = BD $1 ED;
|
||||
}
|
||||
else {
|
||||
pagelist = $1;
|
||||
}
|
||||
pageno = $1;
|
||||
oldpageno = $1;
|
||||
oldpagelist = "";
|
||||
}
|
||||
|
||||
NR != 1 {
|
||||
if ($2 == major && $3 == minor) # neither has changed
|
||||
{
|
||||
if ($1 != pageno) { # new page number, append
|
||||
oldpageno = $1;
|
||||
oldpagelist = pagelist;
|
||||
if ($4 == "@DEF@") {
|
||||
pagelist = pagelist ", " BD $1 ED;
|
||||
}
|
||||
else {
|
||||
pagelist = pagelist ", " $1;
|
||||
}
|
||||
}
|
||||
else { # old page, but check for def
|
||||
if ($4 == "@DEF@") {
|
||||
if (pageno == oldpageno) {
|
||||
if (oldpagelist != "")
|
||||
oldpagelist = oldpagelist ", "
|
||||
}
|
||||
pagelist = oldpagelist BD $1 ED;
|
||||
}
|
||||
}
|
||||
}
|
||||
else # one has changed
|
||||
{
|
||||
if (minor != "") # dump full record
|
||||
printf(".I< \"%s\" \"%s\" \"%s\"\n", major, minor, pagelist);
|
||||
else
|
||||
printf(".I> \"%s\" \"%s\"\n", major, pagelist);
|
||||
if ($4 == "@DEF@") { # restart pagelist
|
||||
pagelist = BD $1 ED;
|
||||
}
|
||||
else {
|
||||
pagelist = $1;
|
||||
}
|
||||
oldpagelist = "";
|
||||
oldpageno = $1;
|
||||
if ($2 != major && $3 != "") # major has changed, minor not null
|
||||
printf(".Ib \"%s\"\n", $2);
|
||||
}
|
||||
major = $2;
|
||||
minor = $3;
|
||||
pageno = $1;
|
||||
}
|
||||
|
||||
END {
|
||||
if (minor != "") # dump full record
|
||||
printf(".I< \"%s\" \"%s\" \"%s\"\n", major, minor, pagelist);
|
||||
else
|
||||
printf(".I> \"%s\" \"%s\"\n", major, pagelist);
|
||||
}
|
||||
|
|
@ -0,0 +1,146 @@
|
|||
/* mkindex
|
||||
*
|
||||
* Copy named files or standard input (if no arguments are given) to
|
||||
* standard output, replacing @[something] by troff macro calls.
|
||||
*
|
||||
* These replacements are performed:
|
||||
*
|
||||
* @[.something] --> \n.Ix "something"\nsomething
|
||||
* @[!something] --> \n.Id "something"\nsomething
|
||||
*
|
||||
* @[.some|thing] --> \n.Ix "thing, some"\nsome thing
|
||||
* @[!some|thing] --> \n.Id "thing, some"\nsome thing
|
||||
*
|
||||
* @[.=something] --> \n.Ix "something"\n
|
||||
* @[!=something] --> \n.Id "something"\n
|
||||
*
|
||||
*
|
||||
* 1) initial \n is omitted at the beginning of an output line
|
||||
*
|
||||
* 2) initial \n is prefixed by \c if @[ follows "(" in input
|
||||
*
|
||||
* 3) omit final \n if @[...] is at end of input line
|
||||
*
|
||||
* 4) within @[...], \] is replaced by ]
|
||||
*
|
||||
* 5) in the macro argument ("something"), all sequences of the form
|
||||
* `` or '' or \fX or \% are removed
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
char *index();
|
||||
|
||||
char buf[10000];
|
||||
long line;
|
||||
char *fn;
|
||||
|
||||
main(ac, av) char **av; {
|
||||
FILE *fp;
|
||||
|
||||
if (ac < 2) {
|
||||
fn = "stdin";
|
||||
doit(stdin);
|
||||
} else {
|
||||
while (--ac > 0) {
|
||||
fn = *++av;
|
||||
if ((fp = fopen(fn, "r")) == 0) {
|
||||
perror(fn); exit(1);
|
||||
}
|
||||
doit(fp);
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
doit(fp) FILE *fp; {
|
||||
char *p, *q, *start, *macro;
|
||||
char inx[1000], arg[1000];
|
||||
int n, need_nl = 0;
|
||||
|
||||
line = 1;
|
||||
while (fgets(buf, 10000, fp) != NULL) {
|
||||
if (p = index(buf, '\n'))
|
||||
*p = 0;
|
||||
p = buf;
|
||||
while (*p) {
|
||||
if (*p == '@' && p[1] == '[') {
|
||||
start = p;
|
||||
p += 2;
|
||||
switch (*p) {
|
||||
case '.':
|
||||
macro = "Ix"; break;
|
||||
case '!':
|
||||
macro = "Id"; break;
|
||||
case 0:
|
||||
error("index truncated");
|
||||
default:
|
||||
error("invalid index type");
|
||||
}
|
||||
p++;
|
||||
q = inx;
|
||||
while (*p != ']') {
|
||||
if (*p == 0)
|
||||
error("missing ]");
|
||||
if (*p == '\\' && p[1] == ']')
|
||||
p++;
|
||||
*q++ = *p++;
|
||||
}
|
||||
if (q == inx)
|
||||
error("empty index");
|
||||
*q = 0;
|
||||
eatfont(inx, arg);
|
||||
if (start > buf && start[-1] == '(')
|
||||
printf("\\c");
|
||||
if (need_nl)
|
||||
putchar('\n');
|
||||
printf(".%s ", macro);
|
||||
p++;
|
||||
if (arg[0] == '=') {
|
||||
printf("\"%s\"", arg+1);
|
||||
if (*p) {
|
||||
putchar('\n');
|
||||
need_nl = 0;
|
||||
if (*p == ' ')
|
||||
p++;
|
||||
}
|
||||
} else if (q = index(arg, '|')) {
|
||||
*q = 0; q++;
|
||||
printf("\"%s, %s\"\n%s %s", q, arg, arg, q);
|
||||
need_nl = 1;
|
||||
} else {
|
||||
printf("\"%s\"\n%s", arg, inx);
|
||||
need_nl = 1;
|
||||
}
|
||||
} else {
|
||||
putchar(*p);
|
||||
need_nl = 1;
|
||||
p++;
|
||||
}
|
||||
}
|
||||
putchar('\n');
|
||||
need_nl = 0;
|
||||
line++;
|
||||
}
|
||||
}
|
||||
|
||||
eatfont(from, to) char *from, *to; {
|
||||
while (*from) {
|
||||
if (*from == '\\' && from[1] == 'f' && from[2]) {
|
||||
from += 3;
|
||||
} else if (*from == '\'' && from[1] == '\'') {
|
||||
from += 2;
|
||||
} else if (*from == '`' && from[1] == '`') {
|
||||
from += 2;
|
||||
} else if (*from == '\\' && from[1] == '%') {
|
||||
from += 2;
|
||||
} else *to++ = *from++;
|
||||
}
|
||||
*to = 0;
|
||||
}
|
||||
|
||||
error(s) char *s; {
|
||||
fprintf(stderr, "Error in %s line %d, %s:\n%s\n", fn, line, s, buf);
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
. \" Macros for the index
|
||||
.de Ib \" blank major entry
|
||||
.br
|
||||
.ne 2v
|
||||
\\$1#
|
||||
..
|
||||
.de I> \" major entry
|
||||
.br
|
||||
\\$1, \\$2
|
||||
..
|
||||
.de I< \" minor entry
|
||||
.br
|
||||
\\$2, \\$3
|
||||
..
|
||||
.de LB \" new letter starts here
|
||||
.di DT \" start diverted text
|
||||
.sp
|
||||
\s+2\f3\\$1\fP\s-2
|
||||
.sp
|
||||
.di \" end diverted text
|
||||
.ne \\n(dnu+1v \" get enough space for it
|
||||
.DT \" output it
|
||||
..
|
||||
.
|
||||
.bp
|
||||
.XS
|
||||
Index
|
||||
.XE
|
||||
.rs
|
||||
.sp .5i
|
||||
.tl '\&'\f3\s+2Index\s0\fP'\&'
|
||||
.sp .5i
|
||||
.2C
|
||||
|
|
@ -0,0 +1,150 @@
|
|||
.\" Conditional requests using \n(.U have been added to most macros
|
||||
.\" for unroff support; the number register .U is non-zero if the file
|
||||
.\" is processed by unroff, else zero.
|
||||
.\"
|
||||
.\" A font suitable for Scheme keywords and program examples must be
|
||||
.\" mounted on font position 5.
|
||||
.\" For example: .fp 5 TT (Typewriter font)
|
||||
.\" or: .fp 5 HR (Helvetica Roman)
|
||||
.\" or: .fp 5 C (Courier)
|
||||
.\"
|
||||
.fp 5 C
|
||||
.\"
|
||||
.nr PS 11
|
||||
.nr VS 5i/24u
|
||||
.\" US paper format.
|
||||
.pl 11i
|
||||
.\" The subscripts 1 and 2.
|
||||
.ie \n(.U .ds 1 1
|
||||
.el .ds 1 "\v'.3m'\s-11\s0\v'-.3m'
|
||||
.ie \n(.U .ds 2 2
|
||||
.el .ds 2 "\v'.3m'\s-12\s0\v'-.3m'
|
||||
.\"
|
||||
.\" The digit 4 as a superscript (used in R^4RS).
|
||||
.ie \n(.U .ds ^4 ^4
|
||||
.el .ds ^4 \u\s-2\&4\s0\d
|
||||
.\"
|
||||
.\" Underline page top.
|
||||
.de Ul
|
||||
.am PT
|
||||
.if \\\\n%-1 .tl ?\\\\v'-.6v'\\\\l'\\\\n(LLu\(ru'\\\\v'.6v'
|
||||
\\..
|
||||
..
|
||||
.\" Index entry.
|
||||
.de Ix
|
||||
.if !\n(.U .tm \\n%#\\$1#\\$2#\\$3
|
||||
..
|
||||
.\" Index entry (definition).
|
||||
.de Id
|
||||
.Ix "\\$1" "\\$2" @DEF@
|
||||
..
|
||||
.\" Scheme code start.
|
||||
.de Ss
|
||||
.KS
|
||||
.nr sF \\n(.f
|
||||
.ft 5
|
||||
.ps -1
|
||||
.vs -1
|
||||
.ie \n(.U .RS
|
||||
.el .in 1c
|
||||
.nf
|
||||
.if !\n(.U .sp .3c
|
||||
..
|
||||
.\" Scheme code end.
|
||||
.de Se
|
||||
.sp .5
|
||||
.fi
|
||||
.ie \n(.U .RE
|
||||
.el .in
|
||||
.ps
|
||||
.vs
|
||||
.ft \\n(sF
|
||||
.KE
|
||||
..
|
||||
.\" Scheme keyword in text. Inline font switches to italics
|
||||
.\" should be used instead, but at least one document
|
||||
.\" (oops/oops.ms) still uses this macro.
|
||||
.de S
|
||||
.ft 5
|
||||
.ps -1
|
||||
.if \\n(.$=1 \&\\$1
|
||||
.if \\n(.$>1 \&\\$1\c
|
||||
.ft
|
||||
.ps
|
||||
.if \\n(.$>1 \&\\$2
|
||||
..
|
||||
.\" Chapter with TOC entry.
|
||||
.de Ch
|
||||
.br
|
||||
.ne 3c
|
||||
.NH
|
||||
\\$1
|
||||
.XS
|
||||
\\$1
|
||||
.XE
|
||||
..
|
||||
.\" Called before first in a group of .Pr/.Sy/.Va.
|
||||
.de Sh
|
||||
.ie \n(.U .LP
|
||||
.el .SH
|
||||
..
|
||||
.\" Scheme procedure.
|
||||
.de Pr
|
||||
.ds xx "
|
||||
.if \\n(.$>=2 .as xx " \f2\\$2\fP
|
||||
.if \\n(.$>=3 .as xx " \f2\\$3\fP
|
||||
.if \\n(.$>=4 .as xx " \f2\\$4\fP
|
||||
.if \\n(.$>=5 .as xx " \f2\\$5\fP
|
||||
.if \\n(.$>=6 .as xx " \f2\\$6\fP
|
||||
.if \\n(.$>=7 .as xx " \f2\\$7\fP
|
||||
.if \\n(.$>=8 .as xx " \f2\\$8\fP
|
||||
.if \\n(.$>=9 .as xx " \f2\\$9\fP
|
||||
.if !\\nP .Sh
|
||||
.if \\n+P>2 .br
|
||||
.ie \n(.U (\f3\\$1\fP\|\\*(xx)
|
||||
.el .tl '(\\$1\|\\*(xx)'\&'procedure'
|
||||
.Id "\\$1"
|
||||
..
|
||||
.\" Scheme syntax form.
|
||||
.de Sy
|
||||
.ds xx "
|
||||
.if \\n(.$>=2 .as xx " \f2\\$2\fP
|
||||
.if \\n(.$>=3 .as xx " \f2\\$3\fP
|
||||
.if \\n(.$>=4 .as xx " \f2\\$4\fP
|
||||
.if \\n(.$>=5 .as xx " \f2\\$5\fP
|
||||
.if \\n(.$>=6 .as xx " \f2\\$6\fP
|
||||
.if \\n(.$>=7 .as xx " \f2\\$7\fP
|
||||
.if \\n(.$>=8 .as xx " \f2\\$8\fP
|
||||
.if \\n(.$>=9 .as xx " \f2\\$9\fP
|
||||
.if !\\nP .Sh
|
||||
.if \\n+P>2 .br
|
||||
.ie \n(.U (\f3\\$1\fP\|\\*(xx)
|
||||
.el .tl '(\\$1\|\\*(xx)'\&'syntax'
|
||||
.Id "\\$1"
|
||||
..
|
||||
.\" Scheme variable.
|
||||
.de Va
|
||||
.if !\\nP .Sh
|
||||
.if \\n+P>2 .br
|
||||
.ie \n(.U \f3\\$1\fP
|
||||
.el .tl '\\$1'\&'variable'
|
||||
.Id "\\$1"
|
||||
..
|
||||
.nr P 0
|
||||
.\" .[[ and .]] enclose a group of .Pr/.Sy/.Va requests.
|
||||
.de [[
|
||||
.nr P 1 1
|
||||
.Sh
|
||||
..
|
||||
.de ]]
|
||||
.nr P 0 0
|
||||
..
|
||||
.\" Output the table of contents.
|
||||
.de Tc
|
||||
.de PT
|
||||
\\..
|
||||
.1C
|
||||
.bp
|
||||
.ie \n(.U .## (if (zero? (option 'split)) (parse-line ".PX"))
|
||||
.el .PX
|
||||
..
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
MANUAL= xlib
|
||||
TROFF= groff -ms -t
|
||||
UNROFF= unroff -ms
|
||||
|
||||
$(MANUAL).ps: $(MANUAL).ms index.ms
|
||||
(cat $(MANUAL).ms ../util/tmac.index index.ms; echo ".Tc")\
|
||||
| $(TROFF) 2> /dev/null > $(MANUAL).ps
|
||||
|
||||
$(MANUAL).html: $(MANUAL).ms
|
||||
(cat $?; echo ".Tc") | $(UNROFF) document=$(MANUAL)
|
||||
|
||||
index.ms: $(MANUAL).ms index.raw
|
||||
sort -f -t# +1 -3 +0n index.raw | awk -f ../util/fixindex.awk\
|
||||
| awk -f ../util/block.awk >index.ms
|
||||
|
||||
index.raw: $(MANUAL).ms
|
||||
$(TROFF) $(MANUAL).ms 2> index.raw >/dev/null
|
||||
|
||||
check:
|
||||
checknr -c.Ul.Pr.Sy.Va.Sh.Ix.Id.Ch -a.Ss.Se.[[.]] $(MANUAL).ms |\
|
||||
grep -v "Empty command"
|
||||
|
||||
clean:
|
||||
rm -f index.raw index.ms $(MANUAL).ps $(MANUAL).html
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,24 @@
|
|||
MANUAL= xt
|
||||
TROFF= groff -ms -t
|
||||
UNROFF= unroff -ms
|
||||
|
||||
$(MANUAL).ps: $(MANUAL).ms index.ms
|
||||
(cat $(MANUAL).ms ../util/tmac.index index.ms; echo ".Tc")\
|
||||
| $(TROFF) 2> /dev/null > $(MANUAL).ps
|
||||
|
||||
$(MANUAL).html: $(MANUAL).ms
|
||||
(cat $?; echo ".Tc") | $(UNROFF) document=$(MANUAL)
|
||||
|
||||
index.ms: $(MANUAL).ms index.raw
|
||||
sort -f -t# +1 -3 +0n index.raw | awk -f ../util/fixindex.awk\
|
||||
| awk -f ../util/block.awk >index.ms
|
||||
|
||||
index.raw: $(MANUAL).ms
|
||||
$(TROFF) $(MANUAL).ms 2> index.raw >/dev/null
|
||||
|
||||
check:
|
||||
checknr -c.Ul.Pr.Sy.Va.Sh.Ix.Id.Ch -a.Ss.Se.[[.]] $(MANUAL).ms |\
|
||||
grep -v "Empty command"
|
||||
|
||||
clean:
|
||||
rm -f index.raw index.ms $(MANUAL).ps $(MANUAL).html
|
||||
|
|
@ -0,0 +1,579 @@
|
|||
.so ../util/tmac.scheme
|
||||
.Ul
|
||||
.TL
|
||||
Elk/Xt Reference Manual
|
||||
.AU
|
||||
Oliver Laumann
|
||||
.
|
||||
.Ch "Introduction"
|
||||
.PP
|
||||
This manual describes the functions, special forms, and
|
||||
variables defined by the Xt (X Toolkit Intrinsics) extension included
|
||||
in the Elk distribution.
|
||||
Most of the functions are directly equivalent to a function of the
|
||||
X toolkit C library, so that the description need not be repeated.
|
||||
In such cases, only the name of the corresponding Xt function is
|
||||
mentioned.
|
||||
Thus, you should have the \f2X Toolkit Intrinsics \- C Language Interface\fP
|
||||
manual within reach when using this reference manual.
|
||||
.PP
|
||||
The functions listed in this document are loaded when the expression
|
||||
.DS
|
||||
.ft 5
|
||||
(require 'xwidgets)
|
||||
.ft
|
||||
.DE
|
||||
.Ix xwidgets
|
||||
is evaluated or, when the OSF/Motif software has been installed on
|
||||
your system and you want to use Motif widgets from within Scheme,
|
||||
when
|
||||
.DS
|
||||
.ft 5
|
||||
(require 'motif)
|
||||
.ft
|
||||
.DE
|
||||
.Ix motif
|
||||
is evaluated in the interpreter's top level or in a Scheme program.
|
||||
If you only want to use the toolkit functionality (and no widgets),
|
||||
evaluate
|
||||
.DS
|
||||
.ft 5
|
||||
(require 'xt).
|
||||
.ft
|
||||
.DE
|
||||
.Ix xt
|
||||
Note that all of the above forms cause the Elk/Xlib functions to be
|
||||
loaded as well.
|
||||
.LP
|
||||
Individual widgets are loaded by evaluating
|
||||
.DS
|
||||
.ft 5
|
||||
(load-widgets . \f2widget-names\fP)
|
||||
.ft
|
||||
.DE
|
||||
.LP
|
||||
.Id load-widgets
|
||||
Each \f2widget-name\fP is a symbol (not quoted, since \f2load-widgets\fP
|
||||
is a macro).
|
||||
.PP
|
||||
The widgets are loaded from subdirectories of ``$install_dir/runtime/obj''
|
||||
(where $install_dir is the directory where you have installed Elk on
|
||||
your system).
|
||||
.PP
|
||||
In the following, the types of arguments of the listed procedures are
|
||||
not specified when they are obvious from the context or from the name.
|
||||
For instance, an argument named \f2widget\fP is always of type \f2widget\fP,
|
||||
an argument named \f2context\fP is an object of type \f2context\fP
|
||||
(application context), etc.
|
||||
Arguments the names of which end in ``?'' are always of type \f2boolean\fP.
|
||||
.if !\n(.U \{\
|
||||
.PP
|
||||
In the following, each description of a procedure, special form, or
|
||||
variable lists the kind of object in boldface.
|
||||
Here, \f3procedure\fP denotes either a primitive procedure or a
|
||||
compound procedure, \f3syntax\fP denotes a special form or a macro,
|
||||
and \f3variable\fP denotes a global variable that has some initial
|
||||
value and can be re-assigned a new value by the user (by means
|
||||
of \f2set!\fP or \f2fluid-let\fP).
|
||||
.\}
|
||||
.
|
||||
.Ch "Widget Classes"
|
||||
.
|
||||
.Pr class? x
|
||||
.LP
|
||||
Returns #t iff \f2x\fP is an object of type \f2class\fP (widget class).
|
||||
.
|
||||
.Pr find-class name-of-class
|
||||
.LP
|
||||
Returns the widget class of the specified name (an object of
|
||||
type \f2class\fP).
|
||||
\f2name-of-class\fP is a string or a symbol.
|
||||
.
|
||||
.Pr class-resources widget-class
|
||||
.LP
|
||||
See \f2XtGetResourceList\fP.
|
||||
Returns the resource list of the specified widget class.
|
||||
Each element of the list is a list of three symbols \-
|
||||
the resource name, the resource class, and the resource type.
|
||||
.
|
||||
.Pr class-constraint-resources widget-class
|
||||
.LP
|
||||
See \f2XtGetConstraintRespourceList\fP.
|
||||
Returns the list of constraint resources that are defined for the
|
||||
specified widget class.
|
||||
Each element of the list is a list of three symbols \-
|
||||
the resource name, the resource class, and the resource type.
|
||||
.
|
||||
.Pr class-sub-resources widget-class
|
||||
.LP
|
||||
Returns the list of sub-resources (if there are any) of the
|
||||
specified widget class.
|
||||
See \f2class-resources\fP above.
|
||||
.
|
||||
.Pr class-exists? name-of-class
|
||||
.LP
|
||||
Returns #t iff a widget class of the given name exists
|
||||
(i.\|e.\& has been loaded by means of \f2load-widgets\fP).
|
||||
\f2name-of-class\fP is a string or a symbol.
|
||||
.
|
||||
.Ch "Widget Functions"
|
||||
.
|
||||
.Pr widget? x
|
||||
.LP
|
||||
Returns #t iff \f2x\fP is an object of type \f2widget\fP.
|
||||
.
|
||||
.Pr destroy-widget widget
|
||||
.LP
|
||||
See \f2XtDestroyWidget\fP.
|
||||
.
|
||||
.Pr create-shell application-name application-class parent display . args
|
||||
.LP
|
||||
See \f2XtAppCreateShell\fP.
|
||||
\f2application-name\fP and \f2application-class\fP are strings or symbols
|
||||
or #f (NULL is used in the latter case).
|
||||
\f2parent\fP is a widget.
|
||||
The number of \f2args\fP must be even, the 1st, 3rd, etc.\& argument
|
||||
is the name of a resource to be set (a string or a symbol), the
|
||||
2nd, 4th, etc.\& argument is the corresponding value.
|
||||
.
|
||||
.[[
|
||||
.Pr create-widget widget-class parent . args
|
||||
.Pr create-widget widget-name widget-class parent . args
|
||||
.]]
|
||||
.LP
|
||||
See \f2XtCreateWidget\fP.
|
||||
\f2widget-name\fP is a string or a symbol; \f2parent\fP is a widget.
|
||||
If no \f2widget-name\fP is given, the name of the widget class is used.
|
||||
The number of \f2args\fP must be even, the 1st, 3rd, etc.\& argument
|
||||
is the name of a resource to be set (a string or a symbol), the
|
||||
2nd, 4th, etc.\& argument is the corresponding value.
|
||||
.
|
||||
.Pr create-managed-widget . args
|
||||
.LP
|
||||
Applies \f2create-widget\fP to the arguments and then calls \f2manage-child\fP
|
||||
with the newly created widget.
|
||||
.
|
||||
.Pr realize-widget widget
|
||||
.LP
|
||||
See \f2XtRealizeWidget\fP.
|
||||
.
|
||||
.Pr unrealize-widget widget
|
||||
.LP
|
||||
See \f2XtUnrealizeWidget\fP.
|
||||
.
|
||||
.Pr widget-realized? widget
|
||||
.LP
|
||||
See \f2XtIsRealized\fP.
|
||||
.
|
||||
.Pr widget-display widget
|
||||
.LP
|
||||
See \f2XtDisplay\fP.
|
||||
Returns an object of type \f2display\fP.
|
||||
.
|
||||
.Pr widget-parent widget
|
||||
.LP
|
||||
See \f2XtParent\fP.
|
||||
.
|
||||
.Pr widget-name widget
|
||||
.LP
|
||||
See \f2XtName\fP.
|
||||
Returns the name of a widget as a string.
|
||||
.
|
||||
.[[
|
||||
.Pr widget\(mi>window widget
|
||||
.Pr widget-window widget
|
||||
.]]
|
||||
.LP
|
||||
See \f2XtWindow\fP.
|
||||
Returns an object of type \f2window\fP.
|
||||
.
|
||||
.Pr widget-composite? widget
|
||||
.LP
|
||||
See \f2XtIsComposite\fP.
|
||||
.
|
||||
.Pr manage-children . widgets
|
||||
.LP
|
||||
See \f2XtManageChildren\fP.
|
||||
.
|
||||
.Pr manage-child widget
|
||||
.LP
|
||||
Calls \f2manage-children\fP with the specified widget.
|
||||
.
|
||||
.Pr unmanage-children . widgets
|
||||
.LP
|
||||
See \f2XtUnmanageChildren\fP.
|
||||
.
|
||||
.Pr unmanage-child widget
|
||||
.LP
|
||||
Calls \f2unmanage-children\fP with the specified widget.
|
||||
.
|
||||
.Pr widget-managed? widget
|
||||
.LP
|
||||
See \f2XtIsManaged\fP.
|
||||
.
|
||||
.Pr widget-class widget
|
||||
.LP
|
||||
See \f2XtClass\fP.
|
||||
Returns an object of type \f2class\fP.
|
||||
.
|
||||
.Pr widget-superclass widget
|
||||
.LP
|
||||
See \f2XtSuperclass\fP.
|
||||
Returns an object of type \f2class\fP or the symbol \f5none\fP
|
||||
when the widget's class does not have a super-class.
|
||||
.
|
||||
.Pr widget-subclass? widget class
|
||||
.LP
|
||||
See \f2XtIsSubclass\fP.
|
||||
.
|
||||
.Pr set-mapped-when-managed! widget managed?
|
||||
.LP
|
||||
See \f2XtSetMappedWhenManaged\fP.
|
||||
.
|
||||
.Pr map-widget widget
|
||||
.LP
|
||||
See \f2XtMapWidget\fP.
|
||||
.
|
||||
.Pr unmap-widget widget
|
||||
.LP
|
||||
See \f2XtUnmapWidget\fP.
|
||||
.
|
||||
.Pr set-values! widget . args
|
||||
.LP
|
||||
See \f2XtSetValues\fP.
|
||||
The number of \f2args\fP must be even, the 1st, 3rd, etc.\& argument
|
||||
is the name of a resource to be set (a string or a symbol), the
|
||||
2nd, 4th, etc.\& argument is the corresponding value.
|
||||
.
|
||||
.Pr get-values widget . args
|
||||
.LP
|
||||
See \f2XtGetValues\fP.
|
||||
Each \f2arg\fP is the name of a resource (a string or a symbol).
|
||||
Returns a list of the values of the specified resources.
|
||||
.
|
||||
.Pr widget-context widget
|
||||
.LP
|
||||
See \f2XtWidgetToApplicationContext\fP.
|
||||
Returns an object of type \f2context\fP.
|
||||
.
|
||||
.Pr set-sensitive! widget sensitive?
|
||||
.LP
|
||||
See \f2XtSetSensitive\fP.
|
||||
.
|
||||
.Pr widget-sensitive? widget
|
||||
.LP
|
||||
See \f2XtIsSensitive\fP.
|
||||
.
|
||||
.Pr window\(mi>widget window
|
||||
.LP
|
||||
See \f2XtWindowToWidget\fP.
|
||||
.
|
||||
.Pr name\(mi>widget root-widget name
|
||||
.LP
|
||||
See \f2XtNameToWidget\fP.
|
||||
\f2name\fP is a string or a symbol.
|
||||
.
|
||||
.Pr widget-translate-coordinates widget x y
|
||||
.LP
|
||||
See \f2XtTranslateCoords\fP.
|
||||
Returns the root-relative x and y coordinates as a pair of integers.
|
||||
.
|
||||
.Ch "Callback Functions"
|
||||
.
|
||||
.Pr add-callbacks widget callback-name . callback-functions
|
||||
.LP
|
||||
See \f2XtAddCallbacks\fP.
|
||||
Adds the functions to a callback list of the specified widget.
|
||||
\f2callback-name\fP is a string or a symbol.
|
||||
Each callback function will be called with at least one argument \-
|
||||
the widget to which the function has been attached.
|
||||
.
|
||||
.Pr add-callback widget callback-name callback-function
|
||||
.LP
|
||||
Calls \f2add-callbacks\fP with the specified function.
|
||||
.
|
||||
.\" .Pr call-callbacks widget callback-name object
|
||||
.\" Calls each callback procedure that is registered in the callback
|
||||
.\" list named \f2callback-name\fP of the given \f2widget\fP with
|
||||
.\" \f2object\fP as an argument.
|
||||
.\" .
|
||||
.Ch "Popup Shells"
|
||||
.
|
||||
.[[
|
||||
.Pr create-popup-shell widget-class parent-widget . args
|
||||
.Pr create-popup-shell widget-name widget-class parent-widget . args
|
||||
.]]
|
||||
.LP
|
||||
See \f2XtCreatePopupShell\fP.
|
||||
\f2widget-name\fP is a string or a symbol.
|
||||
If no widget name is given, the name of the shell class is used.
|
||||
The number of \f2args\fP must be even, the 1st, 3rd, etc.\& argument
|
||||
is the name of a resource to be set (a string or a symbol), the
|
||||
2nd, 4th, etc.\& argument is the corresponding value.
|
||||
.
|
||||
.Pr popup shell-widget grab-kind
|
||||
.LP
|
||||
See \f2XtPopup\fP.
|
||||
\f2grab-kind\fP is a symbol (\f5grab-once\fP, \f5grab-nonexclusive\fP,
|
||||
or \f5grab-exclusive\fP).
|
||||
.
|
||||
.Pr popdown shell-widget
|
||||
.LP
|
||||
See \f2XtPopdown\fP.
|
||||
.
|
||||
.Ch "Application Contexts"
|
||||
.
|
||||
.Pr context? x
|
||||
.LP
|
||||
Returns #t iff \f2x\fP is an object of type \f2context\fP
|
||||
(application context).
|
||||
.
|
||||
.Pr create-context
|
||||
.LP
|
||||
See \f2XtCreateApplicationContext\fP.
|
||||
.
|
||||
.Pr destroy-context context
|
||||
.LP
|
||||
See \f2XtDestroyApplicationContext\fP.
|
||||
.
|
||||
.Pr initialize-display context display application-name application-class
|
||||
.LP
|
||||
See \f2XtDisplayInitialize\fP, \f2XtOpenDisplay\fP.
|
||||
If \f2display\fP is an object of type \f2display\fP,
|
||||
\f2XtDisplayInitialize\fP is called.
|
||||
If \f2display\fP is a display name (a string or a symbol) or #f,
|
||||
\f2XtOpenDisplay\fP is called (with a NULL display in the latter case),
|
||||
and the newly opened display is returned.
|
||||
\f2application-name\fP and \f2application-class\fP are strings or symbols
|
||||
or #f (NULL and the empty string are used in the latter case).
|
||||
.
|
||||
.Pr application-initialize name . fallback-resources
|
||||
.LP
|
||||
A convenience function that creates an application context by a call
|
||||
to \f2create-context\fP, sets the fallback resources (if any), initializes
|
||||
the display by a call to \f2initialize-display\fP with the specified
|
||||
\f2name\fP and a class of #f, and creates and returns an application
|
||||
shell with the name \f2name\fP and class #f.
|
||||
.LP
|
||||
Calling \f2application-initialize\fP more than once may cause the
|
||||
application contexts and displays that were created by earlier
|
||||
calls to be closed during a future garbage collection.
|
||||
.
|
||||
.Pr display\(mi>context display
|
||||
.LP
|
||||
See \f2XtDisplayToApplicationContext\fP.
|
||||
.
|
||||
.Pr set-context-fallback-resources! context . resources
|
||||
.LP
|
||||
See \f2XtAppSetFallbackResources\fP.
|
||||
Each \f2resource\fP is a string.
|
||||
.
|
||||
.Pr context-main-loop context
|
||||
.LP
|
||||
See \f2XtAppMainLoop\fP.
|
||||
.
|
||||
.Pr context-pending context
|
||||
.LP
|
||||
See \f2XtAppPending\fP.
|
||||
Returns a list of symbols (\f5x-event\fP, \f5timer\fP, \f5alternate-input\fP).
|
||||
.
|
||||
.Pr context-process-event context . mask
|
||||
.LP
|
||||
See \f2XtProcessEvent\fP.
|
||||
The optional argument \f2mask\fP is a list of symbols (see
|
||||
\f2context-pending\fP above).
|
||||
\f2XtIMAll\fP is used if the \f2mask\fP argument is omitted
|
||||
.
|
||||
.Pr context-add-work-proc context procedure
|
||||
.LP
|
||||
See \f2XtAppAddWorkProc\fP.
|
||||
Returns an \f2identifier\fP that can be used as an argument to
|
||||
\f2remove-work-proc\fP.
|
||||
\f2procedure\fP is a procedure with no arguments.
|
||||
.
|
||||
.Pr remove-work-proc identifier
|
||||
.LP
|
||||
See \f2XtRemoveWorkProc\fP.
|
||||
\f2identifier\fP must be the return value of a previous call to
|
||||
\f2context-add-work-proc\fP.
|
||||
Each such \f2identifier\fP can be used as an argument for
|
||||
\f2remove-work-proc\fP only once.
|
||||
.
|
||||
.Pr context-add-timeout context timer-value procedure
|
||||
.LP
|
||||
See \f2XtAppAddTimeOut\fP.
|
||||
\f2timer-value\fP is an integer.
|
||||
Returns an \f2identifier\fP that can be used as an argument to
|
||||
\f2remove-timeout\fP.
|
||||
The time-out procedure will be called with one argument, the identifier
|
||||
returned by the call to \f2context-add-timeout\fP (i.\|e.\& the object
|
||||
that uniquely identifies the timer).
|
||||
.
|
||||
.Pr remove-timeout identifier
|
||||
.LP
|
||||
See \f2XtRemoveTimeOut\fP.
|
||||
\f2identifier\fP must be the return value of a previous call to
|
||||
\f2context-add-timeout\fP.
|
||||
Each such \f2identifier\fP can be used as an argument for
|
||||
\f2remove-timeout\fP only once.
|
||||
.
|
||||
.Pr context-add-input context source procedure . mask
|
||||
.LP
|
||||
See \f2XtAppAddInput\fP.
|
||||
\f2source\fP is a file port.
|
||||
Returns an \f2identifier\fP that can be used as an argument to
|
||||
\f2context-remove-input\fP.
|
||||
The \f2procedure\fP will be called with two arguments \- \f2source\fP
|
||||
and the identifier returned by the call to \f2context-add-input\fP.
|
||||
.LP
|
||||
The optional \f2mask\fP argument is a list of one or more of the
|
||||
symbols \f2read\fP, \f2write\fP, and \f2exception\fP.
|
||||
It specifies the condition on which the procedure will be called.
|
||||
If no \f2mask\fP argument is given, \f2read\fP is used if \f2source\fP
|
||||
is an input-port, \f2write\fP if it is an output-port, and
|
||||
both \f2read\fP and \f2write\fP if it is an input-output-port.
|
||||
.
|
||||
.Pr remove-input identifier
|
||||
.LP
|
||||
See \f2XtRemoveInput\fP.
|
||||
\f2identifier\fP must be the return value of a previous call to
|
||||
\f2context-add-input\fP.
|
||||
Each such \f2identifier\fP can be used as an argument for
|
||||
\f2remove-input\fP only once.
|
||||
.
|
||||
.Pr identifier? x
|
||||
.LP
|
||||
Returns #t iff \f2x\fP is an \f2identifier\fP (an object returned by
|
||||
functions like \f2context-add-timeout\fP).
|
||||
.
|
||||
.Ch "Translations Management Functions"
|
||||
.
|
||||
.Pr context-add-action context name procedure
|
||||
.LP
|
||||
See \f2XtAppAddActions\fP.
|
||||
\f2name\fP is the name of the action (a string or a symbol).
|
||||
The action procedure will be invoked with three arguments:
|
||||
a widget, a list of event-specific arguments (see \f2handle-events\fP)
|
||||
and a list of strings (the action arguments).
|
||||
.
|
||||
.Pr augment-translations widget translation-table
|
||||
.LP
|
||||
See \f2XtAugmentTranslations\fP.
|
||||
\f2translation-table\fP is a string; \f2XtParseTranslationTable\fP is
|
||||
applied to it.
|
||||
.
|
||||
.Pr override-translations widget translation-table
|
||||
.LP
|
||||
See \f2XtOverrideTranslations\fP.
|
||||
\f2translation-table\fP is a string; \f2XtParseTranslationTable\fP is
|
||||
applied to it.
|
||||
.
|
||||
.Pr uninstall-translations widget
|
||||
.LP
|
||||
See \f2XtUninstallTranslations\fP.
|
||||
.
|
||||
.Pr install-accelerators dst-widget src-widget
|
||||
.LP
|
||||
See \f2XtInstallAccelerators\fP.
|
||||
.
|
||||
.Pr install-all-accelerators dst-widget src-widget
|
||||
.LP
|
||||
See \f2XtInstallAllAccelerators\fP.
|
||||
.
|
||||
.Pr multi-click-time display
|
||||
.LP
|
||||
See \f2XtGetMultiClickTime\fP.
|
||||
Returns an integer.
|
||||
.
|
||||
.Pr set-multi-click-time! display time
|
||||
.LP
|
||||
See \f2XtSetMultiClickTime\fP.
|
||||
\f2time\fP is an integer.
|
||||
.
|
||||
.Ch "Error Handling"
|
||||
.
|
||||
.Va xt-warning-handler
|
||||
.LP
|
||||
See \f2XtSetWarningHandler\fP.
|
||||
When a warning message is to be printed by the Xt intrinsics and the
|
||||
global variable \f2xt-warning-handler\fP is bound to a compound
|
||||
procedure, this procedure is invoked with the error message (a string)
|
||||
as an argument.
|
||||
When this variable is not bound to a compound procedure, the message
|
||||
is sent to the current output port.
|
||||
The initial value of this variable is the empty list.
|
||||
.LP
|
||||
This interface is bogus and will be replaced by a more useful mechanism
|
||||
in future versions of the software.
|
||||
.
|
||||
.Ch "Miscellaneous Functions"
|
||||
.
|
||||
.Pr xt-release-4-or-later?
|
||||
.LP
|
||||
Returns always #t.
|
||||
.
|
||||
.Pr xt-release-5-or-later?
|
||||
.LP
|
||||
Returns #t iff the Xt extension is linked together with the X11
|
||||
Release 5 toolkit intrinsics or later versions of the intrinsics.
|
||||
.
|
||||
.Pr xt-release-6-or-later?
|
||||
.LP
|
||||
Returns #t iff the Xt extension is linked together with the X11
|
||||
Release 6 toolkit intrinsics or later versions of the intrinsics.
|
||||
.
|
||||
.Ch "Interaction with the Garbage Collector"
|
||||
.
|
||||
.PP
|
||||
.Ix "garbage collector"
|
||||
The Scheme garbage collector destroys objects of type \f2context\fP
|
||||
or \f2widget\fP that are not longer accessible from within the Scheme
|
||||
program.
|
||||
This is done by invoking the function \f2destroy-context\fP or
|
||||
\f2destroy-widget\fP, respectively, with the unreferenced object as
|
||||
an argument.
|
||||
.PP
|
||||
The garbage collector only destroys objects that have been created
|
||||
from with the Scheme program (by functions like \f2create-context\fP
|
||||
or \f2create-widget\fP).
|
||||
Objects that have been obtained from Xt through functions like
|
||||
\f2widget-context\fP (and are owned by the Xt internals),
|
||||
are ignored by the garbage collector.
|
||||
.PP
|
||||
Programmers must make sure that an object is accessible during the object's
|
||||
entire lifetime, otherwise future runs of the garbage collector can
|
||||
result in undesired termination of the object.
|
||||
One must be especially careful when results of functions that create
|
||||
new objects (such as \f2create-context\fP) are ignored or assigned
|
||||
to local variables as in
|
||||
.Ss
|
||||
(define (initialize)
|
||||
(let* ((con (create-context))
|
||||
(dpy (initialize-display con #f 'Test #f)))
|
||||
(create-shell 'Test #f (find-class 'application-shell) dpy))))
|
||||
.Se
|
||||
.PP
|
||||
In this example, after termination of the function, the garbage
|
||||
collector will destroy the application context created by the
|
||||
call to \f2create-context\fP as well as the display,
|
||||
as they are no longer directly accessible from within the program.
|
||||
Bugs like this are often hard to find, since (in the above example)
|
||||
the shell widget returned by \f2initialize\fP can still be used,
|
||||
although its application context and the display associated with
|
||||
the application context have already been destroyed.
|
||||
.PP
|
||||
The problem can be solved by re-writing the above function like this:
|
||||
.Ss
|
||||
(define initialize #f)
|
||||
.sp .5
|
||||
(let ((con) (dpy))
|
||||
(set! initialize
|
||||
(lambda ()
|
||||
(set! con (create-context))
|
||||
(set! dpy (initialize-display con #f 'Test #f))
|
||||
(create-shell 'Test #f (find-class 'application-shell) dpy))))
|
||||
.Se
|
||||
.PP
|
||||
An alternative solution is to place the application context and
|
||||
display into a global variable, so that they can be terminated
|
||||
explicitly by the program when desired.
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,89 @@
|
|||
/*-----------------------------------------------------------------------------
|
||||
|
||||
This trivial Elk extension demonstrates encapsulation of a C++ class in
|
||||
a first-class Scheme type, and encapsulation of member functions in
|
||||
Scheme primitives.
|
||||
|
||||
See constructor.c in this directory for compilation instructions.
|
||||
|
||||
Here is a transcript showing a test run under Solaris 2.4 using the
|
||||
GNU g++ compiler:
|
||||
|
||||
% g++ -fpic -I/usr/elk/include -c class.c
|
||||
%
|
||||
% scheme
|
||||
> (load 'class.o)
|
||||
|
||||
> (define x (make-foo))
|
||||
x
|
||||
> (read-val x)
|
||||
1234
|
||||
> (write-val! x 11)
|
||||
|
||||
> (read-val x)
|
||||
11
|
||||
> (exit)
|
||||
%
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
||||
class foo {
|
||||
int val;
|
||||
public:
|
||||
int read_val(void);
|
||||
void write_val(int);
|
||||
foo() { val = 1234; };
|
||||
};
|
||||
|
||||
int foo::read_val(void) {
|
||||
return val;
|
||||
}
|
||||
|
||||
void foo::write_val(int newval) {
|
||||
val = newval;
|
||||
}
|
||||
|
||||
/* ---------------------------------- */
|
||||
|
||||
#include "scheme.h"
|
||||
|
||||
struct S_Foo {
|
||||
Object tag; class foo foo;
|
||||
};
|
||||
|
||||
int T_Foo;
|
||||
|
||||
#define FOO(x) ((struct S_Foo *)POINTER(x))
|
||||
|
||||
Object P_Make_Foo(void) {
|
||||
Object f = Alloc_Object(sizeof (struct S_Foo), T_Foo, 0);
|
||||
FOO(f)->foo.write_val(1234); /* FOO(f)->foo.foo() is not allowed?! */
|
||||
return f;
|
||||
}
|
||||
|
||||
Object P_Read_Val(Object x) {
|
||||
Check_Type(x, T_Foo);
|
||||
return Make_Integer(FOO(x)->foo.read_val());
|
||||
}
|
||||
|
||||
Object P_Write_Val(Object x, Object y) {
|
||||
Check_Type(x, T_Foo);
|
||||
FOO(x)->foo.write_val(Get_Integer(y));
|
||||
return Void;
|
||||
}
|
||||
|
||||
Foo_Print(Object h, Object port, int raw, int depth, int length) {
|
||||
Printf(port, "#[foo %d]", FOO(h)->foo.read_val());
|
||||
}
|
||||
|
||||
int Foo_Equal(Object x, Object y) {
|
||||
return FOO(x)->foo.read_val() == FOO(y)->foo.read_val();
|
||||
}
|
||||
|
||||
void elk_init_foo() {
|
||||
T_Foo = Define_Type(0, "foo", NOFUNC, sizeof(struct S_Foo),
|
||||
Foo_Equal, Foo_Equal, Foo_Print, NOFUNC);
|
||||
Define_Primitive((Object(*)(...))P_Make_Foo, "make-foo", 0, 0, EVAL);
|
||||
Define_Primitive((Object(*)(...))P_Read_Val, "read-val", 1, 1, EVAL);
|
||||
Define_Primitive((Object(*)(...))P_Write_Val, "write-val!", 2, 2, EVAL);
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
/*----------------------------------------------------------------------
|
||||
|
||||
This simple C++ program demonstrates that static constructors (destructors)
|
||||
are invoked by Elk when loading a compiled C++ file (when exiting).
|
||||
|
||||
o Compile the program with CC -c -I/usr/elk/include constructor.c, where
|
||||
/usr/elk is the toplevel directory of your Elk installation. Under
|
||||
Solaris 2.x (and SysVR4) you also have to specify -pic (-fpic for g++).
|
||||
|
||||
o Invoke Elk and set the load-libraries to point to the C++ and the
|
||||
C library, e.g. type something like:
|
||||
|
||||
(set! load-libraries "-L/usr/lang/SC2.0.1 -lC -lc")
|
||||
or
|
||||
(set! load-libraries "-R/usr/lang/lib -L/usr/lang/lib -lC -lc")
|
||||
or just
|
||||
(set! load-libraries "-lC -lc")
|
||||
|
||||
depending on the platform and the place where the C++ library has
|
||||
been installed on your system. If you are using g++, you may have
|
||||
to mention both the g++ library and the gcc library.
|
||||
|
||||
o Now "(load 'constructor.o)", observe the "invoking constructor" message,
|
||||
and evaluate "(test)", which should return 3. Terminate the interpreter
|
||||
and observe the "invoking destructor" message.
|
||||
|
||||
|
||||
o If you get a message from the linker complaining about `Text relocation
|
||||
remains against symbol _GLOBAL_.D.P_Test__Fv', you have probably run
|
||||
into a known bug in g++ on ELF-based systems (such as Solaris 2.x).
|
||||
|
||||
In this case you have to link your C++ extensions with Elk statically
|
||||
or use a different C++ compiler.
|
||||
|
||||
|
||||
o If static constructors don't get called when loading compiled C++ files,
|
||||
your C++ compiler is probably using a naming convention for static
|
||||
constructors and destructors that is not anticipated by the current
|
||||
version of Elk.
|
||||
|
||||
In this case, you may want to find out what kind of names are used
|
||||
(by applying "nm" to an object file) and add the name prefixes to
|
||||
the Init_Prefixes and Finit_Prefixes lists in src/stab.c in the Elk
|
||||
source tree. Then recompile Elk. Send me mail.
|
||||
----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include "scheme.h"
|
||||
|
||||
#include <iostream.h>
|
||||
|
||||
class C {
|
||||
public:
|
||||
int i;
|
||||
C() {
|
||||
cerr << "[invoking constructor]" << endl;
|
||||
i = 3;
|
||||
}
|
||||
~C() { cerr << "[invoking destructor]" << endl; }
|
||||
};
|
||||
|
||||
C c;
|
||||
|
||||
Object P_Test() {
|
||||
return Make_Integer(c.i);
|
||||
}
|
||||
|
||||
void elk_init_constructor() {
|
||||
Define_Primitive((Object (*)(...))P_Test, "test", 0, 0, EVAL);
|
||||
}
|
||||
|
||||
void elk_finit_constructor() {
|
||||
cerr << "Goodbye." << endl;
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
;;; -*-Scheme-*-
|
||||
;;;
|
||||
;;; Demonstrate the regular expression primitives.
|
||||
|
||||
(require 'regexp)
|
||||
|
||||
;; Returns a list of substrings of string `str' that match the
|
||||
;; pattern `pat'
|
||||
|
||||
(define (matches str pat)
|
||||
(let loop ((r (make-regexp pat '(extended))) (result '()) (from 0))
|
||||
(let ((m (regexp-exec r str from)))
|
||||
(if (regexp-match? m)
|
||||
(loop r (cons (substring str (+ from (regexp-match-start m 0))
|
||||
(+ from (regexp-match-end m 0)))
|
||||
result)
|
||||
(+ from (regexp-match-end m 0)))
|
||||
(reverse result)))))
|
||||
|
||||
(require 'siteinfo)
|
||||
|
||||
(cond
|
||||
((feature? ':regular-expressions)
|
||||
(print (matches "Hello, world!" "[a-zA-z]+"))
|
||||
(print (matches "Hello, world!" ".")))
|
||||
(else
|
||||
(format #t "Regular expressions not supported by ~a-~a~%"
|
||||
site-machine site-os)))
|
||||
|
|
@ -0,0 +1,173 @@
|
|||
; Date: 15 Nov 88 23:03:24 GMT
|
||||
; From: uoregon!markv@beaver.cs.washington.edu (Mark VandeWettering)
|
||||
; Organization: University of Oregon, Computer Science, Eugene OR
|
||||
; Subject: The Paradoxical Combinator -- Y (LONG)
|
||||
;
|
||||
; Alternatively entitled:
|
||||
; "Y? Why Not?" :-)
|
||||
;
|
||||
; The discussion that has been going on in regards to the Y combinator as
|
||||
; the basic operation in implementing recursive functions are interesting.
|
||||
; The practical tests that people have made have shown that the Y
|
||||
; combinator is orders of magnitude slower for implementing recursion than
|
||||
; directly compiling it.
|
||||
;
|
||||
; This is true for Scheme. I hold that for an interesting set of
|
||||
; languages, (lazy languages) that this result will not necessarily hold.
|
||||
;
|
||||
; The problem with Y isn't its complexity, it is the fact that it is an
|
||||
; inherently lazy operation. Any implementation in Scheme is clouded by
|
||||
; the fact that Scheme is an applicative order evaluator, while Y prefers
|
||||
; to be evaluated in normal order.
|
||||
;
|
||||
;
|
||||
(define Y
|
||||
(lambda (g)
|
||||
((lambda (h) (g (lambda (x) ((h h) x))))
|
||||
(lambda (h) (g (lambda (x) ((h h) x)))))))
|
||||
;
|
||||
(define fact
|
||||
(lambda (f)
|
||||
(lambda (n)
|
||||
(if (= n 1)
|
||||
1
|
||||
(* n (f (- n 1)))))))
|
||||
;
|
||||
;
|
||||
; Evaluating (Y fact) 2 results in the following operations in
|
||||
; Scheme:
|
||||
;
|
||||
; The argument is (trivially) evaluated, and returns two.
|
||||
; (Y fact) must be evaluated. What is it? Y and fact each evaluate
|
||||
; to closures. When applied, Y binds g to fact, and executes the
|
||||
; body.
|
||||
;
|
||||
; The body is an application of a closure to another closure. The
|
||||
; operator binds h to the operand, and executes its body which....
|
||||
;
|
||||
; Evaluates (g (lambda (x) ((h h) x))). The operand is a closure,
|
||||
; which gets built and then returns. g evaluates to fact. We
|
||||
; substitute the closure (lambda (x) ((h h) x)) in for the function
|
||||
; f in the definition of fact, giving...
|
||||
;
|
||||
; (lambda (n)
|
||||
; (if (= n 1)
|
||||
; 1
|
||||
; (* n ((lambda (x) ((h h) x)) (- n 1)))))
|
||||
;
|
||||
; Which we return as the value of (Y fact). When we apply this to 2, we get
|
||||
;
|
||||
; (* 2 ((lambda (x) ((h h) x)) 1))
|
||||
;
|
||||
; We then have to evaluate
|
||||
; ((lambda (x) ((h h) x)) 1)
|
||||
;
|
||||
; or
|
||||
; ((h h) 1)
|
||||
;
|
||||
; But remembering that h was (lambda (h) (g (lambda (x) ((h h) x)))),
|
||||
; we have
|
||||
;
|
||||
; (((lambda (h) (g (lambda (x) ((h h) x))))
|
||||
; (lambda (h) (g (lambda (x) ((h h) x)))))
|
||||
; 1) ....
|
||||
;
|
||||
; So, we rebind h to be the right stuff, and evaluate the body, which is
|
||||
;
|
||||
; ((g (lambda (x) ((h h) x))) 1)
|
||||
;
|
||||
; Which by the definition of g (still == fact) is just 1.
|
||||
;
|
||||
; (* 2 1) = 2.
|
||||
;
|
||||
; ########################################################################
|
||||
;
|
||||
; Summary: If you didn't follow this, performing this evaluation
|
||||
; was cumbersome at best. As far as compiler or interpreter is
|
||||
; concerned, the high cost of evaluating this function is related
|
||||
; to two different aspects:
|
||||
;
|
||||
; It is necessary to create "suspended" values. These suspended
|
||||
; values are represented as closures, which are in general heap
|
||||
; allocated and expensive.
|
||||
;
|
||||
; For every level of recursion, new closures are created (h gets
|
||||
; rebound above). While this could probably be optimized out by a
|
||||
; smart compiler, it does seem like the representation of suspended
|
||||
; evaluation by lambdas is inefficient.
|
||||
;
|
||||
;
|
||||
; ########################################################################
|
||||
;
|
||||
; You can try to figure out how all this works. It is complicated, I
|
||||
; believe I understand it. The point in the derivation above is that in
|
||||
; Scheme, to understand how the implementation of Y works, you have to
|
||||
; fall back on the evaluation mechanism of Scheme. Suspended values must
|
||||
; be represented as closures. It is the creation of these closures that
|
||||
; cause the Scheme implementation to be slow.
|
||||
;
|
||||
; If one wishes to abandon Scheme (or at least applicative order
|
||||
; evaluators of Scheme) one can typically do much better. My thesis work
|
||||
; is in graph reduction, and trying to understand better the issues having
|
||||
; to do with implementation.
|
||||
;
|
||||
; In graph reduction, all data items (evaluated and unevaluated) have the
|
||||
; same representation: as graphs in the heap. We choose to evaluate using
|
||||
; an outermost, leftmost strategy. This allows the natural definition of
|
||||
; (Y h) = (h (Y h)) to be used. An application node of the form:
|
||||
;
|
||||
; @
|
||||
; / \
|
||||
; / \
|
||||
; Y h
|
||||
;
|
||||
; can be constructed in the obvious way:
|
||||
; @
|
||||
; / \
|
||||
; / \
|
||||
; h @
|
||||
; / \
|
||||
; / \
|
||||
; Y h
|
||||
;
|
||||
; costing one heap allocation per level of recursion, which is
|
||||
; certainly cheaper than the multiple allocations of scheme
|
||||
; closures above. More efficiently, we might choose to implement
|
||||
; it using a "knot tying" version:
|
||||
;
|
||||
;
|
||||
; /\
|
||||
; / \
|
||||
; @ |
|
||||
; / \ /
|
||||
; / \/
|
||||
; h
|
||||
;
|
||||
; Which also works quite well. Y has been eliminated, and will
|
||||
; cause no more reductions.
|
||||
;
|
||||
; The basic idea is somehow that recursion in functional languages
|
||||
; is analogous to cycles in the graph in a graph reduction engine.
|
||||
; Therefore, the Y combinator is a specific "textual" indicator of
|
||||
; the graph.
|
||||
;
|
||||
; The G-machine (excellently described in Peyton Jones' book "The
|
||||
; Implementation of Functional Programming Languages") also
|
||||
; described the Y combinator as being efficient. He chose letrecs
|
||||
; as being a primitive in the extended lambda calculus. His
|
||||
; methodology behind compiling these recursive definitions was
|
||||
; basically to compile fixed code which directly built these cyclic
|
||||
; structures, rather than having them built at runtime.
|
||||
;
|
||||
; I think (and my thesis work is evolving into this kind of
|
||||
; argument) that Y is overlooked for trivial reasons. Partial
|
||||
; evaluation and smarter code generation could make an SK based
|
||||
; compiler generate code which is equal in quality to that produced
|
||||
; by supercombinator based compilation.
|
||||
;
|
||||
;
|
||||
; This is too long already, ciao for now.
|
||||
;
|
||||
; Mark VandeWettering
|
||||
|
||||
(print ((Y fact) 10))
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
;;; -*-Scheme-*-
|
||||
;;;
|
||||
;;; The Ackermann function
|
||||
|
||||
(define (acker x y)
|
||||
(cond
|
||||
((zero? x)
|
||||
(+ y 1))
|
||||
((zero? y)
|
||||
(acker (- x 1) 1))
|
||||
(else
|
||||
(acker (- x 1) (acker x (- y 1))))))
|
||||
|
||||
(print (acker 3 2))
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,30 @@
|
|||
;;; -*-Scheme-*-
|
||||
|
||||
(define acc)
|
||||
(define bcc)
|
||||
(define n 5)
|
||||
|
||||
(define (a)
|
||||
(if (not (= 0 (call-with-current-continuation
|
||||
(lambda (cc)
|
||||
(set! acc cc) 0))))
|
||||
(if (> n 0)
|
||||
(begin
|
||||
(set! n (- n 1))
|
||||
(display "resume b") (newline)
|
||||
(bcc 1))
|
||||
#v)
|
||||
acc))
|
||||
|
||||
(define (b)
|
||||
(if (not (= 0 (call-with-current-continuation
|
||||
(lambda (cc)
|
||||
(set! bcc cc) 0))))
|
||||
(begin
|
||||
(display "resume a") (newline)
|
||||
(acc 1)))
|
||||
bcc)
|
||||
|
||||
(a)
|
||||
(b)
|
||||
(acc 1)
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
;;; -*-Scheme-*-
|
||||
|
||||
(define (make-cell)
|
||||
(call-with-current-continuation
|
||||
(lambda (return-from-make-cell)
|
||||
(letrec ((state
|
||||
(call-with-current-continuation
|
||||
(lambda (return-new-state)
|
||||
(return-from-make-cell
|
||||
(lambda (op)
|
||||
(case op
|
||||
((set)
|
||||
(lambda (value)
|
||||
(call-with-current-continuation
|
||||
(lambda (return-from-access)
|
||||
(return-new-state
|
||||
(list value return-from-access))))))
|
||||
((get) (car state)))))))))
|
||||
((cadr state) 'done)))))
|
||||
|
||||
(define c (make-cell))
|
||||
(print ((c 'set) 99))
|
||||
(print (c 'get))
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
;;; -*-Scheme-*-
|
||||
|
||||
(require 'cscheme)
|
||||
|
||||
(define (displayLine . someArgs)
|
||||
(for-each
|
||||
(lambda (aTerm) (display aTerm) (display " "))
|
||||
someArgs)
|
||||
(newline))
|
||||
|
||||
(define (Monitor)
|
||||
|
||||
(define stopAtMonitorLevel #f)
|
||||
(define clock 0)
|
||||
(define stopTime 0)
|
||||
(define processIndicators '())
|
||||
|
||||
(define (setInitialProcessState! aContinuation)
|
||||
(set! processIndicators
|
||||
(cons (list 0 aContinuation) processIndicators))
|
||||
(stopAtMonitorLevel #f))
|
||||
|
||||
(define (startSimulation! aDuration)
|
||||
(set! stopTime aDuration)
|
||||
(if (not (null? processIndicators))
|
||||
(let ((firstIndicatorOnList (car processIndicators)))
|
||||
(set! processIndicators
|
||||
(remove firstIndicatorOnList processIndicators))
|
||||
(resumeSimulation! firstIndicatorOnList))
|
||||
(displayLine "*** no active process recorded!")))
|
||||
|
||||
(define (resumeSimulation! aProcessState)
|
||||
(set! processIndicators
|
||||
(cons aProcessState processIndicators))
|
||||
(let ((nextProcessState aProcessState))
|
||||
(for-each (lambda (aStatePair)
|
||||
(if (< (car aStatePair) (car nextProcessState))
|
||||
(set! nextProcessState aStatePair)))
|
||||
processIndicators)
|
||||
(let ((time (car nextProcessState))
|
||||
(continuation (cadr nextProcessState)))
|
||||
(set! processIndicators
|
||||
(remove nextProcessState processIndicators))
|
||||
(if (<= time stopTime)
|
||||
(begin (set! clock time)
|
||||
(continuation #f))
|
||||
(begin (displayLine "*** simulation stops at:" clock)
|
||||
(stopAtMonitorLevel #f))))))
|
||||
|
||||
(define (dispatch aMessage . someArguments)
|
||||
(cond ((eq? aMessage 'initialize)
|
||||
(setInitialProcessState! (car someArguments)))
|
||||
((eq? aMessage 'startSimulation)
|
||||
(startSimulation! (car someArguments)))
|
||||
((eq? aMessage 'proceed)
|
||||
(resumeSimulation! (car someArguments)))
|
||||
((eq? aMessage 'time)
|
||||
clock)
|
||||
((eq? aMessage 'processIndicators)
|
||||
processIndicators)
|
||||
(else
|
||||
"Sorry, I don't know how to do this!")))
|
||||
|
||||
(call-with-current-continuation
|
||||
(lambda (anArg)
|
||||
(set! stopAtMonitorLevel anArg)))
|
||||
dispatch)
|
||||
|
||||
|
||||
|
||||
|
||||
(define (Tourist aName aMonitor)
|
||||
(call-with-current-continuation
|
||||
(lambda (anArg)
|
||||
(aMonitor 'initialize anArg)))
|
||||
(displayLine aName "starts at" (aMonitor 'time))
|
||||
(while #t
|
||||
(displayLine aName "walks on at" (aMonitor 'time))
|
||||
(call-with-current-continuation
|
||||
(lambda (anArg)
|
||||
(aMonitor 'proceed
|
||||
(list (+ (aMonitor 'time) 1) anArg))))
|
||||
(displayLine aName "arrives at new attraction at" (aMonitor 'time))
|
||||
(call-with-current-continuation
|
||||
(lambda (anArg)
|
||||
(aMonitor 'proceed
|
||||
(list (+ (aMonitor 'time) 2)
|
||||
anArg))))))
|
||||
|
||||
|
||||
(define Gallery (Monitor))
|
||||
|
||||
(Tourist 'Jane Gallery)
|
||||
(Tourist 'Bruce Gallery)
|
||||
|
||||
(Gallery 'startSimulation 5)
|
||||
|
|
@ -0,0 +1,494 @@
|
|||
(require 'cscheme)
|
||||
|
||||
;
|
||||
; Optimizing scheme compiler
|
||||
; supports quote, set!, if, lambda special forms,
|
||||
; constant refs, variable refs and proc applications
|
||||
;
|
||||
; Using Clusures for Code Generation
|
||||
; Marc Feeley and Guy LaPalme
|
||||
; Computer Language, Vol. 12, No. 1, pp. 47-66
|
||||
; 1987
|
||||
;
|
||||
|
||||
(define (compile expr)
|
||||
((gen expr nil '())))
|
||||
|
||||
(define (gen expr env term)
|
||||
(cond
|
||||
((symbol? expr)
|
||||
(ref (variable expr env) term))
|
||||
((not (pair? expr))
|
||||
(cst expr term))
|
||||
((eq? (car expr) 'quote)
|
||||
(cst (cadr expr) term))
|
||||
((eq? (car expr) 'set!)
|
||||
(set (variable (cadr expr) env) (gen (caddr expr) env '()) term))
|
||||
((eq? (car expr) 'if)
|
||||
(gen-tst (gen (cadr expr) env '())
|
||||
(gen (caddr expr) env term)
|
||||
(gen (cadddr expr) env term)))
|
||||
((eq? (car expr) 'lambda)
|
||||
(let ((p (cadr expr)))
|
||||
(prc p (gen (caddr expr) (allocate p env) #t) term)))
|
||||
(else
|
||||
(let ((args (map (lambda (x) (gen x env '())) (cdr expr))))
|
||||
(let ((var (and (symbol? (car expr)) (variable (car expr) env))))
|
||||
(if (global? var)
|
||||
(app (cons var args) #t term)
|
||||
(app (cons (gen (car expr) env '()) args) '() term)))))))
|
||||
|
||||
|
||||
(define (allocate parms env)
|
||||
(cond ((null? parms) env)
|
||||
((symbol? parms) (cons parms env))
|
||||
(else
|
||||
(cons (car parms) (allocate (cdr parms) env)))))
|
||||
|
||||
(define (variable symb env)
|
||||
(let ((x (memq symb env)))
|
||||
(if x
|
||||
(- (length env) (length x))
|
||||
(begin
|
||||
(if (not (assq symb -glo-env-)) (define-global symb '-undefined-))
|
||||
(assq symb -glo-env-)))))
|
||||
|
||||
(define (global? var)
|
||||
(pair? var))
|
||||
|
||||
(define (cst val term)
|
||||
(cond ((eqv? val 1)
|
||||
((if term gen-1* gen-1)))
|
||||
((eqv? val 2)
|
||||
((if term gen-2* gen-2)))
|
||||
((eqv? val nil)
|
||||
((if term gen-null* gen-null)))
|
||||
(else
|
||||
((if term gen-cst* gen-cst) val))))
|
||||
|
||||
(define (ref var term)
|
||||
(cond ((global? var)
|
||||
((if term gen-ref-glo* gen-ref-glo) var))
|
||||
((= var 0)
|
||||
((if term gen-ref-loc-1* gen-ref-loc-1)))
|
||||
((= var 1)
|
||||
((if term gen-ref-loc-2* gen-ref-loc-2)))
|
||||
((= var 2)
|
||||
((if term gen-ref-loc-3* gen-ref-loc-3)))
|
||||
(else
|
||||
((if term gen-ref* gen-ref) var))))
|
||||
|
||||
(define (set var val term)
|
||||
(cond ((global? var)
|
||||
((if term gen-set-glo* gen-set-glo) var val))
|
||||
((= var 0)
|
||||
((if term gen-set-loc-1* gen-set-loc-1) val))
|
||||
((= var 1)
|
||||
((if term gen-set-loc-2* gen-set-loc-2) val))
|
||||
((= var 2)
|
||||
((if term gen-set-loc-3* gen-set-loc-3) val))
|
||||
(else
|
||||
((if term gen-set* gen-set) var val))))
|
||||
|
||||
(define (prc parms body term)
|
||||
((cond ((null? parms)
|
||||
(if term gen-pr0* gen-pr0))
|
||||
((symbol? parms)
|
||||
(if term gen-pr1/rest* gen-pr1/rest))
|
||||
((null? (cdr parms))
|
||||
(if term gen-pr1* gen-pr1))
|
||||
((symbol? (cdr parms))
|
||||
(if term gen-pr2/rest* gen-pr2/rest))
|
||||
((null? (cddr parms))
|
||||
(if term gen-pr2* gen-pr2))
|
||||
((symbol? (cddr parms))
|
||||
(if term gen-pr3/rest* gen-pr3/rest))
|
||||
((null? (cdddr parms))
|
||||
(if term gen-pr3 gen-pr3))
|
||||
(else
|
||||
(error "too many parameters in a lambda-expression")))
|
||||
body))
|
||||
|
||||
(define (app vals glo term)
|
||||
(apply (case (length vals)
|
||||
((1) (if glo
|
||||
(if term gen-ap0-glo* gen-ap0-glo)
|
||||
(if term gen-ap0* gen-ap0)))
|
||||
((2) (if glo
|
||||
(if term gen-ap1-glo* gen-ap1-glo)
|
||||
(if term gen-ap1* gen-ap1)))
|
||||
((3) (if glo
|
||||
(if term gen-ap2-glo* gen-ap2-glo)
|
||||
(if term gen-ap2* gen-ap2)))
|
||||
((4) (if glo
|
||||
(if term gen-ap3-glo* gen-ap3-glo)
|
||||
(if term gen-ap3* gen-ap3)))
|
||||
(else (error "too many arguments in a proc application")))
|
||||
vals))
|
||||
;
|
||||
; code generation for non-terminal evaluations
|
||||
;
|
||||
|
||||
;
|
||||
; constants
|
||||
;
|
||||
|
||||
(define (gen-1) (lambda () 1))
|
||||
(define (gen-2) (lambda () 2))
|
||||
(define (gen-null) (lambda () '()))
|
||||
(define (gen-cst a) (lambda () a))
|
||||
|
||||
;
|
||||
; variable reference
|
||||
;
|
||||
|
||||
(define (gen-ref-glo a) (lambda () (cdr a))) ; global var
|
||||
(define (gen-ref-loc-1) (lambda () (cadr *env*))) ; first local var
|
||||
(define (gen-ref-loc-2) (lambda () (caddr *env*))) ; second local var
|
||||
(define (gen-ref-loc-3) (lambda () (cadddr *env*))) ; third local var
|
||||
(define (gen-ref a) (lambda () (do ((i 0 (1+ i)) ; any non-global
|
||||
(env (cdr *env*) (cdr env)))
|
||||
((= i a) (car env)))))
|
||||
|
||||
;
|
||||
; assignment
|
||||
;
|
||||
|
||||
(define (gen-set-glo a b) (lambda () (set-cdr! a (b))))
|
||||
(define (gen-set-loc-1 a) (lambda () (set-car! (cdr *env*) (a))))
|
||||
(define (gen-set-loc-2 a) (lambda () (set-car! (cddr *env*) (a))))
|
||||
(define (gen-set-loc-3 a) (lambda () (set-car! (cdddr *env*) (a))))
|
||||
(define (gen-set a b) (lambda () (do ((i 0 (1+ i))
|
||||
(env (cdr *env*) (cdr env)))
|
||||
((= i a) (set-car! env (b))))))
|
||||
|
||||
;
|
||||
; conditional
|
||||
;
|
||||
|
||||
(define (gen-tst a b c) (lambda () (if (a) (b) (c))))
|
||||
|
||||
;
|
||||
; procedure application
|
||||
;
|
||||
|
||||
(define (gen-ap0-glo a) (lambda () ((cdr a))))
|
||||
(define (gen-ap1-glo a b) (lambda () ((cdr a) (b))))
|
||||
(define (gen-ap2-glo a b c) (lambda () ((cdr a) (b) (c))))
|
||||
(define (gen-ap3-glo a b c d) (lambda () ((cdr a) (b) (c) (d))))
|
||||
|
||||
(define (gen-ap0 a) (lambda () ((a))))
|
||||
(define (gen-ap1 a b) (lambda () ((a) (b))))
|
||||
(define (gen-ap2 a b c) (lambda () ((a) (b) (c))))
|
||||
(define (gen-ap3 a b c d) (lambda () ((a) (b) (c) (d))))
|
||||
|
||||
;
|
||||
; lambda expressions
|
||||
;
|
||||
|
||||
(define (gen-pr0 a) ; without "rest" parameter
|
||||
(lambda ()
|
||||
(let ((def (cdr *env*)))
|
||||
(lambda ()
|
||||
(set! *env* (cons *env* def))
|
||||
(a)))))
|
||||
|
||||
(define (gen-pr1 a)
|
||||
(lambda ()
|
||||
(let ((def (cdr *env*)))
|
||||
(lambda (x)
|
||||
(set! *env* (cons *env* (cons x def)))
|
||||
(a)))))
|
||||
|
||||
(define (gen-pr2 a)
|
||||
(lambda ()
|
||||
(let ((def (cdr *env*)))
|
||||
(lambda (x y)
|
||||
(set! *env* (cons *env* (cons x (cons y def))))
|
||||
(a)))))
|
||||
|
||||
(define (gen-pr3 a)
|
||||
(lambda ()
|
||||
(let ((def (cdr *env*)))
|
||||
(lambda (x y z)
|
||||
(set! *env* (cons *env* (cons x (cons y (cons z def)))))
|
||||
(a)))))
|
||||
|
||||
(define (gen-pr1/rest a)
|
||||
(lambda ()
|
||||
(let ((def (cdr *env*)))
|
||||
(lambda x
|
||||
(set! *env* (cons *env* (cons x def)))
|
||||
(a)))))
|
||||
|
||||
(define (gen-pr2/rest a)
|
||||
(lambda ()
|
||||
(let ((def (cdr *env*)))
|
||||
(lambda (x . y)
|
||||
(set! *env* (cons *env* (cons x (cons y def))))
|
||||
(a)))))
|
||||
|
||||
(define (gen-pr3/rest a)
|
||||
(lambda ()
|
||||
(let ((def (cdr *env*)))
|
||||
(lambda (x y . z)
|
||||
(set! *env* (cons *env* (cons x (cons y (cons z def)))))
|
||||
(a)))))
|
||||
|
||||
;
|
||||
; code generation for terminal evaluations
|
||||
;
|
||||
|
||||
;
|
||||
; constants
|
||||
;
|
||||
|
||||
(define (gen-1*)
|
||||
(lambda ()
|
||||
(set! *env* (car *env*))
|
||||
1))
|
||||
|
||||
(define (gen-2*)
|
||||
(lambda ()
|
||||
(set! *env* (car *env*))
|
||||
2))
|
||||
|
||||
(define (gen-null*)
|
||||
(lambda ()
|
||||
(set! *env* (car *env*))
|
||||
()))
|
||||
|
||||
(define (gen-cst* a)
|
||||
(lambda ()
|
||||
(set! *env* (car *env*))
|
||||
a))
|
||||
|
||||
;
|
||||
; variable reference
|
||||
;
|
||||
|
||||
(define (gen-ref-glo* a)
|
||||
(lambda ()
|
||||
(set! *env* (car *env*))
|
||||
(cdr a)))
|
||||
|
||||
(define (gen-ref-loc-1*)
|
||||
(lambda ()
|
||||
(let ((val (cadr *env*)))
|
||||
(set! *env* (car *env*))
|
||||
val)))
|
||||
|
||||
(define (gen-ref-loc-2*)
|
||||
(lambda ()
|
||||
(let ((val (caddr *env*)))
|
||||
(set! *env* (car *env*))
|
||||
val)))
|
||||
|
||||
(define (gen-ref-loc-3*)
|
||||
(lambda ()
|
||||
(let ((val (cadddr *env*)))
|
||||
(set! *env* (car *env*))
|
||||
val)))
|
||||
|
||||
(define (gen-ref* a)
|
||||
(lambda ()
|
||||
(do ((i 0 (1+ i))
|
||||
(env (cdr *env*) (cdr env)))
|
||||
((= i a)
|
||||
(set! *env* (car *env*))
|
||||
(car env)))))
|
||||
|
||||
;
|
||||
; assignment
|
||||
;
|
||||
|
||||
(define (gen-set-glo* a b)
|
||||
(lambda ()
|
||||
(set! *env* (car *env*))
|
||||
(set-cdr! a (b))))
|
||||
|
||||
(define (gen-set-loc-1* a)
|
||||
(lambda ()
|
||||
(set! *env* (car *env*))
|
||||
(set-car! (cdr *env*) (a))))
|
||||
|
||||
(define (gen-set-loc-2* a)
|
||||
(lambda ()
|
||||
(set! *env* (car *env*))
|
||||
(set-car! (cddr *env*) (a))))
|
||||
|
||||
(define (gen-set-loc-3* a)
|
||||
(lambda ()
|
||||
(set! *env* (car *env*))
|
||||
(set-car! (cdddr *env*) (a))))
|
||||
|
||||
(define (gen-set* a b)
|
||||
(lambda ()
|
||||
(do ((i 0 (1+ i))
|
||||
(env (cdr *env*) (cdr env)))
|
||||
((= i 0)
|
||||
(set! *env* (car *env*))
|
||||
(set-car! env (b))))))
|
||||
|
||||
;
|
||||
; procedure application
|
||||
;
|
||||
|
||||
(define (gen-ap0-glo* a)
|
||||
(lambda ()
|
||||
(set! *env* (car *env*))
|
||||
((cdr a))))
|
||||
|
||||
(define (gen-ap1-glo* a b)
|
||||
(lambda ()
|
||||
(let ((x (b)))
|
||||
(set! *env* (car *env*))
|
||||
((cdr a) x))))
|
||||
|
||||
(define (gen-ap2-glo* a b c)
|
||||
(lambda ()
|
||||
(let ((x (b)) (y (c)))
|
||||
(set! *env* (car *env*))
|
||||
((cdr a) x y))))
|
||||
|
||||
(define (gen-ap3-glo* a b c d)
|
||||
(lambda ()
|
||||
(let ((x (b)) (y (c)) (z (d)))
|
||||
(set! *env* (car *env*))
|
||||
((cdr a) x y z))))
|
||||
|
||||
(define (gen-ap0* a)
|
||||
(lambda ()
|
||||
(let ((w (a)))
|
||||
(set! *env* (car *env*))
|
||||
(w))))
|
||||
|
||||
(define (gen-ap1* a b)
|
||||
(lambda ()
|
||||
(let ((w (a)) (x (b)))
|
||||
(set! *env* (car *env*))
|
||||
(w x))))
|
||||
|
||||
(define (gen-ap2* a b c)
|
||||
(lambda ()
|
||||
(let ((w (a)) (x (b)) (y (c)))
|
||||
(set! *env* (car *env*))
|
||||
(w x y))))
|
||||
|
||||
(define (gen-ap3* a b c d)
|
||||
(lambda ()
|
||||
(let ((w (a)) (x (b)) (y (c)) (z (d)))
|
||||
(set! *env* (car *env*))
|
||||
(w x y z))))
|
||||
|
||||
;
|
||||
; lambda
|
||||
;
|
||||
|
||||
(define (gen-pr0* a)
|
||||
(lambda ()
|
||||
(let ((def (cdr *env*)))
|
||||
(set! *env* (car *env*))
|
||||
(lambda ()
|
||||
(set! *env* (cons *env* def))
|
||||
(a)))))
|
||||
|
||||
|
||||
(define (gen-pr1* a)
|
||||
(lambda ()
|
||||
(let ((def (cdr *env*)))
|
||||
(set! *env* (car *env*))
|
||||
(lambda (x)
|
||||
(set! *env* (cons *env* (cons x def)))
|
||||
(a)))))
|
||||
|
||||
(define (gen-pr2* a)
|
||||
(lambda ()
|
||||
(let ((def (cdr *env*)))
|
||||
(set! *env* (car *env*))
|
||||
(lambda (x y)
|
||||
(set! *env* (cons *env* (cons x (cons y def))))
|
||||
(a)))))
|
||||
|
||||
(define (gen-pr3* a)
|
||||
(lambda ()
|
||||
(let ((def (cdr *env*)))
|
||||
(set! *env* (car *env*))
|
||||
(lambda (x y z)
|
||||
(set! *env* (cons *env* (cons x (cons y (cons z def)))))
|
||||
(a)))))
|
||||
|
||||
(define (gen-pr1/rest* a)
|
||||
(lambda ()
|
||||
(let ((def (cdr *env*)))
|
||||
(set! *env* (car *env*))
|
||||
(lambda x
|
||||
(set! *env* (cons *env* (cons x def)))
|
||||
(a)))))
|
||||
|
||||
(define (gen-pr2/rest* a)
|
||||
(lambda ()
|
||||
(let ((def (cdr *env*)))
|
||||
(set! *env* (car *env*))
|
||||
(lambda (x . y)
|
||||
(set! *env* (cons *env* (cons x (cons y def))))
|
||||
(a)))))
|
||||
|
||||
(define (gen-pr1/rest* a)
|
||||
(lambda ()
|
||||
(let ((def (cdr *env*)))
|
||||
(set! *env* (car *env*))
|
||||
(lambda (x y . z)
|
||||
(set! *env* (cons *env* (cons x (cons y (cons z def)))))
|
||||
(a)))))
|
||||
|
||||
;
|
||||
; global defs
|
||||
;
|
||||
|
||||
(define (define-global var val)
|
||||
(if (assq var -glo-env-)
|
||||
(set-cdr! (assq var -glo-env-) val)
|
||||
(set! -glo-env- (cons (cons var val) -glo-env-))))
|
||||
|
||||
(define -glo-env- (list (cons 'define define-global)))
|
||||
|
||||
(define-global 'cons cons)
|
||||
(define-global 'car car)
|
||||
(define-global 'cdr cdr)
|
||||
(define-global 'null? null?)
|
||||
(define-global 'not not)
|
||||
(define-global '< <)
|
||||
(define-global '-1+ -1+)
|
||||
(define-global '+ +)
|
||||
(define-global '- -)
|
||||
|
||||
;
|
||||
; current environment
|
||||
;
|
||||
|
||||
(define *env* '(dummy))
|
||||
|
||||
;
|
||||
; environment manipulation
|
||||
;
|
||||
|
||||
(define (restore-env)
|
||||
(set! *env* (car *env*)))
|
||||
|
||||
;
|
||||
; evaluator
|
||||
;
|
||||
|
||||
(define (evaluate expr)
|
||||
((compile (list 'lambda '() expr))))
|
||||
|
||||
|
||||
(evaluate '(define 'fib
|
||||
(lambda (x)
|
||||
(if (< x 2)
|
||||
x
|
||||
(+ (fib (- x 1))
|
||||
(fib (- x 2)))))))
|
||||
|
||||
(print (evaluate '(fib 10)))
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
;;; -*-Scheme-*-
|
||||
|
||||
(define (identity value) value)
|
||||
|
||||
(define (gcd a b) (cps-gcd a b identity))
|
||||
|
||||
(define (cps-gcd a b k)
|
||||
(if (= b 0)
|
||||
(k a)
|
||||
(cps-remainder a b (lambda (v) (cps-gcd b v k)))))
|
||||
|
||||
(define (cps-remainder n d k)
|
||||
(if (< n d)
|
||||
(k n)
|
||||
(cps-remainder (- n d) d k)))
|
||||
|
||||
(print (gcd 4 6))
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
;;; -*-Scheme-*-
|
||||
|
||||
(define cont #f)
|
||||
(define done #f)
|
||||
|
||||
(define (pr msg)
|
||||
(display msg) (newline))
|
||||
|
||||
(define (doit)
|
||||
(dynamic-wind
|
||||
(lambda () (pr " 1:in"))
|
||||
(lambda ()
|
||||
(set! done (call-with-current-continuation
|
||||
(lambda (c) (set! cont c) (pr " catch") #f))))
|
||||
(lambda () (pr " 1:out")))
|
||||
(if (not done)
|
||||
(dynamic-wind
|
||||
(lambda () (pr " 2:in"))
|
||||
(lambda () (pr " throw") (cont #t))
|
||||
(lambda () (pr " 2:out")))))
|
||||
|
||||
(dynamic-wind
|
||||
(lambda () (pr "0:in"))
|
||||
doit
|
||||
(lambda () (pr "0:out")))
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
;;; -*-Scheme-*-
|
||||
|
||||
(define (f n)
|
||||
(if (= n 0)
|
||||
0
|
||||
(let fib ((i n) (a1 1) (a2 0))
|
||||
(if (= i 1)
|
||||
a1
|
||||
(fib (- i 1) (+ a1 a2) a1)))))
|
||||
|
||||
(print (f 20))
|
||||
|
||||
(define tau (/ (+ 1 (sqrt 5.0)) 2))
|
||||
|
||||
(define (fib n)
|
||||
(/ (+ (expt tau n) (expt tau (- 0 n))) (sqrt 5.0)))
|
||||
|
||||
(print (fib 20))
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
;;; -*-Scheme-*-
|
||||
;;;
|
||||
;;; from BYTE Feb. 88 page 208
|
||||
|
||||
(define (fixed-point f initial-value)
|
||||
(define epsilon 1.0e-10)
|
||||
(define (close-enough? v1 v2)
|
||||
(< (abs (- v1 v2)) epsilon))
|
||||
(define (loop value)
|
||||
(let ((next-value (f value)))
|
||||
(if (close-enough? value next-value)
|
||||
next-value
|
||||
(loop next-value))))
|
||||
(loop initial-value))
|
||||
|
||||
(define (average-damp f)
|
||||
(lambda (x)
|
||||
(average x (f x))))
|
||||
|
||||
(define (average x y)
|
||||
(/ (+ x y) 2))
|
||||
|
||||
(define (sqrt x)
|
||||
(fixed-point (average-damp (lambda (y) (/ x y)))
|
||||
1))
|
||||
|
||||
(print (sqrt 2))
|
||||
(print (sqrt 4))
|
||||
|
|
@ -0,0 +1,258 @@
|
|||
;;; -*-Scheme-*-
|
||||
;;;
|
||||
;;; flame -- print a flame (ported from the Gnu-Emacs flame.el)
|
||||
|
||||
(define flame)
|
||||
|
||||
(let ((pos) (end-margin 55) (margin 65))
|
||||
|
||||
(set! flame (lambda n
|
||||
(cond ((null? n)
|
||||
(set! n '(1)))
|
||||
((or (not (integer? (car n))) (negative? (car n)))
|
||||
(error 'flame "positive integer argument expected")))
|
||||
(set! pos 0)
|
||||
(fluid-let ((garbage-collect-notify? #f))
|
||||
(do ((i (car n) (1- i))) ((zero? i))
|
||||
(if (> pos end-margin)
|
||||
(begin
|
||||
(set! pos 0) (newline)))
|
||||
(flame-print #t (flatten (flame-expand '(sentence))))
|
||||
(display " "))
|
||||
(newline))
|
||||
#v))
|
||||
|
||||
(define (flame-expand x)
|
||||
(if (pair? x)
|
||||
(map flame-expand ((eval (car x))))
|
||||
x))
|
||||
|
||||
(define (flatten x)
|
||||
(if (pair? x)
|
||||
(apply append (map flatten x))
|
||||
(list x)))
|
||||
|
||||
(define (capitalize w)
|
||||
(display (char-upcase (string-ref w 0)))
|
||||
(if (> (string-length w) 1)
|
||||
(display (substring w 1 (string-length w)))))
|
||||
|
||||
(define (flame-print first x)
|
||||
(if (not (null? x))
|
||||
(begin
|
||||
(let* ((w (symbol->string (car x))) (len (string-length w)))
|
||||
((if first capitalize display) w)
|
||||
(set! pos (+ 1 pos len))
|
||||
(if (not (null? (cdr x)))
|
||||
(begin
|
||||
(if (not (memq (cadr x) '(? \. \, s! ! s \'s -loving)))
|
||||
(if (< pos margin)
|
||||
(display " ")
|
||||
(set! pos 0) (newline)))
|
||||
(flame-print #f (cdr x))))))))
|
||||
|
||||
(define (choose class)
|
||||
(list-ref class (modulo (random) (length class))))
|
||||
|
||||
(define (sentence) (choose sentences))
|
||||
|
||||
(define sentences
|
||||
'((how can you say that (statement) ?)
|
||||
(I can't believe how (adjective) you are.)
|
||||
(only a (der-term) like you would say that (statement) \.)
|
||||
((statement) \, huh?) (so, (statement) ?)
|
||||
((statement) \, right?) (I mean, (sentence))
|
||||
(don't you realise that (statement) ?)
|
||||
(I firmly believe that (statement) \.)
|
||||
(let me tell you something, you (der-term) \, (statement) \.)
|
||||
(furthermore, you (der-term) \, (statement) \.)
|
||||
(I couldn't care less about your (thing) \.)
|
||||
(How can you be so (adjective) ?)
|
||||
(you make me sick.)
|
||||
(it's well known that (statement) \.)
|
||||
((statement) \.)
|
||||
(it takes a (group-adj) (der-term) like you to say that (statement) \.)
|
||||
(I don't want to hear about your (thing) \.)
|
||||
(you're always totally wrong.)
|
||||
(I've never heard anything as ridiculous as the idea that (statement) \.)
|
||||
(you must be a real (der-term) to think that (statement) \.)
|
||||
(you (adjective) (group-adj) (der-term) !)
|
||||
(you're probably (group-adj) yourself.)
|
||||
(you sound like a real (der-term) \.)
|
||||
(why, (statement) !)
|
||||
(I have many (group-adj) friends.)
|
||||
(save the (thing) s!) (no nukes!) (ban (thing) s!)
|
||||
(I'll bet you think that (thing) s are (adjective) \.)
|
||||
(you know, (statement) \.)
|
||||
(your (quality) reminds me of a (thing) \.)
|
||||
(you have the (quality) of a (der-term) \.)
|
||||
((der-term) !)
|
||||
((adjective) (group-adj) (der-term) !)
|
||||
(you're a typical (group-adj) person, totally (adjective) \.)
|
||||
(man, (sentence))))
|
||||
|
||||
(define (quality) (choose qualities))
|
||||
|
||||
(define qualities
|
||||
'((ignorance) (stupidity) (worthlessness)
|
||||
(prejudice) (lack of intelligence) (lousiness)
|
||||
(bad grammar) (lousy spelling)
|
||||
(lack of common decency) (ugliness) (nastiness)
|
||||
(subtlety) (dishonesty) ((adjective) (quality))))
|
||||
|
||||
(define (adjective) (choose adjectives))
|
||||
|
||||
(define adjectives
|
||||
'((ignorant) (crass) (pathetic) (sick)
|
||||
(bloated) (malignant) (perverted) (sadistic)
|
||||
(stupid) (unpleasant) (lousy) (abusive) (bad)
|
||||
(braindamaged) (selfish) (improper) (nasty)
|
||||
(disgusting) (foul) (intolerable) (primitive)
|
||||
(depressing) (dumb) (phoney)
|
||||
((adjective) and (adjective))
|
||||
(as (adjective) as a (thing))))
|
||||
|
||||
(define (der-term) (choose der-terms))
|
||||
|
||||
(define der-terms
|
||||
'(((adjective) (der-term)) (sexist) (fascist)
|
||||
(weakling) (coward) (beast) (peasant) (racist)
|
||||
(cretin) (fool) (jerk) (ignoramus) (idiot)
|
||||
(wanker) (rat) (slimebag) (DAF driver)
|
||||
(Neanderthal) (sadist) (drunk) (capitalist)
|
||||
(wimp) (dogmatist) (wally) (maniac)
|
||||
(whimpering scumbag) (pea brain) (arsehole)
|
||||
(moron) (goof) (incompetant) (lunkhead) (Nazi)
|
||||
(SysThug) ((der-term) (der-term))))
|
||||
|
||||
(define (thing) (choose things))
|
||||
|
||||
(define things
|
||||
'(((adjective) (thing)) (computer)
|
||||
(Honeywell DPS8) (whale) (operation)
|
||||
(sexist joke) (ten-incher) (dog) (MicroVAX II)
|
||||
(source license) (real-time clock)
|
||||
(mental problem) (sexual fantasy)
|
||||
(venereal disease) (Jewish grandmother)
|
||||
(cardboard cut-out) (punk haircut) (surfboard)
|
||||
(system call) (wood-burning stove)
|
||||
(graphics editor) (right wing death squad)
|
||||
(disease) (vegetable) (religion)
|
||||
(cruise missile) (bug fix) (lawyer) (copyright)
|
||||
(PAD)))
|
||||
|
||||
(define (group-adj) (choose group-adjs))
|
||||
|
||||
(define group-adjs
|
||||
'((gay) (old) (lesbian) (young) (black)
|
||||
(Polish) ((adjective)) (white)
|
||||
(mentally retarded) (Nicaraguan) (homosexual)
|
||||
(dead) (underpriviledged) (religious)
|
||||
((thing) -loving) (feminist) (foreign)
|
||||
(intellectual) (crazy) (working) (unborn)
|
||||
(Chinese) (short) ((adjective)) (poor) (rich)
|
||||
(funny-looking) (Puerto Rican) (Mexican)
|
||||
(Italian) (communist) (fascist) (Iranian)
|
||||
(Moonie)))
|
||||
|
||||
(define (statement) (choose statements))
|
||||
|
||||
(define statements
|
||||
'((your (thing) is great) ((thing) s are fun)
|
||||
((person) is a (der-term))
|
||||
((group-adj) people are (adjective))
|
||||
(every (group-adj) person is a (der-term))
|
||||
(most (group-adj) people have (thing) s)
|
||||
(all (group-adj) dudes should get (thing) s)
|
||||
((person) is (group-adj)) (trees are (adjective))
|
||||
(if you've seen one (thing) \, you've seen them all)
|
||||
(you're (group-adj)) (you have a (thing))
|
||||
(my (thing) is pretty good)
|
||||
(the Martians are coming)
|
||||
(the (paper) is always right)
|
||||
(just because you read it in the (paper) that doesn't mean it's true)
|
||||
((person) was (group-adj))
|
||||
((person) \'s ghost is living in your (thing))
|
||||
(you look like a (thing))
|
||||
(the oceans are full of dirty fish)
|
||||
(people are dying every day)
|
||||
(a (group-adj) man ain't got nothing in the world these days)
|
||||
(women are inherently superior to men)
|
||||
(the system staff is fascist)
|
||||
(there is life after death)
|
||||
(the world is full of (der-term) s)
|
||||
(you remind me of (person)) (technology is evil)
|
||||
((person) killed (person))
|
||||
(the Russians are tapping your phone)
|
||||
(the Earth is flat)
|
||||
(it's OK to run down (group-adj) people)
|
||||
(Multics is a really (adjective) operating system)
|
||||
(the CIA killed (person))
|
||||
(the sexual revolution is over)
|
||||
(Lassie was (group-adj))
|
||||
(the (group-adj) s have really got it all together)
|
||||
(I was (person) in a previous life)
|
||||
(breathing causes cancer)
|
||||
(it's fun to be really (adjective))
|
||||
((quality) is pretty fun) (you're a (der-term))
|
||||
(the (group-adj) culture is fascinating)
|
||||
(when ya gotta go ya gotta go)
|
||||
((person) is (adjective))
|
||||
((person) \'s (quality) is (adjective))
|
||||
(it's a wonderful day)
|
||||
(everything is really a (thing))
|
||||
(there's a (thing) in (person) \'s brain)
|
||||
((person) is a cool dude)
|
||||
((person) is just a figment of your imagination)
|
||||
(the more (thing) s you have, the better)
|
||||
(life is a (thing)) (life is (quality))
|
||||
((person) is (adjective))
|
||||
((group-adj) people are all (adjective) (der-term) s)
|
||||
((statement) \, and (statement))
|
||||
((statement) \, but (statement))
|
||||
(I wish I had a (thing))
|
||||
(you should have a (thing))
|
||||
(you hope that (statement))
|
||||
((person) is secretly (group-adj))
|
||||
(you wish you were (group-adj))
|
||||
(you wish you were a (thing))
|
||||
(I wish I were a (thing))
|
||||
(you think that (statement))
|
||||
((statement) \, because (statement))
|
||||
((group-adj) people don't get married to (group-adj) people because (reason))
|
||||
((group-adj) people are all (adjective) because (reason))
|
||||
((group-adj) people are (adjective) \, and (reason))
|
||||
(you must be a (adjective) (der-term) to think that (person) said (statement))
|
||||
((group-adj) people are inherently superior to (group-adj) people)
|
||||
(God is Dead)))
|
||||
|
||||
(define (paper) (choose papers))
|
||||
|
||||
(define papers
|
||||
'((Daily Mail) (Daily Express)
|
||||
(Centre Bulletin) (Sun) (Daily Mirror)
|
||||
(Daily Telegraph) (Beano) (Multics Manual)))
|
||||
|
||||
(define (person) (choose persons))
|
||||
|
||||
(define persons
|
||||
'((Reagan) (Ken Thompson) (Dennis Ritchie)
|
||||
(JFK) (the Pope) (Gadaffi) (Napoleon)
|
||||
(Karl Marx) (Groucho) (Michael Jackson)
|
||||
(Caesar) (Nietzsche) (Heidegger)
|
||||
(Henry Kissinger) (Nixon) (Castro) (Thatcher)
|
||||
(Attilla the Hun) (Alaric the Visigoth) (Hitler)))
|
||||
|
||||
(define (reason) (choose reasons))
|
||||
|
||||
(define reasons
|
||||
'((they don't want their children to grow up to be too lazy to steal)
|
||||
(they can't tell them apart from (group-adj) dudes)
|
||||
(they're too (adjective))
|
||||
((person) wouldn't have done it)
|
||||
(they can't spray paint that small)
|
||||
(they don't have (thing) s) (they don't know how)
|
||||
(they can't afford (thing) s)))
|
||||
)
|
||||
|
||||
(flame 15)
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
;;; -*-Scheme-*-
|
||||
;;;
|
||||
;;; Towers of Hanoi
|
||||
|
||||
(define (hanoi n)
|
||||
(if (zero? n)
|
||||
(display "Huh?\n")
|
||||
(transfer 'A 'B 'C n)))
|
||||
|
||||
(define (print-move from to)
|
||||
(format #t "Move disk from ~s to ~s~%" from to))
|
||||
|
||||
(define (transfer from to via n)
|
||||
(if (= n 1)
|
||||
(print-move from to)
|
||||
(transfer from via to (1- n))
|
||||
(print-move from to)
|
||||
(transfer via to from (1- n))))
|
||||
|
||||
(hanoi 3)
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
;;; -*-Scheme-*-
|
||||
|
||||
(define (kons left right)
|
||||
(lambda (op)
|
||||
(case op
|
||||
(a left)
|
||||
(d right))))
|
||||
|
||||
(define (kar cell) (cell 'a))
|
||||
(define (kdr cell) (cell 'd))
|
||||
|
||||
(let ((k (kons 1 2)))
|
||||
(print (cons (kar k) (kdr k))))
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue