Changeset 11958 in project


Ignore:
Timestamp:
09/17/08 01:38:47 (11 years ago)
Author:
iraikov
Message:

Merged trunk and prerelease.

Location:
chicken/branches/prerelease
Files:
31 edited

Legend:

Unmodified
Added
Removed
  • chicken/branches/prerelease

  • chicken/branches/prerelease/Makefile

    r11632 r11958  
    2828        = all clean distclean spotless install uninstall confclean check \
    2929          fullcheck dist libs install-libs bootstrap
     30
    3031SRCDIR = .
    3132
  • chicken/branches/prerelease/Makefile.bsd

    r11632 r11958  
    2626
    2727
    28 SRCDIR = .
    29 VPATH  = $(SRCDIR)
     28SRCDIR = ./
    3029
    3130# platform configuration
  • chicken/branches/prerelease/Makefile.cross-linux-mingw

    r11632 r11958  
    2626
    2727
    28 SRCDIR = .
    29 VPATH  = $(SRCDIR)
     28SRCDIR = ./
    3029
    3130# platform configuration
  • chicken/branches/prerelease/Makefile.cygwin

    r11632 r11958  
    2626
    2727
    28 SRCDIR = .
    29 VPATH  = $(SRCDIR)
     28SRCDIR = ./
    3029
    3130# platform configuration
  • chicken/branches/prerelease/Makefile.linux

    r11632 r11958  
    2626
    2727
    28 SRCDIR = .
    29 VPATH  = $(SRCDIR)
     28SRCDIR = ./
    3029
    3130# platform configuration
  • chicken/branches/prerelease/Makefile.macosx

    r11632 r11958  
    2626
    2727
    28 SRCDIR = .
    29 VPATH  = $(SRCDIR)
     28SRCDIR = ./
    3029
    3130# platform configuration
  • chicken/branches/prerelease/Makefile.mingw

    r11632 r11958  
    2626
    2727
    28 SRCDIR = .
    29 VPATH  = $(SRCDIR)
     28SRCDIR = .\\
    3029
    3130# platform configuration
     
    7574CUSTOM_CHICKEN_DEFAULTS=1
    7675
    77 include $(SRCDIR)/defaults.make
     76include $(SRCDIR)defaults.make
    7877
    7978# main target
     
    141140        echo #endif >>$@
    142141        echo #ifndef C_INSTALL_SHARE_HOME >>$@
    143         echo # define C_INSTALL_SHARE_HOME "$(DATADIR)" >>$@
     142        echo # define C_INSTALL_SHARE_HOME "$(IDATADIR)" >>$@
    144143        echo #endif >>$@
    145144        echo #ifndef C_INSTALL_BIN_HOME >>$@
    146         echo # define C_INSTALL_BIN_HOME "$(BINDIR)" >>$@
     145        echo # define C_INSTALL_BIN_HOME "$(IBINDIR)" >>$@
    147146        echo #endif >>$@
    148147        echo #ifndef C_INSTALL_EGG_HOME >>$@
    149         echo # define C_INSTALL_EGG_HOME "$(EGGDIR)" >>$@
     148        echo # define C_INSTALL_EGG_HOME "$(IEGGDIR)" >>$@
    150149        echo #endif >>$@
    151150        echo #ifndef C_INSTALL_LIB_HOME >>$@
    152         echo # define C_INSTALL_LIB_HOME "$(LIBDIR)" >>$@
     151        echo # define C_INSTALL_LIB_HOME "$(ILIBDIR)" >>$@
    153152        echo #endif >>$@
    154153        echo #ifndef C_INSTALL_STATIC_LIB_HOME >>$@
    155         echo # define C_INSTALL_STATIC_LIB_HOME "$(LIBDIR)" >>$@
     154        echo # define C_INSTALL_STATIC_LIB_HOME "$(ILIBDIR)" >>$@
    156155        echo #endif >>$@
    157156        echo #ifndef C_INSTALL_INCLUDE_HOME >>$@
    158         echo # define C_INSTALL_INCLUDE_HOME "$(INCDIR)" >>$@
     157        echo # define C_INSTALL_INCLUDE_HOME "$(IINCDIR)" >>$@
    159158        echo #endif >>$@
    160159        echo #ifndef C_INSTALL_MORE_LIBS >>$@
     
    192191        echo #endif >>$@
    193192        echo #ifndef C_TARGET_LIB_HOME >>$@
    194         echo # define C_TARGET_LIB_HOME "$(TARGET_PREFIX)/lib" >>$@
     193        echo # define C_TARGET_LIB_HOME "$(TARGET_PREFIX)\\lib" >>$@
    195194        echo #endif >>$@
    196195        echo #ifndef C_TARGET_RUN_LIB_HOME >>$@
    197         echo # define C_TARGET_RUN_LIB_HOME "$(TARGET_PREFIX)/lib" >>$@
     196        echo # define C_TARGET_RUN_LIB_HOME "$(TARGET_PREFIX)\\lib" >>$@
    198197        echo #endif >>$@
    199198        echo #ifndef C_TARGET_SHARE_HOME >>$@
    200         echo # define C_TARGET_SHARE_HOME "$(TARGET_PREFIX)/share" >>$@
     199        echo # define C_TARGET_SHARE_HOME "$(TARGET_PREFIX)\\share" >>$@
    201200        echo #endif >>$@
    202201        echo #ifndef C_TARGET_INCLUDE_HOME >>$@
    203         echo # define C_TARGET_INCLUDE_HOME "$(TARGET_PREFIX)/include" >>$@
     202        echo # define C_TARGET_INCLUDE_HOME "$(TARGET_PREFIX)\\include" >>$@
    204203        echo #endif >>$@
    205204        echo #ifndef C_TARGET_STATIC_LIB_HOME >>$@
    206         echo # define C_TARGET_STATIC_LIB_HOME "$(TARGET_PREFIX)/lib" >>$@
     205        echo # define C_TARGET_STATIC_LIB_HOME "$(TARGET_PREFIX)\\lib" >>$@
    207206        echo #endif >>$@
    208207        echo #ifndef C_BINARY_VERSION >>$@
     
    210209        echo #endif >>$@
    211210
    212 include $(SRCDIR)/rules.make
     211include $(SRCDIR)rules.make
  • chicken/branches/prerelease/Makefile.mingw-msys

    r11632 r11958  
    2626
    2727
    28 SRCDIR = .
    29 VPATH  = $(SRCDIR)
     28SRCDIR = ./
    3029
    3130# platform configuration
  • chicken/branches/prerelease/Makefile.msvc

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

    r11632 r11958  
    2626
    2727
    28 SRCDIR = .
    29 VPATH  = $(SRCDIR)
     28SRCDIR = ./
    3029
    3130# platform configuration
  • chicken/branches/prerelease/NEWS

    r11632 r11958  
    1 
    213.4.0
    32
     3- Fixes to the MinGW build.
     4- PCRE 7.7
    45- Bug fix for bitwise-or use [Joerg Wittenberger]
    56- Bug fix in thread-terminate! [thanks to Joerg Wittenberger]
  • chicken/branches/prerelease/README

    r11632 r11958  
    33  (c)2000-2008 Felix L. Winkelmann
    44
    5   version 3.3.8
     5  version 3.3.15
    66
    77 1. Introduction:
  • chicken/branches/prerelease/chicken-setup.scm

    r11632 r11958  
    421421                                          (let ((dep2 (fixmaketarget dep)))
    422422                                            (unless (file-exists? dep2)
    423                                               (error (sprintf "dependancy ~a was not made~%" dep2)))
     423                                              (error (sprintf "dependency ~a was not made~%" dep2)))
    424424                                            (and (> (file-modification-time dep2) date)
    425425                                                 dep2)) )
  • chicken/branches/prerelease/compiler.scm

    r11632 r11958  
    502502  (define (walk x ae me dest)
    503503    (cond ((symbol? x)
    504            (cond ((assq x ae) =>
     504           (cond ((keyword? x) (walk-literal x ae me dest))
     505                 ((assq x ae) =>
    505506                  (lambda (a)
    506507                    (let ((alias (cdr a)))
  • chicken/branches/prerelease/defaults.make

    r11632 r11958  
    4040# directories
    4141
    42 SRCDIR = .
    43 VPATH  = $(SRCDIR)
    44 
    45 DESTDIR =
     42SRCDIR ?= ./
     43
     44DESTDIR ?=
     45
    4646ifeq ($(PLATFORM),mingw-msys)
    4747PREFIX ?= c:/devtools
    4848else
    4949ifeq ($(PLATFORM),mingw)
    50 PREFIX ?= c:/devtools
     50PREFIX ?= c:\\devtools
    5151else
    5252PREFIX ?= /usr/local
     
    6767
    6868ifeq ($(PLATFORM),mingw)
    69 BINDIR = $(PREFIX)\\bin
    70 LIBDIR = $(PREFIX)\\lib
    71 SHAREDIR = $(PREFIX)\\share
    72 DATADIR = $(SHAREDIR)\\chicken
    73 TOPMANDIR = $(SHAREDIR)\\man
    74 MANDIR = $(TOPMANDIR)\\man1
    75 INFODIR = $(SHAREDIR)\\info
    76 INCDIR = $(PREFIX)\\include
    77 DOCDIR = $(DATADIR)\\doc
    78 CHICKENLIBDIR = $(LIBDIR)\\chicken
    79 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)
    8080else
    8181IBINDIR = $(BINDIR)
     
    155155PCRE_OBJECTS_1 =
    156156else
    157 PCRE_DIR ?= $(VPATH)/pcre
    158 C_COMPILER_PCRE_OPTIONS = -DPCRE_STATIC
     157ifdef WINDOWS
     158PCRE_DIR ?= $(SRCDIR)pcre\\
     159else
     160PCRE_DIR ?= $(SRCDIR)pcre/
     161endif
     162C_COMPILER_PCRE_OPTIONS = -DPCRE_STATIC -DHAVE_CONFIG_H
    159163PCRE_INCLUDES = $(INCLUDES) -I$(PCRE_DIR)
    160164endif
     
    284288CHICKEN_PCRE_LIBRARY_OPTIONS =
    285289else
    286 CHICKEN_PCRE_LIBRARY_OPTIONS = -include-path $(SRCDIR)/pcre
     290CHICKEN_PCRE_LIBRARY_OPTIONS = -include-path $(SRCDIR)pcre
    287291endif
    288292
     
    355359        echo "#endif" >>$@
    356360        echo "#ifndef C_INSTALL_SHARE_HOME" >>$@
    357         echo "# define C_INSTALL_SHARE_HOME \"$(DATADIR)\"" >>$@
     361        echo "# define C_INSTALL_SHARE_HOME \"$(IDATADIR)\"" >>$@
    358362        echo "#endif" >>$@
    359363        echo "#ifndef C_INSTALL_BIN_HOME" >>$@
    360         echo "# define C_INSTALL_BIN_HOME \"$(BINDIR)\"" >>$@
     364        echo "# define C_INSTALL_BIN_HOME \"$(IBINDIR)\"" >>$@
    361365        echo "#endif" >>$@
    362366        echo "#ifndef C_INSTALL_EGG_HOME" >>$@
    363         echo "# define C_INSTALL_EGG_HOME \"$(EGGDIR)\"" >>$@
     367        echo "# define C_INSTALL_EGG_HOME \"$(IEGGDIR)\"" >>$@
    364368        echo "#endif" >>$@
    365369        echo "#ifndef C_INSTALL_LIB_HOME" >>$@
    366         echo "# define C_INSTALL_LIB_HOME \"$(LIBDIR)\"" >>$@
     370        echo "# define C_INSTALL_LIB_HOME \"$(ILIBDIR)\"" >>$@
    367371        echo "#endif" >>$@
    368372        echo "#ifndef C_INSTALL_STATIC_LIB_HOME" >>$@
    369         echo "# define C_INSTALL_STATIC_LIB_HOME \"$(LIBDIR)\"" >>$@
     373        echo "# define C_INSTALL_STATIC_LIB_HOME \"$(ILIBDIR)\"" >>$@
    370374        echo "#endif" >>$@
    371375        echo "#ifndef C_INSTALL_INCLUDE_HOME" >>$@
    372         echo "# define C_INSTALL_INCLUDE_HOME \"$(INCDIR)\"" >>$@
     376        echo "# define C_INSTALL_INCLUDE_HOME \"$(IINCDIR)\"" >>$@
    373377        echo "#endif" >>$@
    374378        echo "#ifndef C_INSTALL_MORE_LIBS" >>$@
     
    405409        echo "# define C_CROSS_CHICKEN $(CROSS_CHICKEN)" >>$@
    406410        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
    407428        echo "#ifndef C_TARGET_LIB_HOME" >>$@
    408429        echo "# define C_TARGET_LIB_HOME \"$(TARGET_PREFIX)/lib\"" >>$@
     
    420441        echo "# define C_TARGET_STATIC_LIB_HOME \"$(TARGET_PREFIX)/lib\"" >>$@
    421442        echo "#endif" >>$@
     443endif
    422444        echo "#ifndef C_CHICKEN_PROGRAM" >>$@
    423445        echo "# define C_CHICKEN_PROGRAM \"$(CHICKEN_PROGRAM)\"" >>$@
  • chicken/branches/prerelease/eval.scm

    r11043 r11958  
    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/prerelease/manual/Unit data-structures

    r10911 r11958  
    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/prerelease/pcre/config.h

    r9381 r11958  
    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/prerelease/pcre/pcre.h

    r9381 r11958  
    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/prerelease/pcre/pcre_compile.c

    r9381 r11958  
    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/prerelease/pcre/pcre_dfa_exec.c

    r9381 r11958  
    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/prerelease/pcre/pcre_exec.c

    r9381 r11958  
    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/prerelease/pcre/pcre_internal.h

    r9381 r11958  
    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/prerelease/pcre/pcre_study.c

    r9381 r11958  
    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/prerelease/pcre/ucpinternal.h

    r6175 r11958  
    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/prerelease/rules.make

    r11632 r11958  
    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))
     
    490490# pcre objects
    491491
    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/pcre_ord2utf8$(O): pcre/pcre_ord2utf8.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_refcount$(O): pcre/pcre_refcount.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/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/pcre_study$(O): pcre/pcre_study.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_tables$(O): pcre/pcre_tables.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_try_flipped$(O): pcre/pcre_try_flipped.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_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
    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/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
    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/pcre_version$(O): pcre/pcre_version.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/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/pcre_xclass$(O): pcre/pcre_xclass.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/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/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)
    569569        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    570570          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     
    573573# static pcre objects
    574574
    575 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
    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_config-static$(O): pcre/pcre_config.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_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
    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_exec-static$(O): pcre/pcre_exec.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_fullinfo-static$(O): pcre/pcre_fullinfo.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_get-static$(O): pcre/pcre_get.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_globals-static$(O): pcre/pcre_globals.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_info-static$(O): pcre/pcre_info.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_maketables-static$(O): pcre/pcre_maketables.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_newline-static$(O): pcre/pcre_newline.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_ord2utf8-static$(O): pcre/pcre_ord2utf8.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_refcount-static$(O): pcre/pcre_refcount.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/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/pcre_study-static$(O): pcre/pcre_study.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_tables-static$(O): pcre/pcre_tables.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_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
    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_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
    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/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
    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/pcre_version-static$(O): pcre/pcre_version.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/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/pcre_xclass-static$(O): pcre/pcre_xclass.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/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/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)
    652652        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \
    653653          $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \
     
    803803endif
    804804ifneq ($(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
    805811        $(POSTINSTALL_STATIC_LIBRARY) $(POSTINSTALL_STATIC_LIBRARY_FLAGS) \
    806812          $(ILIBDIR)/libchicken$(A)
     
    808814          $(ILIBDIR)/libuchicken$(A)
    809815endif
    810         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken.h $(DESTDIR)$(IINCDIR)
     816endif
     817        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken.h $(DESTDIR)$(IINCDIR)
    811818        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(CHICKEN_CONFIG_H) $(DESTDIR)$(IINCDIR)
    812819ifndef STATICBUILD
     
    846853          $(CSI_PROGRAM)$(EXE) $(CSC_PROGRAM)$(EXE) $(CHICKEN_PROFILE_PROGRAM)$(EXE) \
    847854          $(CHICKEN_SETUP_PROGRAM)$(EXE)
    848         $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) NEEDS_RELINKING=no RUNTIME_LINKER_PATH=$(LIBDIR) install
     855        $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) NEEDS_RELINKING=no RUNTIME_LINKER_PATH=$(LIBDIR) install
    849856        $(MAKE_WRITABLE_COMMAND) $(CHICKEN_PROGRAM)$(EXE) $(CSI_PROGRAM)$(EXE) \
    850857          $(CSC_PROGRAM)$(EXE) $(CHICKEN_PROFILE_PROGRAM)$(EXE)
     
    881888endif
    882889endif
    883         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken.1 $(DESTDIR)$(IMANDIR)
    884         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/csi.1 $(DESTDIR)$(IMANDIR)
    885         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/csc.1 $(DESTDIR)$(IMANDIR)
    886         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken-setup.1 $(DESTDIR)$(IMANDIR)
    887         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken-profile.1 $(DESTDIR)$(IMANDIR)
    888         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken-bug.1 $(DESTDIR)$(IMANDIR)
     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)
    889896        $(MAKEDIR_COMMAND) $(MAKEDIR_COMMAND_OPTIONS) $(DESTDIR)$(IDOCDIR)/html
    890         -$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/html/* $(DESTDIR)$(IDOCDIR)/html
    891         -$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken.pdf $(DESTDIR)$(IDOCDIR)
    892         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/README $(DESTDIR)$(IDOCDIR)
    893         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/LICENSE $(DESTDIR)$(IDOCDIR)
    894         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken-more-macros.scm $(DESTDIR)$(IDATADIR)
    895         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken-ffi-macros.scm $(DESTDIR)$(IDATADIR)
    896         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken-sys-macros.scm $(DESTDIR)$(IDATADIR)
     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)
    897904        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) *.exports $(DESTDIR)$(IDATADIR)
    898905        -$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) chicken.info $(DESTDIR)$(IINFODIR)
    899906        $(INSTALLINFO_PROGRAM) $(INSTALLINFO_PROGRAM_OPTIONS) --infodir=$(DESTDIR)$(IINFODIR) chicken.info
    900907ifdef WINDOWS
    901         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) $(SRCDIR)/csibatch.bat $(DESTDIR)$(IBINDIR)
     908        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) $(SRCDIR)csibatch.bat $(DESTDIR)$(IBINDIR)
    902909endif
    903910endif
     
    10611068
    10621069ifeq ($(PLATFORM),mingw)
    1063 CLEAN_PCRE = pcre\*$(O)
     1070CLEAN_PCRE = $(PCRE_DIR)*$(O)
    10641071CLEAN_MINGW_LIBS = libchickengui.a libchickengui.dll libchickengui.dll.a
    10651072else
    1066 CLEAN_PCRE = pcre/*$(O)
     1073CLEAN_PCRE = $(PCRE_DIR)*$(O)
    10671074CLEAN_MINGW_LIBS =
    10681075endif
     
    11061113compiler-check:
    11071114        @echo "======================================== packing ..."
    1108         $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) dist
     1115        $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) dist
    11091116        $(REMOVE_COMMAND $(REMOVE_COMMAND_RECURSIVE_OPTIONS) tests/chicken-*
    11101117        tar -C tests -xzf `ls -t chicken-*.tar.gz | head -1`
    11111118        @echo "======================================== building stage 1 ..."
    1112         $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all
     1119        $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all
    11131120        touch tests/chicken-*/*.scm
    11141121        @echo "======================================== building stage 2 ..."
    1115         $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all
     1122        $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all
    11161123        cat tests/chicken-*/*.c >tests/stage2.out
    11171124        @echo "======================================== building stage 3 ..."
    1118         $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all
     1125        $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all
    11191126        cat tests/chicken-*/*.c >tests/stage3.out
    11201127        diff tests/stage2.out tests/stage3.out >tests/stages.diff
     
    11261133.PHONY: bootstrap bootstrap.tar.gz
    11271134
    1128 bootstrap: $(SRCDIR)/bootstrap.tar.gz
    1129         gzip -d -c $(SRCDIR)/bootstrap.tar.gz | tar xvf -
     1135bootstrap: $(SRCDIR)bootstrap.tar.gz
     1136        gzip -d -c $(SRCDIR)bootstrap.tar.gz | tar xvf -
    11301137        touch *.c
    1131         $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) STATICBUILD=1 chicken$(EXE)
     1138        $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 chicken$(EXE)
    11321139        cp chicken$(EXE) chicken-boot$(EXE)
    11331140        touch *.scm
    11341141
    1135 $(SRCDIR)/bootstrap.tar.gz: distfiles
    1136         tar cfz $(SRCDIR)/bootstrap.tar.gz library.c eval.c data-structures.c ports.c files.c extras.c \
     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 \
    11371144        lolevel.c utils.c tcp.c srfi-1.c srfi-4.c srfi-13.c srfi-14.c srfi-18.c srfi-69.c \
    11381145        posixunix.c posixwin.c regex.c scheduler.c profiler.c stub.c match.c $(COMPILER_OBJECTS_1:=.c)
     1146
  • chicken/branches/prerelease/runtime.c

    r11632 r11958  
    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) {
     
    77687774    default: barf(C_BAD_ARGUMENT_TYPE_ERROR, "number->string", C_fix(radix));
    77697775    }
     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);
    77707825
    77717826  fini:
     
    77807835    radix = C_string(&a, radix, p);
    77817836    C_kontinue(k, radix);
    7782   }
    7783 
    7784   if(!C_immediatep(num) && C_block_header(num) == C_FLONUM_TAG) {
    7785     f = C_flonum_magnitude(num);
    7786 
    7787     if(C_fits_in_unsigned_int_p(num) == C_SCHEME_TRUE) {
    7788       switch(radix) {
    7789       case 2:
    7790         p = to_binary((unsigned int)f);
    7791         goto fini;
    7792 
    7793       case 8:
    7794         C_sprintf(p = buffer, "%o", (unsigned int)f);
    7795         goto fini;
    7796 
    7797       case 16:
    7798         C_sprintf(p = buffer, "%x", (unsigned int)f);
    7799         goto fini;
    7800       }
    7801     }
    7802 
    7803 #if defined(__CYGWIN__) || defined(__MINGW32__)
    7804     if(C_isnan(f)) {
    7805       C_strcpy(p = buffer, "+nan.0");
    7806       goto fini;
    7807     }
    7808     else if(C_isinf(f)) {
    7809       C_sprintf(p = buffer, "%cinf.0", f > 0 ? '+' : '-');
    7810       goto fini;
    7811     }
    7812 #endif
    7813 
    7814 #ifdef HAVE_GCVT
    7815     C_gcvt(f, flonum_print_precision, buffer);
    7816 #else
    7817     C_sprintf(buffer, C_text("%.*g"), flonum_print_precision, f);
    7818 #endif
    7819 
    7820     if((p = C_strpbrk(buffer, C_text(".eE"))) == NULL) {
    7821       if(*buffer == 'i' || *buffer == 'n') { /* inf or nan */
    7822         C_memmove(buffer + 1, buffer, C_strlen(buffer) + 1);
    7823         *buffer = '+';
    7824       }
    7825       else if(buffer[ 1 ] != 'i') C_strcat(buffer, C_text(".0")); /* negative infinity? */
    7826     }
    7827 
    7828     p = buffer;
    7829     goto fini;
    7830   }
    7831 
    7832   barf(C_BAD_ARGUMENT_TYPE_ERROR, "number->string", num);
    78337837}
    78347838
  • chicken/branches/prerelease/scheduler.scm

    r9381 r11958  
    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/prerelease/version.scm

    r11632 r11958  
    11(define-constant +build-version+ "3.4.0")
     2
Note: See TracChangeset for help on using the changeset viewer.