Changeset 12021 in project
- Timestamp:
- 09/28/08 15:02:47 (12 years ago)
- Location:
- chicken/branches/hygienic
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
chicken/branches/hygienic/Makefile
r11646 r12021 28 28 = all clean distclean spotless install uninstall confclean check \ 29 29 fullcheck dist libs install-libs bootstrap 30 30 31 SRCDIR = . 31 32 -
chicken/branches/hygienic/Makefile.bsd
r11646 r12021 26 26 27 27 28 SRCDIR = . 29 VPATH = $(SRCDIR) 28 SRCDIR = ./ 30 29 31 30 # platform configuration -
chicken/branches/hygienic/Makefile.cross-linux-mingw
r11646 r12021 26 26 27 27 28 SRCDIR = . 29 VPATH = $(SRCDIR) 28 SRCDIR = ./ 30 29 31 30 # platform configuration … … 134 133 cat chicken-defaults.h >>$@ 135 134 136 include $(SRCDIR) /rules.make135 include $(SRCDIR)rules.make -
chicken/branches/hygienic/Makefile.cygwin
r11646 r12021 26 26 27 27 28 SRCDIR = . 29 VPATH = $(SRCDIR) 28 SRCDIR = ./ 30 29 31 30 # platform configuration -
chicken/branches/hygienic/Makefile.linux
r11646 r12021 26 26 27 27 28 SRCDIR = . 29 VPATH = $(SRCDIR) 28 SRCDIR ?= ./ 30 29 31 30 # platform configuration -
chicken/branches/hygienic/Makefile.macosx
r11646 r12021 26 26 27 27 28 SRCDIR = . 29 VPATH = $(SRCDIR) 28 SRCDIR = ./ 30 29 31 30 # platform configuration -
chicken/branches/hygienic/Makefile.mingw
r11646 r12021 26 26 27 27 28 SRCDIR = . 29 VPATH = $(SRCDIR) 28 SRCDIR = .\\ 30 29 31 30 # platform configuration … … 75 74 CUSTOM_CHICKEN_DEFAULTS=1 76 75 77 include $(SRCDIR) /defaults.make76 include $(SRCDIR)defaults.make 78 77 79 78 # main target … … 141 140 echo #endif >>$@ 142 141 echo #ifndef C_INSTALL_SHARE_HOME >>$@ 143 echo # define C_INSTALL_SHARE_HOME "$( DATADIR)" >>$@142 echo # define C_INSTALL_SHARE_HOME "$(IDATADIR)" >>$@ 144 143 echo #endif >>$@ 145 144 echo #ifndef C_INSTALL_BIN_HOME >>$@ 146 echo # define C_INSTALL_BIN_HOME "$( BINDIR)" >>$@145 echo # define C_INSTALL_BIN_HOME "$(IBINDIR)" >>$@ 147 146 echo #endif >>$@ 148 147 echo #ifndef C_INSTALL_EGG_HOME >>$@ 149 echo # define C_INSTALL_EGG_HOME "$( EGGDIR)" >>$@148 echo # define C_INSTALL_EGG_HOME "$(IEGGDIR)" >>$@ 150 149 echo #endif >>$@ 151 150 echo #ifndef C_INSTALL_LIB_HOME >>$@ 152 echo # define C_INSTALL_LIB_HOME "$( LIBDIR)" >>$@151 echo # define C_INSTALL_LIB_HOME "$(ILIBDIR)" >>$@ 153 152 echo #endif >>$@ 154 153 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)" >>$@ 156 155 echo #endif >>$@ 157 156 echo #ifndef C_INSTALL_INCLUDE_HOME >>$@ 158 echo # define C_INSTALL_INCLUDE_HOME "$(I NCDIR)" >>$@157 echo # define C_INSTALL_INCLUDE_HOME "$(IINCDIR)" >>$@ 159 158 echo #endif >>$@ 160 159 echo #ifndef C_INSTALL_MORE_LIBS >>$@ … … 192 191 echo #endif >>$@ 193 192 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" >>$@ 195 194 echo #endif >>$@ 196 195 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" >>$@ 198 197 echo #endif >>$@ 199 198 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" >>$@ 201 200 echo #endif >>$@ 202 201 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" >>$@ 204 203 echo #endif >>$@ 205 204 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" >>$@ 207 206 echo #endif >>$@ 208 207 echo #ifndef C_BINARY_VERSION >>$@ … … 210 209 echo #endif >>$@ 211 210 212 include $(SRCDIR) /rules.make211 include $(SRCDIR)rules.make -
chicken/branches/hygienic/Makefile.mingw-msys
r11646 r12021 26 26 27 27 28 SRCDIR = . 29 VPATH = $(SRCDIR) 28 SRCDIR = ./ 30 29 31 30 # platform configuration -
chicken/branches/hygienic/Makefile.msvc
r11573 r12021 33 33 # Germany 34 34 35 PREFIX = c:/msvc-devtools 35 PREFIX = c:\\msvc-devtools 36 SRCDIR = .\\ 36 37 37 38 # platform configuration -
chicken/branches/hygienic/Makefile.solaris
r11646 r12021 26 26 27 27 28 SRCDIR = . 29 VPATH = $(SRCDIR) 28 SRCDIR = ./ 30 29 31 30 # platform configuration -
chicken/branches/hygienic/NEWS
r11646 r12021 34 34 define-macro 35 35 define-extension 36 37 3.3.13 38 39 - Fixes to the MinGW build. 40 41 3.3.12 42 43 - PCRE 7.7 36 44 37 45 3.3.8 -
chicken/branches/hygienic/TODO
r11989 r12021 2 2 3 3 * trunk merge 4 1 1635was last4 12020 was last 5 5 6 6 * macros … … 50 50 * setup/install 51 51 ** setup-download 52 *** HTTP_PROXY52 *** use HTTP_PROXY env. var 53 53 *** handle redirects in http-fetch 54 54 *** connect timeout and alternative download location … … 77 77 * eggs 78 78 ** sassy: convert to proper module 79 ** port javahack, f ps79 ** port javahack, fmt, fps -
chicken/branches/hygienic/compiler.scm
r11892 r12021 526 526 (define (walk x se dest) 527 527 (cond ((symbol? x) 528 (when (memq x unlikely-variables) 529 (compiler-warning 530 'var 531 "reference to variable `~s' possibly unintended" x) ) 528 (cond ((keyword? x) `(quote ,x)) 529 ((memq x unlikely-variables) 530 (compiler-warning 531 'var 532 "reference to variable `~s' possibly unintended" x) )) 532 533 (resolve-variable x se dest)) 533 534 ((not-pair? x) -
chicken/branches/hygienic/defaults.make
r11892 r12021 40 40 # directories 41 41 42 SRCDIR = .43 VPATH = $(SRCDIR) 44 45 DESTDIR = 42 SRCDIR ?= ./ 43 44 DESTDIR ?= 45 46 46 ifeq ($(PLATFORM),mingw-msys) 47 47 PREFIX ?= c:/devtools 48 48 else 49 49 ifeq ($(PLATFORM),mingw) 50 PREFIX ?= c: /devtools50 PREFIX ?= c:\\devtools 51 51 else 52 52 PREFIX ?= /usr/local … … 67 67 68 68 ifeq ($(PLATFORM),mingw) 69 BINDIR = $(PREFIX)\\bin70 LIBDIR = $(PREFIX)\\lib71 SHAREDIR = $(PREFIX)\\share72 DATADIR = $(SHAREDIR)\\chicken73 TOPMANDIR = $(SHAREDIR)\\man74 MANDIR = $(TOPMANDIR)\\man175 I NFODIR = $(SHAREDIR)\\info76 I NCDIR = $(PREFIX)\\include77 DOCDIR = $(DATADIR)\\doc78 CHICKENLIBDIR = $(LIBDIR)\\chicken79 EGGDIR = $(CHICKENLIBDIR)\\$(BINARYVERSION)69 IBINDIR = $(PREFIX)\\bin 70 ILIBDIR = $(PREFIX)\\lib 71 ISHAREDIR = $(PREFIX)\\share 72 IDATADIR = $(ISHAREDIR)\\chicken 73 ITOPMANDIR = $(ISHAREDIR)\\man 74 IMANDIR = $(ITOPMANDIR)\\man1 75 IINFODIR = $(ISHAREDIR)\\info 76 IINCDIR = $(PREFIX)\\include 77 IDOCDIR = $(IDATADIR)\\doc 78 ICHICKENLIBDIR = $(ILIBDIR)\\chicken 79 IEGGDIR = $(ICHICKENLIBDIR)\\$(BINARYVERSION) 80 80 else 81 81 IBINDIR = $(BINDIR) … … 160 160 PCRE_OBJECTS_1 = 161 161 else 162 PCRE_DIR ?= $(VPATH)/pcre 163 C_COMPILER_PCRE_OPTIONS = -DPCRE_STATIC 162 ifdef WINDOWS 163 ifneq ($(HOSTSYSTEM),mingw32) 164 PCRE_DIR ?= $(SRCDIR)pcre\\ 165 else 166 endif 167 PCRE_DIR ?= $(SRCDIR)pcre/ 168 else 169 PCRE_DIR ?= $(SRCDIR)pcre/ 170 endif 171 C_COMPILER_PCRE_OPTIONS = -DPCRE_STATIC -DHAVE_CONFIG_H 164 172 PCRE_INCLUDES = $(INCLUDES) -I$(PCRE_DIR) 165 173 endif … … 317 325 CHICKEN_PCRE_LIBRARY_OPTIONS = 318 326 else 319 CHICKEN_PCRE_LIBRARY_OPTIONS = -include-path $(SRCDIR) /pcre327 CHICKEN_PCRE_LIBRARY_OPTIONS = -include-path $(SRCDIR)pcre 320 328 endif 321 329 … … 395 403 echo "#endif" >>$@ 396 404 echo "#ifndef C_INSTALL_SHARE_HOME" >>$@ 397 echo "# define C_INSTALL_SHARE_HOME \"$( DATADIR)\"" >>$@405 echo "# define C_INSTALL_SHARE_HOME \"$(IDATADIR)\"" >>$@ 398 406 echo "#endif" >>$@ 399 407 echo "#ifndef C_INSTALL_BIN_HOME" >>$@ 400 echo "# define C_INSTALL_BIN_HOME \"$( BINDIR)\"" >>$@408 echo "# define C_INSTALL_BIN_HOME \"$(IBINDIR)\"" >>$@ 401 409 echo "#endif" >>$@ 402 410 echo "#ifndef C_INSTALL_EGG_HOME" >>$@ 403 echo "# define C_INSTALL_EGG_HOME \"$( EGGDIR)\"" >>$@411 echo "# define C_INSTALL_EGG_HOME \"$(IEGGDIR)\"" >>$@ 404 412 echo "#endif" >>$@ 405 413 echo "#ifndef C_INSTALL_LIB_HOME" >>$@ 406 echo "# define C_INSTALL_LIB_HOME \"$( LIBDIR)\"" >>$@414 echo "# define C_INSTALL_LIB_HOME \"$(ILIBDIR)\"" >>$@ 407 415 echo "#endif" >>$@ 408 416 echo "#ifndef C_INSTALL_STATIC_LIB_HOME" >>$@ 409 echo "# define C_INSTALL_STATIC_LIB_HOME \"$( LIBDIR)\"" >>$@417 echo "# define C_INSTALL_STATIC_LIB_HOME \"$(ILIBDIR)\"" >>$@ 410 418 echo "#endif" >>$@ 411 419 echo "#ifndef C_INSTALL_INCLUDE_HOME" >>$@ 412 echo "# define C_INSTALL_INCLUDE_HOME \"$(I NCDIR)\"" >>$@420 echo "# define C_INSTALL_INCLUDE_HOME \"$(IINCDIR)\"" >>$@ 413 421 echo "#endif" >>$@ 414 422 echo "#ifndef C_INSTALL_MORE_LIBS" >>$@ … … 445 453 echo "# define C_CROSS_CHICKEN $(CROSS_CHICKEN)" >>$@ 446 454 echo "#endif" >>$@ 455 ifdef WINDOWS 456 echo "#ifndef C_TARGET_LIB_HOME" >>$@ 457 echo "# define C_TARGET_LIB_HOME \"$(TARGET_PREFIX)\\lib\"" >>$@ 458 echo "#endif" >>$@ 459 echo "#ifndef C_TARGET_RUN_LIB_HOME" >>$@ 460 echo "# define C_TARGET_RUN_LIB_HOME \"$(TARGET_RUN_PREFIX)\\lib\"" >>$@ 461 echo "#endif" >>$@ 462 echo "#ifndef C_TARGET_SHARE_HOME" >>$@ 463 echo "# define C_TARGET_SHARE_HOME \"$(TARGET_PREFIX)\\share\"" >>$@ 464 echo "#endif" >>$@ 465 echo "#ifndef C_TARGET_INCLUDE_HOME" >>$@ 466 echo "# define C_TARGET_INCLUDE_HOME \"$(TARGET_PREFIX)\\include\"" >>$@ 467 echo "#endif" >>$@ 468 echo "#ifndef C_TARGET_STATIC_LIB_HOME" >>$@ 469 echo "# define C_TARGET_STATIC_LIB_HOME \"$(TARGET_PREFIX)\\lib\"" >>$@ 470 echo "#endif" >>$@ 471 else 447 472 echo "#ifndef C_TARGET_LIB_HOME" >>$@ 448 473 echo "# define C_TARGET_LIB_HOME \"$(TARGET_PREFIX)/lib\"" >>$@ … … 460 485 echo "# define C_TARGET_STATIC_LIB_HOME \"$(TARGET_PREFIX)/lib\"" >>$@ 461 486 echo "#endif" >>$@ 487 endif 462 488 echo "#ifndef C_CHICKEN_PROGRAM" >>$@ 463 489 echo "# define C_CHICKEN_PROGRAM \"$(CHICKEN_PROGRAM)\"" >>$@ -
chicken/branches/hygienic/eval.scm
r11989 r12021 293 293 294 294 (define (compile x e h tf cntr se) 295 (cond [(symbol? x) 295 (cond ((keyword? x) (lambda v x)) 296 ((symbol? x) 296 297 (receive (i j) (lookup x e se) 297 298 (cond [(not i) … … 317 318 (lambda v (##core#inline "C_retrieve" var))] ) ) ) ] 318 319 [(zero? i) (lambda (v) (##sys#slot (##sys#slot v 0) j))] 319 [else (lambda (v) (##sys#slot (##core#inline "C_u_i_list_ref" v i) j))] ) ) ]320 [else (lambda (v) (##sys#slot (##core#inline "C_u_i_list_ref" v i) j))] ) ) ) 320 321 [(##sys#number? x) 321 322 (case x -
chicken/branches/hygienic/manual/Unit data-structures
r11085 r12021 420 420 421 421 422 ==== none? 423 424 [procedure] (none? X) 425 426 Ignores its argument and always returns {{#f}}. This is actually useful sometimes. 427 428 429 ==== always? 430 431 [procedure] (always? X) 432 433 Ignores its arguments and always returns {{#t}}. This is actually useful sometimes. 434 435 436 ==== never? 437 438 [procedure] (never? X) 439 440 Ignores its arguments and always returns {{#f}}. This is actually useful sometimes. 441 442 422 443 ==== constantly 423 444 … … 483 504 484 505 485 486 506 ==== each 487 507 … … 559 579 A single value version of {{compose}} (slightly faster). {{(o)}} is equivalent 560 580 to {{identity}}. 581 582 583 ==== left-section 584 585 [procedure] (left-section PROC ARG0 ...) 586 587 Returns 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 598 Returns 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 561 605 562 606 === Binary searching -
chicken/branches/hygienic/pcre/config.h
r9133 r12021 1 /* config.h. From PCRE 7. 6config.h generated from config.h.in by configure. */1 /* config.h. From PCRE 7.7 config.h generated from config.h.in by configure. */ 2 2 3 #if defined(HAVE_CONFIG_H) || defined(HAVE_CHICKEN_CONFIG_H) 3 /* For HAVE_* macros */ 4 #ifdef HAVE_CHICKEN_CONFIG_H 4 5 # include "chicken-config.h" 5 6 #endif 6 7 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 */ 11 14 12 If you are going to build PCRE "by hand" on a system without "configure" you13 should copy the distributed config.h.generic to config.h, and then set up the14 macro definitions the way you need them. You must then add -DHAVE_CONFIG_H to15 all of your compile commands, so that config.h is included at the start of16 every source.17 18 Alternatively, you can avoid editing by using -D on the compiler command line19 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() if22 HAVE_BCOPY is set to 1. If your system has neither bcopy() nor memmove(), set23 them both to 0; an emulation function will be used. */24 25 /* Define to 1 if you have the `memmove' function. */26 #ifndef HAVE_MEMMOVE27 /* hm... there must be a better way */28 # define HAVE_MEMMOVE 129 #endif30 15 31 16 /* The value of LINK_SIZE determines the number of bytes used to store links … … 82 67 (ANYCRLF). */ 83 68 #ifndef NEWLINE 84 #define NEWLINE '\n'69 #define NEWLINE 10 85 70 #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 86 83 87 84 /* Name of package */ … … 95 92 96 93 /* Define to the full name and version of this package. */ 97 #define PACKAGE_STRING "PCRE 7. 6"94 #define PACKAGE_STRING "PCRE 7.7" 98 95 99 96 /* Define to the one symbol short name of this package. */ … … 101 98 102 99 /* Define to the version of this package. */ 103 #define PACKAGE_VERSION "7. 6"100 #define PACKAGE_VERSION "7.7" 104 101 105 102 /* When calling PCRE via the POSIX interface, additional working storage is … … 131 128 132 129 /* Version number of package */ 133 #define VERSION "7. 6"130 #define VERSION "7.7" 134 131 135 132 /* Define to empty if `const' does not conform to ANSI C. */ -
chicken/branches/hygienic/pcre/pcre.h
r9133 r12021 43 43 44 44 #define PCRE_MAJOR 7 45 #define PCRE_MINOR 645 #define PCRE_MINOR 7 46 46 #define PCRE_PRERELEASE 47 #define PCRE_DATE 2008-0 1-2847 #define PCRE_DATE 2008-05-07 48 48 49 49 /* When an application links to a PCRE DLL in Windows, the symbols that are … … 125 125 #define PCRE_BSR_ANYCRLF 0x00800000 126 126 #define PCRE_BSR_UNICODE 0x01000000 127 #define PCRE_JAVASCRIPT_COMPAT 0x02000000 127 128 128 129 /* Exec-time and get/set-time error codes */ -
chicken/branches/hygienic/pcre/pcre_compile.c
r9133 r12021 159 159 "THEN"; 160 160 161 static verbitem verbs[] = {161 static const verbitem verbs[] = { 162 162 { 6, OP_ACCEPT }, 163 163 { 6, OP_COMMIT }, … … 169 169 }; 170 170 171 static int verbcount = sizeof(verbs)/sizeof(verbitem);171 static const int verbcount = sizeof(verbs)/sizeof(verbitem); 172 172 173 173 … … 296 296 "repeating a DEFINE group is not allowed\0" 297 297 "inconsistent NEWLINE options\0" 298 "\\g is not followed by a braced name or an optionally braced non-zeronumber\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" 300 300 "(*VERB) with an argument is not supported\0" 301 301 /* 60 */ … … 303 303 "number is too big\0" 304 304 "subpattern name expected\0" 305 "digit expected after (?+"; 305 "digit expected after (?+\0" 306 "] is an invalid data character in JavaScript compatibility mode"; 306 307 307 308 … … 532 533 break; 533 534 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). */ 540 550 541 551 case 'g': 552 if (ptr[1] == '<' || ptr[1] == '\'') 553 { 554 c = -ESC_g; 555 break; 556 } 557 558 /* Handle the Perl-compatible cases */ 559 542 560 if (ptr[1] == '{') 543 561 { … … 566 584 c = c * 10 + *(++ptr) - '0'; 567 585 568 if (c < 0) 586 if (c < 0) /* Integer overflow */ 569 587 { 570 588 *errorcodeptr = ERR61; … … 572 590 } 573 591 574 if ( c == 0 || (braced && *(++ptr) != '}'))592 if (braced && *(++ptr) != '}') 575 593 { 576 594 *errorcodeptr = ERR57; 595 break; 596 } 597 598 if (c == 0) 599 { 600 *errorcodeptr = ERR58; 577 601 break; 578 602 } … … 612 636 while ((digitab[ptr[1]] & ctype_digit) != 0) 613 637 c = c * 10 + *(++ptr) - '0'; 614 if (c < 0) 638 if (c < 0) /* Integer overflow */ 615 639 { 616 640 *errorcodeptr = ERR61; … … 953 977 Arguments: 954 978 ptr current position in the pattern 955 c ount current count of capturing parens so far encountered979 cd compile background data 956 980 name name to seek, or NULL if seeking a numbered subpattern 957 981 lorn name length, or subpattern number if name is NULL … … 962 986 963 987 static int 964 find_parens(const uschar *ptr, int count, const uschar *name, int lorn,988 find_parens(const uschar *ptr, compile_data *cd, const uschar *name, int lorn, 965 989 BOOL xmode) 966 990 { 967 991 const uschar *thisname; 992 int count = cd->bracount; 968 993 969 994 for (; *ptr != 0; ptr++) … … 985 1010 } 986 1011 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. */ 988 1016 989 1017 if (*ptr == '[') 990 1018 { 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 991 1040 while (*(++ptr) != ']') 992 1041 { … … 1253 1302 case OP_WORDCHAR: 1254 1303 case OP_ANY: 1304 case OP_ALLANY: 1255 1305 branchlength++; 1256 1306 cc++; … … 1545 1595 /* Groups with zero repeats can of course be empty; skip them. */ 1546 1596 1547 if (c == OP_BRAZERO || c == OP_BRAMINZERO )1597 if (c == OP_BRAZERO || c == OP_BRAMINZERO || c == OP_SKIPZERO) 1548 1598 { 1549 1599 code += _pcre_OP_lengths[c]; … … 1631 1681 case OP_WORDCHAR: 1632 1682 case OP_ANY: 1683 case OP_ALLANY: 1633 1684 case OP_ANYBYTE: 1634 1685 case OP_CHAR: … … 1825 1876 repetition simply by copying (because the recursion is allowed to refer to 1826 1877 earlier 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. 1878 optional (i.e. the minimum quantifier is zero), OP_BRAZERO or OP_SKIPZERO is 1879 inserted before it, after it has been compiled. This means that any OP_RECURSE 1880 items within it that refer to the group itself or any contained groups have to 1881 have their offsets adjusted. That one of the jobs of this function. Before it 1882 is called, the partially compiled regex must be temporarily terminated with 1883 OP_END. 1832 1884 1833 1885 This function has been extended with the possibility of forward references for … … 2114 2166 2115 2167 case OP_NOT: 2116 if (next < 0) return FALSE; /* Not a character */2117 2168 if (item == next) return TRUE; 2118 2169 if ((options & PCRE_CASELESS) == 0) return FALSE; … … 2617 2668 zeroreqbyte = reqbyte; 2618 2669 previous = code; 2619 *code++ = OP_ANY;2670 *code++ = ((options & PCRE_DOTALL) != 0)? OP_ALLANY: OP_ANY; 2620 2671 break; 2621 2672 … … 2632 2683 but those above are are explicitly listed afterwards. A flag byte tells 2633 2684 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; 2635 2696 2636 2697 case '[': … … 2664 2725 negate_class = TRUE; 2665 2726 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; 2666 2740 } 2667 2741 … … 3821 3895 if (repeat_min == 0) 3822 3896 { 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 */ 3840 3919 { 3841 3920 *code = OP_END; … … 3843 3922 memmove(previous+1, previous, len); 3844 3923 code++; 3924 if (repeat_max == 0) 3925 { 3926 *previous++ = OP_SKIPZERO; 3927 goto END_REPEAT; 3928 } 3845 3929 *previous++ = OP_BRAZERO + repeat_type; 3846 3930 } … … 4037 4121 } 4038 4122 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 4039 4130 /* Else there's some kind of shambles */ 4040 4131 … … 4323 4414 /* Search the pattern for a forward reference */ 4324 4415 4325 else if ((i = find_parens(ptr, cd ->bracount, name, namelen,4416 else if ((i = find_parens(ptr, cd, name, namelen, 4326 4417 (options & PCRE_EXTENDED) != 0)) > 0) 4327 4418 { … … 4569 4660 through from the Perl recursion syntax (?&name). We also come here from 4570 4661 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. */ 4572 4663 4573 4664 NAMED_REF_OR_RECURSE: … … 4620 4711 } 4621 4712 else if ((recno = /* Forward back reference */ 4622 find_parens(ptr, cd ->bracount, name, namelen,4713 find_parens(ptr, cd, name, namelen, 4623 4714 (options & PCRE_EXTENDED) != 0)) <= 0) 4624 4715 { … … 4647 4738 { 4648 4739 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: 4649 4749 4650 4750 if ((refsign = *ptr) == '+') … … 4668 4768 recno = recno * 10 + *ptr++ - '0'; 4669 4769 4670 if (*ptr != ')')4770 if (*ptr != terminator) 4671 4771 { 4672 4772 *errorcodeptr = ERR29; … … 4721 4821 if (called == NULL) 4722 4822 { 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) 4725 4825 { 4726 4826 *errorcodeptr = ERR15; … … 5092 5192 zeroreqbyte = reqbyte; 5093 5193 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 5094 5252 /* \k<name> or \k'name' is a back reference by name (Perl syntax). 5095 5253 We also support \k{name} (.NET syntax) */ … … 5598 5756 } 5599 5757 5600 /* .* is not anchored unless DOTALL is set and it isn't in brackets that5601 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. */ 5602 5760 5603 5761 else if ((op == OP_TYPESTAR || op == OP_TYPEMINSTAR || 5604 op == OP_TYPEPOSSTAR) && 5605 (*options & PCRE_DOTALL) != 0) 5762 op == OP_TYPEPOSSTAR)) 5606 5763 { 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; 5608 5766 } 5609 5767 -
chicken/branches/hygienic/pcre/pcre_dfa_exec.c
r9133 r12021 85 85 that follow must also be modified. */ 86 86 87 static uschar coptable[] = {87 static const uschar coptable[] = { 88 88 0, /* End */ 89 89 0, 0, 0, 0, 0, /* \A, \G, \K, \B, \b */ 90 90 0, 0, 0, 0, 0, 0, /* \D, \d, \S, \s, \W, \w */ 91 0, 0, /* Any, Anybyte*/91 0, 0, 0, /* Any, AllAny, Anybyte */ 92 92 0, 0, 0, /* NOTPROP, PROP, EXTUNI */ 93 93 0, 0, 0, 0, 0, /* \R, \H, \h, \V, \v */ … … 133 133 0, 0, /* BRAZERO, BRAMINZERO */ 134 134 0, 0, 0, 0, /* PRUNE, SKIP, THEN, COMMIT */ 135 0, 0 /* FAIL, ACCEPT*/135 0, 0, 0 /* FAIL, ACCEPT, SKIPZERO */ 136 136 }; 137 137 … … 139 139 and \w */ 140 140 141 static uschar toptable1[] = {141 static const uschar toptable1[] = { 142 142 0, 0, 0, 0, 0, 0, 143 143 ctype_digit, ctype_digit, 144 144 ctype_space, ctype_space, 145 145 ctype_word, ctype_word, 146 0 /* OP_ANY */146 0, 0 /* OP_ANY, OP_ALLANY */ 147 147 }; 148 148 149 static uschar toptable2[] = {149 static const uschar toptable2[] = { 150 150 0, 0, 0, 0, 0, 0, 151 151 ctype_digit, 0, 152 152 ctype_space, 0, 153 153 ctype_word, 0, 154 1 /* OP_ANY */154 1, 1 /* OP_ANY, OP_ALLANY */ 155 155 }; 156 156 … … 224 224 recursing regex recursive call level 225 225 226 Returns: > 0 => 227 = 0 => 226 Returns: > 0 => number of match offset pairs placed in offsets 227 = 0 => offsets overflowed; longest matches are present 228 228 -1 => failed to match 229 229 < -1 => some kind of unexpected problem … … 695 695 696 696 /*-----------------------------------------------------------------*/ 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 /*-----------------------------------------------------------------*/ 697 704 case OP_CIRC: 698 705 if ((ptr == start_subject && (md->moptions & PCRE_NOTBOL) == 0) || … … 733 740 /*-----------------------------------------------------------------*/ 734 741 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) 736 749 { ADD_NEW(state_offset + 1, 0); } 737 750 break; … … 853 866 /* These opcodes likewise inspect the subject character, but have an 854 867 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. */ 857 870 858 871 case OP_TYPEPLUS: … … 865 878 if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || 866 879 (c < 256 && 867 (d != OP_ANY || 868 (ims & PCRE_DOTALL) != 0 || 869 !IS_NEWLINE(ptr) 870 ) && 880 (d != OP_ANY || !IS_NEWLINE(ptr)) && 871 881 ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) 872 882 { … … 891 901 if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || 892 902 (c < 256 && 893 (d != OP_ANY || 894 (ims & PCRE_DOTALL) != 0 || 895 !IS_NEWLINE(ptr) 896 ) && 903 (d != OP_ANY || !IS_NEWLINE(ptr)) && 897 904 ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) 898 905 { … … 916 923 if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || 917 924 (c < 256 && 918 (d != OP_ANY || 919 (ims & PCRE_DOTALL) != 0 || 920 !IS_NEWLINE(ptr) 921 ) && 925 (d != OP_ANY || !IS_NEWLINE(ptr)) && 922 926 ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) 923 927 { … … 939 943 if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || 940 944 (c < 256 && 941 (d != OP_ANY || 942 (ims & PCRE_DOTALL) != 0 || 943 !IS_NEWLINE(ptr) 944 ) && 945 (d != OP_ANY || !IS_NEWLINE(ptr)) && 945 946 ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) 946 947 { … … 963 964 if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || 964 965 (c < 256 && 965 (d != OP_ANY || 966 (ims & PCRE_DOTALL) != 0 || 967 !IS_NEWLINE(ptr) 968 ) && 966 (d != OP_ANY || !IS_NEWLINE(ptr)) && 969 967 ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) 970 968 { … … 2163 2161 /* ========================================================================== */ 2164 2162 /* 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; 2166 2169 2167 2170 case OP_ASSERT: -
chicken/branches/hygienic/pcre/pcre_exec.c
r9133 r12021 1149 1149 break; 1150 1150 1151 /* BRAZERO and BRAMINZERO occur just before a bracket group, indicating1152 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 upper1154 repeat limits are compiled as a number of copies, with the optional ones1155 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. */ 1156 1156 1157 1157 case OP_BRAZERO: … … 1172 1172 if (rrc != MATCH_NOMATCH) RRETURN(rrc); 1173 1173 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; 1174 1182 } 1175 1183 break; … … 1422 1430 1423 1431 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: 1428 1436 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++; 1431 1438 ecode++; 1432 1439 break; … … 1724 1731 { 1725 1732 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]; 1736 1752 1737 1753 /* Set up for repetition, or handle the non-repeated case */ … … 2936 2952 for (i = 1; i <= min; i++) 2937 2953 { 2938 if (eptr >= md->end_subject || 2939 ((ims & PCRE_DOTALL) == 0 && IS_NEWLINE(eptr))) 2954 if (eptr >= md->end_subject || IS_NEWLINE(eptr)) 2940 2955 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); 2941 2965 eptr++; 2942 2966 while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; … … 3152 3176 { 3153 3177 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 e lse 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; 3163 3187 break; 3164 3188 … … 3417 3441 if (rrc != MATCH_NOMATCH) RRETURN(rrc); 3418 3442 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))) 3421 3444 RRETURN(MATCH_NOMATCH); 3422 3445 … … 3424 3447 switch(ctype) 3425 3448 { 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: 3429 3451 case OP_ANYBYTE: 3430 3452 break; … … 3578 3600 if (rrc != MATCH_NOMATCH) RRETURN(rrc); 3579 3601 if (fi >= max || eptr >= md->end_subject || 3580 ( (ims & PCRE_DOTALL) == 0&& IS_NEWLINE(eptr)))3602 (ctype == OP_ANY && IS_NEWLINE(eptr))) 3581 3603 RRETURN(MATCH_NOMATCH); 3582 3604 … … 3584 3606 switch(ctype) 3585 3607 { 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: 3589 3610 case OP_ANYBYTE: 3590 3611 break; … … 3840 3861 if (max < INT_MAX) 3841 3862 { 3842 if ((ims & PCRE_DOTALL) == 0)3863 for (i = min; i < max; i++) 3843 3864 { 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++; 3850 3868 } 3851 else 3869 } 3870 3871 /* Handle unlimited UTF-8 repeat */ 3872 3873 else 3874 { 3875 for (i = min; i < max; i++) 3852 3876 { 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++; 3859 3880 } 3860 3881 } 3861 3862 /* Handle unlimited UTF-8 repeat */ 3863 3864 else3865 { 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++) 3867 3888 { 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++; 3874 3892 } 3875 else 3876 { 3877 eptr = md->end_subject; 3878 } 3879 } 3893 } 3894 else eptr = md->end_subject; /* Unlimited UTF-8 repeat */ 3880 3895 break; 3881 3896 … … 4065 4080 { 4066 4081 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: 4078 4090 case OP_ANYBYTE: 4079 4091 c = max - min; … … 4451 4463 md->endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0; 4452 4464 utf8 = md->utf8 = (re->options & PCRE_UTF8) != 0; 4465 md->jscript_compat = (re->options & PCRE_JAVASCRIPT_COMPAT) != 0; 4453 4466 4454 4467 md->notbol = (options & PCRE_NOTBOL) != 0; -
chicken/branches/hygienic/pcre/pcre_internal.h
r9133 r12021 66 66 #define DPRINTF(p) /* Nothing */ 67 67 #endif 68 69 70 /* Get the definitions provided by running "configure" */71 72 #include "config.h"73 68 74 69 … … 520 515 PCRE_DOTALL|PCRE_DOLLAR_ENDONLY|PCRE_EXTRA|PCRE_UNGREEDY|PCRE_UTF8| \ 521 516 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) 523 519 524 520 #define PUBLIC_EXEC_OPTIONS \ … … 610 606 their negation. Also, they must appear in the same order as in the opcode 611 607 definitions 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. */ 608 corresponds to "." rather than an escape sequence, and another for OP_ALLANY 609 (which is used for [^] in JavaScript compatibility mode). 610 611 The final escape must be ESC_REF as subsequent values are used for 612 backreferences (\1, \2, \3, etc). There are two tests in the code for an escape 613 greater than ESC_b and less than ESC_Z to detect the types that may be 614 repeated. These are the types that consume characters. If any new escapes are 615 put in between that don't consume a character, that code will have to change. 616 */ 618 617 619 618 enum { 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 }; 622 622 623 623 … … 645 645 OP_NOT_WORDCHAR, /* 10 \W */ 646 646 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 726 727 class - the difference is relevant only when a UTF-8 727 728 character > 255 is encountered. */ 728 729 729 OP_XCLASS, /* 79Extended class for handling UTF-8 chars within the730 OP_XCLASS, /* 80 Extended class for handling UTF-8 chars within the 730 731 class. This does both positive and negative. */ 731 732 732 OP_REF, /* 8 0Match a back reference */733 OP_RECURSE, /* 8 1Match a numbered subpattern (possibly recursive) */734 OP_CALLOUT, /* 8 2Call out to external function if provided */735 736 OP_ALT, /* 8 3Start of alternation */737 OP_KET, /* 8 4End of group that doesn't have an unbounded repeat */738 OP_KETRMAX, /* 8 5These two must remain together and in this */739 OP_KETRMIN, /* 8 6order. 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. */ 740 741 741 742 /* The assertions must come before BRA, CBRA, ONCE, and COND.*/ 742 743 743 OP_ASSERT, /* 8 7Positive lookahead */744 OP_ASSERT_NOT, /* 8 8Negative lookahead */745 OP_ASSERTBACK, /* 89Positive lookbehind */746 OP_ASSERTBACK_NOT, /* 9 0Negative lookbehind */747 OP_REVERSE, /* 9 1Move 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 */ 748 749 749 750 /* ONCE, BRA, CBRA, and COND must come after the assertions, with ONCE first, 750 751 as there's a test for >= ONCE for a subpattern that isn't an assertion. */ 751 752 752 OP_ONCE, /* 9 2Atomic group */753 OP_BRA, /* 9 3Start of non-capturing bracket */754 OP_CBRA, /* 9 4Start of capturing bracket */755 OP_COND, /* 9 5Conditional 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 */ 756 757 757 758 /* These three must follow the previous three, in the same order. There's a 758 759 check for >= SBRA to distinguish the two sets. */ 759 760 760 OP_SBRA, /* 9 6Start of non-capturing bracket, check empty */761 OP_SCBRA, /* 9 7Start of capturing bracket, check empty */762 OP_SCOND, /* 9 8Conditional group, check empty */763 764 OP_CREF, /* 99Used to hold a capture number as condition */765 OP_RREF, /* 10 0Used to hold a recursion number as condition */766 OP_DEF, /* 10 1The DEFINE condition */767 768 OP_BRAZERO, /* 10 2These two must remain together and in this */769 OP_BRAMINZERO, /* 10 3order. */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. */ 770 771 771 772 /* These are backtracking control verbs */ 772 773 773 OP_PRUNE, /* 10 4*/774 OP_SKIP, /* 10 5*/775 OP_THEN, /* 10 6*/776 OP_COMMIT, /* 10 7*/774 OP_PRUNE, /* 105 */ 775 OP_SKIP, /* 106 */ 776 OP_THEN, /* 107 */ 777 OP_COMMIT, /* 108 */ 777 778 778 779 /* These are forced failure and success verbs */ 779 780 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 */ 782 787 }; 783 788 … … 788 793 #define OP_NAME_LIST \ 789 794 "End", "\\A", "\\G", "\\K", "\\B", "\\b", "\\D", "\\d", \ 790 "\\S", "\\s", "\\W", "\\w", "Any", "A nybyte",\795 "\\S", "\\s", "\\W", "\\w", "Any", "AllAny", "Anybyte", \ 791 796 "notprop", "prop", "\\R", "\\H", "\\h", "\\V", "\\v", \ 792 797 "extuni", "\\Z", "\\z", \ … … 804 809 "Once", "Bra", "CBra", "Cond", "SBra", "SCBra", "SCond", \ 805 810 "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" 807 813 808 814 … … 820 826 1, 1, 1, 1, 1, /* \A, \G, \K, \B, \b */ \ 821 827 1, 1, 1, 1, 1, 1, /* \D, \d, \S, \s, \W, \w */ \ 822 1, 1, /* Any, Anybyte*/ \828 1, 1, 1, /* Any, AllAny, Anybyte */ \ 823 829 3, 3, 1, /* NOTPROP, PROP, EXTUNI */ \ 824 830 1, 1, 1, 1, 1, /* \R, \H, \h, \V, \v */ \ … … 869 875 1, 1, /* BRAZERO, BRAMINZERO */ \ 870 876 1, 1, 1, 1, /* PRUNE, SKIP, THEN, COMMIT, */ \ 871 1, 1 /* FAIL, ACCEPT*/877 1, 1, 1 /* FAIL, ACCEPT, SKIPZERO */ 872 878 873 879 … … 885 891 ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49, 886 892 ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59, 887 ERR60, ERR61, ERR62, ERR63 };893 ERR60, ERR61, ERR62, ERR63, ERR64 }; 888 894 889 895 /* The real format of the start of the pcre block; the index of names and the … … 1010 1016 BOOL noteol; /* NOTEOL flag */ 1011 1017 BOOL utf8; /* UTF8 flag */ 1018 BOOL jscript_compat; /* JAVASCRIPT_COMPAT flag */ 1012 1019 BOOL endonly; /* Dollar not before final \n */ 1013 1020 BOOL notempty; /* Empty string match not wanted */ -
chicken/branches/hygienic/pcre/pcre_study.c
r9133 r12021 218 218 break; 219 219 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 220 227 /* Single-char * or ? sets the bit and tries the next item */ 221 228 … … 342 349 { 343 350 case OP_ANY: 351 case OP_ALLANY: 344 352 return SSB_FAIL; 345 353 -
chicken/branches/hygienic/pcre/ucpinternal.h
r6175 r12021 18 18 #define f0_scriptmask 0xff000000 /* Mask for script field */ 19 19 #define f0_scriptshift 24 /* Shift for script value */ 20 #define f0_rangeflag 0x00 f00000 /* Flag for a range item */20 #define f0_rangeflag 0x00800000 /* Flag for a range item */ 21 21 #define f0_charmask 0x001fffff /* Mask for code point value */ 22 22 -
chicken/branches/hygienic/rules.make
r11978 r12021 25 25 # POSSIBILITY OF SUCH DAMAGE. 26 26 27 VPATH=$(SRCDIR):$(SRCDIR)pcre 27 28 28 29 # object files … … 51 52 ifeq ($(USE_HOST_PCRE),) 52 53 PCRE_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_chartables54 $(PCRE_DIR)pcre_compile \ 55 $(PCRE_DIR)pcre_config \ 56 $(PCRE_DIR)pcre_dfa_exec \ 57 $(PCRE_DIR)pcre_exec \ 58 $(PCRE_DIR)pcre_fullinfo \ 59 $(PCRE_DIR)pcre_get \ 60 $(PCRE_DIR)pcre_globals \ 61 $(PCRE_DIR)pcre_info \ 62 $(PCRE_DIR)pcre_maketables \ 63 $(PCRE_DIR)pcre_newline \ 64 $(PCRE_DIR)pcre_ord2utf8 \ 65 $(PCRE_DIR)pcre_refcount \ 66 $(PCRE_DIR)pcre_study \ 67 $(PCRE_DIR)pcre_tables \ 68 $(PCRE_DIR)pcre_try_flipped \ 69 $(PCRE_DIR)pcre_ucp_searchfuncs \ 70 $(PCRE_DIR)pcre_valid_utf8 \ 71 $(PCRE_DIR)pcre_version \ 72 $(PCRE_DIR)pcre_xclass \ 73 $(PCRE_DIR)pcre_chartables 73 74 PCRE_SHARED_OBJECTS = $(PCRE_OBJECTS_1:=$(O)) 74 75 PCRE_STATIC_OBJECTS = $(PCRE_OBJECTS_1:=-static$(O)) … … 596 597 # pcre objects 597 598 598 $(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.h599 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 600 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 601 $(C_COMPILER_PCRE_OPTIONS) 602 $(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.h603 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 604 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 605 $(C_COMPILER_PCRE_OPTIONS) 606 $(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.h607 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 608 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 609 $(C_COMPILER_PCRE_OPTIONS) 610 $(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.h611 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 612 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 613 $(C_COMPILER_PCRE_OPTIONS) 614 $(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.h615 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 616 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 617 $(C_COMPILER_PCRE_OPTIONS) 618 $(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.h619 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 620 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 621 $(C_COMPILER_PCRE_OPTIONS) 622 $(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.h623 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 624 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 625 $(C_COMPILER_PCRE_OPTIONS) 626 $(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.h627 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 628 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 629 $(C_COMPILER_PCRE_OPTIONS) 630 $(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.h631 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 632 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 633 $(C_COMPILER_PCRE_OPTIONS) 634 $(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.h635 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 636 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 637 $(C_COMPILER_PCRE_OPTIONS) 638 pcre/pcre_ord2utf8$(O): pcre/pcre_ord2utf8.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h639 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 640 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 641 $(C_COMPILER_PCRE_OPTIONS) 642 pcre/pcre_refcount$(O): pcre/pcre_refcount.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h643 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 644 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 645 $(C_COMPILER_PCRE_OPTIONS) 646 pcre/pcre_study$(O): pcre/pcre_study.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h647 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 648 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 649 $(C_COMPILER_PCRE_OPTIONS) 650 pcre/pcre_tables$(O): pcre/pcre_tables.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h651 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 652 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 653 $(C_COMPILER_PCRE_OPTIONS) 654 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.h655 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 656 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 657 $(C_COMPILER_PCRE_OPTIONS) 658 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.h659 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 660 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 661 $(C_COMPILER_PCRE_OPTIONS) 662 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.h663 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 664 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 665 $(C_COMPILER_PCRE_OPTIONS) 666 pcre/pcre_version$(O): pcre/pcre_version.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h667 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 668 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 669 $(C_COMPILER_PCRE_OPTIONS) 670 pcre/pcre_xclass$(O): pcre/pcre_xclass.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h671 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 672 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 673 $(C_COMPILER_PCRE_OPTIONS) 674 pcre/pcre_chartables$(O): pcre/pcre_chartables.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H)599 $(PCRE_DIR)pcre_compile$(O): pcre_compile.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h 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_config$(O): pcre_config.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h 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_dfa_exec$(O): pcre_dfa_exec.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h 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_exec$(O): pcre_exec.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h 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_fullinfo$(O): pcre_fullinfo.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h 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_get$(O): pcre_get.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h 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_globals$(O): pcre_globals.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h 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_info$(O): pcre_info.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h 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_maketables$(O): pcre_maketables.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h 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_newline$(O): pcre_newline.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.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_ord2utf8$(O): pcre_ord2utf8.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h 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_refcount$(O): pcre_refcount.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h 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_study$(O): pcre_study.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h 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_tables$(O): pcre_tables.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 652 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 653 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 654 $(C_COMPILER_PCRE_OPTIONS) 655 $(PCRE_DIR)pcre_try_flipped$(O): pcre_try_flipped.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 656 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 657 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 658 $(C_COMPILER_PCRE_OPTIONS) 659 $(PCRE_DIR)pcre_ucp_searchfuncs$(O): pcre_ucp_searchfuncs.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h ucptable.h ucpinternal.h 660 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 661 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 662 $(C_COMPILER_PCRE_OPTIONS) 663 $(PCRE_DIR)pcre_valid_utf8$(O): pcre_valid_utf8.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 664 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 665 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 666 $(C_COMPILER_PCRE_OPTIONS) 667 $(PCRE_DIR)pcre_version$(O): pcre_version.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 668 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 669 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 670 $(C_COMPILER_PCRE_OPTIONS) 671 $(PCRE_DIR)pcre_xclass$(O): pcre_xclass.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 672 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 673 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 674 $(C_COMPILER_PCRE_OPTIONS) 675 $(PCRE_DIR)pcre_chartables$(O): pcre_chartables.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) 675 676 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 676 677 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ … … 679 680 # static pcre objects 680 681 681 pcre/pcre_compile-static$(O): pcre/pcre_compile.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h682 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 683 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 684 $(C_COMPILER_PCRE_OPTIONS) 685 pcre/pcre_config-static$(O): pcre/pcre_config.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h686 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 687 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 688 $(C_COMPILER_PCRE_OPTIONS) 689 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.h690 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 691 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 692 $(C_COMPILER_PCRE_OPTIONS) 693 pcre/pcre_exec-static$(O): pcre/pcre_exec.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h694 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 695 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 696 $(C_COMPILER_PCRE_OPTIONS) 697 pcre/pcre_fullinfo-static$(O): pcre/pcre_fullinfo.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h698 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 699 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 700 $(C_COMPILER_PCRE_OPTIONS) 701 pcre/pcre_get-static$(O): pcre/pcre_get.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h702 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 703 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 704 $(C_COMPILER_PCRE_OPTIONS) 705 pcre/pcre_globals-static$(O): pcre/pcre_globals.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h706 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 707 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 708 $(C_COMPILER_PCRE_OPTIONS) 709 pcre/pcre_info-static$(O): pcre/pcre_info.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h710 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 711 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 712 $(C_COMPILER_PCRE_OPTIONS) 713 pcre/pcre_maketables-static$(O): pcre/pcre_maketables.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h714 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 715 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 716 $(C_COMPILER_PCRE_OPTIONS) 717 pcre/pcre_newline-static$(O): pcre/pcre_newline.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h718 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 719 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 720 $(C_COMPILER_PCRE_OPTIONS) 721 pcre/pcre_ord2utf8-static$(O): pcre/pcre_ord2utf8.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h722 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 723 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 724 $(C_COMPILER_PCRE_OPTIONS) 725 pcre/pcre_refcount-static$(O): pcre/pcre_refcount.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h726 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 727 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 728 $(C_COMPILER_PCRE_OPTIONS) 729 pcre/pcre_study-static$(O): pcre/pcre_study.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h730 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 731 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 732 $(C_COMPILER_PCRE_OPTIONS) 733 pcre/pcre_tables-static$(O): pcre/pcre_tables.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h734 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 735 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 736 $(C_COMPILER_PCRE_OPTIONS) 737 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.h738 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 739 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 740 $(C_COMPILER_PCRE_OPTIONS) 741 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.h742 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 743 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 744 $(C_COMPILER_PCRE_OPTIONS) 745 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.h746 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 747 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 748 $(C_COMPILER_PCRE_OPTIONS) 749 pcre/pcre_version-static$(O): pcre/pcre_version.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h750 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 751 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 752 $(C_COMPILER_PCRE_OPTIONS) 753 pcre/pcre_xclass-static$(O): pcre/pcre_xclass.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H) pcre/pcre.h pcre/ucp.h754 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 755 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 756 $(C_COMPILER_PCRE_OPTIONS) 757 pcre/pcre_chartables-static$(O): pcre/pcre_chartables.c pcre/pcre_internal.h pcre/config.h $(CHICKEN_CONFIG_H)682 $(PCRE_DIR)pcre_compile-static$(O): pcre_compile.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 683 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 684 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 685 $(C_COMPILER_PCRE_OPTIONS) 686 $(PCRE_DIR)pcre_config-static$(O): pcre_config.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 687 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 688 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 689 $(C_COMPILER_PCRE_OPTIONS) 690 $(PCRE_DIR)pcre_dfa_exec-static$(O): pcre_dfa_exec.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 691 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 692 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 693 $(C_COMPILER_PCRE_OPTIONS) 694 $(PCRE_DIR)pcre_exec-static$(O): pcre_exec.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 695 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 696 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 697 $(C_COMPILER_PCRE_OPTIONS) 698 $(PCRE_DIR)pcre_fullinfo-static$(O): pcre_fullinfo.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 699 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 700 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 701 $(C_COMPILER_PCRE_OPTIONS) 702 $(PCRE_DIR)pcre_get-static$(O): pcre_get.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 703 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 704 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 705 $(C_COMPILER_PCRE_OPTIONS) 706 $(PCRE_DIR)pcre_globals-static$(O): pcre_globals.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 707 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 708 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 709 $(C_COMPILER_PCRE_OPTIONS) 710 $(PCRE_DIR)pcre_info-static$(O): pcre_info.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 711 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 712 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 713 $(C_COMPILER_PCRE_OPTIONS) 714 $(PCRE_DIR)pcre_maketables-static$(O): pcre_maketables.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 715 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 716 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 717 $(C_COMPILER_PCRE_OPTIONS) 718 $(PCRE_DIR)pcre_newline-static$(O): pcre_newline.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 719 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 720 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 721 $(C_COMPILER_PCRE_OPTIONS) 722 $(PCRE_DIR)pcre_ord2utf8-static$(O): pcre_ord2utf8.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 723 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 724 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 725 $(C_COMPILER_PCRE_OPTIONS) 726 $(PCRE_DIR)pcre_refcount-static$(O): pcre_refcount.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 727 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 728 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 729 $(C_COMPILER_PCRE_OPTIONS) 730 $(PCRE_DIR)pcre_study-static$(O): pcre_study.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 731 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 732 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 733 $(C_COMPILER_PCRE_OPTIONS) 734 $(PCRE_DIR)pcre_tables-static$(O): pcre_tables.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 735 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 736 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 737 $(C_COMPILER_PCRE_OPTIONS) 738 $(PCRE_DIR)pcre_try_flipped-static$(O): pcre_try_flipped.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 739 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 740 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 741 $(C_COMPILER_PCRE_OPTIONS) 742 $(PCRE_DIR)pcre_ucp_searchfuncs-static$(O): pcre_ucp_searchfuncs.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h ucptable.h ucpinternal.h 743 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 744 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 745 $(C_COMPILER_PCRE_OPTIONS) 746 $(PCRE_DIR)pcre_valid_utf8-static$(O): pcre_valid_utf8.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 747 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 748 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 749 $(C_COMPILER_PCRE_OPTIONS) 750 $(PCRE_DIR)pcre_version-static$(O): pcre_version.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 751 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 752 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 753 $(C_COMPILER_PCRE_OPTIONS) 754 $(PCRE_DIR)pcre_xclass-static$(O): pcre_xclass.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) pcre.h ucp.h 755 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 756 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ 757 $(C_COMPILER_PCRE_OPTIONS) 758 $(PCRE_DIR)pcre_chartables-static$(O): pcre_chartables.c pcre_internal.h config.h $(CHICKEN_CONFIG_H) 758 759 $(C_COMPILER) $(C_COMPILER_OPTIONS) $(PCRE_INCLUDES) $(C_COMPILER_COMPILE_OPTION) \ 759 760 $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< $(C_COMPILER_OUTPUT) \ … … 763 764 764 765 ifneq ($(HACKED_APPLY),) 765 $(APPLY_HACK_OBJECT): apply-hack.$(ARCH).s766 $(APPLY_HACK_OBJECT): $(SRCDIR)apply-hack.$(ARCH).s 766 767 $(ASSEMBLER) $(ASSEMBLER_OPTIONS) $(ASSEMBLER_COMPILE_OPTION) $< $(ASSEMBLER_OUTPUT) 767 768 endif … … 930 931 endif 931 932 ifneq ($(POSTINSTALL_STATIC_LIBRARY),true) 933 ifdef WINDOWS 934 $(POSTINSTALL_STATIC_LIBRARY) $(POSTINSTALL_STATIC_LIBRARY_FLAGS) \ 935 $(ILIBDIR)\\libchicken$(A) 936 $(POSTINSTALL_STATIC_LIBRARY) $(POSTINSTALL_STATIC_LIBRARY_FLAGS) \ 937 $(ILIBDIR)\\libuchicken$(A) 938 else 932 939 $(POSTINSTALL_STATIC_LIBRARY) $(POSTINSTALL_STATIC_LIBRARY_FLAGS) \ 933 940 $(ILIBDIR)/libchicken$(A) … … 935 942 $(ILIBDIR)/libuchicken$(A) 936 943 endif 937 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken.h $(DESTDIR)$(IINCDIR) 944 endif 945 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken.h $(DESTDIR)$(IINCDIR) 938 946 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(CHICKEN_CONFIG_H) $(DESTDIR)$(IINCDIR) 939 947 ifndef STATICBUILD … … 976 984 $(CHICKEN_INSTALL_PROGRAM)$(EXE) $(CHICKEN_UNINSTALL_PROGRAM)$(EXE) \ 977 985 $(CHICKEN_STATUS_PROGRAM)$(EXE) 978 $(MAKE) -f $(SRCDIR) /Makefile.$(PLATFORM) NEEDS_RELINKING=no RUNTIME_LINKER_PATH=$(LIBDIR) install986 $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) NEEDS_RELINKING=no RUNTIME_LINKER_PATH=$(LIBDIR) install 979 987 $(MAKE_WRITABLE_COMMAND) $(CHICKEN_PROGRAM)$(EXE) $(CSI_PROGRAM)$(EXE) \ 980 988 $(CSC_PROGRAM)$(EXE) $(CHICKEN_PROFILE_PROGRAM)$(EXE) … … 1041 1049 endif 1042 1050 endif 1043 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR) /chicken.1 $(DESTDIR)$(IMANDIR)1044 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR) /csi.1 $(DESTDIR)$(IMANDIR)1045 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR) /csc.1 $(DESTDIR)$(IMANDIR)1046 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR) /chicken-install.1 $(DESTDIR)$(IMANDIR)1047 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR) /chicken-uninstall.1 $(DESTDIR)$(IMANDIR)1048 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR) /chicken-status.1 $(DESTDIR)$(IMANDIR)1049 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR) /chicken-profile.1 $(DESTDIR)$(IMANDIR)1050 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR) /chicken-bug.1 $(DESTDIR)$(IMANDIR)1051 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken.1 $(DESTDIR)$(IMANDIR) 1052 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)csi.1 $(DESTDIR)$(IMANDIR) 1053 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)csc.1 $(DESTDIR)$(IMANDIR) 1054 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken-install.1 $(DESTDIR)$(IMANDIR) 1055 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken-uninstall.1 $(DESTDIR)$(IMANDIR) 1056 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken-status.1 $(DESTDIR)$(IMANDIR) 1057 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken-profile.1 $(DESTDIR)$(IMANDIR) 1058 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken-bug.1 $(DESTDIR)$(IMANDIR) 1051 1059 $(MAKEDIR_COMMAND) $(MAKEDIR_COMMAND_OPTIONS) $(DESTDIR)$(IDOCDIR)/html 1052 -$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR) /html/* $(DESTDIR)$(IDOCDIR)/html1053 -$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR) /chicken.pdf $(DESTDIR)$(IDOCDIR)1054 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR) /README $(DESTDIR)$(IDOCDIR)1055 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR) /LICENSE $(DESTDIR)$(IDOCDIR)1056 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR) /chicken-more-macros.scm $(DESTDIR)$(IDATADIR)1060 -$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)html/* $(DESTDIR)$(IDOCDIR)/html 1061 -$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken.pdf $(DESTDIR)$(IDOCDIR) 1062 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)README $(DESTDIR)$(IDOCDIR) 1063 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)LICENSE $(DESTDIR)$(IDOCDIR) 1064 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken-more-macros.scm $(DESTDIR)$(IDATADIR) 1057 1065 -$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) chicken.info $(DESTDIR)$(IINFODIR) 1058 1066 $(INSTALLINFO_PROGRAM) $(INSTALLINFO_PROGRAM_OPTIONS) --infodir=$(DESTDIR)$(IINFODIR) chicken.info 1059 1067 ifdef WINDOWS 1060 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) $(SRCDIR) /csibatch.bat $(DESTDIR)$(IBINDIR)1068 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) $(SRCDIR)csibatch.bat $(DESTDIR)$(IBINDIR) 1061 1069 endif 1062 1070 endif … … 1071 1079 1072 1080 install-setup-files: 1073 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR) /setup.defaults $(DESTDIR)$(IEGGDIR)1081 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)setup.defaults $(DESTDIR)$(IEGGDIR) 1074 1082 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) setup-api.so $(DESTDIR)$(IEGGDIR) 1075 1083 $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) setup-download.so $(DESTDIR)$(IEGGDIR) … … 1113 1121 .SUFFIXES: .scm 1114 1122 1115 library.c: library.scm version.scmbanner.scm1116 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1117 eval.c: eval.scm1118 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1119 expand.c: expand.scmsynrules.scm1123 library.c: $(SRCDIR)library.scm $(SRCDIR)version.scm $(SRCDIR)banner.scm 1124 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1125 eval.c: $(SRCDIR)eval.scm 1126 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1127 expand.c: $(SRCDIR)expand.scm $(SRCDIR)synrules.scm 1120 1128 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1121 data-structures.c: data-structures.scmprivate-namespace.scm1122 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ -extend private-namespace.scm1123 ports.c: ports.scmprivate-namespace.scm1124 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ -extend private-namespace.scm1125 files.c: files.scmprivate-namespace.scm1126 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ -extend private-namespace.scm1127 extras.c: extras.scmprivate-namespace.scm1128 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ -extend private-namespace.scm1129 lolevel.c: lolevel.scm1130 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1131 tcp.c: tcp.scm1132 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1133 srfi-1.c: srfi-1.scm1134 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1135 srfi-4.c: srfi-4.scm1136 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1137 srfi-13.c: srfi-13.scm1138 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1139 srfi-14.c: srfi-14.scm1140 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1141 srfi-18.c: srfi-18.scm1142 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1143 srfi-69.c: srfi-69.scmprivate-namespace.scm1144 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ -extend private-namespace.scm1145 utils.c: utils.scm1146 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1147 posixunix.c: posixunix.scm1148 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1149 posixwin.c: posixwin.scm1150 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1151 regex.c: regex.scm1129 data-structures.c: $(SRCDIR)data-structures.scm $(SRCDIR)private-namespace.scm 1130 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ -extend $(SRCDIR)private-namespace.scm 1131 ports.c: $(SRCDIR)ports.scm $(SRCDIR)private-namespace.scm 1132 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ -extend $(SRCDIR)private-namespace.scm 1133 files.c: $(SRCDIR)files.scm $(SRCDIR)private-namespace.scm 1134 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ -extend $(SRCDIR)private-namespace.scm 1135 extras.c: $(SRCDIR)extras.scm $(SRCDIR)private-namespace.scm 1136 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ -extend $(SRCDIR)private-namespace.scm 1137 lolevel.c: $(SRCDIR)lolevel.scm 1138 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1139 tcp.c: $(SRCDIR)tcp.scm 1140 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1141 srfi-1.c: $(SRCDIR)srfi-1.scm 1142 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1143 srfi-4.c: $(SRCDIR)srfi-4.scm 1144 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1145 srfi-13.c: $(SRCDIR)srfi-13.scm 1146 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1147 srfi-14.c: $(SRCDIR)srfi-14.scm 1148 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1149 srfi-18.c: $(SRCDIR)srfi-18.scm 1150 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1151 srfi-69.c: $(SRCDIR)srfi-69.scm $(SRCDIR)private-namespace.scm 1152 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ -extend $(SRCDIR)private-namespace.scm 1153 utils.c: $(SRCDIR)utils.scm 1154 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1155 posixunix.c: $(SRCDIR)posixunix.scm 1156 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1157 posixwin.c: $(SRCDIR)posixwin.scm 1158 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1159 regex.c: $(SRCDIR)regex.scm 1152 1160 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_PCRE_LIBRARY_OPTIONS) -output-file $@ 1153 scheduler.c: scheduler.scm1154 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1155 profiler.c: profiler.scm1156 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1157 stub.c: stub.scm1158 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1159 1160 ulibrary.c: library.scm version.scm banner.scmunsafe-declarations.scm1161 scheduler.c: $(SRCDIR)scheduler.scm 1162 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1163 profiler.c: $(SRCDIR)profiler.scm 1164 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1165 stub.c: $(SRCDIR)stub.scm 1166 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ 1167 1168 ulibrary.c: $(SRCDIR)library.scm $(SRCDIR)version.scm $(SRCDIR)banner.scm $(SRCDIR)unsafe-declarations.scm 1161 1169 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ 1162 ueval.c: eval.scmunsafe-declarations.scm1170 ueval.c: $(SRCDIR)eval.scm $(SRCDIR)unsafe-declarations.scm 1163 1171 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ 1164 udata-structures.c: data-structures.scm private-namespace.scmunsafe-declarations.scm1165 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ -extend private-namespace.scm1166 uports.c: ports.scm private-namespace.scmunsafe-declarations.scm1172 udata-structures.c: $(SRCDIR)data-structures.scm $(SRCDIR)private-namespace.scm $(SRCDIR)unsafe-declarations.scm 1173 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ -extend $(SRCDIR)private-namespace.scm 1174 uports.c: $(SRCDIR)ports.scm $(SRCDIR)private-namespace.scm $(SRCDIR)unsafe-declarations.scm 1167 1175 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ 1168 ufiles.c: files.scm private-namespace.scmunsafe-declarations.scm1176 ufiles.c: $(SRCDIR)files.scm $(SRCDIR)private-namespace.scm $(SRCDIR)unsafe-declarations.scm 1169 1177 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ 1170 uextras.c: extras.scm private-namespace.scmunsafe-declarations.scm1171 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ -extend private-namespace.scm1172 ulolevel.c: lolevel.scmunsafe-declarations.scm1178 uextras.c: $(SRCDIR)extras.scm $(SRCDIR)private-namespace.scm $(SRCDIR)unsafe-declarations.scm 1179 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ -extend $(SRCDIR)private-namespace.scm 1180 ulolevel.c: $(SRCDIR)lolevel.scm $(SRCDIR)unsafe-declarations.scm 1173 1181 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ 1174 utcp.c: tcp.scmunsafe-declarations.scm1182 utcp.c: $(SRCDIR)tcp.scm $(SRCDIR)unsafe-declarations.scm 1175 1183 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ 1176 usrfi-1.c: srfi-1.scmunsafe-declarations.scm1184 usrfi-1.c: $(SRCDIR)srfi-1.scm $(SRCDIR)unsafe-declarations.scm 1177 1185 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ 1178 usrfi-4.c: srfi-4.scmunsafe-declarations.scm1186 usrfi-4.c: $(SRCDIR)srfi-4.scm $(SRCDIR)unsafe-declarations.scm 1179 1187 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ 1180 usrfi-13.c: srfi-13.scmunsafe-declarations.scm1188 usrfi-13.c: $(SRCDIR)srfi-13.scm $(SRCDIR)unsafe-declarations.scm 1181 1189 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ 1182 usrfi-14.c: srfi-14.scmunsafe-declarations.scm1190 usrfi-14.c: $(SRCDIR)srfi-14.scm $(SRCDIR)unsafe-declarations.scm 1183 1191 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ 1184 usrfi-18.c: srfi-18.scmunsafe-declarations.scm1192 usrfi-18.c: $(SRCDIR)srfi-18.scm $(SRCDIR)unsafe-declarations.scm 1185 1193 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ 1186 usrfi-69.c: srfi-69.scm private-namespace.scmunsafe-declarations.scm1187 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ -extend private-namespace.scm1188 uutils.c: utils.scm1194 usrfi-69.c: $(SRCDIR)srfi-69.scm $(SRCDIR)private-namespace.scm $(SRCDIR)unsafe-declarations.scm 1195 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ -extend $(SRCDIR)private-namespace.scm 1196 uutils.c: $(SRCDIR)utils.scm 1189 1197 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ 1190 uposixunix.c: posixunix.scmunsafe-declarations.scm1198 uposixunix.c: $(SRCDIR)posixunix.scm $(SRCDIR)unsafe-declarations.scm 1191 1199 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ 1192 uposixwin.c: posixwin.scmunsafe-declarations.scm1200 uposixwin.c: $(SRCDIR)posixwin.scm $(SRCDIR)unsafe-declarations.scm 1193 1201 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ 1194 uregex.c: regex.scmunsafe-declarations.scm1202 uregex.c: $(SRCDIR)regex.scm $(SRCDIR)unsafe-declarations.scm 1195 1203 $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) $(CHICKEN_PCRE_LIBRARY_OPTIONS) $(CHICKEN_UNSAFE_OPTIONS) -output-file $@ 1196 1204 1197 chicken.import.c: chicken.import.scm1198 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1199 lolevel.import.c: lolevel.import.scm1200 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1201 srfi-1.import.c: srfi-1.import.scm1202 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1203 srfi-4.import.c: srfi-4.import.scm1204 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1205 data-structures.import.c: data-structures.import.scm1206 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1207 ports.import.c: ports.import.scm1208 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1209 files.import.c: files.import.scm1210 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1211 posix.import.c: posix.import.scm1212 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1213 srfi-13.import.c: srfi-13.import.scm1214 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1215 srfi-69.import.c: srfi-69.import.scm1216 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1217 extras.import.c: extras.import.scm1218 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1219 regex.import.c: regex.import.scm1220 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1221 srfi-14.import.c: srfi-14.import.scm1222 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1223 tcp.import.c: tcp.import.scm1224 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1225 foreign.import.c: foreign.import.scm1226 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1227 scheme.import.c: scheme.import.scm1228 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1229 csi.import.c: csi.import.scm1230 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1231 srfi-18.import.c: srfi-18.import.scm1232 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1233 utils.import.c: utils.import.scm1234 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1235 setup-api.import.c: setup-api.import.scmsetup-api.scm1236 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1237 setup-download.import.c: setup-download.import.scmsetup-download.scm1238 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1239 setup-utils.import.c: setup-utils.import.scmsetup-utils.scm1240 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1241 1242 chicken.c: chicken.scm chicken-more-macros.scm chicken-ffi-macros.scmprivate-namespace.scm1205 chicken.import.c: $(SRCDIR)chicken.import.scm 1206 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1207 lolevel.import.c: $(SRCDIR)lolevel.import.scm 1208 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1209 srfi-1.import.c: $(SRCDIR)srfi-1.import.scm 1210 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1211 srfi-4.import.c: $(SRCDIR)srfi-4.import.scm 1212 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1213 data-structures.import.c: $(SRCDIR)data-structures.import.scm 1214 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1215 ports.import.c: $(SRCDIR)ports.import.scm 1216 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1217 files.import.c: $(SRCDIR)files.import.scm 1218 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1219 posix.import.c: $(SRCDIR)posix.import.scm 1220 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1221 srfi-13.import.c: $(SRCDIR)srfi-13.import.scm 1222 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1223 srfi-69.import.c: $(SRCDIR)srfi-69.import.scm 1224 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1225 extras.import.c: $(SRCDIR)extras.import.scm 1226 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1227 regex.import.c: $(SRCDIR)regex.import.scm 1228 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1229 srfi-14.import.c: $(SRCDIR)srfi-14.import.scm 1230 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1231 tcp.import.c: $(SRCDIR)tcp.import.scm 1232 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1233 foreign.import.c: $(SRCDIR)foreign.import.scm 1234 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1235 scheme.import.c: $(SRCDIR)scheme.import.scm 1236 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1237 csi.import.c: $(SRCDIR)csi.import.scm 1238 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1239 srfi-18.import.c: $(SRCDIR)srfi-18.import.scm 1240 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1241 utils.import.c: $(SRCDIR)utils.import.scm 1242 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1243 setup-api.import.c: $(SRCDIR)setup-api.import.scm $(SRCDIR)setup-api.scm 1244 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1245 setup-download.import.c: $(SRCDIR)setup-download.import.scm $(SRCDIR)setup-download.scm 1246 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1247 setup-utils.import.c: $(SRCDIR)setup-utils.import.scm $(SRCDIR)setup-utils.scm 1248 $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@ 1249 1250 chicken.c: $(SRCDIR)chicken.scm $(SRCDIR)chicken-more-macros.scm $(SRCDIR)chicken-ffi-macros.scm $(SRCDIR)private-namespace.scm 1243 1251 $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@ 1244 support.c: support.scm banner.scmprivate-namespace.scm1252 support.c: $(SRCDIR)support.scm $(SRCDIR)banner.scm $(SRCDIR)private-namespace.scm 1245 1253 $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@ 1246 compiler.c: compiler.scmprivate-namespace.scm1254 compiler.c: $(SRCDIR)compiler.scm $(SRCDIR)private-namespace.scm 1247 1255 $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@ 1248 optimizer.c: optimizer.scmprivate-namespace.scm1256 optimizer.c: $(SRCDIR)optimizer.scm $(SRCDIR)private-namespace.scm 1249 1257 $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@ 1250 batch-driver.c: batch-driver.scmprivate-namespace.scm1258 batch-driver.c: $(SRCDIR)batch-driver.scm $(SRCDIR)private-namespace.scm 1251 1259 $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@ 1252 c-platform.c: c-platform.scmprivate-namespace.scm1260 c-platform.c: $(SRCDIR)c-platform.scm $(SRCDIR)private-namespace.scm 1253 1261 $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@ 1254 c-backend.c: c-backend.scmprivate-namespace.scm1262 c-backend.c: $(SRCDIR)c-backend.scm $(SRCDIR)private-namespace.scm 1255 1263 $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@ 1256 1264 1257 csi.c: csi.scm banner.scm chicken-more-macros.scmprivate-namespace.scm1258 $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@ -extend private-namespace.scm1259 chicken-profile.c: chicken-profile.scm1265 csi.c: $(SRCDIR)csi.scm $(SRCDIR)banner.scm $(SRCDIR)chicken-more-macros.scm $(SRCDIR)private-namespace.scm 1266 $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@ -extend $(SRCDIR)private-namespace.scm 1267 chicken-profile.c: $(SRCDIR)chicken-profile.scm 1260 1268 $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@ 1261 chicken-install.c: chicken-install.scm setup-download.c setup-utils.c1269 chicken-install.c: $(SRCDIR)chicken-install.scm setup-download.c setup-utils.c 1262 1270 $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@ 1263 chicken-uninstall.c: chicken-uninstall.scm setup-utils.c1271 chicken-uninstall.c: $(SRCDIR)chicken-uninstall.scm setup-utils.c 1264 1272 $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@ 1265 chicken-status.c: chicken-status.scm setup-utils.c1273 chicken-status.c: $(SRCDIR)chicken-status.scm setup-utils.c 1266 1274 $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@ 1267 csc.c: csc.scm1275 csc.c: $(SRCDIR)csc.scm 1268 1276 $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@ 1269 chicken-bug.c: chicken-bug.scm1277 chicken-bug.c: $(SRCDIR)chicken-bug.scm 1270 1278 $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@ 1271 1279 1272 setup-api.c: setup-api.scm setup-utils.c1280 setup-api.c: $(SRCDIR)setup-api.scm setup-utils.c 1273 1281 $(CHICKEN) $< $(CHICKEN_DYNAMIC_OPTIONS) -emit-import-library setup-api -output-file $@ 1274 setup-download.c: setup-download.scm setup-utils.c1282 setup-download.c: $(SRCDIR)setup-download.scm setup-utils.c 1275 1283 $(CHICKEN) $< $(CHICKEN_DYNAMIC_OPTIONS) -emit-import-library setup-download -output-file $@ 1276 setup-utils.c: setup-utils.scm1284 setup-utils.c: $(SRCDIR)setup-utils.scm 1277 1285 $(CHICKEN) $< $(CHICKEN_DYNAMIC_OPTIONS) -emit-import-library setup-utils -output-file $@ 1278 1286 … … 1292 1300 1293 1301 dist: distfiles 1294 $(CSI) -s scripts/makedist.scm1302 $(CSI) -s $(SRCDIR)scripts/makedist.scm 1295 1303 1296 1304 # cleaning up … … 1299 1307 1300 1308 ifeq ($(PLATFORM),mingw) 1301 CLEAN_PCRE = pcre\*$(O)1309 CLEAN_PCRE = $(PCRE_DIR)*$(O) 1302 1310 CLEAN_MINGW_LIBS = libchickengui.a libchickengui.dll libchickengui.dll.a 1303 1311 else 1304 CLEAN_PCRE = pcre/*$(O)1312 CLEAN_PCRE = $(PCRE_DIR)*$(O) 1305 1313 CLEAN_MINGW_LIBS = 1306 1314 endif … … 1346 1354 compiler-check: 1347 1355 @echo "======================================== packing ..." 1348 $(MAKE) -f $(SRCDIR) /Makefile.$(PLATFORM) dist1356 $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) dist 1349 1357 $(REMOVE_COMMAND $(REMOVE_COMMAND_RECURSIVE_OPTIONS) tests/chicken-* 1350 1358 tar -C tests -xzf `ls -t chicken-*.tar.gz | head -1` 1351 1359 @echo "======================================== building stage 1 ..." 1352 $(MAKE) -f $(SRCDIR) /Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all1360 $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all 1353 1361 touch tests/chicken-*/*.scm 1354 1362 @echo "======================================== building stage 2 ..." 1355 $(MAKE) -f $(SRCDIR) /Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all1363 $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all 1356 1364 cat tests/chicken-*/*.c >tests/stage2.out 1357 1365 @echo "======================================== building stage 3 ..." 1358 $(MAKE) -f $(SRCDIR) /Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all1366 $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all 1359 1367 cat tests/chicken-*/*.c >tests/stage3.out 1360 1368 diff tests/stage2.out tests/stage3.out >tests/stages.diff … … 1367 1375 1368 1376 bootstrap: 1369 gzip -d -c $(SRCDIR) /bootstrap.tar.gz | tar xvf -1377 gzip -d -c $(SRCDIR)bootstrap.tar.gz | tar xvf - 1370 1378 touch *.c 1371 $(MAKE) -f $(SRCDIR) /Makefile.$(PLATFORM) STATICBUILD=1 DEBUGBUILD=1 \1379 $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 DEBUGBUILD=1 \ 1372 1380 chicken$(EXE) 1373 1381 cp chicken$(EXE) chicken-boot$(EXE) 1374 1382 touch *.scm 1375 1383 1376 bootstrap.tar.gz: posixunix.c posixwin.c $(IMPORT_LIBRARIES:=.import.c) 1377 tar cfz bootstrap.tar.gzlibrary.c eval.c data-structures.c ports.c files.c extras.c lolevel.c utils.c tcp.c \1384 $(SRCDIR)bootstrap.tar.gz: distfiles 1385 tar cfz $@ library.c eval.c data-structures.c ports.c files.c extras.c lolevel.c utils.c tcp.c \ 1378 1386 srfi-1.c srfi-4.c srfi-13.c srfi-14.c srfi-18.c srfi-69.c posixunix.c posixwin.c regex.c \ 1379 1387 scheduler.c profiler.c stub.c expand.c $(COMPILER_OBJECTS_1:=.c) -
chicken/branches/hygienic/runtime.c
r11973 r12021 207 207 # define FORWARDING_BIT_SHIFT 63 208 208 # define UWORD_FORMAT_STRING "0x%lx" 209 # define UWORD_COUNT_FORMAT_STRING "%ld" 209 210 #else 210 211 # define ALIGNMENT_HOLE_MARKER ((C_word)0xfffffffe) 211 212 # define FORWARDING_BIT_SHIFT 31 212 213 # define UWORD_FORMAT_STRING "0x%x" 214 # define UWORD_COUNT_FORMAT_STRING "%d" 213 215 #endif 214 216 … … 1304 1306 C_word arg_val(C_char *arg) 1305 1307 { 1306 int len; 1307 if (!arg) 1308 panic(C_text("required argument missing to runtime option")); 1309 len = C_strlen(arg); 1310 1311 if(len < 1) panic(C_text("illegal runtime-option argument")); 1312 1313 switch(arg[ len - 1 ]) { 1314 case 'k': 1315 case 'K': 1316 return atol(arg) * 1024; 1317 1318 case 'm': 1319 case 'M': 1320 return atol(arg) * 1024 * 1024; 1321 1322 case 'g': 1323 case 'G': 1324 return atol(arg) * 1024 * 1024 * 1024; 1325 1326 default: 1327 return atol(arg); 1328 } 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 } 1329 1332 } 1330 1333 … … 3205 3208 3206 3209 if(debug_mode) 3207 C_printf(C_text("[debug] resizing heap dynamically from " UWORD_ FORMAT_STRING " to " UWORD_FORMAT_STRING " bytes...\n"),3208 (C_uword)heap_size, size);3210 C_printf(C_text("[debug] resizing heap dynamically from " UWORD_COUNT_FORMAT_STRING "k to " UWORD_COUNT_FORMAT_STRING "k ...\n"), 3211 (C_uword)heap_size / 1000, size / 1000); 3209 3212 3210 3213 if(gc_report_flag) { … … 7776 7779 default: barf(C_BAD_ARGUMENT_TYPE_ERROR, "number->string", C_fix(radix)); 7777 7780 } 7781 } 7782 else if(!C_immediatep(num) && C_block_header(num) == C_FLONUM_TAG) { 7783 f = C_flonum_magnitude(num); 7784 7785 if(C_fits_in_unsigned_int_p(num) == C_SCHEME_TRUE) { 7786 switch(radix) { 7787 case 2: 7788 p = to_binary((unsigned int)f); 7789 goto fini; 7790 7791 case 8: 7792 C_sprintf(p = buffer, "%o", (unsigned int)f); 7793 goto fini; 7794 7795 case 16: 7796 C_sprintf(p = buffer, "%x", (unsigned int)f); 7797 goto fini; 7798 } 7799 } 7800 7801 #if defined(__CYGWIN__) || defined(__MINGW32__) 7802 if(C_isnan(f)) { 7803 C_strcpy(p = buffer, "+nan.0"); 7804 goto fini; 7805 } 7806 else if(C_isinf(f)) { 7807 C_sprintf(p = buffer, "%cinf.0", f > 0 ? '+' : '-'); 7808 goto fini; 7809 } 7810 #endif 7811 7812 #ifdef HAVE_GCVT 7813 C_gcvt(f, flonum_print_precision, buffer); 7814 #else 7815 C_sprintf(buffer, C_text("%.*g"), flonum_print_precision, f); 7816 #endif 7817 7818 if((p = C_strpbrk(buffer, C_text(".eE"))) == NULL) { 7819 if(*buffer == 'i' || *buffer == 'n') { /* inf or nan */ 7820 C_memmove(buffer + 1, buffer, C_strlen(buffer) + 1); 7821 *buffer = '+'; 7822 } 7823 else if(buffer[ 1 ] != 'i') C_strcat(buffer, C_text(".0")); /* negative infinity? */ 7824 } 7825 7826 p = buffer; 7827 } 7828 else 7829 barf(C_BAD_ARGUMENT_TYPE_ERROR, "number->string", num); 7778 7830 7779 7831 fini: … … 7788 7840 radix = C_string(&a, radix, p); 7789 7841 C_kontinue(k, radix); 7790 }7791 7792 if(!C_immediatep(num) && C_block_header(num) == C_FLONUM_TAG) {7793 f = C_flonum_magnitude(num);7794 7795 if(C_fits_in_unsigned_int_p(num) == C_SCHEME_TRUE) {7796 switch(radix) {7797 case 2:7798 p = to_binary((unsigned int)f);7799 goto fini;7800 7801 case 8:7802 C_sprintf(p = buffer, "%o", (unsigned int)f);7803 goto fini;7804 7805 case 16:7806 C_sprintf(p = buffer, "%x", (unsigned int)f);7807 goto fini;7808 }7809 }7810 7811 #if defined(__CYGWIN__) || defined(__MINGW32__)7812 if(C_isnan(f)) {7813 C_strcpy(p = buffer, "+nan.0");7814 goto fini;7815 }7816 else if(C_isinf(f)) {7817 C_sprintf(p = buffer, "%cinf.0", f > 0 ? '+' : '-');7818 goto fini;7819 }7820 #endif7821 7822 #ifdef HAVE_GCVT7823 C_gcvt(f, flonum_print_precision, buffer);7824 #else7825 C_sprintf(buffer, C_text("%.*g"), flonum_print_precision, f);7826 #endif7827 7828 if((p = C_strpbrk(buffer, C_text(".eE"))) == NULL) {7829 if(*buffer == 'i' || *buffer == 'n') { /* inf or nan */7830 C_memmove(buffer + 1, buffer, C_strlen(buffer) + 1);7831 *buffer = '+';7832 }7833 else if(buffer[ 1 ] != 'i') C_strcat(buffer, C_text(".0")); /* negative infinity? */7834 }7835 7836 p = buffer;7837 goto fini;7838 }7839 7840 barf(C_BAD_ARGUMENT_TYPE_ERROR, "number->string", num);7841 7842 } 7842 7843 -
chicken/branches/hygienic/scheduler.scm
r10712 r12021 36 36 ##sys#remove-from-ready-queue ##sys#unblock-threads-for-i/o ##sys#force-primordial 37 37 ##sys#fdset-input-set ##sys#fdset-output-set ##sys#fdset-clear 38 ##sys#fdset-select-timeout ##sys#fdset-restore 38 ##sys#fdset-select-timeout ##sys#fdset-restore ##sys#remove-from-timeout-list 39 39 ##sys#clear-i/o-state-for-thread!) 40 40 (foreign-declare #<<EOF … … 218 218 (define ##sys#timeout-list '()) 219 219 220 (define (##sys#remove-from-timeout-list t) 221 (let loop ((l ##sys#timeout-list) (prev #f)) 222 (if (null? l) 223 l 224 (let ((h (##sys#slot l 0)) 225 (r (##sys#slot l 1))) 226 (if (eq? (##sys#slot h 1) t) 227 (if prev 228 (set-cdr! prev r) 229 (set! ##sys#timeout-list r)) 230 (loop r l)))))) 231 220 232 (define (##sys#thread-block-for-timeout! t tm) 221 233 (dbg t " blocks for " tm) … … 247 259 (##sys#setislot t 11 #f) 248 260 (##sys#setislot t 8 '()) 261 (##sys#remove-from-timeout-list t) 249 262 (let ([rs (##sys#slot t 12)]) 250 263 (unless (null? rs) … … 413 426 414 427 ;;; Get list of all threads that are ready or waiting for timeout or waiting for I/O: 415 416 (define (##sys#all-threads) 417 (append ##sys#ready-queue-head 418 (apply append (map cdr ##sys#fd-list)) 419 (map cdr ##sys#timeout-list))) 428 ; 429 ; (contributed by Joerg Wittenberger) 430 431 (define (##sys#all-threads #!optional 432 (cns (lambda (queue arg val init) 433 (cons val init))) 434 (init '())) 435 (let loop ((l ##sys#ready-queue-head) (i init)) 436 (if (pair? l) 437 (loop (cdr l) (cns 'ready #f (car l) i)) 438 (let loop ((l ##sys#fd-list) (i i)) 439 (if (pair? l) 440 (loop (cdr l) 441 (let ((fd (caar l))) 442 (let loop ((l (cdar l))) 443 (if (null? l) i 444 (cns 'i/o fd (car l) (loop (cdr l))))))) 445 (let loop ((l ##sys#timeout-list) (i i)) 446 (if (pair? l) 447 (loop (cdr l) (cns 'timeout (caar l) (cdar l) i)) 448 i))))))) 420 449 421 450 … … 444 473 (define (##sys#thread-unblock! t) 445 474 (when (eq? 'blocked (##sys#slot t 3)) 446 ( set! ##sys#timeout-list (##sys#delq t ##sys#timeout-list))475 (##sys#remove-from-timeout-list t) 447 476 (set! ##sys#fd-list 448 477 (let loop ([fdl ##sys#fd-list]) -
chicken/branches/hygienic/srfi-69.scm
r10952 r12021 9 9 ; 10 10 ; Redistributions of source code must retain the above copyright notice, this list of conditions and the following 11 ; disclaimer. 11 ; disclaimer. 12 12 ; Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following 13 ; disclaimer in the documentation and/or other materials provided with the distribution. 13 ; disclaimer in the documentation and/or other materials provided with the distribution. 14 14 ; Neither the name of the author nor the names of its contributors may be used to endorse or promote 15 ; products derived from this software without specific prior written permission. 15 ; products derived from this software without specific prior written permission. 16 16 ; 17 17 ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS … … 49 49 (declare 50 50 (hide 51 unbound-value-thunk52 51 %object-uid-hash %eq?-hash %eqv?-hash %equal?-hash 53 52 %hash-table-copy %hash-table-ref %hash-table-update! %hash-table-merge! 54 53 %hash-table-for-each %hash-table-fold 54 %hash-table-rehash! %hash-table-check-resize! 55 %hash-table-update!/default 55 56 hash-table-canonical-length hash-table-rehash) ) 56 57 … … 58 59 59 60 (register-feature! 'srfi-69) 60 61 62 ;;; Unbound Value:63 64 (define-inline ($unbound-value)65 (##sys#slot '##sys#arbitrary-unbound-symbol 0))66 67 (define unbound-value-thunk (lambda () ($unbound-value)))68 69 (define-inline ($unbound? ?val)70 (eq? ($unbound-value) ?val) )71 61 72 62 … … 306 296 (define (%equal?-hash obj) 307 297 308 ; Recurse into some portion of the vector's slots 298 ; Recurse into some portion of the vector's slots 309 299 (define (vector-hash obj seed depth start) 310 300 (let ([len (##sys#size obj)]) … … 589 579 (thunk) ) ) 590 580 581 ;; %hash-table-rehash!: 582 583 (define (%hash-table-rehash! vec1 vec2 hash) 584 (let ([len1 (##sys#size vec1)] 585 [len2 (##sys#size vec2)] ) 586 (do ([i 0 (fx+ i 1)]) 587 [(fx>= i len1)] 588 (let loop ([bucket (##sys#slot vec1 i)]) 589 (unless (null? bucket) 590 (let* ([pare (##sys#slot bucket 0)] 591 [key (##sys#slot pare 0)] 592 [hshidx (hash key len2)] ) 593 (##sys#setslot vec2 hshidx 594 (cons (cons key (##sys#slot pare 1)) (##sys#slot vec2 hshidx))) 595 (loop (##sys#slot bucket 1)) ) ) ) ) ) ) 596 597 ;; %hash-table-resize!: 598 599 (define (%hash-table-resize! ht vec len) 600 (let* ([deslen (fxmin hash-table-max-length (fx* len hash-table-new-length-factor))] 601 [newlen (hash-table-canonical-length hash-table-prime-lengths deslen)] 602 [vec2 (make-vector newlen '())] ) 603 (%hash-table-rehash! vec vec2 (##sys#slot ht 4)) 604 (##sys#setslot ht 1 vec2) ) ) 605 606 ;; %hash-table-check-resize!: 607 608 #; ;UNUSED 609 (define %hash-table-check-resize! 610 ; Note that these are standard integrations! 611 (let ([floor floor] 612 [inexact->exact inexact->exact] 613 [* *] ) 614 (lambda (ht newsiz) 615 (let ([vec (##sys#slot ht 1)] 616 [min-load (##sys#slot ht 5)] 617 [max-load (##sys#slot ht 6)] ) 618 (let ([len (##sys#size vec)] ) 619 (let ([min-load-len (inexact->exact (floor (* len min-load)))] 620 [max-load-len (inexact->exact (floor (* len max-load)))] ) 621 (if (and (fx< len hash-table-max-length) 622 (fx<= min-load-len newsiz) (fx<= newsiz max-load-len)) 623 (%hash-table-resize! ht vec len) ) ) ) ) ) ) ) 624 625 (define-inline (%hash-table-check-resize! ht newsiz) 626 (let ([vec (##sys#slot ht 1)] 627 [min-load (##sys#slot ht 5)] 628 [max-load (##sys#slot ht 6)] ) 629 (let ([len (##sys#size vec)] ) 630 (let ([min-load-len (inexact->exact (floor (* len min-load)))] 631 [max-load-len (inexact->exact (floor (* len max-load)))] ) 632 (if (and (fx< len hash-table-max-length) 633 (fx<= min-load-len newsiz) (fx<= newsiz max-load-len)) 634 (%hash-table-resize! ht vec len) ) ) ) ) ) 635 591 636 ;; hash-table-copy: 592 637 … … 623 668 ;; Modified for ht props min & max load. 624 669 625 (define (hash-table-rehash vec1 vec2 hash) 626 (let ([len1 (##sys#size vec1)] 627 [len2 (##sys#size vec2)] ) 628 (do ([i 0 (fx+ i 1)]) 629 [(fx>= i len1)] 630 (let loop ([bucket (##sys#slot vec1 i)]) 631 (unless (null? bucket) 632 (let* ([pare (##sys#slot bucket 0)] 633 [key (##sys#slot pare 0)] 634 [hshidx (hash key len2)] ) 635 (##sys#setslot vec2 hshidx 636 (cons (cons key (##sys#slot pare 1)) 637 (##sys#slot vec2 hshidx))) 638 (loop (##sys#slot bucket 1)) ) ) ) ) ) ) 639 640 (define %hash-table-update! 641 (let ([core-eq? eq?] 642 [floor floor] ) 643 (lambda (ht key func thunk) 644 (let ([hash (##sys#slot ht 4)] 645 [test (##sys#slot ht 3)] 646 [newsiz (fx+ (##sys#slot ht 2) 1)] 647 [min-load (##sys#slot ht 5)] 648 [max-load (##sys#slot ht 6)] ) 649 (let re-enter () 650 (let* ([vec (##sys#slot ht 1)] 651 [len (##sys#size vec)] ) 652 (let ([min-load-len (inexact->exact (floor (* len min-load)))] 653 [max-load-len (inexact->exact (floor (* len max-load)))] 654 [hshidx (hash key len)] ) 655 ; Need to resize table? 656 (if (and (fx< len hash-table-max-length) 657 (fx<= min-load-len newsiz) (fx<= newsiz max-load-len)) 658 ; then resize the table: 659 (let ([vec2 (make-vector 660 (hash-table-canonical-length 661 hash-table-prime-lengths 662 (fxmin hash-table-max-length 663 (fx* len hash-table-new-length-factor))) 664 '())]) 665 (hash-table-rehash vec vec2 hash) 666 (##sys#setslot ht 1 vec2) 667 (re-enter) ) 668 ; else update the table: 669 (let ([bucket0 (##sys#slot vec hshidx)]) 670 (if (eq? core-eq? test) 671 ; Fast path (eq? is rewritten by the compiler): 672 (let loop ([bucket bucket0]) 673 (cond [(null? bucket) 674 (let ([val (func (thunk))]) 675 (##sys#setslot vec hshidx (cons (cons key val) bucket0)) 676 (##sys#setislot ht 2 newsiz) 677 val) ] 678 [else 679 (let ([pare (##sys#slot bucket 0)]) 680 (if (eq? key (##sys#slot pare 0)) 681 (let ([val (func (##sys#slot pare 1))]) 682 (##sys#setslot pare 1 val) 683 val) 684 (loop (##sys#slot bucket 1)) ) ) ] ) ) 685 ; Slow path 686 (let loop ([bucket bucket0]) 687 (cond [(null? bucket) 688 (let ([val (func (thunk))]) 689 (##sys#setslot vec hshidx (cons (cons key val) bucket0)) 690 (##sys#setislot ht 2 newsiz) 691 val) ] 692 [else 693 (let ([pare (##sys#slot bucket 0)]) 694 (if (test key (##sys#slot pare 0)) 695 (let ([val (func (##sys#slot pare 1))]) 696 (##sys#setslot pare 1 val) 697 val) 698 (loop (##sys#slot bucket 1)) ) ) ] ) ) ) ) ) ) ) ) ) ) ) ) 699 700 (define (hash-table-update! 701 ht key 702 #!optional (func identity) 703 (thunk 704 (let ([thunk (##sys#slot ht 9)]) 705 (or thunk 706 (lambda () 707 (##sys#signal-hook #:access-error 708 'hash-table-update! 709 "hash-table does not contain key" key ht)))))) 710 (##sys#check-structure ht 'hash-table 'hash-table-update!) 711 (##sys#check-closure func 'hash-table-update!) 712 (##sys#check-closure thunk 'hash-table-update!) 713 (%hash-table-update! ht key func thunk) ) 670 (define hash-table-update! 671 (let ([core-eq? eq?] ) 672 (lambda (ht key 673 #!optional (func identity) 674 (thunk 675 (let ([thunk (##sys#slot ht 9)]) 676 (or thunk 677 (lambda () 678 (##sys#signal-hook #:access-error 679 'hash-table-update! 680 "hash-table does not contain key" key ht)))))) 681 (##sys#check-structure ht 'hash-table 'hash-table-update!) 682 (##sys#check-closure func 'hash-table-update!) 683 (##sys#check-closure thunk 'hash-table-update!) 684 (let ([newsiz (fx+ (##sys#slot ht 2) 1)] ) 685 (%hash-table-check-resize! ht newsiz) 686 (let ([hash (##sys#slot ht 4)] 687 [test (##sys#slot ht 3)] 688 [vec (##sys#slot ht 1)] ) 689 (let* ([len (##sys#size vec)] 690 [hshidx (hash key len)] 691 [bucket0 (##sys#slot vec hshidx)] ) 692 (if (eq? core-eq? test) 693 ; Fast path (eq? is rewritten by the compiler): 694 (let loop ([bucket bucket0]) 695 (if (null? bucket) 696 (let ([val (func (thunk))]) 697 (##sys#setslot vec hshidx (cons (cons key val) bucket0)) 698 (##sys#setislot ht 2 newsiz) 699 val ) 700 (let ([pare (##sys#slot bucket 0)]) 701 (if (eq? key (##sys#slot pare 0)) 702 (let ([val (func (##sys#slot pare 1))]) 703 (##sys#setslot pare 1 val) 704 val) 705 (loop (##sys#slot bucket 1)) ) ) ) ) 706 ; Slow path 707 (let loop ([bucket bucket0]) 708 (if (null? bucket) 709 (let ([val (func (thunk))]) 710 (##sys#setslot vec hshidx (cons (cons key val) bucket0)) 711 (##sys#setislot ht 2 newsiz) 712 val ) 713 (let ([pare (##sys#slot bucket 0)]) 714 (if (test key (##sys#slot pare 0)) 715 (let ([val (func (##sys#slot pare 1))]) 716 (##sys#setslot pare 1 val) 717 val ) 718 (loop (##sys#slot bucket 1)) ) ) ) ) ) ) ) ) ) ) ) 719 720 (define %hash-table-update!/default 721 (let ([core-eq? eq?] ) 722 (lambda (ht key func def) 723 (let ([newsiz (fx+ (##sys#slot ht 2) 1)] ) 724 (%hash-table-check-resize! ht newsiz) 725 (let ([hash (##sys#slot ht 4)] 726 [test (##sys#slot ht 3)] 727 [vec (##sys#slot ht 1)] ) 728 (let* ([len (##sys#size vec)] 729 [hshidx (hash key len)] 730 [bucket0 (##sys#slot vec hshidx)] ) 731 (if (eq? core-eq? test) 732 ; Fast path (eq? is rewritten by the compiler): 733 (let loop ([bucket bucket0]) 734 (if (null? bucket) 735 (let ([val (func def)]) 736 (##sys#setslot vec hshidx (cons (cons key val) bucket0)) 737 (##sys#setislot ht 2 newsiz) 738 val ) 739 (let ([pare (##sys#slot bucket 0)]) 740 (if (eq? key (##sys#slot pare 0)) 741 (let ([val (func (##sys#slot pare 1))]) 742 (##sys#setslot pare 1 val) 743 val) 744 (loop (##sys#slot bucket 1)) ) ) ) ) 745 ; Slow path 746 (let loop ([bucket bucket0]) 747 (if (null? bucket) 748 (let ([val (func def)]) 749 (##sys#setslot vec hshidx (cons (cons key val) bucket0)) 750 (##sys#setislot ht 2 newsiz) 751 val ) 752 (let ([pare (##sys#slot bucket 0)]) 753 (if (test key (##sys#slot pare 0)) 754 (let ([val (func (##sys#slot pare 1))]) 755 (##sys#setslot pare 1 val) 756 val ) 757 (loop (##sys#slot bucket 1)) ) ) ) ) ) ) ) ) ) ) ) 714 758 715 759 (define (hash-table-update!/default ht key func def) 716 760 (##sys#check-structure ht 'hash-table 'hash-table-update!/default) 717 761 (##sys#check-closure func 'hash-table-update!/default) 718 (%hash-table-update! ht key func (lambda () def)) ) 719 720 (define (hash-table-set! ht key val) 721 (##sys#check-structure ht 'hash-table 'hash-table-set!) 722 (let ([thunk (lambda _ val)]) 723 (%hash-table-update! ht key thunk thunk) ) 724 (void) ) 762 (%hash-table-update!/default ht key func def) ) 763 764 (define hash-table-set! 765 (let ([core-eq? eq?] ) 766 (lambda (ht key val) 767 (##sys#check-structure ht 'hash-table 'hash-table-set!) 768 (let ([newsiz (fx+ (##sys#slot ht 2) 1)] ) 769 (%hash-table-check-resize! ht newsiz) 770 (let ([hash (##sys#slot ht 4)] 771 [test (##sys#slot ht 3)] 772 [vec (##sys#slot ht 1)] ) 773 (let* ([len (##sys#size vec)] 774 [hshidx (hash key len)] 775 [bucket0 (##sys#slot vec hshidx)] ) 776 (if (eq? core-eq? test) 777 ; Fast path (eq? is rewritten by the compiler): 778 (let loop ([bucket bucket0]) 779 (if (null? bucket) 780 (begin 781 (##sys#setslot vec hshidx (cons (cons key val) bucket0)) 782 (##sys#setislot ht 2 newsiz) ) 783 (let ([pare (##sys#slot bucket 0)]) 784 (if (eq? key (##sys#slot pare 0)) 785 (##sys#setslot pare 1 val) 786 (loop (##sys#slot bucket 1)) ) ) ) ) 787 ; Slow path 788 (let loop ([bucket bucket0]) 789 (if (null? bucket) 790 (begin 791 (##sys#setslot vec hshidx (cons (cons key val) bucket0)) 792 (##sys#setislot ht 2 newsiz) ) 793 (let ([pare (##sys#slot bucket 0)]) 794 (if (test key (##sys#slot pare 0)) 795 (##sys#setslot pare 1 val) 796 (loop (##sys#slot bucket 1)) ) ) ) ) ) 797 (void) ) ) ) ) ) ) 725 798 726 799 ;; Hash-Table Reference: 727 800 728 (define %hash-table-ref 801 (define hash-table-ref 802 (getter-with-setter 803 (let ([core-eq? eq?]) 804 (lambda (ht key #!optional (def (lambda () 805 (##sys#signal-hook #:access-error 806 'hash-table-ref 807 "hash-table does not contain key" key ht)))) 808 (##sys#check-structure ht 'hash-table 'hash-table-ref) 809 (##sys#check-closure def 'hash-table-ref) 810 (let ([vec (##sys#slot ht 1)] 811 [test (##sys#slot ht 3)] ) 812 (let* ([hash (##sys#slot ht 4)] 813 [hshidx (hash key (##sys#size vec))] ) 814 (if (eq? core-eq? test) 815 ; Fast path (eq? is rewritten by the compiler): 816 (let loop ([bucket (##sys#slot vec hshidx)]) 817 (if (null? bucket) 818 (def) 819 (let ([pare (##sys#slot bucket 0)]) 820 (if (eq? key (##sys#slot pare 0)) 821 (##sys#slot pare 1) 822 (loop (##sys#slot bucket 1)) ) ) ) ) 823 ; Slow path 824 (let loop ([bucket (##sys#slot vec hshidx)]) 825 (if (null? bucket) 826 (def) 827 (let ([pare (##sys#slot bucket 0)]) 828 (if (test key (##sys#slot pare 0)) 829 (##sys#slot pare 1) 830 (loop (##sys#slot bucket 1)) ) ) ) ) ) ) ) ) ) 831 hash-table-set!) ) 832 833 (define hash-table-ref/default 729 834 (let ([core-eq? eq?]) 730 835 (lambda (ht key def) 731 (let ([vec (##sys#slot ht 1)] 732 [test (##sys#slot ht 3)] ) 733 (let* ([hash (##sys#slot ht 4)] 734 [hshidx (hash key (##sys#size vec))] ) 836 (##sys#check-structure ht 'hash-table 'hash-table-ref/default) 837 (let ([vec (##sys#slot ht 1)] 838 [test (##sys#slot ht 3)] ) 839 (let* ([hash (##sys#slot ht 4)] 840 [hshidx (hash key (##sys#size vec))] ) 735 841 (if (eq? core-eq? test) 736 842 ; Fast path (eq? is rewritten by the compiler): 737 843 (let loop ([bucket (##sys#slot vec hshidx)]) 738 844 (if (null? bucket) 739 (def)845 def 740 846 (let ([pare (##sys#slot bucket 0)]) 741 847 (if (eq? key (##sys#slot pare 0)) … … 745 851 (let loop ([bucket (##sys#slot vec hshidx)]) 746 852 (if (null? bucket) 747 (def)853 def 748 854 (let ([pare (##sys#slot bucket 0)]) 749 855 (if (test key (##sys#slot pare 0)) … … 751 857 (loop (##sys#slot bucket 1)) ) ) ) ) ) ) ) ) ) ) 752 858 753 (define hash-table-ref 754 (getter-with-setter 755 (lambda (ht key #!optional (def (lambda () 756 (##sys#signal-hook #:access-error 757 'hash-table-ref 758 "hash-table does not contain key" key ht)))) 759 (##sys#check-structure ht 'hash-table 'hash-table-ref) 760 (##sys#check-closure def 'hash-table-ref) 761 (%hash-table-ref ht key def) ) 762 hash-table-set!)) 763 764 (define (hash-table-ref/default ht key default) 765 (##sys#check-structure ht 'hash-table 'hash-table-ref/default) 766 (%hash-table-ref ht key (lambda () default)) ) 767 768 (define (hash-table-exists? ht key) 769 (##sys#check-structure ht 'hash-table 'hash-table-exists?) 770 (not ($unbound? (%hash-table-ref ht key unbound-value-thunk))) ) 859 (define hash-table-exists? 860 (let ([core-eq? eq?]) 861 (lambda (ht key) 862 (##sys#check-structure ht 'hash-table 'hash-table-exists?) 863 (let ([vec (##sys#slot ht 1)] 864 [test (##sys#slot ht 3)] ) 865 (let* ([hash (##sys#slot ht 4)] 866 [hshidx (hash key (##sys#size vec))] ) 867 (if (eq? core-eq? test) 868 ; Fast path (eq? is rewritten by the compiler): 869 (let loop ([bucket (##sys#slot vec hshidx)]) 870 (and (not (null? bucket)) 871 (let ([pare (##sys#slot bucket 0)]) 872 (or (eq? key (##sys#slot pare 0)) 873 (loop (##sys#slot bucket 1)) ) ) ) ) 874 ; Slow path 875 (let loop ([bucket (##sys#slot vec hshidx)]) 876 (and (not (null? bucket)) 877 (let ([pare (##sys#slot bucket 0)]) 878 (or (test key (##sys#slot pare 0)) 879 (loop (##sys#slot bucket 1)) ) ) ) ) ) ) ) ) ) ) 771 880 772 881 ;; hash-table-delete!: … … 777 886 (##sys#check-structure ht 'hash-table 'hash-table-delete!) 778 887 (let* ([vec (##sys#slot ht 1)] 779 [len (##sys#size vec)] ) 780 (let* ([hash (##sys#slot ht 4)]781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 (loop bucket nxt)) ) ) ) ) ) ) ) ) ) )888 [len (##sys#size vec)] 889 [hash (##sys#slot ht 4)] 890 [hshidx (hash key len)] ) 891 (let ([test (##sys#slot ht 3)] 892 [newsiz (fx- (##sys#slot ht 2) 1)] 893 [bucket0 (##sys#slot vec hshidx)] ) 894 (if (eq? core-eq? test) 895 ; Fast path (eq? is rewritten by the compiler): 896 (let loop ([prev #f] [bucket bucket0]) 897 (and (not (null? bucket)) 898 (let ([pare (##sys#slot bucket 0)] 899 [nxt (##sys#slot bucket 1)]) 900 (if (eq? key (##sys#slot pare 0)) 901 (begin 902 (if prev 903 (##sys#setslot prev 1 nxt) 904 (##sys#setslot vec hshidx nxt) ) 905 (##sys#setislot ht 2 newsiz) 906 #t ) 907 (loop bucket nxt) ) ) ) ) 908 ; Slow path 909 (let loop ([prev #f] [bucket bucket0]) 910 (and (not (null? bucket)) 911 (let ([pare (##sys#slot bucket 0)] 912 [nxt (##sys#slot bucket 1)]) 913 (if (test key (##sys#slot pare 0)) 914 (begin 915 (if prev 916 (##sys#setslot prev 1 nxt) 917 (##sys#setslot vec hshidx nxt) ) 918 (##sys#setislot ht 2 newsiz) 919 #t ) 920 (loop bucket nxt) ) ) ) ) ) ) ) ) ) ) 812 921 813 922 ;; hash-table-remove!: … … 851 960 [(null? lst)] 852 961 (let ([b (##sys#slot lst 0)]) 853 (%hash-table-update! ht1 (##sys#slot b 0) 854 identity (lambda () (##sys#slot b 1))) ) ) ) ) ) 962 (%hash-table-update!/default ht1 (##sys#slot b 0) identity (##sys#slot b 1)) ) ) ) ) ) 855 963 856 964 (define (hash-table-merge! ht1 ht2) … … 887 995 (let ([ht (apply make-hash-table rest)]) 888 996 (for-each (lambda (x) 889 (%hash-table-update! ht (##sys#slot x 0) 890 identity (lambda () (##sys#slot x 1))) ) 997 (%hash-table-update!/default ht (##sys#slot x 0) identity (##sys#slot x 1)) ) 891 998 alist) 892 999 ht ) ) ) )
Note: See TracChangeset
for help on using the changeset viewer.