Changeset 11632 in project


Ignore:
Timestamp:
08/13/08 15:25:17 (13 years ago)
Author:
Ivan Raikov
Message:

Merged prerelease and trunk.

Location:
chicken/branches/prerelease
Files:
42 edited
3 copied

Legend:

Unmodified
Added
Removed
  • chicken/branches/prerelease/Makefile

    r10643 r11632  
    2525# POSSIBILITY OF SUCH DAMAGE.
    2626
     27STANDARD_TARGETS \
     28        = all clean distclean spotless install uninstall confclean check \
     29          fullcheck dist libs install-libs bootstrap
     30SRCDIR = .
    2731
    28 .PHONY: all clean distclean spotless install uninstall confclean check dist \
    29         libs install-libs fullcheck bootstrap
     32.PHONY: $(STANDARD_TARGETS)
    3033
    3134ifndef PLATFORM
    32 all clean spotless distclean install uninstall:
     35$(STANDARD_TARGETS):
    3336        @echo "no PLATFORM given."
    3437        @echo ""
     
    4952else
    5053all:
    51         $(MAKE) -f Makefile.$(PLATFORM) all
     54        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) all
    5255clean:
    53         $(MAKE) -f Makefile.$(PLATFORM) clean
     56        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) clean
    5457distclean:
    55         $(MAKE) -f Makefile.$(PLATFORM) distclean
     58        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) distclean
    5659spotless:
    57         $(MAKE) -f Makefile.$(PLATFORM) spotless
     60        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) spotless
    5861install:
    59         $(MAKE) -f Makefile.$(PLATFORM) install
     62        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) install
    6063uninstall:
    61         $(MAKE) -f Makefile.$(PLATFORM) uninstall
     64        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) uninstall
    6265confclean:
    63         $(MAKE) -f Makefile.$(PLATFORM) confclean
     66        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) confclean
    6467check:
    65         $(MAKE) -f Makefile.$(PLATFORM) check
     68        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) check
    6669fullcheck:
    67         $(MAKE) -f Makefile.$(PLATFORM) fullcheck
     70        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) fullcheck
    6871dist:
    69         $(MAKE) -f Makefile.$(PLATFORM) distfiles
     72        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) distfiles
    7073        csi -s scripts/makedist.scm
    7174libs:
    72         $(MAKE) -f Makefile.$(PLATFORM) libs
     75        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) libs
    7376install-libs:
    74         $(MAKE) -f Makefile.$(PLATFORM) install-libs
     77        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) install-libs
    7578bootstrap:
    76         $(MAKE) -f Makefile.$(PLATFORM) bootstrap
     79        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) bootstrap
    7780endif
  • chicken/branches/prerelease/Makefile.bsd

    r10641 r11632  
    2626
    2727
     28SRCDIR = .
     29VPATH  = $(SRCDIR)
     30
    2831# platform configuration
    2932
    30 ARCH = $(shell sh config-arch.sh)
     33ARCH = $(shell sh $(SRCDIR)/config-arch.sh)
    3134
    3235# options
     
    4851# select default and internal settings
    4952
    50 include defaults.make
     53include $(SRCDIR)/defaults.make
    5154
    5255chicken-config.h: chicken-defaults.h
     
    9093        cat chicken-defaults.h >>$@
    9194
    92 include rules.make
     95include $(SRCDIR)/rules.make
  • chicken/branches/prerelease/Makefile.cross-linux-mingw

    r9381 r11632  
    2525# POSSIBILITY OF SUCH DAMAGE.
    2626
     27
     28SRCDIR = .
     29VPATH  = $(SRCDIR)
    2730
    2831# platform configuration
     
    7376# select default and internal settings
    7477
    75 include defaults.make
     78include $(SRCDIR)/defaults.make
    7679
    7780# main target
     
    123126        cat chicken-defaults.h >>$@
    124127
    125 include rules.make
     128include $(SRCDIR)/rules.make
  • chicken/branches/prerelease/Makefile.cygwin

    r9381 r11632  
    2626
    2727
     28SRCDIR = .
     29VPATH  = $(SRCDIR)
     30
    2831# platform configuration
    2932
    3033ARCH = x86
    3134HACKED_APPLY=1
     35DLLSINPATH = 1
    3236
    3337# options
     
    6670
    6771LIBRARIES = -lm
    68 LIBCHICKEN_SO_LIBRARIES = -lm
    69 LIBUCHICKEN_SO_LIBRARIES = -lm
    7072LIBCHICKEN_IMPORT_LIBRARY = libchicken.dll.a
    7173LIBUCHICKEN_IMPORT_LIBRARY = libuchicken.dll.a
     
    8082
    8183CUSTOM_CHICKEN_DEFAULTS=1
    82 include defaults.make
     84include $(SRCDIR)/defaults.make
     85
     86LIBCHICKEN_SO_LIBRARIES = $(LIBRARIES)
     87LIBUCHICKEN_SO_LIBRARIES = $(LIBRARIES)
    8388
    8489chicken-config.h: chicken-defaults.h buildsvnrevision
     
    224229        echo "#endif" >>$@
    225230
    226 include rules.make
     231include $(SRCDIR)/rules.make
  • chicken/branches/prerelease/Makefile.linux

    r11043 r11632  
    2626
    2727
     28SRCDIR = .
     29VPATH  = $(SRCDIR)
     30
    2831# platform configuration
    2932
    30 ARCH = $(shell sh config-arch.sh)
     33ARCH = $(shell sh $(SRCDIR)/config-arch.sh)
    3134
    3235# options
     
    5356# select default and internal settings
    5457
    55 include defaults.make
     58include $(SRCDIR)/defaults.make
    5659
    5760chicken-config.h: chicken-defaults.h
     
    100103        cat chicken-defaults.h >>$@
    101104
    102 include rules.make
     105include $(SRCDIR)/rules.make
  • chicken/branches/prerelease/Makefile.macosx

    r10641 r11632  
    2626
    2727
     28SRCDIR = .
     29VPATH  = $(SRCDIR)
     30
    2831# platform configuration
    2932
    30 ARCH = $(shell sh config-arch.sh)
     33ARCH = $(shell sh $(SRCDIR)/config-arch.sh)
    3134
    3235# commands
     
    5760# select default and internal settings
    5861
    59 include defaults.make
     62include $(SRCDIR)/defaults.make
    6063
    6164chicken-config.h: chicken-defaults.h
     
    125128endif
    126129
    127 include rules.make
     130include $(SRCDIR)/rules.make
  • chicken/branches/prerelease/Makefile.mingw

    r9381 r11632  
    2525# POSSIBILITY OF SUCH DAMAGE.
    2626
     27
     28SRCDIR = .
     29VPATH  = $(SRCDIR)
    2730
    2831# platform configuration
     
    7275CUSTOM_CHICKEN_DEFAULTS=1
    7376
    74 include defaults.make
     77include $(SRCDIR)/defaults.make
    7578
    7679# main target
     
    207210        echo #endif >>$@
    208211
    209 include rules.make
     212include $(SRCDIR)/rules.make
  • chicken/branches/prerelease/Makefile.mingw-msys

    r9381 r11632  
    2525# POSSIBILITY OF SUCH DAMAGE.
    2626
     27
     28SRCDIR = .
     29VPATH  = $(SRCDIR)
    2730
    2831# platform configuration
     
    6871# select default and internal settings
    6972
    70 include defaults.make
     73include $(SRCDIR)/defaults.make
    7174
    7275# main target
     
    118121        cat chicken-defaults.h >>$@
    119122
    120 include rules.make
     123include $(SRCDIR)/rules.make
  • chicken/branches/prerelease/Makefile.solaris

    r10641 r11632  
    2626
    2727
     28SRCDIR = .
     29VPATH  = $(SRCDIR)
     30
    2831# platform configuration
    2932
    30 ARCH = $(shell sh config-arch.sh)
     33ARCH = $(shell sh $SRCDIR/config-arch.sh)
    3134
    3235# options
     
    4851# select default and internal settings
    4952
    50 include defaults.make
     53include $(SRCDIR)/defaults.make
    5154
    5255chicken-config.h: chicken-defaults.h
     
    9093        cat chicken-defaults.h >>$@
    9194
    92 include rules.make
     95include $(SRCDIR)/rules.make
  • chicken/branches/prerelease/NEWS

    r11044 r11632  
     1
     23.4.0
     3
     4- Bug fix for bitwise-or use [Joerg Wittenberger]
     5- Bug fix in thread-terminate! [thanks to Joerg Wittenberger]
     6- Cygwin build patched to put the runtime libraries in the right place.
     7  [thanks to Nathan Thern]
     8- added support for out-of-tree compilation (via the SRCDIR variable)
     9  [thanks to Ivan Shmakov]
     10- bug fix for (string->number "/")
     11- support for selective procedure profiling in the compiler
     12- unit utils: moved file- and pathname-related procedures to unit files
     13- new unit files
     14
    1153.3.0
    216
  • chicken/branches/prerelease/README

    r11043 r11632  
    33  (c)2000-2008 Felix L. Winkelmann
    44
    5   version 3.2.7
     5  version 3.3.8
    66
    77 1. Introduction:
     
    168168          know what you are doing.
    169169
     170        SRCDIR=
     171          Specifies that CHICKEN should be built outside of its source
     172          tree. The SRCDIR variable indicates the location of the
     173          CHICKEN source tree. The executables and object files will
     174          be generated in the current directory.
     175
     176
    170177        To remove CHICKEN from your file-system, enter (probably as
    171178        root):
  • chicken/branches/prerelease/batch-driver.scm

    r10643 r11632  
    3838  standard-bindings-that-never-return-false side-effect-free-standard-bindings-that-never-return-false
    3939  compiler-cleanup-hook check-global-exports disabled-warnings check-global-imports
    40   file-io-only undefine-shadowed-macros
     40  file-io-only undefine-shadowed-macros profiled-procedures
    4141  unit-name insert-timer-checks used-units inline-max-size
    4242  debugging perform-lambda-lifting! disable-stack-overflow-checking
     
    352352      (let ([acc (eq? 'accumulate-profile (car profile))])
    353353        (set! emit-profile #t)
     354        (set! profiled-procedures #f)
    354355        (set! initforms
    355356          (append
     
    360361               '() ) ) )
    361362        (when verbose
    362           (printf "Generating ~aprofile~%~!" (if acc "accumulated " "") emit-profile) ) ) )
     363          (printf "Generating ~aprofile~%~!" (if acc "accumulated " "")) ) ) )
    363364
    364365    (cond ((memq 'version options)
  • chicken/branches/prerelease/buildversion

    r11043 r11632  
    1 3.3.0
    2 
     13.4.0
  • chicken/branches/prerelease/chicken-setup.scm

    r11043 r11632  
    2828(declare
    2929  (run-time-macros)
    30   (uses srfi-1 regex utils posix ports tcp match srfi-18 srfi-13)
     30  (uses srfi-1 regex utils files posix ports tcp match srfi-18 srfi-13)
    3131  (export move-file run:execute make/proc uninstall-extension
    3232          install-extension install-program install-script setup-verbose-flag
     
    197197(define *gzip-program* 'gzip)
    198198(define *tar-program* 'tar)
     199
    199200(define *fetch-only* #f)
    200201(define *builddir-created* #f)
     
    10691070  (and (or *dont-ask*
    10701071           (yes-or-no?
    1071             (sprintf "The extension ~A does not exist.~%Do you want to download it ?" ext)
     1072            (sprintf "File ~A.egg or ~A.setup not found in the download directory. ~%Do you want to download .egg archive ?" ext ext)
    10721073            "yes") )
    10731074       (cond ((pathname-directory ext)
  • chicken/branches/prerelease/chicken.scm

    r10641 r11632  
    2727
    2828(declare
    29   (uses srfi-1 match srfi-4 utils support compiler optimizer driver platform backend)
     29  (uses srfi-1 match srfi-4 utils files support compiler optimizer driver platform backend)
    3030  (run-time-macros) )
    3131
  • chicken/branches/prerelease/compiler.scm

    r10643 r11632  
    6969; (import <symbol-or-string> ...)
    7070; (unused <symbol> ...)
     71; (profile <symbol> ...)
    7172;
    7273;   <type> = fixnum | generic
     
    253254  foreign-declarations emit-trace-info block-compilation line-number-database-size
    254255  always-bound-to-procedure block-globals make-block-variable-literal block-variable-literal? block-variable-literal-name
    255   target-heap-size target-stack-size valid-c-identifier?
     256  target-heap-size target-stack-size valid-c-identifier? profiled-procedures
    256257  target-initial-heap-size internal-bindings source-filename dump-nodes source-info->string
    257258  default-default-target-heap-size default-default-target-stack-size verbose-mode original-program-size
     
    367368(define undefine-shadowed-macros #t)
    368369(define constant-declarations '())
     370(define profiled-procedures #f)
    369371
    370372
     
    637639                                           (not (eq? dest (resolve dest ae)))) ; global?
    638640                                       l)
    639                                       ((and emit-profile (eq? 'lambda name))
     641                                      ((and (eq? 'lambda name)
     642                                            emit-profile
     643                                            (or (not profiled-procedures)
     644                                                (memq dest profiled-procedures)))
    640645                                       (expand-profile-lambda dest llist2 body) )
    641646                                      (else
     
    11811186          (for-each (cut ##sys#hash-table-set! import-table <> "<here>") syms)
    11821187          (for-each lookup-exports-file strs) ) )
     1188       ((profile)
     1189        (set! profiled-procedures
     1190          (append (cdr spec)
     1191                  (or profiled-procedures '()))))
    11831192       (else (compiler-warning 'syntax "illegal declaration specifier `~s'" spec)) )
    11841193     '(##core#undefined) ) ) )
  • chicken/branches/prerelease/csc.scm

    r11043 r11632  
    2828(declare
    2929  (block)
    30   (uses data-structures ports srfi-1 srfi-13 utils extras ))
     30  (uses data-structures ports srfi-1 srfi-13 utils files extras ))
    3131
    3232#>
  • chicken/branches/prerelease/debian/control

    r11043 r11632  
    44Priority: optional
    55Maintainer: Davide Puricelli (evo) <evo@debian.org>
    6 Build-Depends: debhelper (>> 4.0.0), libpcre3-dev
     6Build-Depends: debhelper (>> 4.0.0), libpcre3-dev, texinfo
    77Standards-Version: 3.7.3
    88
  • chicken/branches/prerelease/defaults.make

    r11043 r11632  
    4040# directories
    4141
     42SRCDIR = .
     43VPATH  = $(SRCDIR)
     44
    4245DESTDIR =
    4346ifeq ($(PLATFORM),mingw-msys)
     
    152155PCRE_OBJECTS_1 =
    153156else
     157PCRE_DIR ?= $(VPATH)/pcre
    154158C_COMPILER_PCRE_OPTIONS = -DPCRE_STATIC
    155 PCRE_INCLUDES = $(INCLUDES) -Ipcre
     159PCRE_INCLUDES = $(INCLUDES) -I$(PCRE_DIR)
    156160endif
    157161ifndef NOPTABLES
    158162C_COMPILER_PTABLES_OPTIONS ?= -DC_ENABLE_PTABLES
    159163endif
    160 INCLUDES ?= -I.
     164INCLUDES ?= -I. -I$(SRCDIR)
    161165C_COMPILER_COMPILE_OPTION ?= -c
    162166C_COMPILER_OUTPUT_OPTION ?= -o
     
    269273# Scheme compiler flags
    270274
    271 CHICKEN_OPTIONS = -quiet -no-trace -optimize-level 2 -include-path .
     275CHICKEN_OPTIONS = \
     276        -quiet -no-trace -optimize-level 2 \
     277        -include-path . -include-path $(SRCDIR)
    272278CHICKEN_LIBRARY_OPTIONS = $(CHICKEN_OPTIONS) -explicit-use
    273279CHICKEN_PROGRAM_OPTIONS = $(CHICKEN_OPTIONS) -no-lambda-info
     
    278284CHICKEN_PCRE_LIBRARY_OPTIONS =
    279285else
    280 CHICKEN_PCRE_LIBRARY_OPTIONS = -include-path pcre
     286CHICKEN_PCRE_LIBRARY_OPTIONS = -include-path $(SRCDIR)/pcre
    281287endif
    282288
     
    324330
    325331buildsvnrevision:
    326         sh svnrevision.sh
     332        sh $(SRCDIR)/svnrevision.sh
     333ifeq ($(USE_HOST_PCRE),)
     334        $(MAKEDIR_COMMAND) $(MAKEDIR_COMMAND_OPTIONS) pcre
     335endif
    327336
    328337# generic part of chicken-config.h
  • chicken/branches/prerelease/distribution/manifest

    r10911 r11632  
    5959ports.c
    6060ports.exports
     61files.c
     62files.exports
    6163extras.c
    6264extras.exports
     
    9597udata-structures.c
    9698uports.c
     99ufiles.c
    97100ulibrary.c
    98101ulolevel.c
     
    139142data-structures.scm
    140143ports.scm
     144files.scm
    141145chicken-bug.1
    142146chicken-bug.scm
     
    171175html/unit-data-structures.html
    172176html/unit-ports.html
     177html/unit-files.html
    173178html/unit-eval.html
    174179html/unit-extras.html
  • chicken/branches/prerelease/manual/Acknowledgements

    r11048 r11632  
    33== Acknowledgements
    44
    5 Many thanks to Nico Amtsberg, William Annis, Marc Baily, Peter
    6 Barabas, Jonah Beckford, Arto Bendiken, Peter Bex, Jean-Francois
    7 Bignolles, Alaric Blagrave-Snellpym, Dave Bodenstab, Fabian Boehlke,
    8 T. Kurt Bond, Ashley Bone, Dominique Boucher, Terence Brannon, Roy
    9 Bryant, Adam Buchbinder, Hans Bulfone, Category 5, Taylor Campbell,
    10 Naruto Canada, Esteban U. Caamano Castro, Franklin Chen, Thomas Chust,
    11 Gian Paolo Ciceri, John Cowan, Grzegorz Chrupa&#322;a, James Crippen,
    12 Tollef Fog Heen, Alejandro Forero Cuervo, Linh Dang, Brian Denheyer,
    13 dgym, Don, Chris Double, Jarod Eells, Petter Egesund, Steve Elkins,
    14 Daniel B. Faken, Will Farr, Graham Fawcett, Marc Feeley, Fizzie,
    15 Kimura Fuyuki, Tony Garnock-Jones, Martin Gasbichler, Joey Gibson,
    16 Stephen C. Gilardi, Joshua Griffith, Johannes Groedem, Damian Gryski,
    17 Mario Domenech Goulart, Andreas Gustafsson, Sven Hartrumpf, Jun-ichiro
    18 itojun Hagino, Ahdi Hargo, Matthias Heiler, Karl M. Hegbloom, William
    19 P. Heinemann, Bill Hoffman, Bruce Hoult, Hans Huebner, Markus
    20 Huelsmann, Goetz Isenmann, Paulo Jabardo, David Janssens, Christian
    21 Jaeger, Dale Jordan, Valentin Kamyshenko, Daishi Kato, Peter Keller,
    22 Brad Kind, Ron Kneusel, Matthias Koeppe, Krysztof Kowa&#322;czyk,
    23 Andre Kuehne, Todd R. Kueny Sr, Goran Krampe, David Krentzlin, Ben
    24 Kurtz, Micky Latowicki, John Lenz, Kirill Lisovsky, Juergen
    25 Lorenz, Kon Lovett, Dennis Marti, Charles Martin, Bob McIsaac, Alain
    26 Mellan, Eric Merrit, Perry Metzger, Scott G. Miller, Mikael, Bruce
    27 Mitchener, Chris Moline, Eric E. Moore, Julian Morrison, Dan Muresan,
    28 Lars Nilsson, Ian Oversby, o.t., Gene Pavlovsky, Levi Pearson, Nicolas
    29 Pelletier, Carlos Pita, Robin Lee Powell, Pupeno, Davide Puricelli,
    30 Doug Quale, Eric Raible, Ivan Raikov, Joel Reymont, Eric Rochester,
    31 Andreas Rottman, David Rush, Lars Rustemeier, Daniel Sadilek, Oskar
    32 Schirmer, Burton Samograd, Reed Sheridan, Ronald Schroeder, Spencer
    33 Schumann, Alex Shinn, Ivan Shmakov, Shmul, Tony Sidaway, Jeffrey
    34 B. Siegal, Andrey Sidorenko, Michele Simionato, Volker Stolz, Jon
    35 Strait, Dorai Sitaram, Robert Skeels, Jason Songhurst, Clifford Stein,
    36 Sunnan, Zbigniew Szadkowski, Rick Taube, Mike Thomas, Minh Thu,
    37 Christian Tismer, Andre van Tonder, John Tobey, Henrik Tramberend,
    38 Vladimir Tsichevsky, Neil van Dyke, Sander Vesik, Jaques Vidrine,
    39 Panagiotis Vossos, Shawn Wagner, Peter Wang, Ed Watkeys, Brad Watson,
    40 Thomas Weidner, Goeran Weinholt, Matthew Welland, Joerg Wittenberger,
    41 Peter Wright, Mark Wutka, Richard Zidlicky and Houman Zolfaghari for
    42 bug-fixes, tips and suggestions.
     5Many thanks to Nico Amtsberg, Alonso Andres, William Annis, Marc
     6Baily, Peter Barabas, Jonah Beckford, Arto Bendiken, Peter Bex,
     7Jean-Francois Bignolles, Alaric Blagrave-Snellpym, Dave Bodenstab,
     8Fabian Boehlke, T. Kurt Bond, Ashley Bone, Dominique Boucher, Terence
     9Brannon, Roy Bryant, Adam Buchbinder, Hans Bulfone, Category 5, Taylor
     10Campbell, Naruto Canada, Esteban U. Caamano Castro, Franklin Chen,
     11Thomas Chust, Gian Paolo Ciceri, John Cowan, Grzegorz Chrupa&#322;a,
     12James Crippen, Tollef Fog Heen, Alejandro Forero Cuervo, Linh Dang,
     13Brian Denheyer, dgym, Don, Chris Double, Jarod Eells, Petter Egesund,
     14Steve Elkins, Daniel B. Faken, Will Farr, Graham Fawcett, Marc Feeley,
     15Fizzie, Kimura Fuyuki, Tony Garnock-Jones, Martin Gasbichler, Joey
     16Gibson, Stephen C. Gilardi, Joshua Griffith, Johannes Groedem, Damian
     17Gryski, Mario Domenech Goulart, Andreas Gustafsson, Sven Hartrumpf,
     18Jun-ichiro itojun Hagino, Ahdi Hargo, Matthias Heiler, Karl
     19M. Hegbloom, William P. Heinemann, Bill Hoffman, Bruce Hoult, Hans
     20Huebner, Markus Huelsmann, Goetz Isenmann, Paulo Jabardo, David
     21Janssens, Christian Jaeger, Dale Jordan, Valentin Kamyshenko, Daishi
     22Kato, Peter Keller, Brad Kind, Ron Kneusel, Matthias Koeppe, Krysztof
     23Kowa&#322;czyk, Andre Kuehne, Todd R. Kueny Sr, Goran Krampe, David
     24Krentzlin, Ben Kurtz, Micky Latowicki, John Lenz, Kirill Lisovsky,
     25Juergen Lorenz, Kon Lovett, Dennis Marti, Charles Martin, Bob McIsaac,
     26Alain Mellan, Eric Merrit, Perry Metzger, Scott G. Miller, Mikael,
     27Bruce Mitchener, Chris Moline, Eric E. Moore, Julian Morrison, Dan
     28Muresan, Lars Nilsson, Ian Oversby, o.t., Gene Pavlovsky, Levi
     29Pearson, Nicolas Pelletier, Carlos Pita, Robin Lee Powell, Pupeno,
     30Davide Puricelli, Doug Quale, Eric Raible, Ivan Raikov, Joel Reymont,
     31Eric Rochester, Andreas Rottman, David Rush, Lars Rustemeier, Daniel
     32Sadilek, Oskar Schirmer, Burton Samograd, Reed Sheridan, Ronald
     33Schroeder, Spencer Schumann, Alex Shinn, Ivan Shmakov, Shmul, Tony
     34Sidaway, Jeffrey B. Siegal, Andrey Sidorenko, Michele Simionato,
     35Volker Stolz, Jon Strait, Dorai Sitaram, Robert Skeels, Jason
     36Songhurst, Clifford Stein, Sunnan, Zbigniew Szadkowski, Rick Taube,
     37Nathan Thern, Mike Thomas, Minh Thu, Christian Tismer, Andre van
     38Tonder, John Tobey, Henrik Tramberend, Vladimir Tsichevsky, Neil van
     39Dyke, Sander Vesik, Jaques Vidrine, Panagiotis Vossos, Shawn Wagner,
     40Peter Wang, Ed Watkeys, Brad Watson, Thomas Weidner, Goeran Weinholt,
     41Matthew Welland, Joerg Wittenberger, Peter Wright, Mark Wutka, Richard
     42Zidlicky and Houman Zolfaghari for bug-fixes, tips and suggestions.
    4343
    4444CHICKEN uses the PCRE regular expression package ([[http://www.pcre.org]]),
  • chicken/branches/prerelease/manual/Declarations

    r7167 r11632  
    214214
    215215
     216=== profile
     217
     218 [declaration specifier] (profile IDENTIFIER ...)
     219
     220Enable profiling exclusively for given identifiers. Normally the compiler
     221enables profiling decorations for all globally defined procedures. With
     222this declaration, profiling can be enabled for selected procedures.
     223
     224
    216225=== number-type
    217226=== fixnum-arithmetic
  • chicken/branches/prerelease/manual/Locations

    r11048 r11632  
    7171</enscript>
    7272
    73 See [[http://chicken.wiki.br/location-and-c-string-star|location and
    74 c-string*]] for a tip on returning a {{c-string*}} type.
     73See [[http://chicken.wiki.br/location-and-c-string-star|location and c-string*]]
     74for a tip on returning a {{c-string*}} type.
    7575
    7676{{location}} returns a value of type {{c-pointer}}, when given
  • chicken/branches/prerelease/manual/Supported language

    r10911 r11632  
    1515* [[Unit data-structures]] data structures
    1616* [[Unit ports]] I/O ports
     17* [[Unit files]] File and pathname operations
    1718* [[Unit extras]] useful utility definitions
    1819* [[Unit srfi-1]] list library
  • chicken/branches/prerelease/manual/The User's Manual

    r11043 r11632  
    33== The User's Manual
    44
    5 This is the user's manual for the Chicken Scheme compiler, version 3.3.0.
     5This is the user's manual for the Chicken Scheme compiler, version 3.4.0.
    66
    77; [[Getting started]] : What is CHICKEN and how do I use it?
     
    2828
    2929; [[Bibliography]] : Links to documents that may be of interest.
    30 
  • chicken/branches/prerelease/manual/Unit extras

    r10911 r11632  
    183183
    184184
    185 Previous: [[Unit ports]]
     185Previous: [[Unit files]]
    186186
    187187Next: [[Unit srfi-1]]
  • chicken/branches/prerelease/manual/Unit library

    r10641 r11632  
    782782This procedure returns {{X}}.
    783783
     784Finalizers are invoked asynchronously, in the thread that happens
     785to be currently running.
     786
    784787
    785788==== set-gc-report!
  • chicken/branches/prerelease/manual/Unit ports

    r10911 r11632  
    143143Previous: [[Unit data-structures]]
    144144
    145 Next: [[Unit extras]]
     145Next: [[Unit files]]
  • chicken/branches/prerelease/manual/Unit utils

    r10911 r11632  
    55== Unit utils
    66
    7 This unit contains file/pathname oriented procedures, apropos, plus acts as a "grab bag" for procedures without a good home,
    8 and which don't have to be available by default (as compared to the [[Unit extras|extras]] unit).
     7This unit contains apropos and functions as a "grab bag" of procedures
     8without a good home, and which don't have to be available by default
     9(as compared to the [[Unit extras|extras]] unit).
    910
    1011This unit uses the {{extras}} and {{regex}} units.
     
    2829
    2930Like {{apropos}} but returns a list of matching symbols.
    30 
    31 
    32 === Pathname operations
    33 
    34 ==== absolute-pathname?
    35 
    36  [procedure] (absolute-pathname? PATHNAME)
    37 
    38 Returns {{#t}} if the string {{PATHNAME}} names an absolute
    39 pathname, and returns {{#f}} otherwise.
    40 
    41 ==== decompose-pathname
    42 
    43  [procedure] (decompose-pathname PATHNAME)
    44 
    45 Returns three values: the directory-, filename- and extension-components
    46 of the file named by the string {{PATHNAME}}.
    47 For any component that is not contained in {{PATHNAME}}, {{#f}} is returned.
    48 
    49 ==== make-pathname
    50 ==== make-absolute-pathname
    51 
    52  [procedure] (make-pathname DIRECTORY FILENAME [EXTENSION [SEPARATOR]])
    53  [procedure] (make-absolute-pathname DIRECTORY FILENAME [EXTENSION [SEPARATOR]])
    54 
    55 Returns a string that names the file with the
    56 components {{DIRECTORY, FILENAME}} and (optionally)
    57 {{EXTENSION}} with {{SEPARATOR}} being the directory separation indicator
    58 (usually {{/}} on UNIX systems and {{\}} on Windows, defaulting to whatever
    59 platform this is running on).
    60 {{DIRECTORY}} can be {{#f}} (meaning no
    61 directory component), a string or a list of strings. {{FILENAME}}
    62 and {{EXTENSION}} should be strings or {{#f}}.
    63 {{make-absolute-pathname}} returns always an absolute pathname.
    64 
    65 ==== pathname-directory
    66 
    67  [procedure] (pathname-directory PATHNAME)
    68 
    69 ==== pathname-file
    70 
    71  [procedure] (pathname-file PATHNAME)
    72 
    73 ==== pathname-extension
    74 
    75  [procedure] (pathname-extension PATHNAME)
    76 
    77 Accessors for the components of {{PATHNAME}}. If the pathname does
    78 not contain the accessed component, then {{#f}} is returned.
    79 
    80 ==== pathname-replace-directory
    81 
    82  [procedure] (pathname-replace-directory PATHNAME DIRECTORY)
    83 
    84 ==== pathname-replace-file
    85 
    86  [procedure] (pathname-replace-file PATHNAME FILENAME)
    87 
    88 ==== pathname-replace-extension
    89 
    90  [procedure] (pathname-replace-extension PATHNAME EXTENSION)
    91 
    92 Return a new pathname with the specified component of {{PATHNAME}}
    93 replaced by a new value.
    94 
    95 ==== pathname-strip-directory
    96 
    97  [procedure] (pathname-strip-directory PATHNAME)
    98 
    99 ==== pathname-strip-extension
    100 
    101  [procedure] (pathname-strip-extension PATHNAME)
    102 
    103 Return a new pathname with the specified component of {{PATHNAME}}
    104 stripped.
    105 
    106 ==== directory-null?
    107 
    108  [procedure] (directory-null? DIRECTORY)
    109 
    110 Does the {{DIRECTORY}} consist only of path separators and the period?
    111 
    112 {{DIRECTORY}} may be a string or a list of strings.
    113 
    114 
    115 === Temporary files
    116 
    117 ==== create-temporary-file
    118 
    119  [procedure] (create-temporary-file [EXTENSION])
    120 
    121 Creates an empty temporary file and returns its pathname. If
    122 {{EXTENSION}} is not given, then {{.tmp}} is used. If the
    123 environment variable {{TMPDIR, TEMP}} or {{TMP}} is set,
    124 then the pathname names a file in that directory.
    125 
    126 
    127 === Deleting a file without signalling an error
    128 
    129 ==== delete-file*
    130 
    131  [procedure] (delete-file* FILENAME)
    132 
    133 If the file {{FILENAME}} exists, it is deleted and {{#t}}
    134 is returned.  If the file does not exist, nothing happens and {{#f}}
    135 is returned.
    136 
    137 
    138 === File move/copy
    139 
    140 ==== file-copy
    141 
    142  [procedure] (file-copy ORIGFILE NEWFILE #!optional CLOBBER BLOCKSIZE)
    143 
    144 Copies {{ORIGFILE}} (a string denoting some filename) to {{NEWFILE}},
    145 {{BLOCKSIZE}} bytes at a time.  {{BLOCKSIZE}} defaults to 1024, and must be
    146 a positive integer.  Returns the number of bytes copied on success, or errors
    147 on failure.  {{CLOBBER}} determines the behaviour of {{file-copy}} when
    148 {{NEWFILE}} is already extant.  When set to {{#f}} (default), an error is
    149 signalled.  When set to any other value, {{NEWFILE}} is overwritten.
    150 {{file-copy}} will work across filesystems and devices and is not
    151 platform-dependent.
    152 
    153 ==== file-move
    154 
    155  [procedure] (file-move ORIGFILE NEWFILE #!optional CLOBBER BLOCKSIZE)
    156 
    157 Moves {{ORIGFILE}} (a string denoting some filename) to {{NEWFILE}}, with
    158 the same semantics as {{file-copy}}, above.  {{file-move}} is safe across
    159 filesystems and devices (unlike {{file-rename}}).  It is possible for an
    160 error to be signalled despite partial success if {{NEWFILE}} could be created
    161 and fully written but removing {{ORIGFILE}} fails.
    16231
    16332
  • chicken/branches/prerelease/posixunix.scm

    r10641 r11632  
    2828(declare
    2929  (unit posix)
    30   (uses scheduler regex extras utils)
     30  (uses scheduler regex extras utils files)
    3131  (disable-interrupts)
    3232  (usual-integrations)
  • chicken/branches/prerelease/posixwin.scm

    r10641 r11632  
    6666(declare
    6767  (unit posix)
    68   (uses scheduler regex extras utils)
     68  (uses scheduler regex extras utils files)
    6969  (disable-interrupts)
    7070  (usual-integrations)
  • chicken/branches/prerelease/regex.scm

    r11043 r11632  
    653653                (%regexp-options-set! rgxp
    654654                                      (bitwise-ior (%regexp-options regexp)
    655                                                   (pcre-option->number 'anchored)))
     655                                                   (pcre-option->number 'anchored)))
    656656                rgxp] ) ) ) ) )
  • chicken/branches/prerelease/rules.make

    r11043 r11632  
    2929
    3030LIBCHICKEN_OBJECTS_1 = \
    31        library eval data-structures ports extras lolevel utils tcp srfi-1 srfi-4 srfi-13 \
     31       library eval data-structures ports files extras lolevel utils tcp srfi-1 srfi-4 srfi-13 \
    3232       srfi-14 srfi-18 srfi-69 $(POSIXFILE) regex scheduler \
    3333       profiler stub match runtime
     
    3636
    3737LIBUCHICKEN_OBJECTS_1 = \
    38        ulibrary ueval udata-structures uports uextras ulolevel uutils utcp usrfi-1 usrfi-4 \
     38       ulibrary ueval udata-structures uports ufiles uextras ulolevel uutils utcp usrfi-1 usrfi-4 \
    3939       usrfi-13 usrfi-14 usrfi-18 usrfi-69 u$(POSIXFILE) uregex scheduler \
    4040       profiler stub match uruntime
     
    4343
    4444LIBCHICKENGUI_OBJECTS_1 = \
    45        library eval data-structures ports extras lolevel utils tcp srfi-1 srfi-4 srfi-13 \
     45       library eval data-structures ports files extras lolevel utils tcp srfi-1 srfi-4 srfi-13 \
    4646       srfi-14 srfi-18 srfi-69 $(POSIXFILE) regex scheduler \
    4747       profiler stub match gui-runtime
     
    104104          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
    105105          $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
     106files$(O): files.c chicken.h $(CHICKEN_CONFIG_H)
     107        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
     108          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
     109          $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
    106110extras$(O): extras.c chicken.h $(CHICKEN_CONFIG_H)
    107111        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
     
    132136          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
    133137          $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
    134 regex$(O): regex.c chicken.h $(CHICKEN_CONFIG_H) pcre/pcre.h
     138regex$(O): regex.c chicken.h $(CHICKEN_CONFIG_H)
    135139        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(PCRE_INCLUDES) \
    136140          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
     
    193197          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
    194198          $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
     199ufiles$(O): ufiles.c chicken.h $(CHICKEN_CONFIG_H)
     200        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
     201          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
     202          $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
    195203uextras$(O): uextras.c chicken.h $(CHICKEN_CONFIG_H)
    196204        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
     
    213221          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
    214222          $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
    215 uregex$(O): uregex.c chicken.h $(CHICKEN_CONFIG_H) pcre/pcre.h
     223uregex$(O): uregex.c chicken.h $(CHICKEN_CONFIG_H)
    216224        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(PCRE_INCLUDES) \
    217225          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
     
    271279          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
    272280          $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
     281files-static$(O): files.c chicken.h $(CHICKEN_CONFIG_H)
     282        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
     283          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
     284          $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
    273285extras-static$(O): extras.c chicken.h $(CHICKEN_CONFIG_H)
    274286        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
     
    299311          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
    300312          $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
    301 regex-static$(O): regex.c chicken.h $(CHICKEN_CONFIG_H) pcre/pcre.h
     313regex-static$(O): regex.c chicken.h $(CHICKEN_CONFIG_H)
    302314        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(PCRE_INCLUDES) \
    303315          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
     
    360372          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
    361373          $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
     374ufiles-static$(O): ufiles.c chicken.h $(CHICKEN_CONFIG_H)
     375        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
     376          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
     377          $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
    362378uextras-static$(O): uextras.c chicken.h $(CHICKEN_CONFIG_H)
    363379        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
     
    380396          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
    381397          $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
    382 uregex-static$(O): uregex.c chicken.h $(CHICKEN_CONFIG_H) pcre/pcre.h
     398uregex-static$(O): uregex.c chicken.h $(CHICKEN_CONFIG_H)
    383399        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
    384400          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(PCRE_INCLUDES) \
     
    474490# pcre objects
    475491
    476 pcre/pcre_compile$(O): pcre/pcre_compile.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    477         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    478           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    479           $(C_COMPILER_PCRE_OPTIONS)
    480 pcre/pcre_config$(O): pcre/pcre_config.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    481         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    482           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    483           $(C_COMPILER_PCRE_OPTIONS)
    484 pcre/pcre_dfa_exec$(O): pcre/pcre_dfa_exec.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    485         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    486           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    487           $(C_COMPILER_PCRE_OPTIONS)
    488 pcre/pcre_exec$(O): pcre/pcre_exec.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    489         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    490           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    491           $(C_COMPILER_PCRE_OPTIONS)
    492 pcre/pcre_fullinfo$(O): pcre/pcre_fullinfo.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    493         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    494           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    495           $(C_COMPILER_PCRE_OPTIONS)
    496 pcre/pcre_get$(O): pcre/pcre_get.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    497         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    498           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    499           $(C_COMPILER_PCRE_OPTIONS)
    500 pcre/pcre_globals$(O): pcre/pcre_globals.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    501         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    502           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    503           $(C_COMPILER_PCRE_OPTIONS)
    504 pcre/pcre_info$(O): pcre/pcre_info.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    505         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    506           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    507           $(C_COMPILER_PCRE_OPTIONS)
    508 pcre/pcre_maketables$(O): pcre/pcre_maketables.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    509         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    510           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    511           $(C_COMPILER_PCRE_OPTIONS)
    512 pcre/pcre_newline$(O): pcre/pcre_newline.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
     492$(PCRE_DIR)/pcre_compile$(O): $(PCRE_DIR)/pcre_compile.c $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
     493        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     494          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     495          $(C_COMPILER_PCRE_OPTIONS)
     496$(PCRE_DIR)/pcre_config$(O): $(PCRE_DIR)/pcre_config.c $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
     497        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     498          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     499          $(C_COMPILER_PCRE_OPTIONS)
     500$(PCRE_DIR)/pcre_dfa_exec$(O): $(PCRE_DIR)/pcre_dfa_exec.c $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
     501        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     502          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     503          $(C_COMPILER_PCRE_OPTIONS)
     504$(PCRE_DIR)/pcre_exec$(O): $(PCRE_DIR)/pcre_exec.c $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
     505        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     506          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     507          $(C_COMPILER_PCRE_OPTIONS)
     508$(PCRE_DIR)/pcre_fullinfo$(O): $(PCRE_DIR)/pcre_fullinfo.c $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
     509        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     510          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     511          $(C_COMPILER_PCRE_OPTIONS)
     512$(PCRE_DIR)/pcre_get$(O): $(PCRE_DIR)/pcre_get.c $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
     513        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     514          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     515          $(C_COMPILER_PCRE_OPTIONS)
     516$(PCRE_DIR)/pcre_globals$(O): $(PCRE_DIR)/pcre_globals.c $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
     517        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     518          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     519          $(C_COMPILER_PCRE_OPTIONS)
     520$(PCRE_DIR)/pcre_info$(O): $(PCRE_DIR)/pcre_info.c $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
     521        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     522          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     523          $(C_COMPILER_PCRE_OPTIONS)
     524$(PCRE_DIR)/pcre_maketables$(O): $(PCRE_DIR)/pcre_maketables.c $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
     525        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     526          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     527          $(C_COMPILER_PCRE_OPTIONS)
     528$(PCRE_DIR)/pcre_newline$(O): $(PCRE_DIR)/pcre_newline.c $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
    513529        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    514530          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     
    792808          $(ILIBDIR)/libuchicken$(A)
    793809endif
    794         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) chicken.h $(DESTDIR)$(IINCDIR)
     810        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken.h $(DESTDIR)$(IINCDIR)
    795811        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(CHICKEN_CONFIG_H) $(DESTDIR)$(IINCDIR)
    796812ifndef STATICBUILD
     
    830846          $(CSI_PROGRAM)$(EXE) $(CSC_PROGRAM)$(EXE) $(CHICKEN_PROFILE_PROGRAM)$(EXE) \
    831847          $(CHICKEN_SETUP_PROGRAM)$(EXE)
    832         $(MAKE) NEEDS_RELINKING=no RUNTIME_LINKER_PATH=$(LIBDIR) install
     848        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) NEEDS_RELINKING=no RUNTIME_LINKER_PATH=$(LIBDIR) install
    833849        $(MAKE_WRITABLE_COMMAND) $(CHICKEN_PROGRAM)$(EXE) $(CSI_PROGRAM)$(EXE) \
    834850          $(CSC_PROGRAM)$(EXE) $(CHICKEN_PROFILE_PROGRAM)$(EXE)
     
    865881endif
    866882endif
    867         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) chicken.1 $(DESTDIR)$(IMANDIR)
    868         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) csi.1 $(DESTDIR)$(IMANDIR)
    869         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) csc.1 $(DESTDIR)$(IMANDIR)
    870         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) chicken-setup.1 $(DESTDIR)$(IMANDIR)
    871         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) chicken-profile.1 $(DESTDIR)$(IMANDIR)
    872         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) chicken-bug.1 $(DESTDIR)$(IMANDIR)
     883        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken.1 $(DESTDIR)$(IMANDIR)
     884        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/csi.1 $(DESTDIR)$(IMANDIR)
     885        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/csc.1 $(DESTDIR)$(IMANDIR)
     886        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken-setup.1 $(DESTDIR)$(IMANDIR)
     887        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken-profile.1 $(DESTDIR)$(IMANDIR)
     888        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken-bug.1 $(DESTDIR)$(IMANDIR)
    873889        $(MAKEDIR_COMMAND) $(MAKEDIR_COMMAND_OPTIONS) $(DESTDIR)$(IDOCDIR)/html
    874         -$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) html/* $(DESTDIR)$(IDOCDIR)/html
    875         -$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) chicken.pdf $(DESTDIR)$(IDOCDIR)
    876         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) README $(DESTDIR)$(IDOCDIR)
    877         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) LICENSE $(DESTDIR)$(IDOCDIR)
    878         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) chicken-more-macros.scm $(DESTDIR)$(IDATADIR)
    879         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) chicken-ffi-macros.scm $(DESTDIR)$(IDATADIR)
    880         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) chicken-sys-macros.scm $(DESTDIR)$(IDATADIR)
     890        -$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/html/* $(DESTDIR)$(IDOCDIR)/html
     891        -$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken.pdf $(DESTDIR)$(IDOCDIR)
     892        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/README $(DESTDIR)$(IDOCDIR)
     893        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/LICENSE $(DESTDIR)$(IDOCDIR)
     894        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken-more-macros.scm $(DESTDIR)$(IDATADIR)
     895        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken-ffi-macros.scm $(DESTDIR)$(IDATADIR)
     896        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken-sys-macros.scm $(DESTDIR)$(IDATADIR)
    881897        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) *.exports $(DESTDIR)$(IDATADIR)
    882898        -$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) chicken.info $(DESTDIR)$(IINFODIR)
    883899        $(INSTALLINFO_PROGRAM) $(INSTALLINFO_PROGRAM_OPTIONS) --infodir=$(DESTDIR)$(IINFODIR) chicken.info
    884900ifdef WINDOWS
    885         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) csibatch.bat $(DESTDIR)$(IBINDIR)
     901        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) $(SRCDIR)/csibatch.bat $(DESTDIR)$(IBINDIR)
    886902endif
    887903endif
     
    926942ports.c: ports.scm private-namespace.scm
    927943        $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ -extend private-namespace.scm
     944files.c: files.scm private-namespace.scm
     945        $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ -extend private-namespace.scm
    928946extras.c: extras.scm private-namespace.scm
    929947        $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ -extend private-namespace.scm
     
    968986        $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ -extend private-namespace.scm
    969987uports.c: ports.scm private-namespace.scm
     988        $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ -extend private-namespace.scm
     989ufiles.c: files.scm private-namespace.scm
    970990        $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ -extend private-namespace.scm
    971991uextras.c: extras.scm private-namespace.scm
     
    10261046.PHONY: distfiles
    10271047
    1028 distfiles: buildsvnrevision library.c eval.c data-structures.c ports.c extras.c lolevel.c utils.c \
     1048distfiles: buildsvnrevision library.c eval.c data-structures.c ports.c files.c extras.c lolevel.c utils.c \
    10291049        tcp.c srfi-1.c srfi-4.c srfi-13.c srfi-14.c srfi-18.c srfi-69.c \
    10301050        posixunix.c posixwin.c regex.c scheduler.c profiler.c stub.c match.c \
    1031         ulibrary.c ueval.c udata-structures.c uports.c uextras.c ulolevel.c \
     1051        ulibrary.c ueval.c udata-structures.c uports.c ufiles.c uextras.c ulolevel.c \
    10321052        uutils.c utcp.c usrfi-1.c usrfi-4.c usrfi-13.c usrfi-14.c \
    10331053        usrfi-18.c usrfi-69.c uposixunix.c uposixwin.c uregex.c \
     
    10531073          csc-static$(EXE) chicken-static$(EXE) chicken-bug$(EXE) chicken.info *$(O) \
    10541074          $(LIBCHICKEN_SO_FILE) $(LIBUCHICKEN_SO_FILE) $(LIBCHICKENGUI_SO_FILE) \
    1055           libchicken$(A) libuchicken$(A) libchickengui$(A) $(PROGRAM_IMPORT_LIBRARIES) \
    1056           $(LIBCHICKEN_IMPORT_LIBRARY) $(LIBUCHICKEN_IMPORT_LIBRARY) $(LIBCHICKENGUI_IMPORT_LIBRARY) \
    1057           $(MSVC_CHICKEN_EXPORT_FILES) chicken.info $(CLEAN_PCRE) $(CLEAN_MINGW_LIBS) \
    1058           $(CLEAN_MANIFESTS)
     1075          libchicken$(A) libuchicken$(A) libchickengui$(A) libchicken$(SO) libuchicken$(SO) \
     1076          $(PROGRAM_IMPORT_LIBRARIES) $(LIBCHICKEN_IMPORT_LIBRARY) $(LIBUCHICKEN_IMPORT_LIBRARY) \
     1077          $(LIBCHICKENGUI_IMPORT_LIBRARY)  $(MSVC_CHICKEN_EXPORT_FILES) \
     1078          chicken.info $(CLEAN_PCRE) $(CLEAN_MINGW_LIBS) $(CLEAN_MANIFESTS)
    10591079confclean:
    10601080        -$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) chicken-config.h chicken-defaults.h buildsvnrevision
    10611081
    10621082spotless: distclean
    1063         -$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) library.c eval.c data-structures.c ports.c \
     1083        -$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) library.c eval.c data-structures.c ports.c files.c \
    10641084          extras.c lolevel.c utils.c tcp.c srfi-1.c srfi-4.c srfi-13.c srfi-14.c srfi-18.c srfi-69.c \
    10651085          posixunix.c posixwin.c regex.c scheduler.c profiler.c stub.c match.c \
    1066           ulibrary.c ueval.c udata-structures.c uports.c uextras.c ulolevel.c \
     1086          ulibrary.c ueval.c udata-structures.c uports.c ufiles.c uextras.c ulolevel.c \
    10671087          uutils.c utcp.c usrfi-1.c usrfi-4.c usrfi-13.c usrfi-14.c \
    10681088          usrfi-18.c usrfi-69.c uposixunix.c uposixwin.c uregex.c chicken-profile.c chicken-setup.c chicken-bug.c \
     
    10861106compiler-check:
    10871107        @echo "======================================== packing ..."
    1088         $(MAKE) dist
     1108        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) dist
    10891109        $(REMOVE_COMMAND $(REMOVE_COMMAND_RECURSIVE_OPTIONS) tests/chicken-*
    10901110        tar -C tests -xzf `ls -t chicken-*.tar.gz | head -1`
    10911111        @echo "======================================== building stage 1 ..."
    1092         $(MAKE) STATICBUILD=1 -C tests/chicken-* confclean all
     1112        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all
    10931113        touch tests/chicken-*/*.scm
    10941114        @echo "======================================== building stage 2 ..."
    1095         $(MAKE) STATICBUILD=1 -C tests/chicken-* confclean all
     1115        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all
    10961116        cat tests/chicken-*/*.c >tests/stage2.out
    10971117        @echo "======================================== building stage 3 ..."
    1098         $(MAKE) STATICBUILD=1 -C tests/chicken-* confclean all
     1118        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all
    10991119        cat tests/chicken-*/*.c >tests/stage3.out
    11001120        diff tests/stage2.out tests/stage3.out >tests/stages.diff
     
    11061126.PHONY: bootstrap bootstrap.tar.gz
    11071127
    1108 bootstrap: bootstrap.tar.gz
    1109         gzip -d -c bootstrap.tar.gz | tar xvf -
     1128bootstrap: $(SRCDIR)/bootstrap.tar.gz
     1129        gzip -d -c $(SRCDIR)/bootstrap.tar.gz | tar xvf -
    11101130        touch *.c
    1111         $(MAKE) -f Makefile.$(PLATFORM) STATICBUILD=1 chicken$(EXE)
     1131        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) STATICBUILD=1 chicken$(EXE)
    11121132        cp chicken$(EXE) chicken-boot$(EXE)
    11131133        touch *.scm
    11141134
    1115 bootstrap.tar.gz: distfiles
    1116         tar cfz bootstrap.tar.gz library.c eval.c data-structures.c uports.c extras.c lolevel.c utils.c tcp.c \
    1117           srfi-1.c srfi-4.c srfi-13.c srfi-14.c srfi-18.c srfi-69.c posixunix.c posixwin.c regex.c \
    1118           scheduler.c profiler.c stub.c match.c $(COMPILER_OBJECTS_1:=.c)
     1135$(SRCDIR)/bootstrap.tar.gz: distfiles
     1136        tar cfz $(SRCDIR)/bootstrap.tar.gz library.c eval.c data-structures.c ports.c files.c extras.c \
     1137        lolevel.c utils.c tcp.c srfi-1.c srfi-4.c srfi-13.c srfi-14.c srfi-18.c srfi-69.c \
     1138        posixunix.c posixwin.c regex.c scheduler.c profiler.c stub.c match.c $(COMPILER_OBJECTS_1:=.c)
  • chicken/branches/prerelease/runtime.c

    r11043 r11632  
    75917591  /* check for rational representation: */
    75927592  if((eptr = C_strchr(sptr, '/')) != NULL) {
     7593    if (eptr == sptr) {
     7594        n = C_SCHEME_FALSE;
     7595        goto fini;
     7596    }
    75937597    *eptr = '\0';
    75947598    ratp = 1;
  • chicken/branches/prerelease/scheme-complete.el

    r9381 r11632  
    3232;;;     (eldoc-mode)))
    3333;;;
    34 ;;; There's a single custom variable, `default-scheme-implementation',
     34;;; There's a single custom variable, `scheme-default-implementation',
    3535;;; which you can use to specify your preferred implementation when we
    3636;;; can't infer it from the source code.
     
    3939
    4040;;; History:
     41;;; 0.8.2: 2008/07/04 - both TAB and M-TAB scroll results (thanks Peter Bex),
     42;;;                     better MATCH handling, fixed SRFI-55, other bugfixes
     43;;; 0.8.1: 2008/04/17 - great renaming, everthing starts with `scheme-'
     44;;                      also, don't scan imported modules multiple times
    4145;;;   0.8: 2008/02/08 - several parsing bugfixes on unclosed parenthesis
    4246;;;                       (thanks to Kazushi NODA)
     
    8589  '((define (syntax (identifier value) undefined) "define a new variable")
    8690    (set! (syntax (identifier value) undefined) "set the value of a variable")
    87     (let (syntax (vars body |...|)) "bind new local variables in parallel")
    88     (let* (syntax (vars body |...|)) "bind new local variables sequentially")
    89     (letrec (syntax (vars body |...|)) "bind new local variables recursively")
    90     (lambda (syntax (params body |...|)) "procedure syntax")
     91    (let (syntax (vars body \.\.\.)) "bind new local variables in parallel")
     92    (let* (syntax (vars body \.\.\.)) "bind new local variables sequentially")
     93    (letrec (syntax (vars body \.\.\.)) "bind new local variables recursively")
     94    (lambda (syntax (params body \.\.\.)) "procedure syntax")
    9195    (if (syntax (cond then else)) "conditional evaluation")
    92     (cond (syntax (clause |...|)) "try each clause until one succeeds")
    93     (case (syntax (expr clause |...|)) "look for EXPR among literal lists")
     96    (cond (syntax (clause \.\.\.)) "try each clause until one succeeds")
     97    (case (syntax (expr clause \.\.\.)) "look for EXPR among literal lists")
    9498    (delay (syntax (expr)) "create a promise to evaluate EXPR")
    95     (and (syntax (expr |...|)) "evaluate EXPRs while true, return last")
    96     (or (syntax (expr |...|)) "return the first true EXPR")
    97     (begin (syntax (expr |...|)) "evaluate each EXPR in turn and return the last")
    98     (do (syntax (vars finish body |...|)) "simple iterator")
     99    (and (syntax (expr \.\.\.)) "evaluate EXPRs while true, return last")
     100    (or (syntax (expr \.\.\.)) "return the first true EXPR")
     101    (begin (syntax (expr \.\.\.)) "evaluate each EXPR in turn and return the last")
     102    (do (syntax (vars finish body \.\.\.)) "simple iterator")
    99103    (quote (syntax (expr)) "represent EXPR literally without evaluating it")
    100104    (quasiquote (syntax (expr)) "quote literals allowing escapes")
    101105    (unquote (syntax (expr)) "escape an expression inside quasiquote")
    102106    (unquote-splicing (syntax (expr)) "escape and splice a list expression inside quasiquote")
    103     (define-syntax (syntax (identifier body |...|) undefined) "create a macro")
    104     (let-syntax (syntax (syntaxes body |...|)) "a local macro")
    105     (letrec-syntax (syntax (syntaxes body |...|)) "a local macro")
    106     (syntax-rules (syntax (literals clauses |...|) undefined) "simple macro language")
     107    (define-syntax (syntax (identifier body \.\.\.) undefined) "create a macro")
     108    (let-syntax (syntax (syntaxes body \.\.\.)) "a local macro")
     109    (letrec-syntax (syntax (syntaxes body \.\.\.)) "a local macro")
     110    (syntax-rules (syntax (literals clauses \.\.\.) undefined) "simple macro language")
    107111    (eqv? (lambda (obj1 obj2) bool) "returns #t if OBJ1 and OBJ2 are the same object")
    108112    (eq? (lambda (obj1 obj2) bool) "finer grained version of EQV?")
     
    117121    (exact? (lambda (z) bool) "returns #t iff Z is exact")
    118122    (inexact? (lambda (z) bool) "returns #t iff Z is inexact")
    119     (= (lambda (z1 z2 |...|) bool) "returns #t iff the arguments are all equal")
    120     (< (lambda (x1 x2 |...|) bool) "returns #t iff the arguments are monotonically increasing")
    121     (> (lambda (x1 x2 |...|) bool) "returns #t iff the arguments are monotonically decreasing")
    122     (<= (lambda (x1 x2 |...|) bool) "returns #t iff the arguments are monotonically nondecreasing")
    123     (>= (lambda (x1 x2 |...|) bool) "returns #t iff the arguments are monotonically nonincreasing")
     123    (= (lambda (z1 z2 \.\.\.) bool) "returns #t iff the arguments are all equal")
     124    (< (lambda (x1 x2 \.\.\.) bool) "returns #t iff the arguments are monotonically increasing")
     125    (> (lambda (x1 x2 \.\.\.) bool) "returns #t iff the arguments are monotonically decreasing")
     126    (<= (lambda (x1 x2 \.\.\.) bool) "returns #t iff the arguments are monotonically nondecreasing")
     127    (>= (lambda (x1 x2 \.\.\.) bool) "returns #t iff the arguments are monotonically nonincreasing")
    124128    (zero? (lambda (z) bool))
    125     (positive? (lambda (x) bool))
    126     (negative? (lambda (x) bool))
     129    (positive? (lambda (x1) bool))
     130    (negative? (lambda (x1) bool))
    127131    (odd? (lambda (n) bool))
    128132    (even? (lambda (n) bool))
    129     (max (lambda (x1 x2 |...|) x) "returns the maximum of the arguments")
    130     (min (lambda (x1 x2 |...|) x) "returns the minimum of the arguments")
    131     (+ (lambda (z1 |...|) z))
    132     (* (lambda (z1 |...|) z))
    133     (- (lambda (z1 |...|) z))
    134     (/ (lambda (z1 |...|) z))
    135     (abs (lambda (x) x) "returns the absolute value of X")
     133    (max (lambda (x1 x2 \.\.\.) x3) "returns the maximum of the arguments")
     134    (min (lambda (x1 x2 \.\.\.) x3) "returns the minimum of the arguments")
     135    (+ (lambda (z1 \.\.\.) z))
     136    (* (lambda (z1 \.\.\.) z))
     137    (- (lambda (z1 \.\.\.) z))
     138    (/ (lambda (z1 \.\.\.) z))
     139    (abs (lambda (x1) x2) "returns the absolute value of X")
    136140    (quotient (lambda (n1 n2) n) "integer division")
    137141    (remainder (lambda (n1 n2) n) "same sign as N1")
    138142    (modulo (lambda (n1 n2) n) "same sign as N2")
    139     (gcd (lambda (n1 |...|) n) "greatest common divisor")
    140     (lcm (lambda (n2 |...|) n) "least common multiple")
     143    (gcd (lambda (n1 \.\.\.) n) "greatest common divisor")
     144    (lcm (lambda (n2 \.\.\.) n) "least common multiple")
    141145    (numerator (lambda (rational) n))
    142146    (denominator (lambda (rational) n))
    143     (floor (lambda (x) n) "largest integer not larger than X")
    144     (ceiling (lambda (x) n) "smallest integer not smaller than X")
    145     (truncate (lambda (x) n) "drop fractional part")
    146     (round (lambda (x) n) "round to even (banker's rounding)")
    147     (rationalize (lambda (x y) n) "rational number differing from X by at most Y")
     147    (floor (lambda (x1) n) "largest integer not larger than X")
     148    (ceiling (lambda (x1) n) "smallest integer not smaller than X")
     149    (truncate (lambda (x1) n) "drop fractional part")
     150    (round (lambda (x1) n) "round to even (banker's rounding)")
     151    (rationalize (lambda (x1 y) n) "rational number differing from X by at most Y")
    148152    (exp (lambda (z) z) "e^Z")
    149153    (log (lambda (z) z) "natural logarithm of Z")
     
    158162    (make-rectangular (lambda (x1 x2) z) "create a complex number")
    159163    (make-polar (lambda (x1 x2) z) "create a complex number")
    160     (real-part (lambda (z) x))
    161     (imag-part (lambda (z) x))
    162     (magnitude (lambda (z) x))
    163     (angle (lambda (z) x))
     164    (real-part (lambda (z) x1))
     165    (imag-part (lambda (z) x1))
     166    (magnitude (lambda (z) x1))
     167    (angle (lambda (z) x1))
    164168    (exact->inexact (lambda (z) z))
    165169    (inexact->exact (lambda (z) z))
     
    202206    (null? (lambda (obj) bool) "returns #t iff OBJ is the empty list")
    203207    (list? (lambda (obj) bool) "returns #t iff OBJ is a proper list")
    204     (list (lambda (obj |...|) list) "returns a newly allocated list")
     208    (list (lambda (obj \.\.\.) list) "returns a newly allocated list")
    205209    (length (lambda (list) n))
    206     (append (lambda (list |...|) list) "concatenates the list arguments")
     210    (append (lambda (list \.\.\.) list) "concatenates the list arguments")
    207211    (reverse (lambda (list) list))
    208212    (list-tail (lambda (list k) list) "returns the Kth cdr of LIST")
     
    239243    (string? (lambda (obj) bool) "returns #t iff OBJ is a string")
    240244    (make-string (lambda (k :optional ch) str) "a new string of length k")
    241     (string (lambda (ch |...|) str) "a new string made of the char arguments")
     245    (string (lambda (ch \.\.\.) str) "a new string made of the char arguments")
    242246    (string-length (lambda (str) n) "the number of characters in STR")
    243247    (string-ref (lambda (str i) ch) "the Ith character of STR")
     
    254258    (string-ci>=? (lambda (str1 str2) bool))
    255259    (substring (lambda (str start end) str))
    256     (string-append (lambda (str |...|) str) "concatenate the string arguments")
     260    (string-append (lambda (str \.\.\.) str) "concatenate the string arguments")
    257261    (string->list (lambda (str) list))
    258262    (list->string (lambda (list) str))
     
    261265    (vector? (lambda (obj) bool) "returns #t iff OBJ is a vector")
    262266    (make-vector (lambda (len :optional fill) vec) "a new vector of K elements")
    263     (vector (lambda (obj |...|) vec))
     267    (vector (lambda (obj \.\.\.) vec))
    264268    (vector-length (lambda (vec) n) "the number of elements in VEC")
    265269    (vector-ref (lambda (vec i) obj) "the Ith element of VEC")
     
    269273    (vector-fill! (lambda (vec obj) undefined) "set every element in VEC to OBJ")
    270274    (procedure? (lambda (obj) bool) "returns #t iff OBJ is a procedure")
    271     (apply (lambda ((lambda obj a) obj |...|) a) "procedure application")
    272     (map (lambda ((lambda obj a) obj |...|) (list a)) "a new list of PROC applied to every element of LIST")
    273     (for-each (lambda ((lambda obj a) obj |...|) undefined) "apply PROC to each element of LIST in order")
     275    (apply (lambda ((lambda obj a) obj \.\.\.) a) "procedure application")
     276    (map (lambda ((lambda obj a) obj \.\.\.) (list a)) "a new list of PROC applied to every element of LIST")
     277    (for-each (lambda ((lambda obj a) obj \.\.\.) undefined) "apply PROC to each element of LIST in order")
    274278    (force (lambda (promise) obj) "force the delayed value of PROMISE")
    275279    (call-with-current-continuation (lambda (proc) obj) "goto on steroids")
    276     (values (lambda (obj |...|)) "send multiple values to the calling continuation")
     280    (values (lambda (obj \.\.\.)) "send multiple values to the calling continuation")
    277281    (call-with-values (lambda (producer consumer) obj))
    278282    (dynamic-wind (lambda (before-thunk thunk after-thunk) obj))
     
    308312   ;; SRFI 0
    309313   ("Feature-based conditional expansion construct"
    310     (cond-expand (syntax (clause |...|))))
     314    (cond-expand (syntax (clause \.\.\.))))
    311315   
    312316   ;; SRFI 1
    313317   ("List Library"
    314318    (xcons (lambda (object object) pair))
    315     (cons* (lambda (object |...|) pair))
     319    (cons* (lambda (object \.\.\.) pair))
    316320    (make-list (lambda (integer :optional object) list))
    317321    (list-tabulate (lambda (integer procedure) list))
    318322    (list-copy (lambda (list) list))
    319     (circular-list (lambda (object |...|) list))
     323    (circular-list (lambda (object \.\.\.) list))
    320324    (iota (lambda (integer :optional integer integer) list))
    321325    (proper-list? (lambda (object) bool))
     
    324328    (not-pair? (lambda (object) bool))
    325329    (null-list? (lambda (object) bool))
    326     (list= (lambda (procedure list |...|) bool))
     330    (list= (lambda (procedure list \.\.\.) bool))
    327331    (first (lambda (pair)))
    328332    (second (lambda (pair)))
     
    348352    (length+ (lambda (object) n))
    349353    (concatenate (lambda (list) list))
    350     (append! (lambda (list |...|) list))
     354    (append! (lambda (list \.\.\.) list))
    351355    (concatenate! (lambda (list) list))
    352356    (reverse! (lambda (list) list))
    353357    (append-reverse (lambda (list list) list))
    354358    (append-reverse! (lambda (list list) list))
    355     (zip (lambda (list |...|) list))
     359    (zip (lambda (list \.\.\.) list))
    356360    (unzip1 (lambda (list) list))
    357361    (unzip2 (lambda (list) list))
     
    359363    (unzip4 (lambda (list) list))
    360364    (unzip5 (lambda (list) list))
    361     (count (lambda (procedure list |...|) n))
    362     (fold (lambda ((lambda obj a) object list |...|) a))
     365    (count (lambda (procedure list \.\.\.) n))
     366    (fold (lambda ((lambda obj a) object list \.\.\.) a))
    363367    (unfold (lambda (procedure procedure procedure object :optional procedure) obj))
    364     (pair-fold (lambda ((lambda obj a) object list |...|) a))
    365     (reduce (lambda ((lambda obj a) object list |...|) a))
    366     (fold-right (lambda ((lambda obj a) object list |...|) a))
     368    (pair-fold (lambda ((lambda obj a) object list \.\.\.) a))
     369    (reduce (lambda ((lambda obj a) object list \.\.\.) a))
     370    (fold-right (lambda ((lambda obj a) object list \.\.\.) a))
    367371    (unfold-right (lambda (procedure procedure procedure object :optional object) obj))
    368     (pair-fold-right (lambda ((lambda obj a) object list |...|) a))
    369     (reduce-right (lambda ((lambda obj a) object list |...|) a))
    370     (append-map (lambda (procedure list |...|) list))
    371     (append-map! (lambda (procedure list |...|) list))
    372     (map! (lambda (procedure list |...|) list))
    373     (pair-for-each (lambda (procedure list |...|) undefined))
    374     (filter-map (lambda (procedure list |...|) list))
    375     (map-in-order (lambda (procedure list |...|) list))
     372    (pair-fold-right (lambda ((lambda obj a) object list \.\.\.) a))
     373    (reduce-right (lambda ((lambda obj a) object list \.\.\.) a))
     374    (append-map (lambda (procedure list \.\.\.) list))
     375    (append-map! (lambda (procedure list \.\.\.) list))
     376    (map! (lambda (procedure list \.\.\.) list))
     377    (pair-for-each (lambda (procedure list \.\.\.) undefined))
     378    (filter-map (lambda (procedure list \.\.\.) list))
     379    (map-in-order (lambda (procedure list \.\.\.) list))
    376380    (filter (lambda (procedure list) list))
    377381    (partition (lambda (procedure list) list))
     
    382386    (find (lambda (procedure list) obj))
    383387    (find-tail (lambda (procedure list) obj))
    384     (any (lambda ((lambda obj a) list |...|) a))
    385     (every (lambda ((lambda obj a) list |...|) a))
    386     (list-index (lambda (procedure list |...|) (or bool integer)))
     388    (any (lambda ((lambda obj a) list \.\.\.) a))
     389    (every (lambda ((lambda obj a) list \.\.\.) a))
     390    (list-index (lambda (procedure list \.\.\.) (or bool integer)))
    387391    (take-while (lambda (procedure list) list))
    388392    (drop-while (lambda (procedure list) list))
     
    400404    (alist-delete (lambda (obj alist) alist))
    401405    (alist-delete! (lambda (obj alist) alist))
    402     (lset<= (lambda (procedure list |...|) bool))
    403     (lset= (lambda (procedure list |...|) bool))
    404     (lset-adjoin (lambda (procedure list object |...|) list))
    405     (lset-union (lambda (procedure list |...|) list))
    406     (lset-union! (lambda (procedure list |...|) list))
    407     (lset-intersection (lambda (procedure list |...|) list))
    408     (lset-intersection! (lambda (procedure list |...|) list))
    409     (lset-difference (lambda (procedure list |...|) list))
    410     (lset-difference! (lambda (procedure list |...|) list))
    411     (lset-xor (lambda (procedure list |...|) list))
    412     (lset-xor! (lambda (procedure list |...|) list))
    413     (lset-diff+intersection (lambda (procedure list |...|) list))
    414     (lset-diff+intersection! (lambda (procedure list |...|) list))
     406    (lset<= (lambda (procedure list \.\.\.) bool))
     407    (lset= (lambda (procedure list \.\.\.) bool))
     408    (lset-adjoin (lambda (procedure list object \.\.\.) list))
     409    (lset-union (lambda (procedure list \.\.\.) list))
     410    (lset-union! (lambda (procedure list \.\.\.) list))
     411    (lset-intersection (lambda (procedure list \.\.\.) list))
     412    (lset-intersection! (lambda (procedure list \.\.\.) list))
     413    (lset-difference (lambda (procedure list \.\.\.) list))
     414    (lset-difference! (lambda (procedure list \.\.\.) list))
     415    (lset-xor (lambda (procedure list \.\.\.) list))
     416    (lset-xor! (lambda (procedure list \.\.\.) list))
     417    (lset-diff+intersection (lambda (procedure list \.\.\.) list))
     418    (lset-diff+intersection! (lambda (procedure list \.\.\.) list))
    415419
    416420    )
     
    418422   ;; SRFI 2
    419423   ("AND-LET*: an AND with local bindings, a guarded LET* special form"
    420     (and-let* (syntax (bindings body |...|))))
     424    (and-let* (syntax (bindings body \.\.\.))))
    421425
    422426   ()
     
    427431    (u8vector? (lambda (obj) bool))
    428432    (make-u8vector (lambda (size integer) u8vector))
    429     (u8vector (lambda (integer |...|) u8vector))
     433    (u8vector (lambda (integer \.\.\.) u8vector))
    430434    (u8vector-length (lambda (u8vector) n))
    431435    (u8vector-ref (lambda (u8vector i) int))
     
    436440    (s8vector? (lambda (obj) bool))
    437441    (make-s8vector (lambda (size integer) s8vector))
    438     (s8vector (lambda (integer |...|) s8vector))
     442    (s8vector (lambda (integer \.\.\.) s8vector))
    439443    (s8vector-length (lambda (s8vector) n))
    440444    (s8vector-ref (lambda (s8vector i) int))
     
    445449    (u16vector? (lambda (obj) bool))
    446450    (make-u16vector (lambda (size integer) u16vector))
    447     (u16vector (lambda (integer |...|)))
     451    (u16vector (lambda (integer \.\.\.)))
    448452    (u16vector-length (lambda (u16vector) n))
    449453    (u16vector-ref (lambda (u16vector i) int))
     
    454458    (s16vector? (lambda (obj) bool))
    455459    (make-s16vector (lambda (size integer) s16vector))
    456     (s16vector (lambda (integer |...|) s16vector))
     460    (s16vector (lambda (integer \.\.\.) s16vector))
    457461    (s16vector-length (lambda (s16vector) n))
    458462    (s16vector-ref (lambda (s16vector i) int))
     
    463467    (u32vector? (lambda (obj) bool))
    464468    (make-u32vector (lambda (size integer) u32vector))
    465     (u32vector (lambda (integer |...|) u32vector))
     469    (u32vector (lambda (integer \.\.\.) u32vector))
    466470    (u32vector-length (lambda (u32vector) n))
    467471    (u32vector-ref (lambda (u32vector i) int))
     
    472476    (s32vector? (lambda (obj) bool))
    473477    (make-s32vector (lambda (size integer) s32vector))
    474     (s32vector (lambda (integer |...|) s32vector))
     478    (s32vector (lambda (integer \.\.\.) s32vector))
    475479    (s32vector-length (lambda (s32vector) n))
    476480    (s32vector-ref (lambda (s32vector i) int))
     
    481485    (u64vector? (lambda (obj) bool))
    482486    (make-u64vector (lambda (size integer) u64vector))
    483     (u64vector (lambda (integer |...|) u64vector))
     487    (u64vector (lambda (integer \.\.\.) u64vector))
    484488    (u64vector-length (lambda (u64vector) n))
    485489    (u64vector-ref (lambda (u64vector i) int))
     
    490494    (s64vector? (lambda (obj) bool))
    491495    (make-s64vector (lambda (size integer) s64vector))
    492     (s64vector (lambda (integer |...|) s64vector))
     496    (s64vector (lambda (integer \.\.\.) s64vector))
    493497    (s64vector-length (lambda (s64vector) n))
    494498    (s64vector-ref (lambda (s64vector i) int))
     
    499503    (f32vector? (lambda (obj) bool))
    500504    (make-f32vector (lambda (size integer) f32vector))
    501     (f32vector (lambda (number |...|) f32vector))
     505    (f32vector (lambda (number \.\.\.) f32vector))
    502506    (f32vector-length (lambda (f32vector) n))
    503507    (f32vector-ref (lambda (f32vector i) int))
     
    508512    (f64vector? (lambda (obj) bool))
    509513    (make-f64vector (lambda (size integer) f64vector))
    510     (f64vector (lambda (number |...|) f64vector))
     514    (f64vector (lambda (number \.\.\.) f64vector))
    511515    (f64vector-length (lambda (f64vector) n))
    512516    (f64vector-ref (lambda (f64vector i) int))
     
    518522   ;; SRFI 5
    519523   ("A compatible let form with signatures and rest arguments"
    520     (let (syntax (bindings body |...|))))
     524    (let (syntax (bindings body \.\.\.))))
    521525
    522526   ;; SRFI 6
     
    528532   ;; SRFI 7
    529533   ("Feature-based program configuration language"
    530     (program (syntax (clause |...|)))
     534    (program (syntax (clause \.\.\.)))
    531535    (feature-cond (syntax (clause))))
    532536
    533537   ;; SRFI 8
    534538   ("receive: Binding to multiple values"
    535     (receive (syntax (identifiers producer body |...|))))
     539    (receive (syntax (identifiers producer body \.\.\.))))
    536540
    537541   ;; SRFI 9
    538542   ("Defining Record Types"
    539     (define-record-type (syntax (name constructor-name pred-name fields |...|))))
     543    (define-record-type (syntax (name constructor-name pred-name fields \.\.\.))))
    540544
    541545   ;; SRFI 10
     
    545549   ;; SRFI 11
    546550   ("Syntax for receiving multiple values"
    547     (let-values (syntax (bindings body |...|)))
    548     (let-values* (syntax (bindings body |...|))))
     551    (let-values (syntax (bindings body \.\.\.)))
     552    (let-values* (syntax (bindings body \.\.\.))))
    549553
    550554   ()
     
    621625    (string-concatenate (lambda (string-list) str))
    622626    (string-concatenate/shared (lambda (string-list) str))
    623     (string-append/shared (lambda (str |...|) str))
     627    (string-append/shared (lambda (str \.\.\.) str))
    624628    (string-concatenate-reverse (lambda (string-list :optional final-string end) str))
    625629    (string-concatenate-reverse/shared (lambda (string-list :optional final-string end) str))
     
    638642   ("Character-Set Library"
    639643    (char-set? (lambda (cset) bool))
    640     (char-set= (lambda (cset |...|) bool))
    641     (char-set<= (lambda (cset |...|) bool))
     644    (char-set= (lambda (cset \.\.\.) bool))
     645    (char-set<= (lambda (cset \.\.\.) bool))
    642646    (char-set-hash (lambda (cset :optional int) int))
    643647    (char-set-cursor (lambda (cset) cursor))
     
    651655    (char-set-map (lambda (proc cset) cset))
    652656    (char-set-copy (lambda (cset) cset))
    653     (char-set (lambda (ch |...|) cset))
     657    (char-set (lambda (ch \.\.\.) cset))
    654658    (list->char-set (lambda (list :optional obj) cset))
    655659    (list->char-set! (lambda (list cset) cset))
     
    666670    (char-set-every (lambda (proc cset) obj))
    667671    (char-set-any (lambda (proc cset) obj))
    668     (char-set-adjoin (lambda (cset ch |...|) cset))
    669     (char-set-delete (lambda (cset ch |...|) cset))
    670     (char-set-adjoin! (lambda (cset ch |...|) cset))
    671     (char-set-delete! (lambda (cset ch |...|) cset))
     672    (char-set-adjoin (lambda (cset ch \.\.\.) cset))
     673    (char-set-delete (lambda (cset ch \.\.\.) cset))
     674    (char-set-adjoin! (lambda (cset ch \.\.\.) cset))
     675    (char-set-delete! (lambda (cset ch \.\.\.) cset))
    672676    (char-set->list (lambda (cset) list))
    673677    (char-set->string (lambda (cset) str))
    674678    (char-set-complement (lambda (cset) cset))
    675     (char-set-union (lambda (cset |...|) cset))
    676     (char-set-intersection (lambda (cset |...|) cset))
    677     (char-set-xor (lambda (cset |...|) cset))
    678     (char-set-difference (lambda (cset |...|) cset))
    679     (char-set-diff+intersection (lambda (cset |...|) cset))
     679    (char-set-union (lambda (cset \.\.\.) cset))
     680    (char-set-intersection (lambda (cset \.\.\.) cset))
     681    (char-set-xor (lambda (cset \.\.\.) cset))
     682    (char-set-difference (lambda (cset \.\.\.) cset))
     683    (char-set-diff+intersection (lambda (cset \.\.\.) cset))
    680684    (char-set-complement! (lambda (cset) cset))
    681     (char-set-union! (lambda (cset |...|) cset))
    682     (char-set-intersection! (lambda (cset |...|) cset))
    683     (char-set-xor! (lambda (cset |...|) cset))
    684     (char-set-difference! (lambda (cset |...|) cset))
    685     (char-set-diff+intersection! (lambda (cset |...|) cset))
     685    (char-set-union! (lambda (cset \.\.\.) cset))
     686    (char-set-intersection! (lambda (cset \.\.\.) cset))
     687    (char-set-xor! (lambda (cset \.\.\.) cset))
     688    (char-set-difference! (lambda (cset \.\.\.) cset))
     689    (char-set-diff+intersection! (lambda (cset \.\.\.) cset))
    686690    (char-set:lower-case char-set)
    687691    (char-set:upper-case char-set)
     
    706710   ;; SRFI 16
    707711   ("Syntax for procedures of variable arity"
    708     (case-lambda (syntax (clauses |...|) procedure)))
     712    (case-lambda (syntax (clauses \.\.\.) procedure)))
    709713
    710714   ;; SRFI 17
     
    748752    (current-time (lambda () time))
    749753    (time? (lambda (obj) bool))
    750     (time->seconds (lambda (time) x))
    751     (seconds->time (lambda (x) time))
     754    (time->seconds (lambda (time) x1))
     755    (seconds->time (lambda (x1) time))
    752756    (current-exception-handler (lambda () handler))
    753757    (with-exception-handler (lambda (handler thunk)))
     
    851855   ;; SRFI 23
    852856   ("Error reporting mechanism"
    853     (error (lambda (reason-string arg |...|))))
     857    (error (lambda (reason-string arg \.\.\.))))
    854858
    855859   ()
     
    859863    (array? (lambda (obj)))
    860864    (make-array (lambda (shape :optional init)))
    861     (shape (lambda (bound |...|)))
    862     (array (lambda (shape obj |...|)))
     865    (shape (lambda (bound \.\.\.)))
     866    (array (lambda (shape obj \.\.\.)))
    863867    (array-rank (lambda (array)))
    864868    (array-start (lambda (array)))
    865869    (array-end (lambda (array)))
    866870    (array-shape (lambda (array)))
    867     (array-ref (lambda (array i |...|)))
    868     (array-set! (lambda (array obj |...|) undefined))
     871    (array-ref (lambda (array i \.\.\.)))
     872    (array-set! (lambda (array obj \.\.\.) undefined))
    869873    (share-array (lambda (array shape proc)))
    870874    )
     
    872876   ;; SRFI 26
    873877   ("Notation for Specializing Parameters without Currying"
    874     (cut (syntax (obj |...|)))
    875     (cute (lambda (obj |...|))))
     878    (cut (syntax (obj \.\.\.)))
     879    (cute (lambda (obj \.\.\.))))
    876880
    877881   ;; SRFI 27
     
    892896   ;; SRFI 28
    893897   ("Basic Format Strings"
    894     (format (lambda (port-or-boolean format-string arg |...|))))
     898    (format (lambda (port-or-boolean format-string arg \.\.\.))))
    895899
    896900   ;; SRFI 29
     
    911915   ;; SRFI 31
    912916   ("A special form for recursive evaluation"
    913     (rec (syntax (name body |...|) procedure)))
     917    (rec (syntax (name body \.\.\.) procedure)))
    914918
    915919   ()
     
    919923   ;; SRFI 34
    920924   ("Exception Handling for Programs"
    921     (guard (syntax (clauses |...|)))
     925    (guard (syntax (clauses \.\.\.)))
    922926    (raise (lambda (obj)))
    923927    )
     
    931935    (condition-has-type? (lambda (condition condition-type)))
    932936    (condition-ref (lambda (condition field-name)))
    933     (make-compound-condition (lambda (condition |...|)))
     937    (make-compound-condition (lambda (condition \.\.\.)))
    934938    (extract-condition (lambda (condition condition-type)))
    935     (define-condition-type (syntax (name parent pred-name fields |...|)))
    936     (condition (syntax (type-field-binding |...|)))
     939    (define-condition-type (syntax (name parent pred-name fields \.\.\.)))
     940    (condition (syntax (type-field-binding \.\.\.)))
    937941    )
    938942
     
    956960   ("args-fold: a program argument processor"
    957961    (args-fold
    958      (arg-list option-list unrecognized-option-proc operand-proc seed |...|))
    959     (option-processor (lambda (option name arg seeds |...|)))
    960     (operand-processor (lambda (operand seeds |...|)))
     962     (arg-list option-list unrecognized-option-proc operand-proc seed \.\.\.))
     963    (option-processor (lambda (option name arg seeds \.\.\.)))
     964    (operand-processor (lambda (operand seeds \.\.\.)))
    961965    (option (lambda (name-list required-arg? optional-arg? option-proc)))
    962966    (option-names (lambda (option)))
     
    975979   ("Parameter objects"
    976980    (make-parameter (lambda (init-value :optional converter)))
    977     (parameterize (syntax (bindings body |...|))))
     981    (parameterize (syntax (bindings body \.\.\.))))
    978982
    979983   ;; SRFI 40
     
    987991    (stream-cdr (lambda (stream)))
    988992    (stream-delay (syntax (expr)))
    989     (stream (lambda (obj |...|)))
     993    (stream (lambda (obj \.\.\.)))
    990994    (stream-unfoldn (lambda (generator-proc seed n)))
    991     (stream-map (lambda (proc stream |...|)))
    992     (stream-for-each (lambda (proc stream |...|) undefined))
     995    (stream-map (lambda (proc stream \.\.\.)))
     996    (stream-for-each (lambda (proc stream \.\.\.) undefined))
    993997    (stream-filter (lambda (pred stream)))
    994998    )
     
    10261030   ;; SRFI 43
    10271031   ("Vector Library"
    1028     (vector-unfold (f length initial-seed |...|))
    1029     (vector-unfold-right (lambda (f length initial-seed |...|)))
     1032    (vector-unfold (f length initial-seed \.\.\.))
     1033    (vector-unfold-right (lambda (f length initial-seed \.\.\.)))
    10301034    (vector-tabulate (lambda (f size)))
    10311035    (vector-copy (lambda (vec :optional start end fill)))
    10321036    (vector-reverse-copy (lambda (vec :optional start end)))
    1033     (vector-append (lambda (vec |...|)))
     1037    (vector-append (lambda (vec \.\.\.)))
    10341038    (vector-concatenate (lambda (vector-list)))
    10351039    (vector-empty? (lambda (obj)))
    1036     (vector= (lambda (eq-proc vec |...|)))
    1037     (vector-fold (lambda (kons knil vec |...|)))
    1038     (vector-fold-right (lambda (kons knil vec |...|)))
    1039     (vector-map (lambda (f vec |...|)))
    1040     (vector-map! (lambda (f vec |...|)))
    1041     (vector-for-each (lambda (f vec |...|) undefined))
    1042     (vector-count (lambda (pred vec |...|)))
    1043     (vector-index (lambda (pred vec |...|)))
    1044     (vector-index-right (lambda (pred vec |...|)))
    1045     (vector-skip (lambda (pred vec |...|)))
    1046     (vector-skip-right (lambda (pred vec |...|)))
     1040    (vector= (lambda (eq-proc vec \.\.\.)))
     1041    (vector-fold (lambda (kons knil vec \.\.\.)))
     1042    (vector-fold-right (lambda (kons knil vec \.\.\.)))
     1043    (vector-map (lambda (f vec \.\.\.)))
     1044    (vector-map! (lambda (f vec \.\.\.)))
     1045    (vector-for-each (lambda (f vec \.\.\.) undefined))
     1046    (vector-count (lambda (pred vec \.\.\.)))
     1047    (vector-index (lambda (pred vec \.\.\.)))
     1048    (vector-index-right (lambda (pred vec \.\.\.)))
     1049    (vector-skip (lambda (pred vec \.\.\.)))
     1050    (vector-skip-right (lambda (pred vec \.\.\.)))
    10471051    (vector-binary-search (lambda (vec value cmp-proc)))
    1048     (vector-any (lambda (pred vec |...|)))
    1049     (vector-every (lambda (pred vec |...|)))
     1052    (vector-any (lambda (pred vec \.\.\.)))
     1053    (vector-every (lambda (pred vec \.\.\.)))
    10501054    (vector-swap! (lambda (vec i j) undefined))
    10511055    (vector-reverse! (lambda (vec :optional start end) undefined))
     
    10741078   ;; SRFI 47
    10751079   ("Array"
    1076     (make-array (lambda (prototype k |...|)))
     1080    (make-array (lambda (prototype k \.\.\.)))
    10771081    (ac64 (lambda (:optional z)))
    10781082    (ac32 (lambda (:optional z)))
    1079     (ar64 (lambda (:optional x)))
    1080     (ar32 (lambda (:optional x)))
     1083    (ar64 (lambda (:optional x1)))
     1084    (ar32 (lambda (:optional x1)))
    10811085    (as64 (lambda (:optional n)))
    10821086    (as32 (lambda (:optional n)))
     
    10881092    (au8 (lambda (:optional n)))
    10891093    (at1 (lambda (:optional bool)))
    1090     (make-shared-array (lambda (array mapper k |...|)))
     1094    (make-shared-array (lambda (array mapper k \.\.\.)))
    10911095    (array-rank (lambda (obj)))
    10921096    (array-dimensions (lambda (array)))
    1093     (array-in-bounds? (lambda (array k |...|)))
    1094     (array-ref (lambda (array k |...|)))
    1095     (array-set! (lambda (array obj k |...|)))
     1097    (array-in-bounds? (lambda (array k \.\.\.)))
     1098    (array-ref (lambda (array k \.\.\.)))
     1099    (array-set! (lambda (array obj k \.\.\.)))
    10961100    )
    10971101
    10981102   ;; SRFI 48
    10991103   ("Intermediate Format Strings"
    1100     (format (lambda (port-or-boolean format-string arg |...|))))
     1104    (format (lambda (port-or-boolean format-string arg \.\.\.))))
    11011105
    11021106   ;; SRFI 49
     
    11251129   ;; SRFI 54
    11261130   ("Formatting"
    1127     (cat (lambda (obj |...|))))
     1131    (cat (lambda (obj \.\.\.))))
    11281132
    11291133   ;; SRFI 55
     
    11611165   ;; SRFI 60
    11621166   ("Integers as Bits"
    1163     (bitwise-and (lambda (n |...|) int))
    1164     (bitwise-ior (lambda (n |...|) int))
    1165     (bitwise-xor (lambda (n |...|) int))
     1167    (bitwise-and (lambda (n \.\.\.) int))
     1168    (bitwise-ior (lambda (n \.\.\.) int))
     1169    (bitwise-xor (lambda (n \.\.\.) int))
    11661170    (bitwise-not (lambda (n) int))
    11671171    (bitwise-if (lambda (mask n m) int))
     
    12041208    (test-begin (syntax (suite-name :optional count)))
    12051209    (test-end (syntax (suite-name)))
    1206     (test-group (syntax (suite-name decl-or-expr |...|)))
    1207     (test-group-with-cleanup (syntax (suite-name decl-or-expr |...|)))
     1210    (test-group (syntax (suite-name decl-or-expr \.\.\.)))
     1211    (test-group-with-cleanup (syntax (suite-name decl-or-expr \.\.\.)))
    12081212    (test-match-name (lambda (name)))
    12091213    (test-match-nth (lambda (n :optional count)))
    1210     (test-match-any (lambda (specifier |...|)))
    1211     (test-match-all (lambda (specifier |...|)))
     1214    (test-match-any (lambda (specifier \.\.\.)))
     1215    (test-match-all (lambda (specifier \.\.\.)))
    12121216    (test-skip (syntax (specifier)))
    12131217    (test-expect-fail (syntax (specifier)))
     
    12191223    (test-runner-create (lambda ()))
    12201224    (test-runner-factory (lambda (:optional factory)))
    1221     (test-apply (syntax (runner specifier |...|)))
    1222     (test-with-runner (syntax (runner decl-or-expr |...|)))
     1225    (test-apply (syntax (runner specifier \.\.\.)))
     1226    (test-with-runner (syntax (runner decl-or-expr \.\.\.)))
    12231227    (test-result-kind (lambda (:optional runner)))
    12241228    (test-passed? (lambda (:optional runner)))
     
    12591263   ("Octet Vectors"
    12601264    (make-u8vector (lambda (len n)))
    1261     (u8vector (lambda (n |...|)))
     1265    (u8vector (lambda (n \.\.\.)))
    12621266    (u8vector->list (lambda (u8vector)))
    12631267    (list->u8vector (lambda (octet-list)))
     
    13141318     (chop (lambda (list k) list))
    13151319     (complement (lambda (f) f2))
    1316      (compose (lambda (f1 f2 |...|) f))
     1320     (compose (lambda (f1 f2 \.\.\.) f))
    13171321     (compress (lambda (boolean-list list)))
    1318      (conc (lambda (obj |...|)))
    1319      (conjoin (lambda (pred |...|) pred))
    1320      (constantly (lambda (obj |...|) f))
    1321      (disjoin (lambda (pred |...|) pred))
    1322      (each (lambda (proc |...|) proc))
    1323      (flatten (lambda (list1 |...|) list))
     1322     (conc (lambda (obj \.\.\.)))
     1323     (conjoin (lambda (pred \.\.\.) pred))
     1324     (constantly (lambda (obj \.\.\.) f))
     1325     (disjoin (lambda (pred \.\.\.) pred))
     1326     (each (lambda (proc \.\.\.) proc))
     1327     (flatten (lambda (list1 \.\.\.) list))
    13241328     (flip (lambda (proc) proc))
    1325      (format (lambda (format-string arg |...|)))
    1326      (fprintf (lambda (port format-string arg |...|)))
     1329     (format (lambda (format-string arg \.\.\.)))
     1330     (fprintf (lambda (port format-string arg \.\.\.)))
    13271331     (hash (lambda (obj :optional n) int))
    13281332     (hash-by-identity (lambda (obj :optional n) int))
     
    13571361     (merge (lambda (list1 list2 less-fn) list))
    13581362     (merge! (lambda (list1 list2 less-fn) list))
    1359      (noop (lambda (obj |...|) undefined))
     1363     (noop (lambda (obj \.\.\.) undefined))
    13601364     (pp (lambda (obj :optional output-port) undefined))
    13611365     (pretty-print (lambda (obj :optional output-port) undefined))
    13621366     (pretty-print-width (lambda (:optional new-width) n))
    1363      (printf (lambda (format-string arg |...|) undefined))
     1367     (printf (lambda (format-string arg \.\.\.) undefined))
    13641368     (project (lambda (n) proc))
    13651369     (queue->list (lambda (queue) list))
     
    13731377     (queue? (lambda (obj) bool))
    13741378     (random (lambda (n) n))
    1375      (randomize (lambda (:optional x) undefined))
     1379     (randomize (lambda (:optional x1) undefined))
    13761380     (rassoc (lambda (key list :optional eq-fn)))
    13771381     (read-file (lambda (:optional file-or-port reader-fn max-count) str))
     
    13851389     (sort! (lambda (sequence less-fn) sequence))
    13861390     (sorted? (lambda (sequence less-fn) bool))
    1387      (sprintf (lambda (format-string arg |...|) str))
     1391     (sprintf (lambda (format-string arg \.\.\.) str))
    13881392     (string-chomp (lambda (str :optional suffix-str) str))
    13891393     (string-chop (lambda (str length) list))
     
    14151419     (block-ref (lambda (block index) int))
    14161420     (block-set! (lambda (block index obj) undefined))
    1417      (byte-vector (lambda (n |...|) byte-vector))
     1421     (byte-vector (lambda (n \.\.\.) byte-vector))
    14181422     (byte-vector->list (lambda (byte-vector) list))
    14191423     (byte-vector->string (lambda (byte-vector) string))
     
    14231427     (byte-vector-set! (lambda (byte-vector i n) undefined))
    14241428     (byte-vector? (lambda (obj) bool))
    1425      (extend-procedure (lambda (proc x) proc))
     1429     (extend-procedure (lambda (proc x1) proc))
    14261430     (extended-procedure? (lambda (proc) bool))
    14271431     (free (lambda (pointer) undefined))
     
    14371441     (make-byte-vector (lambda (size :optional init-n) byte-vector))
    14381442     (make-locative (lambda (obj :optional index) locative))
    1439      (make-record-instance (lambda (sym arg |...|)))
     1443     (make-record-instance (lambda (sym arg \.\.\.)))
    14401444     (make-static-byte-vector (lambda (size :optional init-n)))
    14411445     (make-weak-locative (lambda (obj :optional index) locative))
     
    14581462     (pointer->object (lambda (ptr)))
    14591463     (pointer-f32-ref (lambda (ptr) real))
    1460      (pointer-f32-set! (lambda (ptr x) undefined))
     1464     (pointer-f32-set! (lambda (ptr x1) undefined))
    14611465     (pointer-f64-ref (lambda (ptr) real))
    1462      (pointer-f64-set! (lambda (ptr x) undefined))
     1466     (pointer-f64-set! (lambda (ptr x1) undefined))
    14631467     (pointer-offset (lambda (ptr n) n))
    14641468     (pointer-s16-ref (lambda (ptr) int))
     
    15661570     (get-groups (lambda ()))
    15671571     (get-host-name (lambda ()))
    1568      (glob (lambda (pattern1 |...|)))
     1572     (glob (lambda (pattern1 \.\.\.)))
    15691573     (group-information (lambda (group-name-or-n)))
    15701574     (initialize-groups (lambda (user-name base-group-n)))
     
    16181622     (process-signal (lambda (pid :optional signal)))
    16191623     (process-wait (lambda (:optional pid nohang?)))
    1620      (read-symbolic-link (lambda (filename)))
     1624     (read-symbolic-link (lambda (filename) filename))
    16211625     (regular-file? (lambda (filename)))
    16221626     (seconds->local-time (lambda (seconds)))
     
    16671671     (unmap-file-from-memory (lambda (mmap :optional len)))
    16681672     (unsetenv (lambda (name) undefined))
    1669      (user-information (lambda ((or integer (string complete-user-name))) list))
     1673     (user-information (lambda ((or integer (string scheme-complete-user-name))) list))
    16701674     (utc-time->seconds (lambda (vector)))
    16711675     (with-input-from-pipe (lambda (cmdline-string thunk :optional mode)))
     
    16941698     (tcp-buffer-size (lambda (:optional new-size)))
    16951699     (tcp-close (lambda (listener)))
    1696      (tcp-connect (lambda ((string complete-host-name) :optional (string complete-port-name))))
     1700     (tcp-connect (lambda ((string scheme-complete-host-name) :optional (string scheme-complete-port-name))))
    16971701     (tcp-listen (lambda (tcp-port-n :optional backlog-n host-string)))
    16981702     (tcp-listener-fileno (lambda (listener)))
     
    17221726     (read-all (lambda (:optional file-or-port)))
    17231727     (shift! (lambda (list :optional default)))
    1724      (system* (lambda (format-string arg1 |...|)))
     1728     (system* (lambda (format-string arg1 \.\.\.)))
    17251729     (unshift! (lambda (obj pair)))
    17261730     )
     
    17371741     (argv (lambda () list))
    17381742     (bit-set? (lambda (n index) bool))
    1739      (bitwise-and (lambda (n |...|) n))
    1740      (bitwise-ior (lambda (n |...|) n))
    1741      (bitwise-not (lambda (n |...|) n))
    1742      (bitwise-xor (lambda (n |...|) n))
     1743     (bitwise-and (lambda (n \.\.\.) n))
     1744     (bitwise-ior (lambda (n \.\.\.) n))
     1745     (bitwise-not (lambda (n \.\.\.) n))
     1746     (bitwise-xor (lambda (n \.\.\.) n))
    17431747     (blob->string (lambda (blob) string))
    17441748     (blob-size (lambda (blob) n))
     
    17571761     (continuation-capture (lambda (proc)))
    17581762     (continuation-graft (lambda (continuation thunk)))
    1759      (continuation-return (lambda (continuation vals|...|)))
     1763     (continuation-return (lambda (continuation vals\.\.\.)))
    17601764     (continuation? (lambda (obj) bool))
    17611765     (copy-read-table (lambda (read-table) read-table))
     
    17661770     (current-milliseconds (lambda () n))
    17671771     (current-read-table (lambda () read-table))
    1768      (current-seconds (lambda () x))
     1772     (current-seconds (lambda () x1))
    17691773     (define-reader-ctor (lambda (sym proc) undefined))
    17701774     (delete-file (lambda (filename) undefined))
     
    17751779     (enable-warnings (lambda () undefined))
    17761780     (errno (lambda () n))
    1777      (error (lambda (error-string args |...|) undefined))
     1781     (error (lambda (error-string args \.\.\.) undefined))
    17781782     (eval-handler (lambda () proc))
    17791783     (exit (lambda (:optional n) undefined))
     
    17891793     (flush-output (lambda (:optional port) undefined))
    17901794     (force (lambda (promise)))
    1791      (force-finalizers (lambda (f args |...|)))
    1792      (fp* (lambda (x1 x2) x))
    1793      (fp+ (lambda (x1 x2) x))
    1794      (fp- (lambda (x1 x2) x))
    1795      (fp/ (lambda (x1 x2) x))
    1796      (fp< (lambda (x1 x2) x))
    1797      (fp<= (lambda (x1 x2) x))
    1798      (fp= (lambda (x1 x2) x))
    1799      (fp> (lambda (x1 x2) x))
    1800      (fp>= (lambda (x1 x2) x))
    1801      (fpmax (lambda (x1 x2) x))
    1802      (fpmin (lambda (x1 x2) x))
    1803      (fpneg (lambda (x1 x2) x))
     1795     (force-finalizers (lambda (f args \.\.\.)))
     1796     (fp* (lambda (x1 x2) x3))
     1797     (fp+ (lambda (x1 x2) x3))
     1798     (fp- (lambda (x1 x2) x3))
     1799     (fp/ (lambda (x1 x2) x3))
     1800     (fp< (lambda (x1 x2) x3))
     1801     (fp<= (lambda (x1 x2) x3))
     1802     (fp= (lambda (x1 x2) x3))
     1803     (fp> (lambda (x1 x2) x3))
     1804     (fp>= (lambda (x1 x2) x3))
     1805     (fpmax (lambda (x1 x2) x3))
     1806     (fpmin (lambda (x1 x2) x3))
     1807     (fpneg (lambda (x1 x2) x3))
    18041808     (fx* (lambda (n1 n2) n))
    18051809     (fx+ (lambda (n1 n2) n))
     
    18441848     (macroexpand-1 (lambda (sexp) sexp))
    18451849     (make-blob (lambda (size) blob))
    1846      (make-composite-condition (lambda (condition |...|) condition))
     1850     (make-composite-condition (lambda (condition \.\.\.) condition))
    18471851     (make-parameter (lambda (val) proc))
    1848      (make-property-condition (lambda (kind |...|) condition))
     1852     (make-property-condition (lambda (kind \.\.\.) condition))
    18491853     (match-error-control (lambda (:optional proc) proc))
    18501854     (match-error-procedure (lambda (:optional proc) proc))
     
    18531857     (open-input-string (lambda (string) string-input-port))
    18541858     (open-output-string (lambda () string-output-port))
    1855      (ormap (lambda (pred list |...|) bool))
     1859     (ormap (lambda (pred list \.\.\.) bool))
    18561860     (port-name (lambda (port) name))
    18571861     (port-position (lambda (port) n))
    18581862     (port? (lambda (obj) bool))
    1859      (print (lambda (obj |...|) undefined))
    1860      (print* (lambda (obj |...|) undefined))
     1863     (print (lambda (obj \.\.\.) undefined))
     1864     (print* (lambda (obj \.\.\.) undefined))
    18611865     (print-backtrace (lambda (:optional n) undefined))
    18621866     (print-call-chain (lambda (:optional n) undefined))
    1863      (print-error-message (lambda (err args |...|) undefined))
     1867     (print-error-message (lambda (err args \.\.\.) undefined))
    18641868     (procedure-information (lambda (proc)))
    18651869     (program-name (lambda (:optional name) name))
     
    18721876     (repl (lambda () undefined))
    18731877     (repository-path (lambda (:optional dirname) dirname))
    1874      (require (lambda (sym |...|) undefined))
     1878     (require (lambda (sym \.\.\.) undefined))
    18751879     (reset (lambda () undefined))
    18761880     (reset-handler (lambda (:optional proc) proc))
     
    18871891     (setter (lambda (proc) proc))
    18881892     (signal (lambda (n) undefined))
    1889      (signum (lambda (x) x))
     1893     (signum (lambda (x1) x2))
    18901894     (singlestep (lambda (thunk)))
    18911895     (software-type (lambda () sym))
     
    18951899     (string->uninterned-symbol (lambda (string) sym))
    18961900     (string-copy (lambda (string) string))
    1897      (sub1 (lambda (x) x))
    1898      (syntax-error (lambda (args |...|) undefined))
     1901     (sub1 (lambda (z1) z2))
     1902     (syntax-error (lambda (args \.\.\.) undefined))
    18991903     (system (lambda (str) n))
    19001904     (test-feature? (lambda (obj) bool))
    19011905     (undefine-macro! (lambda (sym) undefined))
    19021906     (unregister-feature! (lambda (sym) undefined))
    1903      (use (special symbol chicken-available-modules)
     1907     (use (special symbol scheme-chicken-available-modules)
    19041908          "import extensions into top-level namespace")
    19051909     (vector-copy! (lambda (from-vector to-vector :optional start) undefined))
    19061910     (vector-resize (lambda (vec n :optional init)))
    19071911     (void (lambda () undefined))
    1908      (warning (lambda (msg-str args |...|) undefined))
     1912     (warning (lambda (msg-str args \.\.\.) undefined))
    19091913     (with-exception-handler (lambda (handler thunk)))
    19101914     (write-byte (lambda (n :optional output-port) undefined))
     
    20982102     (any (lambda (pred list)))
    20992103     (any$ (lambda (pred) proc))
    2100      (any-pred (lambda (pred |...|) pred))
    2101      (append! (lambda (list |...|) list))
     2104     (any-pred (lambda (pred \.\.\.) pred))
     2105     (append! (lambda (list \.\.\.) list))
    21022106     (apply$ (lambda (proc) proc))
    21032107     (apply-generic (lambda (generic list)))
     
    21232127     (change-object-class (lambda (obj orig-class new-class)))
    21242128     (char->ucs (lambda (ch) int))
    2125      (char-set (lambda (ch |...|) char-set))
     2129     (char-set (lambda (ch \.\.\.) char-set))
    21262130     (char-set-contains? (lambda (char-set ch) bool))
    21272131     (char-set-copy (lambda (char-set) char-set))
     
    21292133     (check-arg (syntax))
    21302134     (circular-list? (lambda (obj) bool))
    2131      (clamp (lambda (x :optional min-x max-x) x))
     2135     (clamp (lambda (x1 :optional min-x max-x) x2))
    21322136     (class-direct-methods (lambda (class) list))
    21332137     (class-direct-slots (lambda (class) list))
     
    21472151     (compare (lambda (obj1 obj2) n))
    21482152     (complement (lambda (proc) proc))
    2149      (compose (lambda (proc |...|) proc))
     2153     (compose (lambda (proc \.\.\.) proc))
    21502154     (compute-applicable-methods (lambda (generic list)))
    21512155     (compute-cpl (lambda (generic list)))
     
    21742178     (current-time (lambda () time))
    21752179     (cut (syntax))
    2176      (cute (lambda (args |...|) proc))
     2180     (cute (lambda (args \.\.\.) proc))
    21772181     (debug-print (lambda (obj)))
    21782182     (debug-print-width (lambda () int))
    21792183     (debug-source-info (lambda (obj)))
    21802184     (dec! (syntax))
    2181      (decode-float (lambda (x) vector))
     2185     (decode-float (lambda (x1) vector))
    21822186     (define-class (syntax))
    21832187     (define-condition-type (syntax))
     
    22042208     (eq-hash (lambda (obj)))
    22052209     (eqv-hash (lambda (obj)))
    2206      (error (lambda (msg-string args |...|)))
    2207      (errorf (lambda (fmt-string args |...|)))
     2210     (error (lambda (msg-string args \.\.\.)))
     2211     (errorf (lambda (fmt-string args \.\.\.)))
    22082212     (eval-when (syntax))
    22092213     (every$ (lambda (pred) pred))
    2210      (every-pred (lambda (pred |...|) pred))
     2214     (every-pred (lambda (pred \.\.\.) pred))
    22112215     (exit (lambda (:optional n) undefined))
    22122216     (export (syntax))
     
    22282232     (flush (lambda (:optional output-port) undefined))
    22292233     (flush-all-ports (lambda () undefined))
    2230      (fmod (lambda (x1 x2) x))
     2234     (fmod (lambda (x1 x2) x3))
    22312235     (fold (lambda (proc init list)))
    22322236     (fold$ (lambda (proc :optional init) proc))
     
    22372241     (foreign-pointer-attribute-set (lambda (ptr attr val)))
    22382242     (foreign-pointer-attributes (lambda (ptr) list))
    2239      (format (lambda (fmt-string arg |...|)))
    2240      (format/ss (lambda (fmt-string arg |...|)))
    2241      (frexp (lambda (x) x))
     2243     (format (lambda (fmt-string arg \.\.\.)))
     2244     (format/ss (lambda (fmt-string arg \.\.\.)))
     2245     (frexp (lambda (x1) x2))
    22422246     (gauche-architecture (lambda () string))
    22432247     (gauche-architecture-directory (lambda () string))
     
    22662270     (has-setter? (lambda (proc) bool))
    22672271     (hash (lambda (obj)))
    2268      (hash-table (lambda (id pair |...|) hash-table))
     2272     (hash-table (lambda (id pair \.\.\.) hash-table))
    22692273     (hash-table-delete! (lambda (hash-table key) undefined))
    22702274     (hash-table-exists? (lambda (hash-table key) bool))
     
    22882292     (import (syntax))
    22892293     (inc! (syntax))
    2290      (inexact-/ (lambda (x1 x2) x))
     2294     (inexact-/ (lambda (x1 x2) x3))
    22912295     (initialize (lambda (obj)))
    22922296     (instance-slot-ref (lambda (obj id)))
     
    22992303     (last-pair (lambda (pair) pair))
    23002304     (lazy (syntax))
    2301      (ldexp (lambda (x n) x))
     2305     (ldexp (lambda (x1 n) x2))
    23022306     (let-keywords* (syntax))
    23032307     (let-optionals* (syntax))
     
    23092313     (library-has-module? (lambda (filename id) bool))
    23102314     (library-map (lambda (string proc) list))
    2311      (list* (lambda (obj |...|) list))
     2315     (list* (lambda (obj \.\.\.) list))
    23122316     (list-copy (lambda (list) list))
    2313      (logand (lambda (n |...|) n))
     2317     (logand (lambda (n \.\.\.) n))
    23142318     (logbit? (lambda (index n) bool))
    23152319     (logcount (lambda (n) n))
    2316      (logior (lambda (n |...|) n))
     2320     (logior (lambda (n \.\.\.) n))
    23172321     (lognot (lambda (n) n))
    2318      (logtest (lambda (n |...|) bool))
    2319      (logxor (lambda (n |...|) n))
     2322     (logtest (lambda (n \.\.\.) bool))
     2323     (logxor (lambda (n \.\.\.) n))
    23202324     (macroexpand (lambda (obj)))
    23212325     (macroexpand-1 (lambda (obj)))
    2322      (make (lambda (class args |...|)))
     2326     (make (lambda (class args \.\.\.)))
    23232327     (make-byte-string (lambda (n :optional int) byte-string))
    2324      (make-compound-condition (lambda (condition |...|) condition))
    2325      (make-condition (lambda (condition-type field+value |...|) condition))
     2328     (make-compound-condition (lambda (condition \.\.\.) condition))
     2329     (make-condition (lambda (condition-type field+value \.\.\.) condition))
    23262330     (make-condition-type (lambda (id condition-type list) condition-type))
    23272331     (make-hash-table (lambda (:optional id) hash-table))
     
    23352339     (merge! (lambda (list1 list2 proc) list))
    23362340     (method-more-specific? (lambda (method1 method2 list) bool))
    2337      (min&max (lambda (x |...|) (values x1 x2)))
    2338      (modf (lambda (x) x))
     2341     (min&max (lambda (x1 \.\.\.) (values x2 x3)))
     2342     (modf (lambda (x1) x2))
    23392343     (module-exports (lambda (env) list))
    23402344     (module-imports (lambda (env) list))
     
    23462350     (module? (lambda (obj) bool))
    23472351     (null-list? (lambda (obj) bool))
    2348      (object-* (lambda (z |...|) z))
    2349      (object-+ (lambda (z |...|) z))
    2350      (object-- (lambda (z |...|) z))
    2351      (object-/ (lambda (z |...|) z))
    2352      (object-apply (lambda (proc arg |...|)))
     2352     (object-* (lambda (z \.\.\.) z))
     2353     (object-+ (lambda (z \.\.\.) z))
     2354     (object-- (lambda (z \.\.\.) z))
     2355     (object-/ (lambda (z \.\.\.) z))
     2356     (object-apply (lambda (proc arg \.\.\.)))
    23532357     (object-compare (lambda (obj1 obj2) n))
    23542358     (object-equal? (lambda (obj1 obj2) bool))
     
    23612365     (open-output-fd-port (lambda (fileno) output-port))
    23622366     (open-output-string (lambda () string-output-port))
    2363      (pa$ (lambda (proc arg |...|) proc))
     2367     (pa$ (lambda (proc arg \.\.\.) proc))
    23642368     (partition$ (lambda (pred) proc))
    23652369     (path->module-name (lambda (str) sym))
     
    23842388     (port-tell (lambda (port) n))
    23852389     (port-type (lambda (port) sym))
    2386      (print (lambda (obj |...|)))
     2390     (print (lambda (obj \.\.\.)))
    23872391     (procedure-arity-includes? (lambda (proc n) bool))
    23882392     (procedure-info (lambda (proc)))
     
    24172421     (reduce$ (lambda (proc :optional default) proc))
    24182422     (reduce-right$ (lambda (proc :optional default) proc))
    2419      (ref (lambda (obj key |...|)))
    2420      (ref* (lambda (obj key |...|)))
     2423     (ref (lambda (obj key \.\.\.)))
     2424     (ref* (lambda (obj key \.\.\.)))
    24212425     (regexp->string (lambda (regexp) string))
    24222426     (regexp-case-fold? (lambda (regexp) bool))
     
    24262430     (regexp-quote (lambda (str) str))
    24272431     (regexp-replace (lambda (regexp string subst) string))
    2428      (regexp-replace* (lambda (string regexp subst |...|) string))
     2432     (regexp-replace* (lambda (string regexp subst \.\.\.) string))
    24292433     (regexp-replace-all (lambda (regexp string subst) string))
    2430      (regexp-replace-all* (lambda (string regexp subst |...|)))
     2434     (regexp-replace-all* (lambda (string regexp subst \.\.\.)))
    24312435     (regexp? (lambda (obj) bool))
    24322436     (regmatch? (lambda (obj) bool))
     
    24472451     (rxmatch-start (lambda (regmatch :optional i) n))
    24482452     (rxmatch-substring (lambda (regmatch :optional i) str))
    2449      (seconds->time (lambda (x) time))
     2453     (seconds->time (lambda (x1) time))
    24502454     (select-module (syntax))
    24512455     (set!-values (syntax))
     
    25182522     (sys-abort (lambda () undefined))
    25192523     (sys-access (lambda (filename (flags amode R_OK W_OK X_OK F_OK))))
    2520      (sys-alarm (lambda (x) x))
     2524     (sys-alarm (lambda (x1) x2))
    25212525     (sys-asctime (lambda (time) str))
    25222526     (sys-basename (lambda (filename) str))
     
    25282532     (sys-ctermid (lambda () string))
    25292533     (sys-ctime (lambda (time) string))
    2530      (sys-difftime (lambda (time1 time2) x))
     2534     (sys-difftime (lambda (time1 time2) x1))
    25312535     (sys-dirname (lambda (filename) string))
    25322536     (sys-exec (lambda (command-string list) n))
     
    25742578     (sys-mkfifo (lambda (filename)))
    25752579     (sys-mkstemp (lambda (filename)))
    2576      (sys-mktime (lambda (time) x))
    2577      (sys-nanosleep (lambda (x)))
     2580     (sys-mktime (lambda (time) x1))
     2581     (sys-nanosleep (lambda (x1)))
    25782582     (sys-normalize-pathname (lambda (filename) string))
    2579      (sys-pause (lambda (x)))
     2583     (sys-pause (lambda (x1)))
    25802584     (sys-pipe (lambda (:optional buffering) (values input-port output-port)))
    25812585     (sys-putenv (lambda (name string)))
     
    25972601     (sys-sigmask (lambda ((set how SIG_SETMASK SIG_BLOCK SIG_UNBLOCK) sigset)))
    25982602     (sys-signal-name (lambda (n)))
    2599      (sys-sigset (lambda (n |...|) sigset))
     2603     (sys-sigset (lambda (n \.\.\.) sigset))
    26002604     (sys-sigset-add! (lambda (sigset n)))
    26012605     (sys-sigset-delete! (lambda (sigset n)))
     
    26042608     (sys-sigsuspend (lambda (sigset)))
    26052609     (sys-sigwait (lambda (sigset)))
    2606      (sys-sleep (lambda (x)))
     2610     (sys-sleep (lambda (x1)))
    26072611     (sys-srandom (lambda (n)))
    26082612     (sys-stat (lambda (filename)))
     
    26482652     (tanh (lambda (z) z))
    26492653     (time (syntax))
    2650      (time->seconds (lambda (time) x))
     2654     (time->seconds (lambda (time) x1))
    26512655     (time? (lambda (obj) bool))
    26522656     (toplevel-closure? (lambda (obj) bool))
     
    26612665     (update-direct-method! (lambda ()))
    26622666     (update-direct-subclass! (lambda ()))
    2663      (use (special symbol gauche-available-modules))
     2667     (use (special symbol scheme-gauche-available-modules))
    26642668     (use-version (syntax))
    26652669     (values-ref (syntax))
     
    27022706;; special lookups (XXXX add more impls, try to abstract better)
    27032707
    2704 (defvar *chicken-base-repo*
     2708(defvar *scheme-chicken-base-repo*
    27052709  (or (getenv "CHICKEN_REPOSITORY")
    27062710      (let ((dir
     
    27192723      "/usr/local/lib/chicken"))
    27202724
    2721 (defvar *chicken-repo-dirs*
     2725(defvar *scheme-chicken-repo-dirs*
    27222726  (remove-if-not
    27232727   #'(lambda (x) (and (stringp x) (not (equal x ""))))
     
    27252729     (if (and home (not (equal home "")))
    27262730         (let ((res (split-string home ";")))
    2727            (if (member *chicken-repo-dirs* res)
     2731           (if (member *scheme-chicken-repo-dirs* res)
    27282732               res
    2729              (cons *chicken-repo-dirs* res)))
    2730        (list *chicken-base-repo*)))))
    2731 
    2732 (defun chicken-available-modules (&optional sym)
     2733             (cons *scheme-chicken-repo-dirs* res)))
     2734       (list *scheme-chicken-base-repo*)))))
     2735
     2736(defun scheme-chicken-available-modules (&optional sym)
    27332737  (append
    27342738   (mapcar #'symbol-name (mapcar #'car *scheme-chicken-modules*))
     
    27362740    #'file-name-sans-extension
    27372741    (directory-files "." nil ".*\\.scm$" t))
    2738    (append-map
     2742   (scheme-append-map
    27392743    #'(lambda (dir)
    27402744        (mapcar
    27412745         #'file-name-sans-extension
    27422746         (directory-files dir nil ".*\\.\\(so\\|scm\\)$" t)))
    2743     *chicken-repo-dirs*)))
    2744 
    2745 (defvar *gauche-repo-path*
     2747    *scheme-chicken-repo-dirs*)))
     2748
     2749(defvar *scheme-gauche-repo-path*
    27462750  (or (car (remove-if-not #'file-directory-p
    27472751                          '("/usr/share/gauche"
     
    27552759      "/usr/local/share/gauche"))
    27562760
    2757 (defvar *gauche-site-repo-path*
    2758   (concat *gauche-repo-path* "/site/lib"))
    2759 
    2760 (defun gauche-available-modules (&optional sym)
    2761   (let ((version-dir (concat
    2762                       (car (directory-files *gauche-repo-path* t "^[0-9]"))
    2763                       "/lib"))
    2764         (site-dir *gauche-site-repo-path*)
     2761(defvar *scheme-gauche-site-repo-path*
     2762  (concat *scheme-gauche-repo-path* "/site/lib"))
     2763
     2764(defun scheme-gauche-available-modules (&optional sym)
     2765  (let ((version-dir
     2766         (concat
     2767          (car (directory-files *scheme-gauche-repo-path* t "^[0-9]"))
     2768          "/lib"))
     2769        (site-dir *scheme-gauche-site-repo-path*)
    27652770        (other-dirs
    27662771         (remove-if-not
     
    27712776     (mapcar
    27722777      #'file-name-sans-extension
    2773       (append-map
     2778      (scheme-append-map
    27742779       #'(lambda (dir)
    27752780           (let ((len (length dir)))
    27762781             (mapcar #'(lambda (f) (substring f (+ 1 len)))
    2777                      (directory-tree-files dir t "\\.scm"))))
     2782                     (scheme-directory-tree-files dir t "\\.scm"))))
    27782783       (cons version-dir (cons site-dir other-dirs)))))))
    27792784
     
    27812786;; utilities
    27822787
    2783 (defun append-map (proc init-ls)
     2788(defun scheme-append-map (proc init-ls)
    27842789  (if (null init-ls)
    27852790      '()
     
    27902795      res)))
    27912796
    2792 (defun flatten (ls)
     2797(defun scheme-flatten (ls)
    27932798  (cond
    2794    ((consp ls) (cons (car ls) (flatten (cdr ls))))
     2799   ((consp ls) (cons (car ls) (scheme-flatten (cdr ls))))
    27952800   ((null ls) '())
    27962801   (t (list ls))))
     
    28102815      (forward-sexp -1))))
    28112816
    2812 (defun find-file-in-path (file path)
     2817(defun scheme-find-file-in-path (file path)
    28132818  (car (remove-if-not
    28142819        #'(lambda (dir) (file-exists-p (concat dir file)))
     
    28162821
    28172822;; visit a file and kill the buffer only if it wasn't already open
    2818 (defmacro with-find-file (path-expr &rest body)
     2823(defmacro scheme-with-find-file (path-expr &rest body)
    28192824  (let ((path (gensym))
    28202825        (buf (gensym))
     
    28312836           ,res)))))
    28322837
    2833 (defun directory-tree-files (init-dir &optional full match)
     2838(defun scheme-directory-tree-files (init-dir &optional full match)
    28342839  (let ((res '())
    28352840        (stack (list init-dir)))
     
    28572862
    28582863;; returns current argument position within sexp
    2859 (defun beginning-of-current-sexp-operator ()
     2864(defun scheme-beginning-of-current-sexp-operator ()
    28602865  (let ((pos 0))
    28612866    (skip-syntax-backward "w_")
     
    28652870    pos))
    28662871
    2867 (defun beginning-of-next-sexp ()
     2872(defun scheme-beginning-of-next-sexp ()
    28682873  (forward-sexp 2)
    28692874  (backward-sexp 1))
    28702875
    2871 (defun beginning-of-string ()
     2876(defun scheme-beginning-of-string ()
    28722877  (interactive)
    28732878  (search-backward "\"" nil t)
     
    28772882;; for the enclosing sexp, returns a cons of the leading symbol (if
    28782883;; any) and the current position within the sexp (starting at 0)
    2879 (defun enclosing-sexp-prefix ()
     2884;; (defun scheme-enclosing-sexp-prefix ()
     2885;;   (save-excursion
     2886;;     (let ((pos (scheme-beginning-of-current-sexp-operator)))
     2887;;       (cons (scheme-symbol-at-point) pos))))
     2888
     2889(defun scheme-enclosing-2-sexp-prefixes ()
    28802890  (save-excursion
    2881     (let ((pos (beginning-of-current-sexp-operator)))
    2882       (cons (scheme-symbol-at-point) pos))))
    2883 
    2884 (defun enclosing-2-sexp-prefixes ()
    2885   (save-excursion
    2886     (let* ((pos1 (beginning-of-current-sexp-operator))
     2891    (let* ((pos1 (scheme-beginning-of-current-sexp-operator))
    28872892           (sym1 (scheme-symbol-at-point)))
    28882893      (backward-char)
    28892894      (or
    28902895       (ignore-errors
    2891          (let ((pos2 (beginning-of-current-sexp-operator)))
     2896         (let ((pos2 (scheme-beginning-of-current-sexp-operator)))
    28922897           (list sym1 pos1 (scheme-symbol-at-point) pos2)))
    28932898       (list sym1 pos1 nil 0)))))
     
    28972902;; sexps.  this is one of the few places we use it, so we're careful
    28982903;; to wrap it in ignore-errors.
    2899 (defun nth-sexp-at-point (n)
     2904(defun scheme-nth-sexp-at-point (n)
    29002905  (ignore-errors
    29012906    (save-excursion
     
    29132918           (intern (buffer-substring start (point)))))))
    29142919
    2915 (defun goto-next-top-level ()
     2920(defun scheme-goto-next-top-level ()
    29162921  (let ((here (point)))
    29172922    (or (ignore-errors (end-of-defun) (end-of-defun)
     
    29242929;; variable extraction
    29252930
    2926 (defun sexp-type-at-point (&optional env)
     2931(defun scheme-sexp-type-at-point (&optional env)
    29272932  (case (char-syntax (char-after))
    29282933    ((?\()
     
    29332938            ((eq op 'lambda)
    29342939             (let ((params
    2935                     (nth-sexp-at-point 1)))
     2940                    (scheme-nth-sexp-at-point 1)))
    29362941               `(lambda ,params)))
    29372942            (t
     
    29522957     nil)))
    29532958
    2954 (defun let-vars-at-point (&optional env)
     2959(defun scheme-let-vars-at-point (&optional env)
    29552960  (let ((end (or (ignore-errors
    29562961                   (save-excursion (forward-sexp) (point)))
     
    29652970              (let* ((sym (scheme-symbol-at-point))
    29662971                     (type (ignore-errors
    2967                              (beginning-of-next-sexp)
    2968                              (sexp-type-at-point env))))
     2972                             (scheme-beginning-of-next-sexp)
     2973                             (scheme-sexp-type-at-point env))))
    29692974                (push (if type (list sym type) (list sym)) vars)))))
    29702975      (unless (ignore-errors (let ((here (point)))
    2971                                (beginning-of-next-sexp)
     2976                               (scheme-beginning-of-next-sexp)
    29722977                               (> (point) here)))
    29732978        (goto-char end)))
    29742979    (reverse vars)))
    29752980
    2976 (defun extract-match-clause-vars (x)
     2981(defun scheme-extract-match-clause-vars (x)
    29772982  (cond
    29782983   ((null x) '())
    29792984   ((symbolp x)
    2980     (if (memq x '(_ ___ |...|))
     2985    (if (memq x '(_ ___ \.\.\.))
    29812986        '()
    2982       (list x)))
     2987      (list (list x))))
    29832988   ((consp x)
    29842989    (case (car x)
    2985       ((and or not)
    2986        (extract-match-clause-vars (cdr x)))
    2987       ((? = $)
    2988        (if (consp (cdr x)) (extract-match-clause-vars (cddr x)) '()))
     2990      ((or not)
     2991       (scheme-extract-match-clause-vars (cdr x)))
     2992      ((and)
     2993       (if (and (consp (cdr x))
     2994                (consp (cddr x))
     2995                (symbolp (cadr x))
     2996                (consp (caddr x))
     2997                (not (memq (caaddr x)
     2998                           '(= $ @ ? and or not quote quasiquote get! set!))))
     2999           (cons (list (cadr x) (if (listp (caddr x)) 'list 'pair))
     3000                 (scheme-extract-match-clause-vars (cddr x)))
     3001         (scheme-extract-match-clause-vars (cddr x))))
     3002      ((= $ @)
     3003       (if (consp (cdr x)) (scheme-extract-match-clause-vars (cddr x)) '()))
     3004      ((\?)
     3005       (if (and (consp (cdr x))
     3006                (consp (cddr x))
     3007                (symbolp (cadr x))
     3008                (symbolp (caddr x)))
     3009           (cons (list (caddr x) (scheme-predicate->type (cadr x)))
     3010                 (scheme-extract-match-clause-vars (cdddr x)))
     3011         (scheme-extract-match-clause-vars (cddr x))))
    29893012      ((get! set!)
    2990        (if (consp (cdr x)) (extract-match-clause-vars (cadr x)) '()))
     3013       (if (consp (cdr x)) (scheme-extract-match-clause-vars (cadr x)) '()))
    29913014      ((quote) '())
    29923015      ((quasiquote) '()) ; XXXX
    2993       (t (union (extract-match-clause-vars (car x))
    2994                 (extract-match-clause-vars (cdr x))))))
     3016      (t (union (scheme-extract-match-clause-vars (car x))
     3017                (scheme-extract-match-clause-vars (cdr x))))))
    29953018   ((vectorp x)
    2996     (extract-match-clause-vars (concatenate 'list x)))
     3019    (scheme-extract-match-clause-vars (concatenate 'list x)))
    29973020   (t
    29983021    '())))
    29993022
    3000 (defun extract-match-vars (ls)
    3001   (apply 'append (mapcar 'extract-match-clause-vars
    3002                          (mapcar 'car (remove-if-not 'consp ls)))))
     3023;; call this from the first opening paren of the match clauses
     3024(defun scheme-extract-match-vars (&optional pos limit)
     3025  (let ((match-vars '())
     3026        (limit (or limit
     3027                   (save-excursion
     3028                     (or
     3029                      (ignore-errors (end-of-defun) (point))
     3030                      (point-max))))))
     3031    (save-excursion
     3032      (while (< (point) limit)
     3033        (let* ((end (ignore-errors (forward-sexp) (point)))
     3034               (start (and end (progn (backward-sexp) (point)))))
     3035          (cond
     3036           ((and pos start end (or (< pos start) (> pos end)))
     3037            (goto-char (if end (+ end 1) limit)))
     3038           (t
     3039            (forward-char 1)
     3040            (let* ((pat (scheme-nth-sexp-at-point 0))
     3041                   (new-vars (ignore-errors
     3042                               (scheme-extract-match-clause-vars pat))))
     3043              (setq match-vars (append new-vars match-vars)))
     3044            (goto-char (if (or pos (not end)) limit (+ end 1)))))))
     3045      match-vars)))
    30033046
    30043047;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    3005 ;; You can set the *default-scheme-implementation* to your preferred
     3048;; You can set the *scheme-default-implementation* to your preferred
    30063049;; implementation, for when we can't figure out the file from
    30073050;; heuristics.  Alternately, in any given buffer, just
    30083051;;
    3009 ;; (setq *current-scheme-implementation* whatever)
     3052;; (setq *scheme-current-implementation* whatever)
    30103053
    30113054(defgroup scheme-complete nil
     
    30133056  :group 'scheme)
    30143057
    3015 (defcustom default-scheme-implementation nil
     3058(defcustom scheme-default-implementation nil
    30163059  "Default scheme implementation to provide completion for
    30173060when scheme-complete can't infer the current implementation."
     
    30193062  :group 'scheme-complete)
    30203063
    3021 (defvar *current-scheme-implementation* nil)
    3022 (make-variable-buffer-local '*current-scheme-implementation*)
     3064(defvar *scheme-current-implementation* nil)
     3065(make-variable-buffer-local '*scheme-current-implementation*)
    30233066
    30243067;; most implementations use their name as the script name
     
    30293072    ))
    30303073
    3031 (defun current-scheme-implementation ()
    3032   (unless *current-scheme-implementation*
    3033     (setq *current-scheme-implementation*
     3074(defvar *scheme-imported-modules* '())
     3075
     3076(defun scheme-current-implementation ()
     3077  (unless *scheme-current-implementation*
     3078    (setq *scheme-current-implementation*
    30343079          (save-excursion
    30353080            (goto-char (point-min))
    3036             (or (if (looking-at "#! *\\([^ ]+\\)")
     3081            (or (if (looking-at "#! *\\([^ \t\n]+\\)")
    30373082                    (let ((script (file-name-nondirectory (match-string 1))))
    30383083                      (or (cdr (assoc script *scheme-interpreter-alist*))
     
    30473092                 ((re-search-forward "(module " nil t)
    30483093                  'mzscheme))))))
    3049   (or *current-scheme-implementation*
    3050       default-scheme-implementation))
     3094  (or *scheme-current-implementation*
     3095      scheme-default-implementation))
    30513096
    30523097;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    30533098
    3054 (defun current-local-vars (&optional env)
     3099(defun scheme-current-local-vars (&optional env)
    30553100  (let ((vars '())
    30563101        (limit (save-excursion (beginning-of-defun) (+ (point) 1)))
     
    30733118              ((lambda)
    30743119               (setq vars
    3075                      (append (mapcar #'list (flatten (nth-sexp-at-point 1)))
    3076                              vars)))
    3077               ((match)
    3078                (setq vars (append
    3079                            (mapcar #'list
    3080                                    (flatten (extract-match-vars
    3081                                              (nth-sexp-at-point 2))))
    3082                            vars)))
    3083               ((match-let match-let*)
    3084                (setq vars (append (mapcar #'list
    3085                                           (flatten (extract-match-vars
    3086                                                     (nth-sexp-at-point 1))))
    3087                                   vars)))
     3120                     (append
     3121                      (mapcar #'list
     3122                              (scheme-flatten (scheme-nth-sexp-at-point 1)))
     3123                      vars)))
     3124              ((match match-let match-let*)
     3125               (setq vars
     3126                     (append
     3127                      (ignore-errors
     3128                        (save-excursion
     3129                          (let ((limit (save-excursion
     3130                                         (cond
     3131                                          ((eq sym 'match)
     3132                                           (backward-char 1)
     3133                                           (forward-sexp 1))
     3134                                          (t
     3135                                           (forward-sexp 2)))
     3136                                         (point))))
     3137                            (forward-sexp 2)
     3138                            (if (eq sym 'match)
     3139                                (forward-sexp 1))
     3140                            (backward-sexp 1)
     3141                            (if (not (eq sym 'match))
     3142                                (forward-char 1))
     3143                            (scheme-extract-match-vars
     3144                             (and (or (eq sym 'match) (< start limit)) start)
     3145                             limit))))
     3146                      vars)))
    30883147              ((let let* letrec letrec* let-syntax letrec-syntax and-let* do)
    30893148               (or
    30903149                (ignore-errors
    30913150                  (save-excursion
    3092                     (beginning-of-next-sexp)
     3151                    (scheme-beginning-of-next-sexp)
    30933152                    (if (and (eq sym 'let)
    30943153                             (eq ?w (char-syntax (char-after (point)))))
     
    30963155                        (let* ((sym (scheme-symbol-at-point))
    30973156                               (args (progn
    3098                                        (beginning-of-next-sexp)
    3099                                        (let-vars-at-point env))))
     3157                                       (scheme-beginning-of-next-sexp)
     3158                                       (scheme-let-vars-at-point env))))
    31003159                          (setq vars (cons `(,sym (lambda ,(mapcar #'car args)))
    31013160                                           (append args vars))))
    3102                       (setq vars (append (let-vars-at-point env) vars)))
     3161                      (setq vars (append (scheme-let-vars-at-point env) vars)))
    31033162                    t))
    31043163                (goto-char limit)))
     
    31073166                     (append (mapcar
    31083167                              #'list
    3109                               (append-map
    3110                                #'flatten
    3111                                (remove-if-not 'consp (nth-sexp-at-point 1))))
     3168                              (scheme-append-map
     3169                               #'scheme-flatten
     3170                               (remove-if-not #'consp
     3171                                              (scheme-nth-sexp-at-point 1))))
    31123172                             vars)))
    31133173              ((receive defun defmacro)
    31143174               (setq vars
    3115                      (append (mapcar #'list (flatten (nth-sexp-at-point 1)))
     3175                     (append (mapcar #'list
     3176                                     (scheme-flatten
     3177                                      (scheme-nth-sexp-at-point 1)))
    31163178                             vars)))
    31173179              (t
     
    31213183                                 (scheme-extract-definitions))))
    31223184                     (setq vars
    3123                            (append (append-map
     3185                           (append (scheme-append-map
    31243186                                    #'(lambda (x)
    31253187                                        (and (consp (cdr x))
     
    31273189                                             (eq 'lambda (caadr x))
    31283190                                             (mapcar #'list
    3129                                                      (flatten (cadadr x)))))
     3191                                                     (scheme-flatten
     3192                                                      (cadadr x)))))
    31303193                                    defs)
    31313194                                   defs
     
    31403203                  (backward-sexp)
    31413204                  (if (< (point) start)
    3142                       (setq vars (append (current-scheme-definitions) vars))
     3205                      (setq vars (append (scheme-current-definitions) vars))
    31433206                    ))))))))
    31443207    (reverse vars)))
    31453208
    3146 (defun extract-import-module-name (sexp &optional mzschemep)
     3209(defun scheme-extract-import-module-name (sexp &optional mzschemep)
    31473210  (case (car sexp)
    31483211    ((prefix)
    3149      (extract-import-module-name (if mzschemep (caddr sexp) (cadr sexp))))
     3212     (scheme-extract-import-module-name
     3213      (if mzschemep (caddr sexp) (cadr sexp))))
    31503214    ((prefix-all-except)
    3151      (extract-import-module-name (caddr sexp)))
     3215     (scheme-extract-import-module-name (caddr sexp)))
    31523216    ((for only except rename lib library)
    3153      (extract-import-module-name (cadr sexp) mzschemep))
     3217     (scheme-extract-import-module-name (cadr sexp) mzschemep))
    31543218    ((import)
    3155      (extract-import-module-name (cadr sexp) mzschemep))
     3219     (scheme-extract-import-module-name (cadr sexp) mzschemep))
    31563220    ((require)
    3157      (extract-import-module-name (cadr sexp) t))
     3221     (scheme-extract-import-module-name (cadr sexp) t))
    31583222    (t sexp)))
    31593223
    3160 (defun extract-import-module-imports (sexp &optional mzschemep)
     3224(defun scheme-extract-import-module-imports (sexp &optional mzschemep)
    31613225  (case (car sexp)
    31623226    ((prefix)
    3163      (let* ((ids (extract-import-module-name
     3227     (let* ((ids (scheme-extract-import-module-name
    31643228                  (if mzschemep (caddr sexp) (cadr sexp))
    31653229                  mzschemep))
     
    31753239                       x
    31763240                     (intern (concat prefix (symbol-name x)))))
    3177                (extract-import-module-name (caddr sexp) t))))
     3241               (scheme-extract-import-module-name (caddr sexp) t))))
    31783242    ((for)
    3179      (extract-import-module-name (cadr sexp) mzschemep))
     3243     (scheme-extract-import-module-name (cadr sexp) mzschemep))
    31803244    ((rename)
    31813245     (if mzschemep
     
    31843248    ((except)
    31853249     (remove-if #'(lambda (x) (memq x (cddr sexp)))
    3186                 (extract-import-module-imports (cadr sexp) mzschemep)))
     3250                (scheme-extract-import-module-imports (cadr sexp) mzschemep)))
    31873251    ((only)
    31883252     (cddr sexp))
    31893253    ((import)
    3190      (extract-import-module-imports (cadr sexp) mzschemep))
     3254     (scheme-extract-import-module-imports (cadr sexp) mzschemep))
    31913255    ((require for-syntax)
    3192      (extract-import-module-imports (cadr sexp) t))
     3256     (scheme-extract-import-module-imports (cadr sexp) t))
    31933257    ((library)
    31943258     (if (and (stringp (cadr sexp)) (file-exists-p (cadr sexp)))
     
    32043268    (t sexp)))
    32053269
    3206 (defun extract-sexp-imports (sexp)
     3270(defun scheme-extract-sexp-imports (sexp)
    32073271  (case (car sexp)
    32083272    ((begin)
    3209      (append-map #'extract-sexp-imports (cdr sexp)))
     3273     (scheme-append-map #'scheme-extract-sexp-imports (cdr sexp)))
    32103274    ((cond-expand)
    3211      (append-map #'extract-sexp-imports (append-map #'cdr (cdr sexp))))
     3275     (scheme-append-map #'scheme-extract-sexp-imports
     3276                        (scheme-append-map #'cdr (cdr sexp))))
    32123277    ((use require-extension)
    3213      (append-map #'scheme-module-exports (cdr sexp)))
     3278     (scheme-append-map #'scheme-module-exports (cdr sexp)))
    32143279    ((autoload)
    3215      (mapcar #'(lambda (x) (cons (if (consp x) (car x) x) '((lambda obj))))
    3216              (cddr sexp)))
     3280     (unless (member (cadr sexp) *scheme-imported-modules*)
     3281       (push (cadr sexp) *scheme-imported-modules*)
     3282       (mapcar #'(lambda (x) (cons (if (consp x) (car x) x) '((lambda obj))))
     3283               (cddr sexp))))
    32173284    ((load)
    3218      (and (file-exists-p (cadr sexp))
    3219           (with-find-file (cadr sexp)
    3220             (current-scheme-globals))))
     3285     (unless (member (cadr sexp) *scheme-imported-modules*)
     3286       (push (cadr sexp) *scheme-imported-modules*)
     3287       (and (file-exists-p (cadr sexp))
     3288            (scheme-with-find-file (cadr sexp)
     3289              (scheme-current-globals)))))
    32213290    ((library module)
    3222      (append-map #'extract-import-module-imports
     3291     (scheme-append-map #'scheme-extract-import-module-imports
    32233292                 (remove-if #'(lambda (x) (memq (car x) '(import require)))
    32243293                            (cdr sexp))))
    32253294    (t '())))
    32263295
    3227 (defun module-symbol-p (sym)
     3296(defun scheme-module-symbol-p (sym)
    32283297  (memq sym '(use require require-extension begin cond-expand
    32293298              module library define-module autoload load)))
    32303299
    3231 (defun skip-shebang ()
     3300(defun scheme-skip-shebang ()
    32323301  ;; skip shebang if present
    32333302  (if (looking-at "#!")
    32343303      ;; guile skips until a closing !#
    3235       (if (eq 'guile (current-scheme-implementation))
     3304      (if (eq 'guile (scheme-current-implementation))
    32363305          (re-search-forward "!#" nil t)
    32373306        (next-line))))
    32383307
    3239 (defun current-scheme-imports ()
    3240   (let ((imports '()))
     3308(defun scheme-current-imports ()
     3309  (let ((imports '())
     3310        (*scheme-imported-modules* '()))
    32413311    (save-excursion
    32423312      (goto-char (point-min))
    3243       (skip-shebang)
     3313      (scheme-skip-shebang)
    32443314      ;; scan for module forms
    32453315      (while (not (eobp))
     
    32503320                (forward-char)
    32513321                (when (and (not (eq ?\( (char-after)))
    3252                            (module-symbol-p (scheme-symbol-at-point)))
     3322                           (scheme-module-symbol-p (scheme-symbol-at-point)))
    32533323                  (backward-char)
    32543324                  (ignore-errors
    32553325                    (setq imports
    3256                           (append (extract-sexp-imports (nth-sexp-at-point 0))
     3326                          (append (scheme-extract-sexp-imports
     3327                                   (scheme-nth-sexp-at-point 0))
    32573328                                  imports)))))
    32583329              (goto-char end))
    32593330          ;; if an incomplete sexp is found, try to recover at the
    32603331          ;; next line beginning with an open paren
    3261           (goto-next-top-level))))
     3332          (scheme-goto-next-top-level))))
    32623333    imports))
    32633334
     
    32653336(defun scheme-name-of-define ()
    32663337  (save-excursion
    3267     (beginning-of-next-sexp)
     3338    (scheme-beginning-of-next-sexp)
    32683339    (if (eq ?\( (char-syntax (char-after)))
    32693340        (forward-char))
     
    32733344(defun scheme-type-of-define ()
    32743345  (save-excursion
    3275     (beginning-of-next-sexp)
     3346    (scheme-beginning-of-next-sexp)
    32763347    (cond
    32773348     ((eq ?\( (char-syntax (char-after)))
    3278       `(lambda ,(cdr (nth-sexp-at-point 0))))
     3349      `(lambda ,(cdr (scheme-nth-sexp-at-point 0))))
    32793350     (t
    3280       (beginning-of-next-sexp)
    3281       (sexp-type-at-point)))))
     3351      (scheme-beginning-of-next-sexp)
     3352      (scheme-sexp-type-at-point)))))
    32823353
    32833354;; we should be at the opening paren of an expression
     
    32993370         (backward-char)
    33003371         (ignore-errors
    3301            (let* ((sexp (nth-sexp-at-point 0))
     3372           (let* ((sexp (scheme-nth-sexp-at-point 0))
    33023373                  (name (symbol-name (cadr sexp))))
    33033374             `((,(intern (concat name "?")) (lambda (obj) boolean))
    33043375               (,(intern (concat "make-" name)) (lambda ,(cddr sexp) ))
    3305                ,@(append-map
     3376               ,@(scheme-append-map
    33063377                  #'(lambda (x)
    33073378                      `((,(intern (concat name "-" (symbol-name x)))
     
    33133384         (backward-char)
    33143385         (ignore-errors
    3315            (let ((sexp (nth-sexp-at-point 0)))
     3386           (let ((sexp (scheme-nth-sexp-at-point 0)))
    33163387             `((,(caaddr sexp) (lambda ,(cdaddr sexp)))
    33173388               (,(cadddr sexp) (lambda (obj)))
    3318                ,@(append-map
     3389               ,@(scheme-append-map
    33193390                  #'(lambda (x)
    33203391                      (if (consp x)
     
    33273398        ((begin progn)
    33283399         (forward-sexp)
    3329          (current-scheme-definitions))
     3400         (scheme-current-definitions))
    33303401        (t
    33313402         '())))))
     
    33343405;; top-level form (i.e. a line beginning with an open paren) if
    33353406;; there's an error during normal sexp movement
    3336 (defun current-scheme-globals ()
     3407(defun scheme-current-globals ()
    33373408  (let ((globals '()))
    33383409    (save-excursion
     
    33443415        (setq globals
    33453416              (append (ignore-errors (scheme-extract-definitions)) globals))
    3346         (goto-next-top-level)))
     3417        (scheme-goto-next-top-level)))
    33473418    globals))
    33483419
    33493420;; for internal defines, etc.
    3350 (defun current-scheme-definitions (&optional enclosing-end)
     3421(defun scheme-current-definitions (&optional enclosing-end)
    33513422  (let ((defs '())
    33523423        (end (or enclosing-end (point-max))))
     
    33583429           (new-defs
    33593430             (setq defs (append new-defs defs))
    3360              (or (ignore-errors (beginning-of-next-sexp)
     3431             (or (ignore-errors (scheme-beginning-of-next-sexp)
    33613432                                (> (point) here))
    33623433                 (goto-char end)))
     
    33653436    defs))
    33663437
     3438(defun scheme-srfi-exports (i)
     3439  (and (integerp i)
     3440       (>= i 0)
     3441       (< i (length *scheme-srfi-info*))
     3442       (let ((info (cdr (aref *scheme-srfi-info* i))))
     3443         (if (and (consp info) (null (cdr info)) (symbolp (car info)))
     3444             (scheme-module-exports (car info))
     3445           info))))
     3446
    33673447(defun scheme-module-exports (mod)
    3368   (if (not (symbolp mod))
    3369       '()
     3448  (unless (member mod *scheme-imported-modules*)
     3449    (push mod *scheme-imported-modules*)
    33703450    (cond
     3451     ((and (consp mod) (eq 'srfi (car mod)))
     3452      (scheme-append-map #'scheme-srfi-exports (cdr mod)))
     3453     ((not (symbolp mod))
     3454      '())
    33713455     ((string-match "^srfi-" (symbol-name mod))
    3372       (let ((i (string-to-number (substring (symbol-name mod) 5))))
    3373         (and (< i (length *scheme-srfi-info*))
    3374              (let ((info (cdr (aref *scheme-srfi-info* i))))
    3375                (if (and (consp info) (null (cdr info)) (symbolp (car info)))
    3376                    (scheme-module-exports (car info))
    3377                  info)))))
     3456      (scheme-srfi-exports
     3457       (string-to-number (substring (symbol-name mod) 5))))
    33783458     (t
    3379       (case (current-scheme-implementation)
     3459      (case (scheme-current-implementation)
    33803460        ((chicken)
    33813461         (let ((predefined (assq mod *scheme-chicken-modules*)))
     
    33853465              #'(lambda (x) (cons x '((lambda obj))))
    33863466              (or (mapcar #'intern
    3387                           (file->lines (concat "/usr/local/lib/chicken/3/"
    3388                                                (symbol-name mod)
    3389                                                ".exports")))
     3467                          (scheme-file->lines
     3468                           (concat "/usr/local/lib/chicken/3/"
     3469                                   (symbol-name mod)
     3470                                   ".exports")))
    33903471                  (let ((setup-info (concat "/usr/local/lib/chicken/3/"
    33913472                                            (symbol-name mod)
    33923473                                            ".setup-info")))
    33933474                    (and (file-exists-p setup-info)
    3394                          (with-find-file setup-info
    3395                            (let* ((alist (nth-sexp-at-point 0))
     3475                         (scheme-with-find-file setup-info
     3476                           (let* ((alist (scheme-nth-sexp-at-point 0))
    33963477                                  (cell (assq 'exports alist)))
    33973478                             (cdr cell))))))))))
    33983479        ((gauche)
    3399          (let ((path (find-file-in-path
     3480         (let ((path (scheme-find-file-in-path
    34003481                      (concat (subst-char-in-string ?. ?/ (symbol-name mod))
    34013482                              ".scm")
     
    34103491               '()
    34113492             ;; XXXX parse, don't use regexps
    3412              (with-find-file path
     3493             (scheme-with-find-file path
    34133494               (when (re-search-forward "(export" nil t)
    34143495                 (backward-sexp)
    34153496                 (backward-char)
    34163497                 (mapcar #'list (cdr (ignore-errors
    3417                                        (nth-sexp-at-point 0)))))))))
     3498                                       (scheme-nth-sexp-at-point 0)))))))))
    34183499        ((mzscheme)
    3419          (let ((path (find-file-in-path
     3500         (let ((path (scheme-find-file-in-path
    34203501                      (symbol-name mod)
    34213502                      '("."
     
    34253506               '()
    34263507             ;; XXXX parse, don't use regexps
    3427              (with-find-file path
     3508             (scheme-with-find-file path
    34283509               (when (re-search-forward "(provide" nil t)
    34293510                 (backward-sexp)
    34303511                 (backward-char)
    34313512                 (mapcar #'list (cdr (ignore-errors
    3432                                        (nth-sexp-at-point 0)))))))))
     3513                                       (scheme-nth-sexp-at-point 0)))))))))
    34333514        (t '()))))))
    34343515
     
    34483529      ((num) 'number)
    34493530      ((z) 'complex)
    3450       ((x y timeout seconds nanoseconds) 'real)
     3531      ((x1 x2 x3 y timeout seconds nanoseconds) 'real)
    34513532      ((i j k n m int index size count len length bound nchars start end
    34523533        pid uid gid fd fileno errno)
     
    34983579        (setq type (car spec))
    34993580        (setq spec nil))
    3500        ((and (consp (cdr spec)) (eq '|...| (cadr spec)))
     3581       ((and (consp (cdr spec)) (eq '\.\.\. (cadr spec)))
    35013582        (setq type (car spec))
    35023583        (setq spec nil)))
     
    35073588    type))
    35083589
     3590(defun scheme-predicate->type (pred)
     3591  (case pred
     3592    ((even? odd?) 'integer)
     3593    ((char-upper-case? char-lower-case?
     3594      char-alphabetic? char-numeric? char-whitespace?)
     3595     'char)
     3596    (t
     3597     ;; catch all the `type?' predicates with pattern matching
     3598     ;; ... we could be smarter if the env was passed
     3599     (let ((str (symbol-name pred)))
     3600       (if (string-match "\\?$" str)
     3601           (scheme-translate-type
     3602            (intern (substring str 0 (- (length str) 1))))
     3603         'object)))))
     3604
    35093605;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    35103606;; completion
     
    35183614    (aref (read-key-sequence nil) 0)))
    35193615
    3520 (defun string-prefix-p (pref str)
     3616(unless (fboundp 'event-basic-type)
     3617  (defalias 'event-basic-type 'event-key))
     3618
     3619(defun scheme-string-prefix-p (pref str)
    35213620  (let ((p-len (length pref))
    35223621        (s-len (length str)))
     
    35243623         (equal pref (substring str 0 p-len)))))
    35253624
    3526 (defun do-completion (str coll &optional strs pred)
     3625(defun scheme-do-completion (str coll &optional strs pred)
    35273626  (let* ((coll (mapcar #'(lambda (x)
    35283627                           (cond
     
    35453644      (ding))
    35463645     ((not (string= str completion))
    3547       (let ((prefix-p (string-prefix-p completion completion1)))
     3646      (let ((prefix-p (scheme-string-prefix-p completion completion1)))
    35483647        (unless prefix-p
    35493648          (save-excursion
     
    35643663            'string-lessp)))
    35653664        (while (not done)
    3566           (let ((event
    3567                  (with-current-buffer (get-buffer "*Completions*")
    3568                    (read-event))))
     3665          (let* ((orig-event
     3666                  (with-current-buffer (get-buffer "*Completions*")
     3667                    (read-event)))
     3668                 (event (event-basic-type orig-event)))
    35693669            (cond
    35703670             ((or (event-matches-key-specifier-p event 'tab)
     
    35803680                      (event-matches-key-specifier-p event 32))
    35813681                  (bury-buffer (get-buffer "*Completions*"))
    3582                 (setq unread-command-events (list event)))
     3682                (setq unread-command-events (list orig-event)))
    35833683              (setq done t))))))
    35843684      ))))
     
    35953695  (let ((env (list *scheme-r5rs-info*)))
    35963696    ;; base language
    3597     (let ((base (cdr (assq (current-scheme-implementation)
     3697    (let ((base (cdr (assq (scheme-current-implementation)
    35983698                           *scheme-implementation-exports*))))
    35993699      (if base (push base env)))
    36003700    ;; imports
    3601     (let ((imports (ignore-errors (current-scheme-imports))))
     3701    (let ((imports (ignore-errors (scheme-current-imports))))
    36023702      (if imports (push imports env)))
    36033703    ;; top-level defs
    3604     (let ((top (ignore-errors (current-scheme-globals))))
     3704    (let ((top (ignore-errors (scheme-current-globals))))
    36053705      (if top (push top env)))
    36063706    ;; current local vars
    3607     (let ((locals (ignore-errors (current-local-vars env))))
     3707    (let ((locals (ignore-errors (scheme-current-local-vars env))))
    36083708      (if locals (push locals env)))
    36093709    env))
     
    36713771      (t x))))
    36723772
    3673 (defun nth* (n ls)
     3773(defun scheme-nth* (n ls)
    36743774  (while (and (consp ls) (> n 0))
    36753775    (setq n (- n 1)
     
    36773777  (and (consp ls) (car ls)))
    36783778
    3679 (defun file->lines (file)
     3779(defun scheme-file->lines (file)
    36803780  (and (file-readable-p file)
    3681        (with-find-file file
     3781       (scheme-with-find-file file
    36823782         (goto-char (point-min))
    36833783         (let ((res '()))
     
    36893789           (reverse res)))))
    36903790
    3691 (defun passwd-file-names (file &optional pat)
     3791(defun scheme-passwd-file-names (file &optional pat)
    36923792  (delete
    36933793   nil
     
    36983798             (string-match "^\\([^:]*\\):" line)
    36993799             (match-string 1 line)))
    3700     (file->lines file))))
    3701 
    3702 (defun host-file-names (file)
    3703   (append-map
     3800    (scheme-file->lines file))))
     3801
     3802(defun scheme-host-file-names (file)
     3803  (scheme-append-map
    37043804   #'(lambda (line)
    37053805       (let ((i (string-match "#" line)))
    37063806         (if i (setq line (substring line 0 i))))
    37073807       (cdr (split-string line)))
    3708    (file->lines file)))
    3709 
    3710 (defun ssh-known-hosts-file-names (file)
    3711   (append-map
     3808   (scheme-file->lines file)))
     3809
     3810(defun scheme-ssh-known-hosts-file-names (file)
     3811  (scheme-append-map
    37123812   #'(lambda (line)
    37133813       (split-string (car (split-string line)) ","))
    3714    (file->lines file)))
    3715 
    3716 (defun ssh-config-file-names (file)
    3717   (append-map
     3814   (scheme-file->lines file)))
     3815
     3816(defun scheme-ssh-config-file-names (file)
     3817  (scheme-append-map
    37183818   #'(lambda (line)
    37193819       (and (string-match "^ *Host" line)
    37203820            (cdr (split-string line))))
    3721    (file->lines file)))
    3722 
    3723 (defun complete-user-name (trans sym)
     3821   (scheme-file->lines file)))
     3822
     3823(defun scheme-complete-user-name (trans sym)
    37243824  (if (string-match "apple" (emacs-version))
    3725       (append (passwd-file-names "/etc/passwd" "^[^_].*")
     3825      (append (scheme-passwd-file-names "/etc/passwd" "^[^_].*")
    37263826              (delete "Shared" (directory-files "/Users" nil "^[^.].*")))
    3727     (passwd-file-names "/etc/passwd")))
    3728 
    3729 (defun complete-host-name (trans sym)
    3730   (append (host-file-names "/etc/hosts")
    3731           (ssh-known-hosts-file-names "~/.ssh/known_hosts")
    3732           (ssh-config-file-names "~/.ssh/config")))
     3827    (scheme-passwd-file-names "/etc/passwd")))
     3828
     3829(defun scheme-complete-host-name (trans sym)
     3830  (append (scheme-host-file-names "/etc/hosts")
     3831          (scheme-ssh-known-hosts-file-names "~/.ssh/known_hosts")
     3832          (scheme-ssh-config-file-names "~/.ssh/config")))
    37333833
    37343834;; my /etc/services is 14k lines, so we try to optimize this
    3735 (defun complete-port-name (trans sym)
     3835(defun scheme-complete-port-name (trans sym)
    37363836  (and (file-readable-p "/etc/services")
    3737        (with-find-file "/etc/services"
     3837       (scheme-with-find-file "/etc/services"
    37383838         (goto-char (point-min))
    37393839         (let ((rx (concat "^\\(" (regexp-quote (if (symbolp sym)
     
    37513851           res))))
    37523852
    3753 (defun complete-file-name (trans sym)
     3853(defun scheme-complete-file-name (trans sym)
    37543854  (let* ((file (file-name-nondirectory sym))
    37553855         (dir (file-name-directory sym))
     
    37593859      res)))
    37603860
    3761 (defun complete-directory-name (trans sym)
     3861(defun scheme-complete-directory-name (trans sym)
    37623862  (let* ((file (file-name-nondirectory sym))
    37633863         (dir (file-name-directory sym))
     
    37693869  (case type
    37703870    ((filename)
    3771      '(complete-file-name file-name-nondirectory))
     3871     '(scheme-complete-file-name file-name-nondirectory))
    37723872    ((directory)
    3773      '(complete-directory-name file-name-nondirectory))
     3873     '(scheme-complete-directory-name file-name-nondirectory))
    37743874    (t
    37753875     (cond
     
    37783878      ((and (consp type) (eq 'or (car type)))
    37793879       (car (delete nil (mapcar #'scheme-string-completer (cdr type)))))))))
    3780 
    3781 ;; (defun remove-duplicate-strings/tail (ls)
    3782 ;;   (while (consp ls)
    3783 ;;     (delete (car ls) (cdr ls))
    3784 ;;     (setq ls (cdr ls))))
    3785 
    3786 ;; (defun remove-duplicate-strings (ls)
    3787 ;;   (remove-duplicate-strings/tail ls)
    3788 ;;   ls)
    37893880
    37903881(defun scheme-apply-string-completer (cmpl sym)
     
    38003891         (in-str-p (scheme-in-string-p))
    38013892         (x (save-excursion
    3802               (if in-str-p (beginning-of-string))
    3803               (enclosing-2-sexp-prefixes)))
     3893              (if in-str-p (scheme-beginning-of-string))
     3894              (scheme-enclosing-2-sexp-prefixes)))
    38043895         (inner-proc (car x))
    38053896         (inner-pos (cadr x))
     
    38073898         (outer-pos (cadddr x))
    38083899         (env (save-excursion
    3809                 (if in-str-p (beginning-of-string))
     3900                (if in-str-p (scheme-beginning-of-string))
    38103901                (scheme-current-env)))
    38113902         (outer-spec (scheme-env-lookup env outer-proc))
     
    38163907     ;; return all env symbols when a prefix arg is given
    38173908     (arg
    3818       (do-completion sym (scheme-env-filter #'(lambda (x) t) env)))
     3909      (scheme-do-completion sym (scheme-env-filter #'(lambda (x) t) env)))
    38193910     ;; for now just do file-name completion in strings
    38203911     (in-str-p
     
    38243915                   (scheme-lookup-type (cadr inner-type) inner-pos)))
    38253916             (completer (or (scheme-string-completer param-type)
    3826                             '(complete-file-name file-name-nondirectory))))
    3827         (do-completion
     3917                            '(scheme-complete-file-name
     3918                              file-name-nondirectory))))
     3919        (scheme-do-completion
    38283920         ;;(if (consp completer) (funcall (cadr completer) sym) sym)
    38293921         sym
     
    38333925           (eq 'special (car outer-type))
    38343926           (cadddr outer-type))
    3835       (do-completion sym (funcall (cadddr outer-type) sym)))
     3927      (scheme-do-completion sym (funcall (cadddr outer-type) sym)))
    38363928     ;; inner special
    38373929     ((and (consp inner-type)
    38383930           (eq 'special (car inner-type))
    38393931           (caddr inner-type))
    3840       (do-completion sym (funcall (caddr inner-type) sym)))
     3932      (scheme-do-completion sym (funcall (caddr inner-type) sym)))
    38413933     ;; completing inner procedure, complete procedures with a
    38423934     ;; matching return type
     
    38443936           (eq 'lambda (car outer-type))
    38453937           (not (zerop outer-pos))
    3846            (nth* outer-pos (cadr outer-type))
     3938           (scheme-nth* (- outer-pos 1) (cadr outer-type))
    38473939           (or (zerop inner-pos)
    38483940               (and (>= 1 inner-pos)
     
    38553947                           (eq (caddr inner-type) (caddr param-type)))))))
    38563948      (let ((want-type (scheme-lookup-type (cadr outer-type) outer-pos)))
    3857         (do-completion
     3949        (scheme-do-completion
    38583950         sym
    38593951         (scheme-env-filter
    38603952          #'(lambda (x)
    38613953              (let ((type (cadr x)))
    3862                 (or (memq type '(procedure object))
     3954                (or (memq type '(procedure object nil))
    38633955                    (and (consp type)
    38643956                         (or (and (eq 'syntax (car type))
     
    39104002                 completer
    39114003                 (scheme-apply-string-completer completer sym)))))
    3912         (do-completion
     4004        (scheme-do-completion
    39134005         sym
    39144006         (append set-or-flags base-completions)
     
    39164008     ;; completing a function
    39174009     ((zerop inner-pos)
    3918       (do-completion
     4010      (scheme-do-completion
    39194011       sym
    39204012       (scheme-env-filter
    39214013        #'(lambda (x)
    3922             (or (memq x '(procedure object))
     4014            (or (null (cdr x))
     4015                (memq (cadr x) '(procedure object nil))
    39234016                (and (consp (cadr x))
    39244017                     (memq (caadr x) '(lambda syntax)))))
     
    39264019     ;; complete everything
    39274020     (t
    3928       (do-completion sym (scheme-env-filter #'(lambda (x) t) env)) ))))
     4021      (scheme-do-completion sym (scheme-env-filter #'(lambda (x) t) env)) ))))
    39294022
    39304023(defun scheme-complete-or-indent (&optional arg)
     
    39424035;; optional eldoc function
    39434036
    3944 (defun translate-dot-to-optional (ls)
     4037(defun scheme-translate-dot-to-optional (ls)
    39454038  (let ((res '()))
    39464039    (while (consp ls)
     
    39524045
    39534046(defun scheme-optional-in-brackets (ls)
    3954   ;; stupid xemacs won't allow ... as a symbol
    3955   (setq ls (mapcar #'(lambda (x) (if (eq x '|...|) "..." x)) ls))
    39564047  ;; put optional arguments inside brackets (via a vector)
    39574048  (if (memq :optional ls)
     
    39734064      (t x))))
    39744065
    3975 (defun sexp-to-string (sexp)
     4066(defun scheme-sexp-to-string (sexp)
    39764067  (with-output-to-string (princ sexp)))
    39774068
     
    39814072         (fnsym (if (consp fnsym0) (car fnsym0) fnsym0))
    39824073         (env (save-excursion
    3983                 (if (scheme-in-string-p) (beginning-of-string))
     4074                (if (scheme-in-string-p) (scheme-beginning-of-string))
    39844075                (scheme-current-env)))
    39854076         (spec (or (and sym (scheme-env-lookup env sym))
     
    39984089                   "syntax: "
    39994090                 "")
    4000                (sexp-to-string
     4091               (scheme-sexp-to-string
    40014092                (cons (car spec)
    40024093                      (scheme-optional-in-brackets
    40034094                       (mapcar #'scheme-base-type
    4004                                (translate-dot-to-optional (cadr type))))))
     4095                               (scheme-translate-dot-to-optional
     4096                                (cadr type))))))
    40054097               (if (and (consp (cddr type))
    40064098                        (not (memq (caddr type) '(obj object))))
    4007                    (concat " => " (sexp-to-string (caddr type)))
     4099                   (concat " => " (scheme-sexp-to-string (caddr type)))
    40084100                 "")))
    40094101             ((and (consp type) (eq (car type) 'special))
    4010               (sexp-to-string (car spec)))
     4102              (scheme-sexp-to-string (car spec)))
    40114103             (t
    4012               (sexp-to-string type)))
     4104              (scheme-sexp-to-string type)))
    40134105            (if (and (not (nth 3 spec)) (nth 4 spec)) " - " "")
    40144106            (or (nth 4 spec) ""))))))
     
    40164108(provide 'scheme-complete)
    40174109
     4110;; Local Variables:
     4111;; eval: (put 'scheme-with-find-file 'lisp-indent-hook 1)
     4112;; End:
     4113
  • chicken/branches/prerelease/scripts/makehtml.scm

    r10911 r11632  
    101101    "Unit data-structures"
    102102    "Unit ports"
     103    "Unit files"
    103104    "Unit extras"
    104105    "Unit srfi-1"
  • chicken/branches/prerelease/scripts/maketexi.scm

    r10911 r11632  
    3838                             "Unit data-structures"
    3939                             "Unit ports"
     40                             "Unit files"
    4041                             "Unit extras"
    4142                             "Unit srfi-1"
  • chicken/branches/prerelease/srfi-18.scm

    r9381 r11632  
    260260  (when (eq? thread ##sys#primordial-thread)
    261261    ((##sys#exit-handler)) )
    262   (##sys#setislot thread 2 (list (##core#undefined)))
     262  (##sys#setslot thread 2 (list (##core#undefined)))
    263263  (##sys#setslot thread 7 (##sys#make-structure 'condition '(terminated-thread-exception) '()))
    264264  (##sys#thread-kill! thread 'terminated)
  • chicken/branches/prerelease/svnrevision.sh

    r9599 r11632  
    2727
    2828
     29LANG="C"
     30
    2931if test -d ".svn" ;
    3032then
  • chicken/branches/prerelease/utils.scm

    r10911 r11632  
    2828(declare
    2929  (unit utils)
    30   (uses regex data-structures extras)
     30  (uses regex data-structures extras files)
    3131  (usual-integrations)
    3232  (fixnum)
     
    187187
    188188
    189 ;;; Like `delete-file', but does nothing if the file doesn't exist:
    190 
    191 (define delete-file*
    192   (let ([file-exists? file-exists?]
    193         [delete-file delete-file] )
    194     (lambda (file)
    195       (and (file-exists? file) (delete-file file) #t) ) ) )
    196 
    197 ;;; file-copy and file-move : they do what you'd think.
    198 (define (file-copy origfile newfile #!optional (clobber #f) (blocksize 1024))
    199     (##sys#check-string origfile 'file-copy)
    200     (##sys#check-string newfile 'file-copy)
    201     (##sys#check-number blocksize 'file-copy)
    202     (or (and (integer? blocksize) (> blocksize 0))
    203         (##sys#error (string-append
    204                          "invalid blocksize given: not a positive integer - "
    205                          (number->string blocksize))))
    206     (or (file-exists? origfile)
    207         (##sys#error (string-append "origfile does not exist - " origfile)))
    208     (and (file-exists? newfile)
    209          (or clobber
    210              (##sys#error (string-append
    211                               "newfile exists but clobber is false - "
    212                               newfile))))
    213     (let* ((i   (condition-case (open-input-file origfile)
    214                     (val ()
    215                         (##sys#error (string-append
    216                                          "could not open origfile for read - "
    217                                          origfile)))))
    218            (o   (condition-case (open-output-file newfile)
    219                     (val ()
    220                         (##sys#error (string-append
    221                                          "could not open newfile for write - "
    222                                          newfile)))))
    223            (s   (make-string blocksize)))
    224         (let loop ((d   (read-string! blocksize s i))
    225                    (l   0))
    226             (if (= 0 d)
    227                 (begin
    228                     (close-input-port i)
    229                     (close-output-port o)
    230                     l)
    231                 (begin
    232                     (condition-case (write-string s d o)
    233                         (val ()
    234                             (close-input-port i)
    235                             (close-output-port o)
    236                             (##sys#error (string-append
    237                                              "error writing file starting at "
    238                                              (number->string l)))))
    239                     (loop (read-string! blocksize s i) (+ d l)))))))
    240 
    241 (define (file-move origfile newfile #!optional (clobber #f) (blocksize 1024))
    242     (##sys#check-string origfile 'file-move)
    243     (##sys#check-string newfile 'file-move)
    244     (##sys#check-number blocksize 'file-move)
    245     (or (and (integer? blocksize) (> blocksize 0))
    246         (##sys#error (string-append
    247                          "invalid blocksize given: not a positive integer - "
    248                          (number->string blocksize))))
    249     (or (file-exists? origfile)
    250         (##sys#error (string-append "origfile does not exist - " origfile)))
    251     (and (file-exists? newfile)
    252          (or clobber
    253              (##sys#error (string-append
    254                               "newfile exists but clobber is false - "
    255                               newfile))))
    256     (let* ((i   (condition-case (open-input-file origfile)
    257                     (val ()
    258                         (##sys#error (string-append
    259                                          "could not open origfile for read - "
    260                                          origfile)))))
    261            (o   (condition-case (open-output-file newfile)
    262                     (val ()
    263                         (##sys#error (string-append
    264                                          "could not open newfile for write - "
    265                                          newfile)))))
    266            (s   (make-string blocksize)))
    267         (let loop ((d   (read-string! blocksize s i))
    268                    (l   0))
    269             (if (= 0 d)
    270                 (begin
    271                     (close-input-port i)
    272                     (close-output-port o)
    273                     (condition-case (delete-file origfile)
    274                         (val ()
    275                             (##sys#error (string-append
    276                                              "could not remove origfile - "
    277                                              origfile))))
    278                     l)
    279                 (begin
    280                     (condition-case (write-string s d o)
    281                         (val ()
    282                             (close-input-port i)
    283                             (close-output-port o)
    284                             (##sys#error (string-append
    285                                              "error writing file starting at "
    286                                              (number->string l)))))
    287                     (loop (read-string! blocksize s i) (+ d l)))))))
    288 
    289 ;;; Pathname operations:
    290 
    291 (define absolute-pathname?
    292   (let ([string-match string-match]
    293         [regexp regexp]
    294         [string-append string-append])
    295     (let* ([drv (if ##sys#windows-platform "([A-Za-z]:)?" "")]
    296            [patt (make-anchored-pattern (string-append drv "[\\/\\\\].*"))]
    297            [rx (regexp patt)] )
    298       (lambda (pn)
    299         (##sys#check-string pn 'absolute-pathname?)
    300         (pair? (string-match rx pn)) ) ) ) )
    301 
    302 (define (chop-pds str pds)
    303   (and str
    304        (let ((len (##sys#size str))
    305              (pdslen (if pds (##sys#size pds) 1)))
    306          (if (and (fx>= len 1)
    307                   (if pds
    308                       (##core#inline "C_substring_compare" str pds (fx- len pdslen) 0 pdslen)
    309                       (memq (##core#inline "C_subchar" str (fx- len pdslen))
    310                             '(#\/ #\\) ) ) )
    311              (##sys#substring str 0 (fx- len pdslen))
    312              str) ) ) )
    313 
    314 (define make-pathname)
    315 (define make-absolute-pathname)
    316 (let ([string-append string-append]
    317       [absolute-pathname? absolute-pathname?]
    318       [def-pds "/"] )
    319 
    320   (define (conc-dirs dirs pds)
    321     (##sys#check-list dirs 'make-pathname)
    322     (let loop ([strs dirs])
    323       (if (null? strs)
    324           ""
    325           (let ((s1 (car strs)))
    326             (if (zero? (string-length s1))
    327                 (loop (cdr strs))
    328                 (string-append
    329                  (chop-pds (car strs) pds)
    330                  (or pds def-pds)
    331                  (loop (cdr strs))) ) ) ) ) )
    332 
    333   (define (canonicalize-dirs dirs pds)
    334     (cond [(or (not dirs) (null? dirs)) ""]
    335           [(string? dirs) (conc-dirs (list dirs) pds)]
    336           [else           (conc-dirs dirs pds)] ) )
    337 
    338   (define (_make-pathname loc dir file ext pds)
    339     (let ([ext (or ext "")]
    340           [file (or file "")]
    341           [pdslen (if pds (##sys#size pds) 1)] )
    342       (##sys#check-string dir loc)
    343       (##sys#check-string file loc)
    344       (##sys#check-string ext loc)
    345       (when pds (##sys#check-string pds loc))
    346       (string-append
    347        dir
    348        (if (and (fx>= (##sys#size file) pdslen)
    349                 (if pds
    350                     (##core#inline "C_substring_compare" pds file 0 0 pdslen)
    351                     (memq (##core#inline "C_subchar" file 0) '(#\\ #\/))))
    352            (##sys#substring file pdslen (##sys#size file))
    353            file)
    354        (if (and (fx> (##sys#size ext) 0)
    355                 (not (char=? (##core#inline "C_subchar" ext 0) #\.)) )
    356            "."
    357            "")
    358        ext) ) )
    359 
    360   (set! make-pathname
    361     (lambda (dirs file #!optional ext pds)
    362       (_make-pathname 'make-pathname (canonicalize-dirs dirs pds) file ext pds)))
    363 
    364   (set! make-absolute-pathname
    365     (lambda (dirs file #!optional ext pds)
    366       (_make-pathname
    367        'make-absolute-pathname
    368        (let ([dir (canonicalize-dirs dirs pds)])
    369          (if (absolute-pathname? dir)
    370              dir
    371              (##sys#string-append (or pds def-pds) dir)) )
    372        file ext pds) ) ) )
    373 
    374 (define decompose-pathname
    375   (let ([string-match string-match]
    376         [regexp regexp]
    377         [string-append string-append])
    378     (let* ([patt1 "^(.*[\\/\\\\])?([^\\/\\\\]+)(\\.([^\\/\\\\.]+))$"]
    379            [patt2 "^(.*[\\/\\\\])?((\\.)?[^\\/\\\\]+)$"]
    380            [rx1 (regexp patt1)]
    381            [rx2 (regexp patt2)]
    382            [strip-pds
    383              (lambda (dir)
    384                 (and dir
    385                      (if (member dir '("/" "\\"))
    386                          dir
    387                          (chop-pds dir #f) ) ) )] )
    388       (lambda (pn)
    389         (##sys#check-string pn 'decompose-pathname)
    390         (if (fx= 0 (##sys#size pn))
    391             (values #f #f #f)
    392             (let ([ms (string-match rx1 pn)])
    393               (if ms
    394                   (values (strip-pds (cadr ms)) (caddr ms) (car (cddddr ms)))
    395                   (let ([ms (string-match rx2 pn)])
    396                     (if ms
    397                         (values (strip-pds (cadr ms)) (caddr ms) #f)
    398                         (values (strip-pds pn) #f #f) ) ) ) ) ) ) ) ) )
    399 
    400 (define pathname-directory)
    401 (define pathname-file)
    402 (define pathname-extension)
    403 (define pathname-strip-directory)
    404 (define pathname-strip-extension)
    405 (define pathname-replace-directory)
    406 (define pathname-replace-file)
    407 (define pathname-replace-extension)
    408 (let ([decompose-pathname decompose-pathname])
    409 
    410   (set! pathname-directory
    411     (lambda (pn)
    412       (let-values ([(dir file ext) (decompose-pathname pn)])
    413         dir) ) )
    414 
    415   (set! pathname-file
    416     (lambda (pn)
    417       (let-values ([(dir file ext) (decompose-pathname pn)])
    418         file) ) )
    419 
    420   (set! pathname-extension
    421     (lambda (pn)
    422       (let-values ([(dir file ext) (decompose-pathname pn)])
    423         ext) ) )
    424 
    425   (set! pathname-strip-directory
    426     (lambda (pn)
    427       (let-values ([(dir file ext) (decompose-pathname pn)])
    428         (make-pathname #f file ext) ) ) )
    429 
    430   (set! pathname-strip-extension
    431     (lambda (pn)
    432       (let-values ([(dir file ext) (decompose-pathname pn)])
    433         (make-pathname dir file) ) ) )
    434 
    435   (set! pathname-replace-directory
    436     (lambda (pn dir)
    437       (let-values ([(_ file ext) (decompose-pathname pn)])
    438         (make-pathname dir file ext) ) ) )
    439 
    440   (set! pathname-replace-file
    441     (lambda (pn file)
    442       (let-values ([(dir _ ext) (decompose-pathname pn)])
    443         (make-pathname dir file ext) ) ) )
    444 
    445   (set! pathname-replace-extension
    446     (lambda (pn ext)
    447       (let-values ([(dir file _) (decompose-pathname pn)])
    448         (make-pathname dir file ext) ) ) ) )
    449 
    450 (define create-temporary-file
    451   (let ([getenv getenv]
    452         [make-pathname make-pathname]
    453         [file-exists? file-exists?]
    454         [call-with-output-file call-with-output-file] )
    455     (lambda ext
    456       (let ([dir (or (getenv "TMPDIR") (getenv "TEMP") (getenv "TMP"))]
    457             [ext (if (pair? ext) (car ext) "tmp")])
    458         (##sys#check-string ext 'create-temporary-file)
    459         (let loop ()
    460           (let* ([n (##sys#fudge 16)]
    461                  [pn (make-pathname dir (##sys#string-append "t" (number->string n 16)) ext)] )
    462             (if (file-exists? pn)
    463                 (loop)
    464                 (call-with-output-file pn (lambda (p) pn)) ) ) ) ) ) ) )
    465 
    466 ;; Directory string or list only contains path-separators
    467 ;; and/or current-directory names.
    468 
    469 (define (directory-null? dir)
    470   (let loop ([lst
    471               (if (list? dir)
    472                   dir ; Don't bother to check for strings here
    473                   (begin
    474                     (##sys#check-string dir 'directory-null?)
    475                     (string-split dir "/\\" #t)))])
    476     (or (null? lst)
    477         (and (member (car lst) '("" "."))
    478              (loop (cdr lst)) ) ) ) )
    479 
    480189;;; Handy I/O procedures:
    481190
  • chicken/branches/prerelease/version.scm

    r11043 r11632  
    1 (define-constant +build-version+ "3.3.0")
     1(define-constant +build-version+ "3.4.0")
Note: See TracChangeset for help on using the changeset viewer.