Changeset 11963 in project for chicken


Ignore:
Timestamp:
09/19/08 02:19:57 (11 years ago)
Author:
Ivan Raikov
Message:

Merged prerelease with release.

Location:
chicken/branches/release
Files:
55 edited
3 copied

Legend:

Unmodified
Added
Removed
  • chicken/branches/release

  • chicken/branches/release/Makefile

    r10277 r11963  
    2525# POSSIBILITY OF SUCH DAMAGE.
    2626
     27STANDARD_TARGETS \
     28        = all clean distclean spotless install uninstall confclean check \
     29          fullcheck dist libs install-libs bootstrap
    2730
    28 .PHONY: all clean distclean spotless install uninstall confclean check  \
    29         libs install-libs fullcheck bootstrap
     31SRCDIR = .
     32
     33.PHONY: $(STANDARD_TARGETS)
    3034
    3135ifndef PLATFORM
    32 all clean spotless distclean install uninstall:
     36$(STANDARD_TARGETS):
    3337        @echo "no PLATFORM given."
    3438        @echo ""
     
    5155else
    5256all:
    53         $(MAKE) -f Makefile.$(PLATFORM) all
     57        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) all
    5458clean:
    55         $(MAKE) -f Makefile.$(PLATFORM) clean
     59        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) clean
    5660distclean:
    57         $(MAKE) -f Makefile.$(PLATFORM) distclean
     61        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) distclean
    5862spotless:
    59         $(MAKE) -f Makefile.$(PLATFORM) spotless
     63        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) spotless
    6064install:
    61         $(MAKE) -f Makefile.$(PLATFORM) install
     65        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) install
    6266uninstall:
    63         $(MAKE) -f Makefile.$(PLATFORM) uninstall
     67        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) uninstall
    6468confclean:
    65         $(MAKE) -f Makefile.$(PLATFORM) confclean
     69        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) confclean
    6670check:
    67         $(MAKE) -f Makefile.$(PLATFORM) check
     71        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) check
    6872fullcheck:
    69         $(MAKE) -f Makefile.$(PLATFORM) fullcheck
     73        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) fullcheck
     74dist:
     75        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) distfiles
     76        csi -s scripts/makedist.scm
    7077libs:
    71         $(MAKE) -f Makefile.$(PLATFORM) libs
     78        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) libs
    7279install-libs:
    73         $(MAKE) -f Makefile.$(PLATFORM) install-libs
     80        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) install-libs
    7481bootstrap:
    75         $(MAKE) -f Makefile.$(PLATFORM) bootstrap
     82        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) bootstrap
    7683endif
  • chicken/branches/release/Makefile.bsd

    r10653 r11963  
    2626
    2727
     28SRCDIR = ./
     29
    2830# platform configuration
    2931
    30 ARCH = $(shell sh config-arch.sh)
     32ARCH = $(shell sh $(SRCDIR)/config-arch.sh)
    3133
    3234# options
     
    4850# select default and internal settings
    4951
    50 include defaults.make
     52include $(SRCDIR)/defaults.make
    5153
    5254chicken-config.h: chicken-defaults.h
     
    9092        cat chicken-defaults.h >>$@
    9193
    92 include rules.make
     94include $(SRCDIR)/rules.make
  • chicken/branches/release/Makefile.cross-linux-mingw

    r10108 r11963  
    2525# POSSIBILITY OF SUCH DAMAGE.
    2626
     27
     28SRCDIR = ./
    2729
    2830# platform configuration
     
    7375# select default and internal settings
    7476
    75 include defaults.make
     77include $(SRCDIR)/defaults.make
    7678
    7779# main target
     
    123125        cat chicken-defaults.h >>$@
    124126
    125 include rules.make
     127include $(SRCDIR)/rules.make
  • chicken/branches/release/Makefile.cygwin

    r10108 r11963  
    2626
    2727
     28SRCDIR = ./
     29
    2830# platform configuration
    2931
    3032ARCH = x86
    3133HACKED_APPLY=1
     34DLLSINPATH = 1
    3235
    3336# options
     
    6669
    6770LIBRARIES = -lm
    68 LIBCHICKEN_SO_LIBRARIES = -lm
    69 LIBUCHICKEN_SO_LIBRARIES = -lm
    7071LIBCHICKEN_IMPORT_LIBRARY = libchicken.dll.a
    7172LIBUCHICKEN_IMPORT_LIBRARY = libuchicken.dll.a
     
    8081
    8182CUSTOM_CHICKEN_DEFAULTS=1
    82 include defaults.make
     83include $(SRCDIR)/defaults.make
     84
     85LIBCHICKEN_SO_LIBRARIES = $(LIBRARIES)
     86LIBUCHICKEN_SO_LIBRARIES = $(LIBRARIES)
    8387
    8488chicken-config.h: chicken-defaults.h buildsvnrevision
     
    224228        echo "#endif" >>$@
    225229
    226 include rules.make
     230include $(SRCDIR)/rules.make
  • chicken/branches/release/Makefile.linux

    r11102 r11963  
    2626
    2727
     28SRCDIR = ./
     29
    2830# platform configuration
    2931
    30 ARCH = $(shell sh config-arch.sh)
     32ARCH = $(shell sh $(SRCDIR)/config-arch.sh)
    3133
    3234# options
     
    5355# select default and internal settings
    5456
    55 include defaults.make
     57include $(SRCDIR)/defaults.make
    5658
    5759chicken-config.h: chicken-defaults.h
     
    100102        cat chicken-defaults.h >>$@
    101103
    102 include rules.make
     104include $(SRCDIR)/rules.make
  • chicken/branches/release/Makefile.macosx

    r10653 r11963  
    2626
    2727
     28SRCDIR = ./
     29
    2830# platform configuration
    2931
    30 ARCH = $(shell sh config-arch.sh)
     32ARCH = $(shell sh $(SRCDIR)/config-arch.sh)
    3133
    3234# commands
     
    5759# select default and internal settings
    5860
    59 include defaults.make
     61include $(SRCDIR)/defaults.make
    6062
    6163chicken-config.h: chicken-defaults.h
     
    125127endif
    126128
    127 include rules.make
     129include $(SRCDIR)/rules.make
  • chicken/branches/release/Makefile.mingw

    r10108 r11963  
    2525# POSSIBILITY OF SUCH DAMAGE.
    2626
     27
     28SRCDIR = .\\
    2729
    2830# platform configuration
     
    7274CUSTOM_CHICKEN_DEFAULTS=1
    7375
    74 include defaults.make
     76include $(SRCDIR)defaults.make
    7577
    7678# main target
     
    138140        echo #endif >>$@
    139141        echo #ifndef C_INSTALL_SHARE_HOME >>$@
    140         echo # define C_INSTALL_SHARE_HOME "$(DATADIR)" >>$@
     142        echo # define C_INSTALL_SHARE_HOME "$(IDATADIR)" >>$@
    141143        echo #endif >>$@
    142144        echo #ifndef C_INSTALL_BIN_HOME >>$@
    143         echo # define C_INSTALL_BIN_HOME "$(BINDIR)" >>$@
     145        echo # define C_INSTALL_BIN_HOME "$(IBINDIR)" >>$@
    144146        echo #endif >>$@
    145147        echo #ifndef C_INSTALL_EGG_HOME >>$@
    146         echo # define C_INSTALL_EGG_HOME "$(EGGDIR)" >>$@
     148        echo # define C_INSTALL_EGG_HOME "$(IEGGDIR)" >>$@
    147149        echo #endif >>$@
    148150        echo #ifndef C_INSTALL_LIB_HOME >>$@
    149         echo # define C_INSTALL_LIB_HOME "$(LIBDIR)" >>$@
     151        echo # define C_INSTALL_LIB_HOME "$(ILIBDIR)" >>$@
    150152        echo #endif >>$@
    151153        echo #ifndef C_INSTALL_STATIC_LIB_HOME >>$@
    152         echo # define C_INSTALL_STATIC_LIB_HOME "$(LIBDIR)" >>$@
     154        echo # define C_INSTALL_STATIC_LIB_HOME "$(ILIBDIR)" >>$@
    153155        echo #endif >>$@
    154156        echo #ifndef C_INSTALL_INCLUDE_HOME >>$@
    155         echo # define C_INSTALL_INCLUDE_HOME "$(INCDIR)" >>$@
     157        echo # define C_INSTALL_INCLUDE_HOME "$(IINCDIR)" >>$@
    156158        echo #endif >>$@
    157159        echo #ifndef C_INSTALL_MORE_LIBS >>$@
     
    189191        echo #endif >>$@
    190192        echo #ifndef C_TARGET_LIB_HOME >>$@
    191         echo # define C_TARGET_LIB_HOME "$(TARGET_PREFIX)/lib" >>$@
     193        echo # define C_TARGET_LIB_HOME "$(TARGET_PREFIX)\\lib" >>$@
    192194        echo #endif >>$@
    193195        echo #ifndef C_TARGET_RUN_LIB_HOME >>$@
    194         echo # define C_TARGET_RUN_LIB_HOME "$(TARGET_PREFIX)/lib" >>$@
     196        echo # define C_TARGET_RUN_LIB_HOME "$(TARGET_PREFIX)\\lib" >>$@
    195197        echo #endif >>$@
    196198        echo #ifndef C_TARGET_SHARE_HOME >>$@
    197         echo # define C_TARGET_SHARE_HOME "$(TARGET_PREFIX)/share" >>$@
     199        echo # define C_TARGET_SHARE_HOME "$(TARGET_PREFIX)\\share" >>$@
    198200        echo #endif >>$@
    199201        echo #ifndef C_TARGET_INCLUDE_HOME >>$@
    200         echo # define C_TARGET_INCLUDE_HOME "$(TARGET_PREFIX)/include" >>$@
     202        echo # define C_TARGET_INCLUDE_HOME "$(TARGET_PREFIX)\\include" >>$@
    201203        echo #endif >>$@
    202204        echo #ifndef C_TARGET_STATIC_LIB_HOME >>$@
    203         echo # define C_TARGET_STATIC_LIB_HOME "$(TARGET_PREFIX)/lib" >>$@
     205        echo # define C_TARGET_STATIC_LIB_HOME "$(TARGET_PREFIX)\\lib" >>$@
    204206        echo #endif >>$@
    205207        echo #ifndef C_BINARY_VERSION >>$@
     
    207209        echo #endif >>$@
    208210
    209 include rules.make
     211include $(SRCDIR)rules.make
  • chicken/branches/release/Makefile.mingw-msys

    r10108 r11963  
    2525# POSSIBILITY OF SUCH DAMAGE.
    2626
     27
     28SRCDIR = ./
    2729
    2830# platform configuration
     
    6870# select default and internal settings
    6971
    70 include defaults.make
     72include $(SRCDIR)/defaults.make
    7173
    7274# main target
     
    118120        cat chicken-defaults.h >>$@
    119121
    120 include rules.make
     122include $(SRCDIR)/rules.make
  • chicken/branches/release/Makefile.msvc

    r10108 r11963  
    3333# Germany
    3434
    35 PREFIX = c:/msvc-devtools
     35PREFIX = c:\\msvc-devtools
     36SRCDIR = .\\
    3637
    3738# platform configuration
  • chicken/branches/release/Makefile.solaris

    r10653 r11963  
    2626
    2727
     28SRCDIR = ./
     29
    2830# platform configuration
    2931
    30 ARCH = $(shell sh config-arch.sh)
     32ARCH = $(shell sh $SRCDIR/config-arch.sh)
    3133
    3234# options
     
    4850# select default and internal settings
    4951
    50 include defaults.make
     52include $(SRCDIR)/defaults.make
    5153
    5254chicken-config.h: chicken-defaults.h
     
    9092        cat chicken-defaults.h >>$@
    9193
    92 include rules.make
     94include $(SRCDIR)/rules.make
  • chicken/branches/release/NEWS

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

    r11103 r11963  
    33  (c)2000-2008 Felix L. Winkelmann
    44
    5   version 3.3.0
     5  version 3.4.0
    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/release/batch-driver.scm

    r10653 r11963  
    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/release/buildversion

    r11102 r11963  
    1 3.3.0
    2 
     13.4.0
  • chicken/branches/release/chicken-setup.scm

    r11102 r11963  
    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)
     
    420421                                          (let ((dep2 (fixmaketarget dep)))
    421422                                            (unless (file-exists? dep2)
    422                                               (error (sprintf "dependancy ~a was not made~%" dep2)))
     423                                              (error (sprintf "dependency ~a was not made~%" dep2)))
    423424                                            (and (> (file-modification-time dep2) date)
    424425                                                 dep2)) )
     
    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/release/chicken.scm

    r10653 r11963  
    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/release/compiler.scm

    r10653 r11963  
    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
     
    500502  (define (walk x ae me dest)
    501503    (cond ((symbol? x)
    502            (cond ((assq x ae) =>
     504           (cond ((keyword? x) (walk-literal x ae me dest))
     505                 ((assq x ae) =>
    503506                  (lambda (a)
    504507                    (let ((alias (cdr a)))
     
    637640                                           (not (eq? dest (resolve dest ae)))) ; global?
    638641                                       l)
    639                                       ((and emit-profile (eq? 'lambda name))
     642                                      ((and (eq? 'lambda name)
     643                                            emit-profile
     644                                            (or (not profiled-procedures)
     645                                                (memq dest profiled-procedures)))
    640646                                       (expand-profile-lambda dest llist2 body) )
    641647                                      (else
     
    11811187          (for-each (cut ##sys#hash-table-set! import-table <> "<here>") syms)
    11821188          (for-each lookup-exports-file strs) ) )
     1189       ((profile)
     1190        (set! profiled-procedures
     1191          (append (cdr spec)
     1192                  (or profiled-procedures '()))))
    11831193       (else (compiler-warning 'syntax "illegal declaration specifier `~s'" spec)) )
    11841194     '(##core#undefined) ) ) )
  • chicken/branches/release/csc.scm

    r11102 r11963  
    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/release/debian/control

    r11102 r11963  
    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/release/defaults.make

    r11102 r11963  
    4040# directories
    4141
    42 DESTDIR =
     42SRCDIR ?= ./
     43
     44DESTDIR ?=
     45
    4346ifeq ($(PLATFORM),mingw-msys)
    4447PREFIX ?= c:/devtools
    4548else
    4649ifeq ($(PLATFORM),mingw)
    47 PREFIX ?= c:/devtools
     50PREFIX ?= c:\\devtools
    4851else
    4952PREFIX ?= /usr/local
     
    6467
    6568ifeq ($(PLATFORM),mingw)
    66 BINDIR = $(PREFIX)\\bin
    67 LIBDIR = $(PREFIX)\\lib
    68 SHAREDIR = $(PREFIX)\\share
    69 DATADIR = $(SHAREDIR)\\chicken
    70 TOPMANDIR = $(SHAREDIR)\\man
    71 MANDIR = $(TOPMANDIR)\\man1
    72 INFODIR = $(SHAREDIR)\\info
    73 INCDIR = $(PREFIX)\\include
    74 DOCDIR = $(DATADIR)\\doc
    75 CHICKENLIBDIR = $(LIBDIR)\\chicken
    76 EGGDIR = $(CHICKENLIBDIR)\\$(BINARYVERSION)
     69IBINDIR = $(PREFIX)\\bin
     70ILIBDIR = $(PREFIX)\\lib
     71ISHAREDIR = $(PREFIX)\\share
     72IDATADIR = $(ISHAREDIR)\\chicken
     73ITOPMANDIR = $(ISHAREDIR)\\man
     74IMANDIR = $(ITOPMANDIR)\\man1
     75IINFODIR = $(ISHAREDIR)\\info
     76IINCDIR = $(PREFIX)\\include
     77IDOCDIR = $(IDATADIR)\\doc
     78ICHICKENLIBDIR = $(ILIBDIR)\\chicken
     79IEGGDIR = $(ICHICKENLIBDIR)\\$(BINARYVERSION)
    7780else
    7881IBINDIR = $(BINDIR)
     
    152155PCRE_OBJECTS_1 =
    153156else
    154 C_COMPILER_PCRE_OPTIONS = -DPCRE_STATIC
    155 PCRE_INCLUDES = $(INCLUDES) -Ipcre
     157ifdef WINDOWS
     158PCRE_DIR ?= $(SRCDIR)pcre\\
     159else
     160PCRE_DIR ?= $(SRCDIR)pcre/
     161endif
     162C_COMPILER_PCRE_OPTIONS = -DPCRE_STATIC -DHAVE_CONFIG_H
     163PCRE_INCLUDES = $(INCLUDES) -I$(PCRE_DIR)
    156164endif
    157165ifndef NOPTABLES
    158166C_COMPILER_PTABLES_OPTIONS ?= -DC_ENABLE_PTABLES
    159167endif
    160 INCLUDES ?= -I.
     168INCLUDES ?= -I. -I$(SRCDIR)
    161169C_COMPILER_COMPILE_OPTION ?= -c
    162170C_COMPILER_OUTPUT_OPTION ?= -o
     
    269277# Scheme compiler flags
    270278
    271 CHICKEN_OPTIONS = -quiet -no-trace -optimize-level 2 -include-path .
     279CHICKEN_OPTIONS = \
     280        -quiet -no-trace -optimize-level 2 \
     281        -include-path . -include-path $(SRCDIR)
    272282CHICKEN_LIBRARY_OPTIONS = $(CHICKEN_OPTIONS) -explicit-use
    273283CHICKEN_PROGRAM_OPTIONS = $(CHICKEN_OPTIONS) -no-lambda-info
     
    278288CHICKEN_PCRE_LIBRARY_OPTIONS =
    279289else
    280 CHICKEN_PCRE_LIBRARY_OPTIONS = -include-path pcre
     290CHICKEN_PCRE_LIBRARY_OPTIONS = -include-path $(SRCDIR)pcre
    281291endif
    282292
     
    324334
    325335buildsvnrevision:
    326         sh svnrevision.sh
     336        sh $(SRCDIR)/svnrevision.sh
     337ifeq ($(USE_HOST_PCRE),)
     338        $(MAKEDIR_COMMAND) $(MAKEDIR_COMMAND_OPTIONS) pcre
     339endif
    327340
    328341# generic part of chicken-config.h
     
    346359        echo "#endif" >>$@
    347360        echo "#ifndef C_INSTALL_SHARE_HOME" >>$@
    348         echo "# define C_INSTALL_SHARE_HOME \"$(DATADIR)\"" >>$@
     361        echo "# define C_INSTALL_SHARE_HOME \"$(IDATADIR)\"" >>$@
    349362        echo "#endif" >>$@
    350363        echo "#ifndef C_INSTALL_BIN_HOME" >>$@
    351         echo "# define C_INSTALL_BIN_HOME \"$(BINDIR)\"" >>$@
     364        echo "# define C_INSTALL_BIN_HOME \"$(IBINDIR)\"" >>$@
    352365        echo "#endif" >>$@
    353366        echo "#ifndef C_INSTALL_EGG_HOME" >>$@
    354         echo "# define C_INSTALL_EGG_HOME \"$(EGGDIR)\"" >>$@
     367        echo "# define C_INSTALL_EGG_HOME \"$(IEGGDIR)\"" >>$@
    355368        echo "#endif" >>$@
    356369        echo "#ifndef C_INSTALL_LIB_HOME" >>$@
    357         echo "# define C_INSTALL_LIB_HOME \"$(LIBDIR)\"" >>$@
     370        echo "# define C_INSTALL_LIB_HOME \"$(ILIBDIR)\"" >>$@
    358371        echo "#endif" >>$@
    359372        echo "#ifndef C_INSTALL_STATIC_LIB_HOME" >>$@
    360         echo "# define C_INSTALL_STATIC_LIB_HOME \"$(LIBDIR)\"" >>$@
     373        echo "# define C_INSTALL_STATIC_LIB_HOME \"$(ILIBDIR)\"" >>$@
    361374        echo "#endif" >>$@
    362375        echo "#ifndef C_INSTALL_INCLUDE_HOME" >>$@
    363         echo "# define C_INSTALL_INCLUDE_HOME \"$(INCDIR)\"" >>$@
     376        echo "# define C_INSTALL_INCLUDE_HOME \"$(IINCDIR)\"" >>$@
    364377        echo "#endif" >>$@
    365378        echo "#ifndef C_INSTALL_MORE_LIBS" >>$@
     
    396409        echo "# define C_CROSS_CHICKEN $(CROSS_CHICKEN)" >>$@
    397410        echo "#endif" >>$@
     411ifdef WINDOWS
     412        echo "#ifndef C_TARGET_LIB_HOME" >>$@
     413        echo "# define C_TARGET_LIB_HOME \"$(TARGET_PREFIX)\\lib\"" >>$@
     414        echo "#endif" >>$@
     415        echo "#ifndef C_TARGET_RUN_LIB_HOME" >>$@
     416        echo "# define C_TARGET_RUN_LIB_HOME \"$(TARGET_RUN_PREFIX)\\lib\"" >>$@
     417        echo "#endif" >>$@
     418        echo "#ifndef C_TARGET_SHARE_HOME" >>$@
     419        echo "# define C_TARGET_SHARE_HOME \"$(TARGET_PREFIX)\\share\"" >>$@
     420        echo "#endif" >>$@
     421        echo "#ifndef C_TARGET_INCLUDE_HOME" >>$@
     422        echo "# define C_TARGET_INCLUDE_HOME \"$(TARGET_PREFIX)\\include\"" >>$@
     423        echo "#endif" >>$@
     424        echo "#ifndef C_TARGET_STATIC_LIB_HOME" >>$@
     425        echo "# define C_TARGET_STATIC_LIB_HOME \"$(TARGET_PREFIX)\\lib\"" >>$@
     426        echo "#endif" >>$@
     427else
    398428        echo "#ifndef C_TARGET_LIB_HOME" >>$@
    399429        echo "# define C_TARGET_LIB_HOME \"$(TARGET_PREFIX)/lib\"" >>$@
     
    411441        echo "# define C_TARGET_STATIC_LIB_HOME \"$(TARGET_PREFIX)/lib\"" >>$@
    412442        echo "#endif" >>$@
     443endif
    413444        echo "#ifndef C_CHICKEN_PROGRAM" >>$@
    414445        echo "# define C_CHICKEN_PROGRAM \"$(CHICKEN_PROGRAM)\"" >>$@
  • chicken/branches/release/distribution/manifest

    r11102 r11963  
    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/release/eval.scm

    r11102 r11963  
    106106(define ##sys#core-library-modules
    107107  '(extras lolevel utils tcp regex regex-extras posix match
    108     data-structures ports srfi-1 srfi-4 srfi-13 srfi-14 srfi-18 srfi-69))
     108    data-structures ports files srfi-1 srfi-4 srfi-13 srfi-14 srfi-18 srfi-69))
    109109
    110110(define ##sys#explicit-library-modules '())
     
    602602        [cadadr cadadr]
    603603        [reverse reverse]
     604        (keyword? keyword?)
    604605        [open-output-string open-output-string]
    605606        [get-output-string get-output-string]
     
    665666      (define (compile x e h tf cntr)
    666667        (cond [(symbol? x)
    667                (receive (i j) (lookup x e)
    668                  (cond [(not i)
    669                         (let ((x (##sys#alias-global-hook x)))
    670                           (if ##sys#eval-environment
    671                               (let ([loc (##sys#hash-table-location ##sys#eval-environment x #t)])
    672                                 (unless loc (##sys#syntax-error-hook "reference to undefined identifier" x))
    673                                 (cond-expand
    674                                  [unsafe (lambda v (##sys#slot loc 1))]
    675                                  [else
    676                                   (lambda v
    677                                     (let ([val (##sys#slot loc 1)])
    678                                       (if (eq? unbound val)
    679                                           (##sys#error "unbound variable" x)
    680                                           val) ) ) ] ) )
    681                               (cond-expand
    682                                [unsafe (lambda v (##core#inline "C_slot" x 0))]
    683                                [else
    684                                 (when (and ##sys#unbound-in-eval (not (##sys#symbol-has-toplevel-binding? x)))
    685                                   (set! ##sys#unbound-in-eval (cons (cons x cntr) ##sys#unbound-in-eval)) )
    686                                 (lambda v (##core#inline "C_retrieve" x))] ) ) ) ]
    687                        [(zero? i) (lambda (v) (##sys#slot (##sys#slot v 0) j))]
    688                        [else (lambda (v) (##sys#slot (##core#inline "C_u_i_list_ref" v i) j))] ) ) ]
     668               (if (keyword? x)
     669                   (lambda v x)
     670                   (receive (i j) (lookup x e)
     671                     (cond [(not i)
     672                            (let ((x (##sys#alias-global-hook x)))
     673                              (if ##sys#eval-environment
     674                                  (let ([loc (##sys#hash-table-location ##sys#eval-environment x #t)])
     675                                    (unless loc (##sys#syntax-error-hook "reference to undefined identifier" x))
     676                                    (cond-expand
     677                                     [unsafe (lambda v (##sys#slot loc 1))]
     678                                     [else
     679                                      (lambda v
     680                                        (let ([val (##sys#slot loc 1)])
     681                                          (if (eq? unbound val)
     682                                              (##sys#error "unbound variable" x)
     683                                              val) ) ) ] ) )
     684                                  (cond-expand
     685                                   [unsafe (lambda v (##core#inline "C_slot" x 0))]
     686                                   [else
     687                                    (when (and ##sys#unbound-in-eval (not (##sys#symbol-has-toplevel-binding? x)))
     688                                      (set! ##sys#unbound-in-eval (cons (cons x cntr) ##sys#unbound-in-eval)) )
     689                                    (lambda v (##core#inline "C_retrieve" x))] ) ) ) ]
     690                           [(zero? i) (lambda (v) (##sys#slot (##sys#slot v 0) j))]
     691                           [else (lambda (v) (##sys#slot (##core#inline "C_u_i_list_ref" v i) j))] ) ) ) ]
    689692              [(##sys#number? x)
    690693               (case x
  • chicken/branches/release/manual/Acknowledgements

    r11102 r11963  
    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/release/manual/Declarations

    r7276 r11963  
    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/release/manual/Locations

    r11102 r11963  
    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/release/manual/Supported language

    r11102 r11963  
    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/release/manual/The User's Manual

    r11102 r11963  
    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/release/manual/Unit data-structures

    r11102 r11963  
    420420
    421421
     422==== none?
     423
     424 [procedure] (none? X)
     425
     426Ignores its argument and always returns {{#f}}. This is actually useful sometimes.
     427
     428
     429==== always?
     430
     431 [procedure] (always? X)
     432
     433Ignores its arguments and always returns {{#t}}. This is actually useful sometimes.
     434
     435
     436==== never?
     437
     438 [procedure] (never? X)
     439
     440Ignores its arguments and always returns {{#f}}. This is actually useful sometimes.
     441
     442
    422443==== constantly
    423444
     
    483504
    484505
    485 
    486506==== each
    487507
     
    559579A single value version of {{compose}} (slightly faster). {{(o)}} is equivalent
    560580to {{identity}}.
     581
     582
     583==== left-section
     584
     585 [procedure] (left-section PROC ARG0 ...)
     586
     587Returns a procedure that partially applies some of its' arguments starting from the left.
     588
     589{{PROC}} a procedure.
     590
     591{{ARG0 ...}} some prefix of the arguments for {{PROC}}.
     592
     593
     594==== right-section
     595
     596 [procedure] (right-section PROC ARG0 ...)
     597
     598Returns a procedure that partially applies some of its' arguments starting from the right.
     599
     600{{PROC}} a procedure.
     601
     602{{ARG0 ...}} some reversed suffix of the arguments for {{PROC}}.
     603
     604
    561605
    562606=== Binary searching
  • chicken/branches/release/manual/Unit extras

    r11102 r11963  
    183183
    184184
    185 Previous: [[Unit ports]]
     185Previous: [[Unit files]]
    186186
    187187Next: [[Unit srfi-1]]
  • chicken/branches/release/manual/Unit library

    r10653 r11963  
    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/release/manual/Unit ports

    r11102 r11963  
    143143Previous: [[Unit data-structures]]
    144144
    145 Next: [[Unit extras]]
     145Next: [[Unit files]]
  • chicken/branches/release/manual/Unit utils

    r11102 r11963  
    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/release/pcre/config.h

    r10108 r11963  
    1 /* config.h.  From PCRE 7.6 config.h generated from config.h.in by configure.  */
     1/* config.h.  From PCRE 7.7 config.h generated from config.h.in by configure.  */
    22
    3 #if defined(HAVE_CONFIG_H) || defined(HAVE_CHICKEN_CONFIG_H)
     3/* For HAVE_* macros */
     4#ifdef HAVE_CHICKEN_CONFIG_H
    45# include "chicken-config.h"
    56#endif
    67
    7 /* On Unix-like systems config.h.in is converted by "configure" into config.h.
    8 Some other environments also support the use of "configure". PCRE is written in
    9 Standard C, but there are a few non-standard things it can cope with, allowing
    10 it to run on SunOS4 and other "close to standard" systems.
     8/* By default, the \R escape sequence matches any Unicode line ending
     9   character or sequence of characters. If BSR_ANYCRLF is defined, this is
     10   changed so that backslash-R matches only CR, LF, or CRLF. The build- time
     11   default can be overridden by the user of PCRE at runtime. On systems that
     12   support it, "configure" can be used to override the default. */
     13/* #undef BSR_ANYCRLF */
    1114
    12 If you are going to build PCRE "by hand" on a system without "configure" you
    13 should copy the distributed config.h.generic to config.h, and then set up the
    14 macro definitions the way you need them. You must then add -DHAVE_CONFIG_H to
    15 all of your compile commands, so that config.h is included at the start of
    16 every source.
    17 
    18 Alternatively, you can avoid editing by using -D on the compiler command line
    19 to set the macro values. In this case, you do not have to set -DHAVE_CONFIG_H.
    20 
    21 PCRE uses memmove() if HAVE_MEMMOVE is set to 1; otherwise it uses bcopy() if
    22 HAVE_BCOPY is set to 1. If your system has neither bcopy() nor memmove(), set
    23 them both to 0; an emulation function will be used. */
    24 
    25 /* Define to 1 if you have the `memmove' function. */
    26 #ifndef HAVE_MEMMOVE
    27 /* hm... there must be a better way */
    28 # define HAVE_MEMMOVE 1
    29 #endif
    3015
    3116/* The value of LINK_SIZE determines the number of bytes used to store links
     
    8267   (ANYCRLF). */
    8368#ifndef NEWLINE
    84 #define NEWLINE '\n'
     69#define NEWLINE 10
    8570#endif
     71
     72/* PCRE uses recursive function calls to handle backtracking while matching.
     73   This can sometimes be a problem on systems that have stacks of limited
     74   size. Define NO_RECURSE to get a version that doesn't use recursion in the
     75   match() function; instead it creates its own stack by steam using
     76   pcre_recurse_malloc() to obtain memory from the heap. For more detail, see
     77   the comments and other stuff just above the match() function. On systems
     78   that support it, "configure" can be used to set this in the Makefile (use
     79   --disable-stack-for-recursion). */
     80/* #undef NO_RECURSE */
     81/* Make independent of Chicken stack - KRL */
     82#define NO_RECURSE 1
    8683
    8784/* Name of package */
     
    9592
    9693/* Define to the full name and version of this package. */
    97 #define PACKAGE_STRING "PCRE 7.6"
     94#define PACKAGE_STRING "PCRE 7.7"
    9895
    9996/* Define to the one symbol short name of this package. */
     
    10198
    10299/* Define to the version of this package. */
    103 #define PACKAGE_VERSION "7.6"
     100#define PACKAGE_VERSION "7.7"
    104101
    105102/* When calling PCRE via the POSIX interface, additional working storage is
     
    131128
    132129/* Version number of package */
    133 #define VERSION "7.6"
     130#define VERSION "7.7"
    134131
    135132/* Define to empty if `const' does not conform to ANSI C. */
  • chicken/branches/release/pcre/pcre.h

    r10108 r11963  
    4343
    4444#define PCRE_MAJOR          7
    45 #define PCRE_MINOR          6
     45#define PCRE_MINOR          7
    4646#define PCRE_PRERELEASE     
    47 #define PCRE_DATE           2008-01-28
     47#define PCRE_DATE           2008-05-07
    4848
    4949/* When an application links to a PCRE DLL in Windows, the symbols that are
     
    125125#define PCRE_BSR_ANYCRLF        0x00800000
    126126#define PCRE_BSR_UNICODE        0x01000000
     127#define PCRE_JAVASCRIPT_COMPAT  0x02000000
    127128
    128129/* Exec-time and get/set-time error codes */
  • chicken/branches/release/pcre/pcre_compile.c

    r10108 r11963  
    159159  "THEN";
    160160
    161 static verbitem verbs[] = {
     161static const verbitem verbs[] = {
    162162  { 6, OP_ACCEPT },
    163163  { 6, OP_COMMIT },
     
    169169};
    170170
    171 static int verbcount = sizeof(verbs)/sizeof(verbitem);
     171static const int verbcount = sizeof(verbs)/sizeof(verbitem);
    172172
    173173
     
    296296  "repeating a DEFINE group is not allowed\0"
    297297  "inconsistent NEWLINE options\0"
    298   "\\g is not followed by a braced name or an optionally braced non-zero number\0"
    299   "(?+ or (?- or (?(+ or (?(- must be followed by a non-zero number\0"
     298  "\\g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number\0"
     299  "a numbered reference must not be zero\0"
    300300  "(*VERB) with an argument is not supported\0"
    301301  /* 60 */
     
    303303  "number is too big\0"
    304304  "subpattern name expected\0"
    305   "digit expected after (?+";
     305  "digit expected after (?+\0"
     306  "] is an invalid data character in JavaScript compatibility mode";
    306307
    307308
     
    532533    break;
    533534
    534     /* \g must be followed by a number, either plain or braced. If positive, it
    535     is an absolute backreference. If negative, it is a relative backreference.
    536     This is a Perl 5.10 feature. Perl 5.10 also supports \g{name} as a
    537     reference to a named group. This is part of Perl's movement towards a
    538     unified syntax for back references. As this is synonymous with \k{name}, we
    539     fudge it up by pretending it really was \k. */
     535    /* \g must be followed by one of a number of specific things:
     536
     537    (1) A number, either plain or braced. If positive, it is an absolute
     538    backreference. If negative, it is a relative backreference. This is a Perl
     539    5.10 feature.
     540
     541    (2) Perl 5.10 also supports \g{name} as a reference to a named group. This
     542    is part of Perl's movement towards a unified syntax for back references. As
     543    this is synonymous with \k{name}, we fudge it up by pretending it really
     544    was \k.
     545
     546    (3) For Oniguruma compatibility we also support \g followed by a name or a
     547    number either in angle brackets or in single quotes. However, these are
     548    (possibly recursive) subroutine calls, _not_ backreferences. Just return
     549    the -ESC_g code (cf \k). */
    540550
    541551    case 'g':
     552    if (ptr[1] == '<' || ptr[1] == '\'')
     553      {
     554      c = -ESC_g;
     555      break;
     556      }
     557
     558    /* Handle the Perl-compatible cases */
     559
    542560    if (ptr[1] == '{')
    543561      {
     
    566584      c = c * 10 + *(++ptr) - '0';
    567585
    568     if (c < 0)
     586    if (c < 0)   /* Integer overflow */
    569587      {
    570588      *errorcodeptr = ERR61;
     
    572590      }
    573591
    574     if (c == 0 || (braced && *(++ptr) != '}'))
     592    if (braced && *(++ptr) != '}')
    575593      {
    576594      *errorcodeptr = ERR57;
     595      break;
     596      }
     597
     598    if (c == 0)
     599      {
     600      *errorcodeptr = ERR58;
    577601      break;
    578602      }
     
    612636      while ((digitab[ptr[1]] & ctype_digit) != 0)
    613637        c = c * 10 + *(++ptr) - '0';
    614       if (c < 0)
     638      if (c < 0)    /* Integer overflow */
    615639        {
    616640        *errorcodeptr = ERR61;
     
    953977Arguments:
    954978  ptr          current position in the pattern
    955   count        current count of capturing parens so far encountered
     979  cd           compile background data
    956980  name         name to seek, or NULL if seeking a numbered subpattern
    957981  lorn         name length, or subpattern number if name is NULL
     
    962986
    963987static int
    964 find_parens(const uschar *ptr, int count, const uschar *name, int lorn,
     988find_parens(const uschar *ptr, compile_data *cd, const uschar *name, int lorn,
    965989  BOOL xmode)
    966990{
    967991const uschar *thisname;
     992int count = cd->bracount;
    968993
    969994for (; *ptr != 0; ptr++)
     
    9851010    }
    9861011
    987   /* Skip over character classes */
     1012  /* Skip over character classes; this logic must be similar to the way they
     1013  are handled for real. If the first character is '^', skip it. Also, if the
     1014  first few characters (either before or after ^) are \Q\E or \E we skip them
     1015  too. This makes for compatibility with Perl. */
    9881016
    9891017  if (*ptr == '[')
    9901018    {
     1019    BOOL negate_class = FALSE;
     1020    for (;;)
     1021      {
     1022      int c = *(++ptr);
     1023      if (c == '\\')
     1024        {
     1025        if (ptr[1] == 'E') ptr++;
     1026          else if (strncmp((const char *)ptr+1, "Q\\E", 3) == 0) ptr += 3;
     1027            else break;
     1028        }
     1029      else if (!negate_class && c == '^')
     1030        negate_class = TRUE;
     1031      else break;
     1032      }
     1033
     1034    /* If the next character is ']', it is a data character that must be
     1035    skipped, except in JavaScript compatibility mode. */
     1036
     1037    if (ptr[1] == ']' && (cd->external_options & PCRE_JAVASCRIPT_COMPAT) == 0)
     1038      ptr++;
     1039
    9911040    while (*(++ptr) != ']')
    9921041      {
     
    12531302    case OP_WORDCHAR:
    12541303    case OP_ANY:
     1304    case OP_ALLANY:
    12551305    branchlength++;
    12561306    cc++;
     
    15451595  /* Groups with zero repeats can of course be empty; skip them. */
    15461596
    1547   if (c == OP_BRAZERO || c == OP_BRAMINZERO)
     1597  if (c == OP_BRAZERO || c == OP_BRAMINZERO || c == OP_SKIPZERO)
    15481598    {
    15491599    code += _pcre_OP_lengths[c];
     
    16311681    case OP_WORDCHAR:
    16321682    case OP_ANY:
     1683    case OP_ALLANY:
    16331684    case OP_ANYBYTE:
    16341685    case OP_CHAR:
     
    18251876repetition simply by copying (because the recursion is allowed to refer to
    18261877earlier groups that are outside the current group). However, when a group is
    1827 optional (i.e. the minimum quantifier is zero), OP_BRAZERO is inserted before
    1828 it, after it has been compiled. This means that any OP_RECURSE items within it
    1829 that refer to the group itself or any contained groups have to have their
    1830 offsets adjusted. That one of the jobs of this function. Before it is called,
    1831 the partially compiled regex must be temporarily terminated with OP_END.
     1878optional (i.e. the minimum quantifier is zero), OP_BRAZERO or OP_SKIPZERO is
     1879inserted before it, after it has been compiled. This means that any OP_RECURSE
     1880items within it that refer to the group itself or any contained groups have to
     1881have their offsets adjusted. That one of the jobs of this function. Before it
     1882is called, the partially compiled regex must be temporarily terminated with
     1883OP_END.
    18321884
    18331885This function has been extended with the possibility of forward references for
     
    21142166
    21152167  case OP_NOT:
    2116   if (next < 0) return FALSE;  /* Not a character */
    21172168  if (item == next) return TRUE;
    21182169  if ((options & PCRE_CASELESS) == 0) return FALSE;
     
    26172668    zeroreqbyte = reqbyte;
    26182669    previous = code;
    2619     *code++ = OP_ANY;
     2670    *code++ = ((options & PCRE_DOTALL) != 0)? OP_ALLANY: OP_ANY;
    26202671    break;
    26212672
     
    26322683    but those above are are explicitly listed afterwards. A flag byte tells
    26332684    whether the bitmap is present, and whether this is a negated class or not.
    2634     */
     2685
     2686    In JavaScript compatibility mode, an isolated ']' causes an error. In
     2687    default (Perl) mode, it is treated as a data character. */
     2688
     2689    case ']':
     2690    if ((cd->external_options & PCRE_JAVASCRIPT_COMPAT) != 0)
     2691      {
     2692      *errorcodeptr = ERR64;
     2693      goto FAILED;
     2694      }
     2695    goto NORMAL_CHAR;
    26352696
    26362697    case '[':
     
    26642725        negate_class = TRUE;
    26652726      else break;
     2727      }
     2728
     2729    /* Empty classes are allowed in JavaScript compatibility mode. Otherwise,
     2730    an initial ']' is taken as a data character -- the code below handles
     2731    that. In JS mode, [] must always fail, so generate OP_FAIL, whereas
     2732    [^] must match any character, so generate OP_ALLANY. */
     2733
     2734    if (c ==']' && (cd->external_options & PCRE_JAVASCRIPT_COMPAT) != 0)
     2735      {
     2736      *code++ = negate_class? OP_ALLANY : OP_FAIL;
     2737      if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
     2738      zerofirstbyte = firstbyte;
     2739      break;
    26662740      }
    26672741
     
    38213895      if (repeat_min == 0)
    38223896        {
    3823         /* If the maximum is also zero, we just omit the group from the output
    3824         altogether. */
    3825 
    3826         if (repeat_max == 0)
    3827           {
    3828           code = previous;
    3829           goto END_REPEAT;
    3830           }
    3831 
    3832         /* If the maximum is 1 or unlimited, we just have to stick in the
    3833         BRAZERO and do no more at this point. However, we do need to adjust
    3834         any OP_RECURSE calls inside the group that refer to the group itself or
    3835         any internal or forward referenced group, because the offset is from
    3836         the start of the whole regex. Temporarily terminate the pattern while
    3837         doing this. */
    3838 
    3839         if (repeat_max <= 1)
     3897        /* If the maximum is also zero, we used to just omit the group from the
     3898        output altogether, like this:
     3899
     3900        ** if (repeat_max == 0)
     3901        **   {
     3902        **   code = previous;
     3903        **   goto END_REPEAT;
     3904        **   }
     3905
     3906        However, that fails when a group is referenced as a subroutine from
     3907        elsewhere in the pattern, so now we stick in OP_SKIPZERO in front of it
     3908        so that it is skipped on execution. As we don't have a list of which
     3909        groups are referenced, we cannot do this selectively.
     3910
     3911        If the maximum is 1 or unlimited, we just have to stick in the BRAZERO
     3912        and do no more at this point. However, we do need to adjust any
     3913        OP_RECURSE calls inside the group that refer to the group itself or any
     3914        internal or forward referenced group, because the offset is from the
     3915        start of the whole regex. Temporarily terminate the pattern while doing
     3916        this. */
     3917
     3918        if (repeat_max <= 1)    /* Covers 0, 1, and unlimited */
    38403919          {
    38413920          *code = OP_END;
     
    38433922          memmove(previous+1, previous, len);
    38443923          code++;
     3924          if (repeat_max == 0)
     3925            {
     3926            *previous++ = OP_SKIPZERO;
     3927            goto END_REPEAT;
     3928            }
    38453929          *previous++ = OP_BRAZERO + repeat_type;
    38463930          }
     
    40374121      }
    40384122
     4123    /* If previous is OP_FAIL, it was generated by an empty class [] in
     4124    JavaScript mode. The other ways in which OP_FAIL can be generated, that is
     4125    by (*FAIL) or (?!) set previous to NULL, which gives a "nothing to repeat"
     4126    error above. We can just ignore the repeat in JS case. */
     4127
     4128    else if (*previous == OP_FAIL) goto END_REPEAT;
     4129
    40394130    /* Else there's some kind of shambles */
    40404131
     
    43234414        /* Search the pattern for a forward reference */
    43244415
    4325         else if ((i = find_parens(ptr, cd->bracount, name, namelen,
     4416        else if ((i = find_parens(ptr, cd, name, namelen,
    43264417                        (options & PCRE_EXTENDED) != 0)) > 0)
    43274418          {
     
    45694660        through from the Perl recursion syntax (?&name). We also come here from
    45704661        the Perl \k<name> or \k'name' back reference syntax and the \k{name}
    4571         .NET syntax. */
     4662        .NET syntax, and the Oniguruma \g<...> and \g'...' subroutine syntax. */
    45724663
    45734664        NAMED_REF_OR_RECURSE:
     
    46204711            }
    46214712          else if ((recno =                /* Forward back reference */
    4622                     find_parens(ptr, cd->bracount, name, namelen,
     4713                    find_parens(ptr, cd, name, namelen,
    46234714                      (options & PCRE_EXTENDED) != 0)) <= 0)
    46244715            {
     
    46474738          {
    46484739          const uschar *called;
     4740          terminator = ')';
     4741
     4742          /* Come here from the \g<...> and \g'...' code (Oniguruma
     4743          compatibility). However, the syntax has been checked to ensure that
     4744          the ... are a (signed) number, so that neither ERR63 nor ERR29 will
     4745          be called on this path, nor with the jump to OTHER_CHAR_AFTER_QUERY
     4746          ever be taken. */
     4747
     4748          HANDLE_NUMERICAL_RECURSION:
    46494749
    46504750          if ((refsign = *ptr) == '+')
     
    46684768            recno = recno * 10 + *ptr++ - '0';
    46694769
    4670           if (*ptr != ')')
     4770          if (*ptr != terminator)
    46714771            {
    46724772            *errorcodeptr = ERR29;
     
    47214821            if (called == NULL)
    47224822              {
    4723               if (find_parens(ptr, cd->bracount, NULL, recno,
    4724                    (options & PCRE_EXTENDED) != 0) < 0)
     4823              if (find_parens(ptr, cd, NULL, recno,
     4824                    (options & PCRE_EXTENDED) != 0) < 0)
    47254825                {
    47264826                *errorcodeptr = ERR15;
     
    50925192      zeroreqbyte = reqbyte;
    50935193
     5194      /* \g<name> or \g'name' is a subroutine call by name and \g<n> or \g'n'
     5195      is a subroutine call by number (Oniguruma syntax). In fact, the value
     5196      -ESC_g is returned only for these cases. So we don't need to check for <
     5197      or ' if the value is -ESC_g. For the Perl syntax \g{n} the value is
     5198      -ESC_REF+n, and for the Perl syntax \g{name} the result is -ESC_k (as
     5199      that is a synonym for a named back reference). */
     5200
     5201      if (-c == ESC_g)
     5202        {
     5203        const uschar *p;
     5204        save_hwm = cd->hwm;   /* Normally this is set when '(' is read */
     5205        terminator = (*(++ptr) == '<')? '>' : '\'';
     5206
     5207        /* These two statements stop the compiler for warning about possibly
     5208        unset variables caused by the jump to HANDLE_NUMERICAL_RECURSION. In
     5209        fact, because we actually check for a number below, the paths that
     5210        would actually be in error are never taken. */
     5211
     5212        skipbytes = 0;
     5213        reset_bracount = FALSE;
     5214
     5215        /* Test for a name */
     5216
     5217        if (ptr[1] != '+' && ptr[1] != '-')
     5218          {
     5219          BOOL isnumber = TRUE;
     5220          for (p = ptr + 1; *p != 0 && *p != terminator; p++)
     5221            {
     5222            if ((cd->ctypes[*p] & ctype_digit) == 0) isnumber = FALSE;
     5223            if ((cd->ctypes[*p] & ctype_word) == 0) break;
     5224            }
     5225          if (*p != terminator)
     5226            {
     5227            *errorcodeptr = ERR57;
     5228            break;
     5229            }
     5230          if (isnumber)
     5231            {
     5232            ptr++;
     5233            goto HANDLE_NUMERICAL_RECURSION;
     5234            }
     5235          is_recurse = TRUE;
     5236          goto NAMED_REF_OR_RECURSE;
     5237          }
     5238
     5239        /* Test a signed number in angle brackets or quotes. */
     5240
     5241        p = ptr + 2;
     5242        while ((digitab[*p] & ctype_digit) != 0) p++;
     5243        if (*p != terminator)
     5244          {
     5245          *errorcodeptr = ERR57;
     5246          break;
     5247          }
     5248        ptr++;
     5249        goto HANDLE_NUMERICAL_RECURSION;
     5250        }
     5251
    50945252      /* \k<name> or \k'name' is a back reference by name (Perl syntax).
    50955253      We also support \k{name} (.NET syntax) */
     
    55985756     }
    55995757
    5600    /* .* is not anchored unless DOTALL is set and it isn't in brackets that
    5601    are or may be referenced. */
     5758   /* .* is not anchored unless DOTALL is set (which generates OP_ALLANY) and
     5759   it isn't in brackets that are or may be referenced. */
    56025760
    56035761   else if ((op == OP_TYPESTAR || op == OP_TYPEMINSTAR ||
    5604              op == OP_TYPEPOSSTAR) &&
    5605             (*options & PCRE_DOTALL) != 0)
     5762             op == OP_TYPEPOSSTAR))
    56065763     {
    5607      if (scode[1] != OP_ANY || (bracket_map & backref_map) != 0) return FALSE;
     5764     if (scode[1] != OP_ALLANY || (bracket_map & backref_map) != 0)
     5765       return FALSE;
    56085766     }
    56095767
  • chicken/branches/release/pcre/pcre_dfa_exec.c

    r10108 r11963  
    8585that follow must also be modified. */
    8686
    87 static uschar coptable[] = {
     87static const uschar coptable[] = {
    8888  0,                             /* End                                    */
    8989  0, 0, 0, 0, 0,                 /* \A, \G, \K, \B, \b                     */
    9090  0, 0, 0, 0, 0, 0,              /* \D, \d, \S, \s, \W, \w                 */
    91   0, 0,                          /* Any, Anybyte                           */
     91  0, 0, 0,                       /* Any, AllAny, Anybyte                   */
    9292  0, 0, 0,                       /* NOTPROP, PROP, EXTUNI                  */
    9393  0, 0, 0, 0, 0,                 /* \R, \H, \h, \V, \v                     */
     
    133133  0, 0,                          /* BRAZERO, BRAMINZERO                    */
    134134  0, 0, 0, 0,                    /* PRUNE, SKIP, THEN, COMMIT              */
    135   0, 0                           /* FAIL, ACCEPT                           */
     135  0, 0, 0                        /* FAIL, ACCEPT, SKIPZERO                 */
    136136};
    137137
     
    139139and \w */
    140140
    141 static uschar toptable1[] = {
     141static const uschar toptable1[] = {
    142142  0, 0, 0, 0, 0, 0,
    143143  ctype_digit, ctype_digit,
    144144  ctype_space, ctype_space,
    145145  ctype_word,  ctype_word,
    146   0                               /* OP_ANY */
     146  0, 0                            /* OP_ANY, OP_ALLANY */
    147147};
    148148
    149 static uschar toptable2[] = {
     149static const uschar toptable2[] = {
    150150  0, 0, 0, 0, 0, 0,
    151151  ctype_digit, 0,
    152152  ctype_space, 0,
    153153  ctype_word,  0,
    154   1                               /* OP_ANY */
     154  1, 1                            /* OP_ANY, OP_ALLANY */
    155155};
    156156
     
    224224  recursing         regex recursive call level
    225225
    226 Returns:            > 0 =>
    227                     = 0 =>
     226Returns:            > 0 => number of match offset pairs placed in offsets
     227                    = 0 => offsets overflowed; longest matches are present
    228228                     -1 => failed to match
    229229                   < -1 => some kind of unexpected problem
     
    695695
    696696      /*-----------------------------------------------------------------*/
     697      case OP_SKIPZERO:
     698      code += 1 + GET(code, 2);
     699      while (*code == OP_ALT) code += GET(code, 1);
     700      ADD_ACTIVE(code - start_code + 1 + LINK_SIZE, 0);
     701      break;
     702
     703      /*-----------------------------------------------------------------*/
    697704      case OP_CIRC:
    698705      if ((ptr == start_subject && (md->moptions & PCRE_NOTBOL) == 0) ||
     
    733740      /*-----------------------------------------------------------------*/
    734741      case OP_ANY:
    735       if (clen > 0 && ((ims & PCRE_DOTALL) != 0 || !IS_NEWLINE(ptr)))
     742      if (clen > 0 && !IS_NEWLINE(ptr))
     743        { ADD_NEW(state_offset + 1, 0); }
     744      break;
     745
     746      /*-----------------------------------------------------------------*/
     747      case OP_ALLANY:
     748      if (clen > 0)
    736749        { ADD_NEW(state_offset + 1, 0); }
    737750      break;
     
    853866      /* These opcodes likewise inspect the subject character, but have an
    854867      argument that is not a data character. It is one of these opcodes:
    855       OP_ANY, OP_DIGIT, OP_NOT_DIGIT, OP_WHITESPACE, OP_NOT_SPACE, OP_WORDCHAR,
    856       OP_NOT_WORDCHAR. The value is loaded into d. */
     868      OP_ANY, OP_ALLANY, OP_DIGIT, OP_NOT_DIGIT, OP_WHITESPACE, OP_NOT_SPACE,
     869      OP_WORDCHAR, OP_NOT_WORDCHAR. The value is loaded into d. */
    857870
    858871      case OP_TYPEPLUS:
     
    865878        if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
    866879            (c < 256 &&
    867               (d != OP_ANY ||
    868                (ims & PCRE_DOTALL) != 0 ||
    869                !IS_NEWLINE(ptr)
    870               ) &&
     880              (d != OP_ANY || !IS_NEWLINE(ptr)) &&
    871881              ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
    872882          {
     
    891901        if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
    892902            (c < 256 &&
    893               (d != OP_ANY ||
    894                (ims & PCRE_DOTALL) != 0 ||
    895                !IS_NEWLINE(ptr)
    896               ) &&
     903              (d != OP_ANY || !IS_NEWLINE(ptr)) &&
    897904              ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
    898905          {
     
    916923        if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
    917924            (c < 256 &&
    918               (d != OP_ANY ||
    919                (ims & PCRE_DOTALL) != 0 ||
    920                !IS_NEWLINE(ptr)
    921               ) &&
     925              (d != OP_ANY || !IS_NEWLINE(ptr)) &&
    922926              ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
    923927          {
     
    939943        if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
    940944            (c < 256 &&
    941               (d != OP_ANY ||
    942                (ims & PCRE_DOTALL) != 0 ||
    943                !IS_NEWLINE(ptr)
    944               ) &&
     945              (d != OP_ANY || !IS_NEWLINE(ptr)) &&
    945946              ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
    946947          {
     
    963964        if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
    964965            (c < 256 &&
    965               (d != OP_ANY ||
    966                (ims & PCRE_DOTALL) != 0 ||
    967                !IS_NEWLINE(ptr)
    968               ) &&
     966              (d != OP_ANY || !IS_NEWLINE(ptr)) &&
    969967              ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
    970968          {
     
    21632161/* ========================================================================== */
    21642162      /* These are the opcodes for fancy brackets of various kinds. We have
    2165       to use recursion in order to handle them. */
     2163      to use recursion in order to handle them. The "always failing" assersion
     2164      (?!) is optimised when compiling to OP_FAIL, so we have to support that,
     2165      though the other "backtracking verbs" are not supported. */
     2166
     2167      case OP_FAIL:
     2168      break;
    21662169
    21672170      case OP_ASSERT:
  • chicken/branches/release/pcre/pcre_exec.c

    r10108 r11963  
    11491149    break;
    11501150
    1151     /* BRAZERO and BRAMINZERO occur just before a bracket group, indicating
    1152     that it may occur zero times. It may repeat infinitely, or not at all -
    1153     i.e. it could be ()* or ()? in the pattern. Brackets with fixed upper
    1154     repeat limits are compiled as a number of copies, with the optional ones
    1155     preceded by BRAZERO or BRAMINZERO. */
     1151    /* BRAZERO, BRAMINZERO and SKIPZERO occur just before a bracket group,
     1152    indicating that it may occur zero times. It may repeat infinitely, or not
     1153    at all - i.e. it could be ()* or ()? or even (){0} in the pattern. Brackets
     1154    with fixed upper repeat limits are compiled as a number of copies, with the
     1155    optional ones preceded by BRAZERO or BRAMINZERO. */
    11561156
    11571157    case OP_BRAZERO:
     
    11721172      if (rrc != MATCH_NOMATCH) RRETURN(rrc);
    11731173      ecode++;
     1174      }
     1175    break;
     1176
     1177    case OP_SKIPZERO:
     1178      {
     1179      next = ecode+1;
     1180      do next += GET(next,1); while (*next == OP_ALT);
     1181      ecode = next + 1 + LINK_SIZE;
    11741182      }
    11751183    break;
     
    14221430
    14231431    case OP_ANY:
    1424     if ((ims & PCRE_DOTALL) == 0)
    1425       {
    1426       if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH);
    1427       }
     1432    if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH);
     1433    /* Fall through */
     1434
     1435    case OP_ALLANY:
    14281436    if (eptr++ >= md->end_subject) RRETURN(MATCH_NOMATCH);
    1429     if (utf8)
    1430       while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
     1437    if (utf8) while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
    14311438    ecode++;
    14321439    break;
     
    17241731      {
    17251732      offset = GET2(ecode, 1) << 1;               /* Doubled ref number */
    1726       ecode += 3;                                 /* Advance past item */
    1727 
    1728       /* If the reference is unset, set the length to be longer than the amount
    1729       of subject left; this ensures that every attempt at a match fails. We
    1730       can't just fail here, because of the possibility of quantifiers with zero
    1731       minima. */
    1732 
    1733       length = (offset >= offset_top || md->offset_vector[offset] < 0)?
    1734         md->end_subject - eptr + 1 :
    1735         md->offset_vector[offset+1] - md->offset_vector[offset];
     1733      ecode += 3;
     1734
     1735      /* If the reference is unset, there are two possibilities:
     1736
     1737      (a) In the default, Perl-compatible state, set the length to be longer
     1738      than the amount of subject left; this ensures that every attempt at a
     1739      match fails. We can't just fail here, because of the possibility of
     1740      quantifiers with zero minima.
     1741
     1742      (b) If the JavaScript compatibility flag is set, set the length to zero
     1743      so that the back reference matches an empty string.
     1744
     1745      Otherwise, set the length to the length of what was matched by the
     1746      referenced subpattern. */
     1747
     1748      if (offset >= offset_top || md->offset_vector[offset] < 0)
     1749        length = (md->jscript_compat)? 0 : md->end_subject - eptr + 1;
     1750      else
     1751        length = md->offset_vector[offset+1] - md->offset_vector[offset];
    17361752
    17371753      /* Set up for repetition, or handle the non-repeated case */
     
    29362952        for (i = 1; i <= min; i++)
    29372953          {
    2938           if (eptr >= md->end_subject ||
    2939                ((ims & PCRE_DOTALL) == 0 && IS_NEWLINE(eptr)))
     2954          if (eptr >= md->end_subject || IS_NEWLINE(eptr))
    29402955            RRETURN(MATCH_NOMATCH);
     2956          eptr++;
     2957          while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
     2958          }
     2959        break;
     2960
     2961        case OP_ALLANY:
     2962        for (i = 1; i <= min; i++)
     2963          {
     2964          if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
    29412965          eptr++;
    29422966          while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
     
    31523176        {
    31533177        case OP_ANY:
    3154         if ((ims & PCRE_DOTALL) == 0)
    3155           {
    3156           for (i = 1; i <= min; i++)
    3157             {
    3158             if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH);
    3159             eptr++;
    3160             }
    3161           }
    3162         else eptr += min;
     3178        for (i = 1; i <= min; i++)
     3179          {
     3180          if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH);
     3181          eptr++;
     3182          }
     3183        break;
     3184
     3185        case OP_ALLANY:
     3186        eptr += min;
    31633187        break;
    31643188
     
    34173441          if (rrc != MATCH_NOMATCH) RRETURN(rrc);
    34183442          if (fi >= max || eptr >= md->end_subject ||
    3419                (ctype == OP_ANY && (ims & PCRE_DOTALL) == 0 &&
    3420                 IS_NEWLINE(eptr)))
     3443               (ctype == OP_ANY && IS_NEWLINE(eptr)))
    34213444            RRETURN(MATCH_NOMATCH);
    34223445
     
    34243447          switch(ctype)
    34253448            {
    3426             case OP_ANY:        /* This is the DOTALL case */
    3427             break;
    3428 
     3449            case OP_ANY:        /* This is the non-NL case */
     3450            case OP_ALLANY:
    34293451            case OP_ANYBYTE:
    34303452            break;
     
    35783600          if (rrc != MATCH_NOMATCH) RRETURN(rrc);
    35793601          if (fi >= max || eptr >= md->end_subject ||
    3580                ((ims & PCRE_DOTALL) == 0 && IS_NEWLINE(eptr)))
     3602               (ctype == OP_ANY && IS_NEWLINE(eptr)))
    35813603            RRETURN(MATCH_NOMATCH);
    35823604
     
    35843606          switch(ctype)
    35853607            {
    3586             case OP_ANY:   /* This is the DOTALL case */
    3587             break;
    3588 
     3608            case OP_ANY:     /* This is the non-NL case */
     3609            case OP_ALLANY:
    35893610            case OP_ANYBYTE:
    35903611            break;
     
    38403861          if (max < INT_MAX)
    38413862            {
    3842             if ((ims & PCRE_DOTALL) == 0)
     3863            for (i = min; i < max; i++)
    38433864              {
    3844               for (i = min; i < max; i++)
    3845                 {
    3846                 if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break;
    3847                 eptr++;
    3848                 while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
    3849                 }
     3865              if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break;
     3866              eptr++;
     3867              while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
    38503868              }
    3851             else
     3869            }
     3870
     3871          /* Handle unlimited UTF-8 repeat */
     3872
     3873          else
     3874            {
     3875            for (i = min; i < max; i++)
    38523876              {
    3853               for (i = min; i < max; i++)
    3854                 {
    3855                 if (eptr >= md->end_subject) break;
    3856                 eptr++;
    3857                 while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
    3858                 }
     3877              if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break;
     3878              eptr++;
     3879              while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
    38593880              }
    38603881            }
    3861 
    3862           /* Handle unlimited UTF-8 repeat */
    3863 
    3864           else
    3865             {
    3866             if ((ims & PCRE_DOTALL) == 0)
     3882          break;
     3883
     3884          case OP_ALLANY:
     3885          if (max < INT_MAX)
     3886            {
     3887            for (i = min; i < max; i++)
    38673888              {
    3868               for (i = min; i < max; i++)
    3869                 {
    3870                 if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break;
    3871                 eptr++;
    3872                 while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
    3873                 }
     3889              if (eptr >= md->end_subject) break;
     3890              eptr++;
     3891              while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
    38743892              }
    3875             else
    3876               {
    3877               eptr = md->end_subject;
    3878               }
    3879             }
     3893            }
     3894          else eptr = md->end_subject;   /* Unlimited UTF-8 repeat */
    38803895          break;
    38813896
     
    40654080          {
    40664081          case OP_ANY:
    4067           if ((ims & PCRE_DOTALL) == 0)
    4068             {
    4069             for (i = min; i < max; i++)
    4070               {
    4071               if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break;
    4072               eptr++;
    4073               }
    4074             break;
    4075             }
    4076           /* For DOTALL case, fall through and treat as \C */
    4077 
     4082          for (i = min; i < max; i++)
     4083            {
     4084            if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break;
     4085            eptr++;
     4086            }
     4087          break;
     4088
     4089          case OP_ALLANY:
    40784090          case OP_ANYBYTE:
    40794091          c = max - min;
     
    44514463md->endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0;
    44524464utf8 = md->utf8 = (re->options & PCRE_UTF8) != 0;
     4465md->jscript_compat = (re->options & PCRE_JAVASCRIPT_COMPAT) != 0;
    44534466
    44544467md->notbol = (options & PCRE_NOTBOL) != 0;
  • chicken/branches/release/pcre/pcre_internal.h

    r10108 r11963  
    6666#define DPRINTF(p) /* Nothing */
    6767#endif
    68 
    69 
    70 /* Get the definitions provided by running "configure" */
    71 
    72 #include "config.h"
    7368
    7469
     
    520515   PCRE_DOTALL|PCRE_DOLLAR_ENDONLY|PCRE_EXTRA|PCRE_UNGREEDY|PCRE_UTF8| \
    521516   PCRE_NO_AUTO_CAPTURE|PCRE_NO_UTF8_CHECK|PCRE_AUTO_CALLOUT|PCRE_FIRSTLINE| \
    522    PCRE_DUPNAMES|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE)
     517   PCRE_DUPNAMES|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE| \
     518   PCRE_JAVASCRIPT_COMPAT)
    523519
    524520#define PUBLIC_EXEC_OPTIONS \
     
    610606their negation. Also, they must appear in the same order as in the opcode
    611607definitions below, up to ESC_z. There's a dummy for OP_ANY because it
    612 corresponds to "." rather than an escape sequence. The final one must be
    613 ESC_REF as subsequent values are used for backreferences (\1, \2, \3, etc).
    614 There are two tests in the code for an escape greater than ESC_b and less than
    615 ESC_Z to detect the types that may be repeated. These are the types that
    616 consume characters. If any new escapes are put in between that don't consume a
    617 character, that code will have to change. */
     608corresponds to "." rather than an escape sequence, and another for OP_ALLANY
     609(which is used for [^] in JavaScript compatibility mode).
     610
     611The final escape must be ESC_REF as subsequent values are used for
     612backreferences (\1, \2, \3, etc). There are two tests in the code for an escape
     613greater than ESC_b and less than ESC_Z to detect the types that may be
     614repeated. These are the types that consume characters. If any new escapes are
     615put in between that don't consume a character, that code will have to change.
     616*/
    618617
    619618enum { ESC_A = 1, ESC_G, ESC_K, ESC_B, ESC_b, ESC_D, ESC_d, ESC_S, ESC_s,
    620        ESC_W, ESC_w, ESC_dum1, ESC_C, ESC_P, ESC_p, ESC_R, ESC_H, ESC_h,
    621        ESC_V, ESC_v, ESC_X, ESC_Z, ESC_z, ESC_E, ESC_Q, ESC_k, ESC_REF };
     619       ESC_W, ESC_w, ESC_dum1, ESC_dum2, ESC_C, ESC_P, ESC_p, ESC_R, ESC_H,
     620       ESC_h, ESC_V, ESC_v, ESC_X, ESC_Z, ESC_z, ESC_E, ESC_Q, ESC_g, ESC_k,
     621       ESC_REF };
    622622
    623623
     
    645645  OP_NOT_WORDCHAR,       /* 10 \W */
    646646  OP_WORDCHAR,           /* 11 \w */
    647   OP_ANY,            /* 12 Match any character */
    648   OP_ANYBYTE,        /* 13 Match any byte (\C); different to OP_ANY for UTF-8 */
    649   OP_NOTPROP,        /* 14 \P (not Unicode property) */
    650   OP_PROP,           /* 15 \p (Unicode property) */
    651   OP_ANYNL,          /* 16 \R (any newline sequence) */
    652   OP_NOT_HSPACE,     /* 17 \H (not horizontal whitespace) */
    653   OP_HSPACE,         /* 18 \h (horizontal whitespace) */
    654   OP_NOT_VSPACE,     /* 19 \V (not vertical whitespace) */
    655   OP_VSPACE,         /* 20 \v (vertical whitespace) */
    656   OP_EXTUNI,         /* 21 \X (extended Unicode sequence */
    657   OP_EODN,           /* 22 End of data or \n at end of data: \Z. */
    658   OP_EOD,            /* 23 End of data: \z */
    659 
    660   OP_OPT,            /* 24 Set runtime options */
    661   OP_CIRC,           /* 25 Start of line - varies with multiline switch */
    662   OP_DOLL,           /* 26 End of line - varies with multiline switch */
    663   OP_CHAR,           /* 27 Match one character, casefully */
    664   OP_CHARNC,         /* 28 Match one character, caselessly */
    665   OP_NOT,            /* 29 Match one character, not the following one */
    666 
    667   OP_STAR,           /* 30 The maximizing and minimizing versions of */
    668   OP_MINSTAR,        /* 31 these six opcodes must come in pairs, with */
    669   OP_PLUS,           /* 32 the minimizing one second. */
    670   OP_MINPLUS,        /* 33 This first set applies to single characters.*/
    671   OP_QUERY,          /* 34 */
    672   OP_MINQUERY,       /* 35 */
    673 
    674   OP_UPTO,           /* 36 From 0 to n matches */
    675   OP_MINUPTO,        /* 37 */
    676   OP_EXACT,          /* 38 Exactly n matches */
    677 
    678   OP_POSSTAR,        /* 39 Possessified star */
    679   OP_POSPLUS,        /* 40 Possessified plus */
    680   OP_POSQUERY,       /* 41 Posesssified query */
    681   OP_POSUPTO,        /* 42 Possessified upto */
    682 
    683   OP_NOTSTAR,        /* 43 The maximizing and minimizing versions of */
    684   OP_NOTMINSTAR,     /* 44 these six opcodes must come in pairs, with */
    685   OP_NOTPLUS,        /* 45 the minimizing one second. They must be in */
    686   OP_NOTMINPLUS,     /* 46 exactly the same order as those above. */
    687   OP_NOTQUERY,       /* 47 This set applies to "not" single characters. */
    688   OP_NOTMINQUERY,    /* 48 */
    689 
    690   OP_NOTUPTO,        /* 49 From 0 to n matches */
    691   OP_NOTMINUPTO,     /* 50 */
    692   OP_NOTEXACT,       /* 51 Exactly n matches */
    693 
    694   OP_NOTPOSSTAR,     /* 52 Possessified versions */
    695   OP_NOTPOSPLUS,     /* 53 */
    696   OP_NOTPOSQUERY,    /* 54 */
    697   OP_NOTPOSUPTO,     /* 55 */
    698 
    699   OP_TYPESTAR,       /* 56 The maximizing and minimizing versions of */
    700   OP_TYPEMINSTAR,    /* 57 these six opcodes must come in pairs, with */
    701   OP_TYPEPLUS,       /* 58 the minimizing one second. These codes must */
    702   OP_TYPEMINPLUS,    /* 59 be in exactly the same order as those above. */
    703   OP_TYPEQUERY,      /* 60 This set applies to character types such as \d */
    704   OP_TYPEMINQUERY,   /* 61 */
    705 
    706   OP_TYPEUPTO,       /* 62 From 0 to n matches */
    707   OP_TYPEMINUPTO,    /* 63 */
    708   OP_TYPEEXACT,      /* 64 Exactly n matches */
    709 
    710   OP_TYPEPOSSTAR,    /* 65 Possessified versions */
    711   OP_TYPEPOSPLUS,    /* 66 */
    712   OP_TYPEPOSQUERY,   /* 67 */
    713   OP_TYPEPOSUPTO,    /* 68 */
    714 
    715   OP_CRSTAR,         /* 69 The maximizing and minimizing versions of */
    716   OP_CRMINSTAR,      /* 70 all these opcodes must come in pairs, with */
    717   OP_CRPLUS,         /* 71 the minimizing one second. These codes must */
    718   OP_CRMINPLUS,      /* 72 be in exactly the same order as those above. */
    719   OP_CRQUERY,        /* 73 These are for character classes and back refs */
    720   OP_CRMINQUERY,     /* 74 */
    721   OP_CRRANGE,        /* 75 These are different to the three sets above. */
    722   OP_CRMINRANGE,     /* 76 */
    723 
    724   OP_CLASS,          /* 77 Match a character class, chars < 256 only */
    725   OP_NCLASS,         /* 78 Same, but the bitmap was created from a negative
     647  OP_ANY,            /* 12 Match any character (subject to DOTALL) */
     648  OP_ALLANY,         /* 13 Match any character (not subject to DOTALL) */
     649  OP_ANYBYTE,        /* 14 Match any byte (\C); different to OP_ANY for UTF-8 */
     650  OP_NOTPROP,        /* 15 \P (not Unicode property) */
     651  OP_PROP,           /* 16 \p (Unicode property) */
     652  OP_ANYNL,          /* 17 \R (any newline sequence) */
     653  OP_NOT_HSPACE,     /* 18 \H (not horizontal whitespace) */
     654  OP_HSPACE,         /* 19 \h (horizontal whitespace) */
     655  OP_NOT_VSPACE,     /* 20 \V (not vertical whitespace) */
     656  OP_VSPACE,         /* 21 \v (vertical whitespace) */
     657  OP_EXTUNI,         /* 22 \X (extended Unicode sequence */
     658  OP_EODN,           /* 23 End of data or \n at end of data: \Z. */
     659  OP_EOD,            /* 24 End of data: \z */
     660
     661  OP_OPT,            /* 25 Set runtime options */
     662  OP_CIRC,           /* 26 Start of line - varies with multiline switch */
     663  OP_DOLL,           /* 27 End of line - varies with multiline switch */
     664  OP_CHAR,           /* 28 Match one character, casefully */
     665  OP_CHARNC,         /* 29 Match one character, caselessly */
     666  OP_NOT,            /* 30 Match one character, not the following one */
     667
     668  OP_STAR,           /* 31 The maximizing and minimizing versions of */
     669  OP_MINSTAR,        /* 32 these six opcodes must come in pairs, with */
     670  OP_PLUS,           /* 33 the minimizing one second. */
     671  OP_MINPLUS,        /* 34 This first set applies to single characters.*/
     672  OP_QUERY,          /* 35 */
     673  OP_MINQUERY,       /* 36 */
     674
     675  OP_UPTO,           /* 37 From 0 to n matches */
     676  OP_MINUPTO,        /* 38 */
     677  OP_EXACT,          /* 39 Exactly n matches */
     678
     679  OP_POSSTAR,        /* 40 Possessified star */
     680  OP_POSPLUS,        /* 41 Possessified plus */
     681  OP_POSQUERY,       /* 42 Posesssified query */
     682  OP_POSUPTO,        /* 43 Possessified upto */
     683
     684  OP_NOTSTAR,        /* 44 The maximizing and minimizing versions of */
     685  OP_NOTMINSTAR,     /* 45 these six opcodes must come in pairs, with */
     686  OP_NOTPLUS,        /* 46 the minimizing one second. They must be in */
     687  OP_NOTMINPLUS,     /* 47 exactly the same order as those above. */
     688  OP_NOTQUERY,       /* 48 This set applies to "not" single characters. */
     689  OP_NOTMINQUERY,    /* 49 */
     690
     691  OP_NOTUPTO,        /* 50 From 0 to n matches */
     692  OP_NOTMINUPTO,     /* 51 */
     693  OP_NOTEXACT,       /* 52 Exactly n matches */
     694
     695  OP_NOTPOSSTAR,     /* 53 Possessified versions */
     696  OP_NOTPOSPLUS,     /* 54 */
     697  OP_NOTPOSQUERY,    /* 55 */
     698  OP_NOTPOSUPTO,     /* 56 */
     699
     700  OP_TYPESTAR,       /* 57 The maximizing and minimizing versions of */
     701  OP_TYPEMINSTAR,    /* 58 these six opcodes must come in pairs, with */
     702  OP_TYPEPLUS,       /* 59 the minimizing one second. These codes must */
     703  OP_TYPEMINPLUS,    /* 60 be in exactly the same order as those above. */
     704  OP_TYPEQUERY,      /* 61 This set applies to character types such as \d */
     705  OP_TYPEMINQUERY,   /* 62 */
     706
     707  OP_TYPEUPTO,       /* 63 From 0 to n matches */
     708  OP_TYPEMINUPTO,    /* 64 */
     709  OP_TYPEEXACT,      /* 65 Exactly n matches */
     710
     711  OP_TYPEPOSSTAR,    /* 66 Possessified versions */
     712  OP_TYPEPOSPLUS,    /* 67 */
     713  OP_TYPEPOSQUERY,   /* 68 */
     714  OP_TYPEPOSUPTO,    /* 69 */
     715
     716  OP_CRSTAR,         /* 70 The maximizing and minimizing versions of */
     717  OP_CRMINSTAR,      /* 71 all these opcodes must come in pairs, with */
     718  OP_CRPLUS,         /* 72 the minimizing one second. These codes must */
     719  OP_CRMINPLUS,      /* 73 be in exactly the same order as those above. */
     720  OP_CRQUERY,        /* 74 These are for character classes and back refs */
     721  OP_CRMINQUERY,     /* 75 */
     722  OP_CRRANGE,        /* 76 These are different to the three sets above. */
     723  OP_CRMINRANGE,     /* 77 */
     724
     725  OP_CLASS,          /* 78 Match a character class, chars < 256 only */
     726  OP_NCLASS,         /* 79 Same, but the bitmap was created from a negative
    726727                           class - the difference is relevant only when a UTF-8
    727728                           character > 255 is encountered. */
    728729
    729   OP_XCLASS,         /* 79 Extended class for handling UTF-8 chars within the
     730  OP_XCLASS,         /* 80 Extended class for handling UTF-8 chars within the
    730731                           class. This does both positive and negative. */
    731732
    732   OP_REF,            /* 80 Match a back reference */
    733   OP_RECURSE,        /* 81 Match a numbered subpattern (possibly recursive) */
    734   OP_CALLOUT,        /* 82 Call out to external function if provided */
    735 
    736   OP_ALT,            /* 83 Start of alternation */
    737   OP_KET,            /* 84 End of group that doesn't have an unbounded repeat */
    738   OP_KETRMAX,        /* 85 These two must remain together and in this */
    739   OP_KETRMIN,        /* 86 order. They are for groups the repeat for ever. */
     733  OP_REF,            /* 81 Match a back reference */
     734  OP_RECURSE,        /* 82 Match a numbered subpattern (possibly recursive) */
     735  OP_CALLOUT,        /* 83 Call out to external function if provided */
     736
     737  OP_ALT,            /* 84 Start of alternation */
     738  OP_KET,            /* 85 End of group that doesn't have an unbounded repeat */
     739  OP_KETRMAX,        /* 86 These two must remain together and in this */
     740  OP_KETRMIN,        /* 87 order. They are for groups the repeat for ever. */
    740741
    741742  /* The assertions must come before BRA, CBRA, ONCE, and COND.*/
    742743
    743   OP_ASSERT,         /* 87 Positive lookahead */
    744   OP_ASSERT_NOT,     /* 88 Negative lookahead */
    745   OP_ASSERTBACK,     /* 89 Positive lookbehind */
    746   OP_ASSERTBACK_NOT, /* 90 Negative lookbehind */
    747   OP_REVERSE,        /* 91 Move pointer back - used in lookbehind assertions */
     744  OP_ASSERT,         /* 88 Positive lookahead */
     745  OP_ASSERT_NOT,     /* 89 Negative lookahead */
     746  OP_ASSERTBACK,     /* 90 Positive lookbehind */
     747  OP_ASSERTBACK_NOT, /* 91 Negative lookbehind */
     748  OP_REVERSE,        /* 92 Move pointer back - used in lookbehind assertions */
    748749
    749750  /* ONCE, BRA, CBRA, and COND must come after the assertions, with ONCE first,
    750751  as there's a test for >= ONCE for a subpattern that isn't an assertion. */
    751752
    752   OP_ONCE,           /* 92 Atomic group */
    753   OP_BRA,            /* 93 Start of non-capturing bracket */
    754   OP_CBRA,           /* 94 Start of capturing bracket */
    755   OP_COND,           /* 95 Conditional group */
     753  OP_ONCE,           /* 93 Atomic group */
     754  OP_BRA,            /* 94 Start of non-capturing bracket */
     755  OP_CBRA,           /* 95 Start of capturing bracket */
     756  OP_COND,           /* 96 Conditional group */
    756757
    757758  /* These three must follow the previous three, in the same order. There's a
    758759  check for >= SBRA to distinguish the two sets. */
    759760
    760   OP_SBRA,           /* 96 Start of non-capturing bracket, check empty  */
    761   OP_SCBRA,          /* 97 Start of capturing bracket, check empty */
    762   OP_SCOND,          /* 98 Conditional group, check empty */
    763 
    764   OP_CREF,           /* 99 Used to hold a capture number as condition */
    765   OP_RREF,           /* 100 Used to hold a recursion number as condition */
    766   OP_DEF,            /* 101 The DEFINE condition */
    767 
    768   OP_BRAZERO,        /* 102 These two must remain together and in this */
    769   OP_BRAMINZERO,     /* 103 order. */
     761  OP_SBRA,           /* 97 Start of non-capturing bracket, check empty  */
     762  OP_SCBRA,          /* 98 Start of capturing bracket, check empty */
     763  OP_SCOND,          /* 99 Conditional group, check empty */
     764
     765  OP_CREF,           /* 100 Used to hold a capture number as condition */
     766  OP_RREF,           /* 101 Used to hold a recursion number as condition */
     767  OP_DEF,            /* 102 The DEFINE condition */
     768
     769  OP_BRAZERO,        /* 103 These two must remain together and in this */
     770  OP_BRAMINZERO,     /* 104 order. */
    770771
    771772  /* These are backtracking control verbs */
    772773
    773   OP_PRUNE,          /* 104 */
    774   OP_SKIP,           /* 105 */
    775   OP_THEN,           /* 106 */
    776   OP_COMMIT,         /* 107 */
     774  OP_PRUNE,          /* 105 */
     775  OP_SKIP,           /* 106 */
     776  OP_THEN,           /* 107 */
     777  OP_COMMIT,         /* 108 */
    777778
    778779  /* These are forced failure and success verbs */
    779780
    780   OP_FAIL,           /* 108 */
    781   OP_ACCEPT          /* 109 */
     781  OP_FAIL,           /* 109 */
     782  OP_ACCEPT,         /* 110 */
     783
     784  /* This is used to skip a subpattern with a {0} quantifier */
     785
     786  OP_SKIPZERO        /* 111 */
    782787};
    783788
     
    788793#define OP_NAME_LIST \
    789794  "End", "\\A", "\\G", "\\K", "\\B", "\\b", "\\D", "\\d",         \
    790   "\\S", "\\s", "\\W", "\\w", "Any", "Anybyte",                   \
     795  "\\S", "\\s", "\\W", "\\w", "Any", "AllAny", "Anybyte",         \
    791796  "notprop", "prop", "\\R", "\\H", "\\h", "\\V", "\\v",           \
    792797  "extuni",  "\\Z", "\\z",                                        \
     
    804809  "Once", "Bra", "CBra", "Cond", "SBra", "SCBra", "SCond",        \
    805810  "Cond ref", "Cond rec", "Cond def", "Brazero", "Braminzero",    \
    806   "*PRUNE", "*SKIP", "*THEN", "*COMMIT", "*FAIL", "*ACCEPT"
     811  "*PRUNE", "*SKIP", "*THEN", "*COMMIT", "*FAIL", "*ACCEPT",      \
     812  "Skip zero"
    807813
    808814
     
    820826  1, 1, 1, 1, 1,                 /* \A, \G, \K, \B, \b                     */ \
    821827  1, 1, 1, 1, 1, 1,              /* \D, \d, \S, \s, \W, \w                 */ \
    822   1, 1,                          /* Any, Anybyte                           */ \
     828  1, 1, 1,                       /* Any, AllAny, Anybyte                   */ \
    823829  3, 3, 1,                       /* NOTPROP, PROP, EXTUNI                  */ \
    824830  1, 1, 1, 1, 1,                 /* \R, \H, \h, \V, \v                     */ \
     
    869875  1, 1,                          /* BRAZERO, BRAMINZERO                    */ \
    870876  1, 1, 1, 1,                    /* PRUNE, SKIP, THEN, COMMIT,             */ \
    871   1, 1                           /* FAIL, ACCEPT                           */
     877  1, 1, 1                        /* FAIL, ACCEPT, SKIPZERO                 */
    872878
    873879
     
    885891       ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49,
    886892       ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59,
    887        ERR60, ERR61, ERR62, ERR63 };
     893       ERR60, ERR61, ERR62, ERR63, ERR64 };
    888894
    889895/* The real format of the start of the pcre block; the index of names and the
     
    10101016  BOOL   noteol;                /* NOTEOL flag */
    10111017  BOOL   utf8;                  /* UTF8 flag */
     1018  BOOL   jscript_compat;        /* JAVASCRIPT_COMPAT flag */
    10121019  BOOL   endonly;               /* Dollar not before final \n */
    10131020  BOOL   notempty;              /* Empty string match not wanted */
  • chicken/branches/release/pcre/pcre_study.c

    r10108 r11963  
    218218      break;
    219219
     220      /* SKIPZERO skips the bracket. */
     221
     222      case OP_SKIPZERO:
     223      do tcode += GET(tcode,1); while (*tcode == OP_ALT);
     224      tcode += 1 + LINK_SIZE;
     225      break;
     226
    220227      /* Single-char * or ? sets the bit and tries the next item */
    221228
     
    342349        {
    343350        case OP_ANY:
     351        case OP_ALLANY:
    344352        return SSB_FAIL;
    345353
  • chicken/branches/release/pcre/ucpinternal.h

    r6175 r11963  
    1818#define f0_scriptmask   0xff000000  /* Mask for script field */
    1919#define f0_scriptshift          24  /* Shift for script value */
    20 #define f0_rangeflag    0x00f00000  /* Flag for a range item */
     20#define f0_rangeflag    0x00800000  /* Flag for a range item */
    2121#define f0_charmask     0x001fffff  /* Mask for code point value */
    2222
  • chicken/branches/release/posixunix.scm

    r10653 r11963  
    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/release/posixwin.scm

    r10653 r11963  
    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/release/regex.scm

    r11102 r11963  
    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/release/rules.make

    r11102 r11963  
    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
     
    5151ifeq ($(USE_HOST_PCRE),)
    5252PCRE_OBJECTS_1 ?= \
    53        pcre/pcre_compile \
    54        pcre/pcre_config \
    55        pcre/pcre_dfa_exec \
    56        pcre/pcre_exec \
    57        pcre/pcre_fullinfo \
    58        pcre/pcre_get \
    59        pcre/pcre_globals \
    60        pcre/pcre_info \
    61        pcre/pcre_maketables \
    62        pcre/pcre_newline \
    63        pcre/pcre_ord2utf8 \
    64        pcre/pcre_refcount \
    65        pcre/pcre_study \
    66        pcre/pcre_tables \
    67        pcre/pcre_try_flipped \
    68        pcre/pcre_ucp_searchfuncs \
    69        pcre/pcre_valid_utf8 \
    70        pcre/pcre_version \
    71        pcre/pcre_xclass \
    72        pcre/pcre_chartables
     53       $(PCRE_DIR)pcre_compile \
     54       $(PCRE_DIR)pcre_config \
     55       $(PCRE_DIR)pcre_dfa_exec \
     56       $(PCRE_DIR)pcre_exec \
     57       $(PCRE_DIR)pcre_fullinfo \
     58       $(PCRE_DIR)pcre_get \
     59       $(PCRE_DIR)pcre_globals \
     60       $(PCRE_DIR)pcre_info \
     61       $(PCRE_DIR)pcre_maketables \
     62       $(PCRE_DIR)pcre_newline \
     63       $(PCRE_DIR)pcre_ord2utf8 \
     64       $(PCRE_DIR)pcre_refcount \
     65       $(PCRE_DIR)pcre_study \
     66       $(PCRE_DIR)pcre_tables \
     67       $(PCRE_DIR)pcre_try_flipped \
     68       $(PCRE_DIR)pcre_ucp_searchfuncs \
     69       $(PCRE_DIR)pcre_valid_utf8 \
     70       $(PCRE_DIR)pcre_version \
     71       $(PCRE_DIR)pcre_xclass \
     72       $(PCRE_DIR)pcre_chartables
    7373PCRE_SHARED_OBJECTS = $(PCRE_OBJECTS_1:=$(O))
    7474PCRE_STATIC_OBJECTS = $(PCRE_OBJECTS_1:=-static$(O))
     
    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
    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/pcre_ord2utf8$(O): pcre/pcre_ord2utf8.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/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/pcre_refcount$(O): pcre/pcre_refcount.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/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/pcre_study$(O): pcre/pcre_study.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/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/pcre_tables$(O): pcre/pcre_tables.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    529         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    530           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    531           $(C_COMPILER_PCRE_OPTIONS)
    532 pcre/pcre_try_flipped$(O): pcre/pcre_try_flipped.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    533         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    534           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    535           $(C_COMPILER_PCRE_OPTIONS)
    536 pcre/pcre_ucp_searchfuncs$(O): pcre/pcre_ucp_searchfuncs.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h pcre/ucptable.h pcre/ucpinternal.h
    537         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    538           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    539           $(C_COMPILER_PCRE_OPTIONS)
    540 pcre/pcre_valid_utf8$(O): pcre/pcre_valid_utf8.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    541         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    542           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    543           $(C_COMPILER_PCRE_OPTIONS)
    544 pcre/pcre_version$(O): pcre/pcre_version.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    545         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    546           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    547           $(C_COMPILER_PCRE_OPTIONS)
    548 pcre/pcre_xclass$(O): pcre/pcre_xclass.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    549         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    550           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    551           $(C_COMPILER_PCRE_OPTIONS)
    552 pcre/pcre_chartables$(O): pcre/pcre_chartables.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_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
     529        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     530          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     531          $(C_COMPILER_PCRE_OPTIONS)
     532$(PCRE_DIR)pcre_ord2utf8$(O): $(PCRE_DIR)pcre_ord2utf8.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)pcre.h $(PCRE_DIR)ucp.h
     533        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     534          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     535          $(C_COMPILER_PCRE_OPTIONS)
     536$(PCRE_DIR)pcre_refcount$(O): $(PCRE_DIR)pcre_refcount.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)pcre.h $(PCRE_DIR)ucp.h
     537        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     538          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     539          $(C_COMPILER_PCRE_OPTIONS)
     540$(PCRE_DIR)pcre_study$(O): $(PCRE_DIR)pcre_study.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)pcre.h $(PCRE_DIR)ucp.h
     541        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     542          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     543          $(C_COMPILER_PCRE_OPTIONS)
     544$(PCRE_DIR)pcre_tables$(O): $(PCRE_DIR)pcre_tables.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)pcre.h $(PCRE_DIR)ucp.h
     545        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     546          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     547          $(C_COMPILER_PCRE_OPTIONS)
     548$(PCRE_DIR)pcre_try_flipped$(O): $(PCRE_DIR)pcre_try_flipped.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)pcre.h $(PCRE_DIR)ucp.h
     549        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     550          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     551          $(C_COMPILER_PCRE_OPTIONS)
     552$(PCRE_DIR)pcre_ucp_searchfuncs$(O): $(PCRE_DIR)pcre_ucp_searchfuncs.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)pcre.h $(PCRE_DIR)ucp.h $(PCRE_DIR)ucptable.h $(PCRE_DIR)ucpinternal.h
     553        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     554          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     555          $(C_COMPILER_PCRE_OPTIONS)
     556$(PCRE_DIR)pcre_valid_utf8$(O): $(PCRE_DIR)pcre_valid_utf8.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)pcre.h $(PCRE_DIR)ucp.h
     557        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     558          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     559          $(C_COMPILER_PCRE_OPTIONS)
     560$(PCRE_DIR)pcre_version$(O): $(PCRE_DIR)pcre_version.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)pcre.h $(PCRE_DIR)ucp.h
     561        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     562          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     563          $(C_COMPILER_PCRE_OPTIONS)
     564$(PCRE_DIR)pcre_xclass$(O): $(PCRE_DIR)pcre_xclass.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)pcre.h $(PCRE_DIR)ucp.h
     565        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     566          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     567          $(C_COMPILER_PCRE_OPTIONS)
     568$(PCRE_DIR)pcre_chartables$(O): $(PCRE_DIR)pcre_chartables.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H)
    553569        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    554570          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     
    557573# static pcre objects
    558574
    559 pcre/pcre_compile-static$(O): pcre/pcre_compile.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    560         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    561           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    562           $(C_COMPILER_PCRE_OPTIONS)
    563 pcre/pcre_config-static$(O): pcre/pcre_config.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    564         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    565           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    566           $(C_COMPILER_PCRE_OPTIONS)
    567 pcre/pcre_dfa_exec-static$(O): pcre/pcre_dfa_exec.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    568         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    569           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    570           $(C_COMPILER_PCRE_OPTIONS)
    571 pcre/pcre_exec-static$(O): pcre/pcre_exec.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    572         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    573           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    574           $(C_COMPILER_PCRE_OPTIONS)
    575 pcre/pcre_fullinfo-static$(O): pcre/pcre_fullinfo.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    576         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    577           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    578           $(C_COMPILER_PCRE_OPTIONS)
    579 pcre/pcre_get-static$(O): pcre/pcre_get.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    580         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    581           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    582           $(C_COMPILER_PCRE_OPTIONS)
    583 pcre/pcre_globals-static$(O): pcre/pcre_globals.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    584         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    585           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    586           $(C_COMPILER_PCRE_OPTIONS)
    587 pcre/pcre_info-static$(O): pcre/pcre_info.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    588         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    589           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    590           $(C_COMPILER_PCRE_OPTIONS)
    591 pcre/pcre_maketables-static$(O): pcre/pcre_maketables.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    592         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    593           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    594           $(C_COMPILER_PCRE_OPTIONS)
    595 pcre/pcre_newline-static$(O): pcre/pcre_newline.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    596         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    597           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    598           $(C_COMPILER_PCRE_OPTIONS)
    599 pcre/pcre_ord2utf8-static$(O): pcre/pcre_ord2utf8.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    600         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    601           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    602           $(C_COMPILER_PCRE_OPTIONS)
    603 pcre/pcre_refcount-static$(O): pcre/pcre_refcount.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    604         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    605           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    606           $(C_COMPILER_PCRE_OPTIONS)
    607 pcre/pcre_study-static$(O): pcre/pcre_study.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    608         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    609           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    610           $(C_COMPILER_PCRE_OPTIONS)
    611 pcre/pcre_tables-static$(O): pcre/pcre_tables.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    612         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    613           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    614           $(C_COMPILER_PCRE_OPTIONS)
    615 pcre/pcre_try_flipped-static$(O): pcre/pcre_try_flipped.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    616         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    617           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    618           $(C_COMPILER_PCRE_OPTIONS)
    619 pcre/pcre_ucp_searchfuncs-static$(O): pcre/pcre_ucp_searchfuncs.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h pcre/ucptable.h pcre/ucpinternal.h
    620         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    621           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    622           $(C_COMPILER_PCRE_OPTIONS)
    623 pcre/pcre_valid_utf8-static$(O): pcre/pcre_valid_utf8.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    624         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    625           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    626           $(C_COMPILER_PCRE_OPTIONS)
    627 pcre/pcre_version-static$(O): pcre/pcre_version.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    628         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    629           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    630           $(C_COMPILER_PCRE_OPTIONS)
    631 pcre/pcre_xclass-static$(O): pcre/pcre_xclass.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h
    632         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    633           $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
    634           $(C_COMPILER_PCRE_OPTIONS)
    635 pcre/pcre_chartables-static$(O): pcre/pcre_chartables.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H)
     575$(PCRE_DIR)pcre_compile-static$(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
     576        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     577          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     578          $(C_COMPILER_PCRE_OPTIONS)
     579$(PCRE_DIR)pcre_config-static$(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
     580        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     581          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     582          $(C_COMPILER_PCRE_OPTIONS)
     583$(PCRE_DIR)pcre_dfa_exec-static$(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
     584        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     585          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     586          $(C_COMPILER_PCRE_OPTIONS)
     587$(PCRE_DIR)pcre_exec-static$(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
     588        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     589          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     590          $(C_COMPILER_PCRE_OPTIONS)
     591$(PCRE_DIR)pcre_fullinfo-static$(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
     592        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     593          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     594          $(C_COMPILER_PCRE_OPTIONS)
     595$(PCRE_DIR)pcre_get-static$(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
     596        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     597          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     598          $(C_COMPILER_PCRE_OPTIONS)
     599$(PCRE_DIR)pcre_globals-static$(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
     600        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     601          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     602          $(C_COMPILER_PCRE_OPTIONS)
     603$(PCRE_DIR)pcre_info-static$(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
     604        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     605          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     606          $(C_COMPILER_PCRE_OPTIONS)
     607$(PCRE_DIR)pcre_maketables-static$(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
     608        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     609          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     610          $(C_COMPILER_PCRE_OPTIONS)
     611$(PCRE_DIR)pcre_newline-static$(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
     612        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     613          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     614          $(C_COMPILER_PCRE_OPTIONS)
     615$(PCRE_DIR)pcre_ord2utf8-static$(O): $(PCRE_DIR)pcre_ord2utf8.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)pcre.h $(PCRE_DIR)ucp.h
     616        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     617          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     618          $(C_COMPILER_PCRE_OPTIONS)
     619$(PCRE_DIR)pcre_refcount-static$(O): $(PCRE_DIR)pcre_refcount.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)pcre.h $(PCRE_DIR)ucp.h
     620        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     621          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     622          $(C_COMPILER_PCRE_OPTIONS)
     623$(PCRE_DIR)pcre_study-static$(O): $(PCRE_DIR)pcre_study.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)pcre.h $(PCRE_DIR)ucp.h
     624        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     625          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     626          $(C_COMPILER_PCRE_OPTIONS)
     627$(PCRE_DIR)pcre_tables-static$(O): $(PCRE_DIR)pcre_tables.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)pcre.h $(PCRE_DIR)ucp.h
     628        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     629          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     630          $(C_COMPILER_PCRE_OPTIONS)
     631$(PCRE_DIR)pcre_try_flipped-static$(O): $(PCRE_DIR)pcre_try_flipped.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)pcre.h $(PCRE_DIR)ucp.h
     632        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     633          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     634          $(C_COMPILER_PCRE_OPTIONS)
     635$(PCRE_DIR)pcre_ucp_searchfuncs-static$(O): $(PCRE_DIR)pcre_ucp_searchfuncs.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)pcre.h $(PCRE_DIR)ucp.h $(PCRE_DIR)ucptable.h $(PCRE_DIR)ucpinternal.h
     636        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     637          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     638          $(C_COMPILER_PCRE_OPTIONS)
     639$(PCRE_DIR)pcre_valid_utf8-static$(O): $(PCRE_DIR)pcre_valid_utf8.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)pcre.h $(PCRE_DIR)ucp.h
     640        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     641          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     642          $(C_COMPILER_PCRE_OPTIONS)
     643$(PCRE_DIR)pcre_version-static$(O): $(PCRE_DIR)pcre_version.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)pcre.h $(PCRE_DIR)ucp.h
     644        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     645          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     646          $(C_COMPILER_PCRE_OPTIONS)
     647$(PCRE_DIR)pcre_xclass-static$(O): $(PCRE_DIR)pcre_xclass.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H) $(PCRE_DIR)pcre.h $(PCRE_DIR)ucp.h
     648        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
     649          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     650          $(C_COMPILER_PCRE_OPTIONS)
     651$(PCRE_DIR)pcre_chartables-static$(O): $(PCRE_DIR)pcre_chartables.c $(PCRE_DIR)pcre_internal.h $(PCRE_DIR)config.h $(CHICKEN_CONFIG_H)
    636652        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    637653          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     
    787803endif
    788804ifneq ($(POSTINSTALL_STATIC_LIBRARY),true)
     805ifdef WINDOWS
     806        $(POSTINSTALL_STATIC_LIBRARY) $(POSTINSTALL_STATIC_LIBRARY_FLAGS) \
     807          $(ILIBDIR)\\libchicken$(A)
     808        $(POSTINSTALL_STATIC_LIBRARY) $(POSTINSTALL_STATIC_LIBRARY_FLAGS) \
     809          $(ILIBDIR)\\libuchicken$(A)
     810else
    789811        $(POSTINSTALL_STATIC_LIBRARY) $(POSTINSTALL_STATIC_LIBRARY_FLAGS) \
    790812          $(ILIBDIR)/libchicken$(A)
     
    792814          $(ILIBDIR)/libuchicken$(A)
    793815endif
    794         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) chicken.h $(DESTDIR)$(IINCDIR)
     816endif
     817        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken.h $(DESTDIR)$(IINCDIR)
    795818        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(CHICKEN_CONFIG_H) $(DESTDIR)$(IINCDIR)
    796819ifndef STATICBUILD
     
    830853          $(CSI_PROGRAM)$(EXE) $(CSC_PROGRAM)$(EXE) $(CHICKEN_PROFILE_PROGRAM)$(EXE) \
    831854          $(CHICKEN_SETUP_PROGRAM)$(EXE)
    832         $(MAKE) NEEDS_RELINKING=no RUNTIME_LINKER_PATH=$(LIBDIR) install
     855        $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) NEEDS_RELINKING=no RUNTIME_LINKER_PATH=$(LIBDIR) install
    833856        $(MAKE_WRITABLE_COMMAND) $(CHICKEN_PROGRAM)$(EXE) $(CSI_PROGRAM)$(EXE) \
    834857          $(CSC_PROGRAM)$(EXE) $(CHICKEN_PROFILE_PROGRAM)$(EXE)
     
    865888endif
    866889endif
    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)
     890        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken.1 $(DESTDIR)$(IMANDIR)
     891        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)csi.1 $(DESTDIR)$(IMANDIR)
     892        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)csc.1 $(DESTDIR)$(IMANDIR)
     893        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken-setup.1 $(DESTDIR)$(IMANDIR)
     894        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken-profile.1 $(DESTDIR)$(IMANDIR)
     895        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken-bug.1 $(DESTDIR)$(IMANDIR)
    873896        $(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)
     897        -$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)html/* $(DESTDIR)$(IDOCDIR)/html
     898        -$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken.pdf $(DESTDIR)$(IDOCDIR)
     899        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)README $(DESTDIR)$(IDOCDIR)
     900        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)LICENSE $(DESTDIR)$(IDOCDIR)
     901        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken-more-macros.scm $(DESTDIR)$(IDATADIR)
     902        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken-ffi-macros.scm $(DESTDIR)$(IDATADIR)
     903        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken-sys-macros.scm $(DESTDIR)$(IDATADIR)
    881904        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) *.exports $(DESTDIR)$(IDATADIR)
    882905        -$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) chicken.info $(DESTDIR)$(IINFODIR)
    883906        $(INSTALLINFO_PROGRAM) $(INSTALLINFO_PROGRAM_OPTIONS) --infodir=$(DESTDIR)$(IINFODIR) chicken.info
    884907ifdef WINDOWS
    885         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) csibatch.bat $(DESTDIR)$(IBINDIR)
     908        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) $(SRCDIR)csibatch.bat $(DESTDIR)$(IBINDIR)
    886909endif
    887910endif
     
    926949ports.c: ports.scm private-namespace.scm
    927950        $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ -extend private-namespace.scm
     951files.c: files.scm private-namespace.scm
     952        $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ -extend private-namespace.scm
    928953extras.c: extras.scm private-namespace.scm
    929954        $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ -extend private-namespace.scm
     
    968993        $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ -extend private-namespace.scm
    969994uports.c: ports.scm private-namespace.scm
     995        $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ -extend private-namespace.scm
     996ufiles.c: files.scm private-namespace.scm
    970997        $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ -extend private-namespace.scm
    971998uextras.c: extras.scm private-namespace.scm
     
    10261053.PHONY: distfiles
    10271054
    1028 distfiles: buildsvnrevision library.c eval.c data-structures.c ports.c extras.c lolevel.c utils.c \
     1055distfiles: buildsvnrevision library.c eval.c data-structures.c ports.c files.c extras.c lolevel.c utils.c \
    10291056        tcp.c srfi-1.c srfi-4.c srfi-13.c srfi-14.c srfi-18.c srfi-69.c \
    10301057        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 \
     1058        ulibrary.c ueval.c udata-structures.c uports.c ufiles.c uextras.c ulolevel.c \
    10321059        uutils.c utcp.c usrfi-1.c usrfi-4.c usrfi-13.c usrfi-14.c \
    10331060        usrfi-18.c usrfi-69.c uposixunix.c uposixwin.c uregex.c \
     
    10411068
    10421069ifeq ($(PLATFORM),mingw)
    1043 CLEAN_PCRE = pcre\*$(O)
     1070CLEAN_PCRE = $(PCRE_DIR)*$(O)
    10441071CLEAN_MINGW_LIBS = libchickengui.a libchickengui.dll libchickengui.dll.a
    10451072else
    1046 CLEAN_PCRE = pcre/*$(O)
     1073CLEAN_PCRE = $(PCRE_DIR)*$(O)
    10471074CLEAN_MINGW_LIBS =
    10481075endif
     
    10531080          csc-static$(EXE) chicken-static$(EXE) chicken-bug$(EXE) chicken.info *$(O) \
    10541081          $(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)
     1082          libchicken$(A) libuchicken$(A) libchickengui$(A) libchicken$(SO) libuchicken$(SO) \
     1083          $(PROGRAM_IMPORT_LIBRARIES) $(LIBCHICKEN_IMPORT_LIBRARY) $(LIBUCHICKEN_IMPORT_LIBRARY) \
     1084          $(LIBCHICKENGUI_IMPORT_LIBRARY)  $(MSVC_CHICKEN_EXPORT_FILES) \
     1085          chicken.info $(CLEAN_PCRE) $(CLEAN_MINGW_LIBS) $(CLEAN_MANIFESTS)
    10591086confclean:
    10601087        -$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) chicken-config.h chicken-defaults.h buildsvnrevision
    10611088
    10621089spotless: distclean
    1063         -$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) library.c eval.c data-structures.c ports.c \
     1090        -$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) library.c eval.c data-structures.c ports.c files.c \
    10641091          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 \
    10651092          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 \
     1093          ulibrary.c ueval.c udata-structures.c uports.c ufiles.c uextras.c ulolevel.c \
    10671094          uutils.c utcp.c usrfi-1.c usrfi-4.c usrfi-13.c usrfi-14.c \
    10681095          usrfi-18.c usrfi-69.c uposixunix.c uposixwin.c uregex.c chicken-profile.c chicken-setup.c chicken-bug.c \
     
    10861113compiler-check:
    10871114        @echo "======================================== packing ..."
    1088         $(MAKE) dist
     1115        $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) dist
    10891116        $(REMOVE_COMMAND $(REMOVE_COMMAND_RECURSIVE_OPTIONS) tests/chicken-*
    10901117        tar -C tests -xzf `ls -t chicken-*.tar.gz | head -1`
    10911118        @echo "======================================== building stage 1 ..."
    1092         $(MAKE) STATICBUILD=1 -C tests/chicken-* confclean all
     1119        $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all
    10931120        touch tests/chicken-*/*.scm
    10941121        @echo "======================================== building stage 2 ..."
    1095         $(MAKE) STATICBUILD=1 -C tests/chicken-* confclean all
     1122        $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all
    10961123        cat tests/chicken-*/*.c >tests/stage2.out
    10971124        @echo "======================================== building stage 3 ..."
    1098         $(MAKE) STATICBUILD=1 -C tests/chicken-* confclean all
     1125        $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all
    10991126        cat tests/chicken-*/*.c >tests/stage3.out
    11001127        diff tests/stage2.out tests/stage3.out >tests/stages.diff
     
    11061133.PHONY: bootstrap bootstrap.tar.gz
    11071134
    1108 bootstrap: bootstrap.tar.gz
    1109         gzip -d -c bootstrap.tar.gz | tar xvf -
     1135bootstrap: $(SRCDIR)bootstrap.tar.gz
     1136        gzip -d -c $(SRCDIR)bootstrap.tar.gz | tar xvf -
    11101137        touch *.c
    1111         $(MAKE) -f Makefile.$(PLATFORM) STATICBUILD=1 chicken$(EXE)
     1138        $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 chicken$(EXE)
    11121139        cp chicken$(EXE) chicken-boot$(EXE)
    11131140        touch *.scm
    11141141
    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)
     1142$(SRCDIR)bootstrap.tar.gz: distfiles
     1143        tar cfz $(SRCDIR)bootstrap.tar.gz library.c eval.c data-structures.c ports.c files.c extras.c \
     1144        lolevel.c utils.c tcp.c srfi-1.c srfi-4.c srfi-13.c srfi-14.c srfi-18.c srfi-69.c \
     1145        posixunix.c posixwin.c regex.c scheduler.c profiler.c stub.c match.c $(COMPILER_OBJECTS_1:=.c)
     1146
  • chicken/branches/release/runtime.c

    r11102 r11963  
    207207# define FORWARDING_BIT_SHIFT          63
    208208# define UWORD_FORMAT_STRING           "0x%lx"
     209# define UWORD_COUNT_FORMAT_STRING     "%ld"
    209210#else
    210211# define ALIGNMENT_HOLE_MARKER         ((C_word)0xfffffffe)
    211212# define FORWARDING_BIT_SHIFT          31
    212213# define UWORD_FORMAT_STRING           "0x%x"
     214# define UWORD_COUNT_FORMAT_STRING     "%d"
    213215#endif
    214216
     
    13041306C_word arg_val(C_char *arg)
    13051307{
    1306   int len = C_strlen(arg);
    1307 
    1308   if(len < 1) panic(C_text("illegal runtime-option argument"));
    1309 
    1310   switch(arg[ len - 1 ]) {
    1311   case 'k':
    1312   case 'K':
    1313     return atol(arg) * 1024;
    1314 
    1315   case 'm':
    1316   case 'M':
    1317     return atol(arg) * 1024 * 1024;
    1318 
    1319   case 'g':
    1320   case 'G':
    1321     return atol(arg) * 1024 * 1024 * 1024;
    1322 
    1323   default:
    1324     return atol(arg);
    1325   }
     1308     int len;
     1309     
     1310     if (arg == NULL) panic(C_text("illegal runtime-option argument"));
     1311     
     1312     len = C_strlen(arg);
     1313     
     1314     if(len < 1) panic(C_text("illegal runtime-option argument"));
     1315     
     1316     switch(arg[ len - 1 ]) {
     1317     case 'k':
     1318     case 'K':
     1319          return atol(arg) * 1024;
     1320         
     1321     case 'm':
     1322     case 'M':
     1323          return atol(arg) * 1024 * 1024;
     1324         
     1325     case 'g':
     1326     case 'G':
     1327          return atol(arg) * 1024 * 1024 * 1024;
     1328         
     1329     default:
     1330          return atol(arg);
     1331     }
    13261332}
    13271333
     
    31973203
    31983204  if(debug_mode)
    3199     C_printf(C_text("[debug] resizing heap dynamically from " UWORD_FORMAT_STRING " to " UWORD_FORMAT_STRING " bytes...\n"),
    3200            (C_uword)heap_size, size);
     3205    C_printf(C_text("[debug] resizing heap dynamically from " UWORD_COUNT_FORMAT_STRING "k to " UWORD_COUNT_FORMAT_STRING "k ...\n"),
     3206             (C_uword)heap_size / 1000, size / 1000);
    32013207
    32023208  if(gc_report_flag) {
     
    75917597  /* check for rational representation: */
    75927598  if((eptr = C_strchr(sptr, '/')) != NULL) {
     7599    if (eptr == sptr) {
     7600        n = C_SCHEME_FALSE;
     7601        goto fini;
     7602    }
    75937603    *eptr = '\0';
    75947604    ratp = 1;
     
    77647774    default: barf(C_BAD_ARGUMENT_TYPE_ERROR, "number->string", C_fix(radix));
    77657775    }
     7776  }
     7777  else if(!C_immediatep(num) && C_block_header(num) == C_FLONUM_TAG) {
     7778    f = C_flonum_magnitude(num);
     7779
     7780    if(C_fits_in_unsigned_int_p(num) == C_SCHEME_TRUE) {
     7781      switch(radix) {
     7782      case 2:
     7783        p = to_binary((unsigned int)f);
     7784        goto fini;
     7785
     7786      case 8:
     7787        C_sprintf(p = buffer, "%o", (unsigned int)f);
     7788        goto fini;
     7789
     7790      case 16:
     7791        C_sprintf(p = buffer, "%x", (unsigned int)f);
     7792        goto fini;
     7793      }
     7794    }
     7795
     7796#if defined(__CYGWIN__) || defined(__MINGW32__)
     7797    if(C_isnan(f)) {
     7798      C_strcpy(p = buffer, "+nan.0");
     7799      goto fini;
     7800    }
     7801    else if(C_isinf(f)) {
     7802      C_sprintf(p = buffer, "%cinf.0", f > 0 ? '+' : '-');
     7803      goto fini;
     7804    }
     7805#endif
     7806
     7807#ifdef HAVE_GCVT
     7808    C_gcvt(f, flonum_print_precision, buffer);
     7809#else
     7810    C_sprintf(buffer, C_text("%.*g"), flonum_print_precision, f);
     7811#endif
     7812
     7813    if((p = C_strpbrk(buffer, C_text(".eE"))) == NULL) {
     7814      if(*buffer == 'i' || *buffer == 'n') { /* inf or nan */
     7815        C_memmove(buffer + 1, buffer, C_strlen(buffer) + 1);
     7816        *buffer = '+';
     7817      }
     7818      else if(buffer[ 1 ] != 'i') C_strcat(buffer, C_text(".0")); /* negative infinity? */
     7819    }
     7820
     7821    p = buffer;
     7822  }
     7823  else
     7824    barf(C_BAD_ARGUMENT_TYPE_ERROR, "number->string", num);
    77667825
    77677826  fini:
     
    77767835    radix = C_string(&a, radix, p);
    77777836    C_kontinue(k, radix);
    7778   }
    7779 
    7780   if(!C_immediatep(num) && C_block_header(num) == C_FLONUM_TAG) {
    7781     f = C_flonum_magnitude(num);
    7782 
    7783     if(C_fits_in_unsigned_int_p(num) == C_SCHEME_TRUE) {
    7784       switch(radix) {
    7785       case 2:
    7786         p = to_binary((unsigned int)f);
    7787         goto fini;
    7788 
    7789       case 8:
    7790         C_sprintf(p = buffer, "%o", (unsigned int)f);
    7791         goto fini;
    7792 
    7793       case 16:
    7794         C_sprintf(p = buffer, "%x", (unsigned int)f);
    7795         goto fini;
    7796       }
    7797     }
    7798 
    7799 #if defined(__CYGWIN__) || defined(__MINGW32__)
    7800     if(C_isnan(f)) {
    7801       C_strcpy(p = buffer, "+nan.0");
    7802       goto fini;
    7803     }
    7804     else if(C_isinf(f)) {
    7805       C_sprintf(p = buffer, "%cinf.0", f > 0 ? '+' : '-');
    7806       goto fini;
    7807     }
    7808 #endif
    7809 
    7810 #ifdef HAVE_GCVT
    7811     C_gcvt(f, flonum_print_precision, buffer);
    7812 #else
    7813     C_sprintf(buffer, C_text("%.*g"), flonum_print_precision, f);
    7814 #endif
    7815 
    7816     if((p = C_strpbrk(buffer, C_text(".eE"))) == NULL) {
    7817       if(*buffer == 'i' || *buffer == 'n') { /* inf or nan */
    7818         C_memmove(buffer + 1, buffer, C_strlen(buffer) + 1);
    7819         *buffer = '+';
    7820       }
    7821       else if(buffer[ 1 ] != 'i') C_strcat(buffer, C_text(".0")); /* negative infinity? */
    7822     }
    7823 
    7824     p = buffer;
    7825     goto fini;
    7826   }
    7827 
    7828   barf(C_BAD_ARGUMENT_TYPE_ERROR, "number->string", num);
    78297837}
    78307838
  • chicken/branches/release/scheduler.scm

    r10108 r11963  
    439439(define (##sys#thread-unblock! t)
    440440  (when (eq? 'blocked (##sys#slot t 3))
    441     (set! ##sys#timeout-list (##sys#delq t ##sys#timeout-list))
     441    (set! ##sys#timeout-list
     442      (let loop ((l ##sys#timeout-list))
     443        (if (null? l)
     444            l
     445            (let ((h (##sys#slot l 0)))
     446              (if (eq? (##sys#slot h 1) t)
     447                  (##sys#slot l 1)
     448                  (cons h (loop (##sys#slot l 1))))))))
    442449    (set! ##sys#fd-list
    443450      (let loop ([fdl ##sys#fd-list])
  • chicken/branches/release/scheme-complete.el

    r10108 r11963  
    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))))))