source: project/chicken/trunk/patches/chicken-stuff.diff @ 15669

Last change on this file since 15669 was 15669, checked in by felix winkelmann, 11 years ago

added possible patch for combination unit

File size: 14.2 KB
  • chicken-stuff.scm

     
     1;;;; chicken-stuff.scm
     2
     3; Copyright (c) 2009, The Chicken Team
     4; All rights reserved.
     5;
     6; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
     7; conditions are met:
     8;
     9;   Redistributions of source code must retain the above copyright notice, this list of conditions and the following
     10;     disclaimer.
     11;   Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
     12;     disclaimer in the documentation and/or other materials provided with the distribution.
     13;   Neither the name of the author nor the names of its contributors may be used to endorse or promote
     14;     products derived from this software without specific prior written permission.
     15;
     16; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
     17; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
     18; AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
     19; CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     20; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
     21; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     22; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     23; OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     24; POSSIBILITY OF SUCH DAMAGE.
     25
     26
     27(declare
     28  (uses data-structures extras files ports))
  • chicken-stuff.import.scm

     
     1;;;; chicken-stuff.import.scm
     2
     3; Copyright (c) 2009, The Chicken Team
     4; All rights reserved.
     5;
     6; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
     7; conditions are met:
     8;
     9;   Redistributions of source code must retain the above copyright notice, this list of conditions and the following
     10;     disclaimer.
     11;   Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
     12;     disclaimer in the documentation and/or other materials provided with the distribution.
     13;   Neither the name of the author nor the names of its contributors may be used to endorse or promote
     14;     products derived from this software without specific prior written permission.
     15;
     16; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
     17; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
     18; AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
     19; CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     20; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
     21; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     22; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     23; OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     24; POSSIBILITY OF SUCH DAMAGE.
     25
     26
     27(##sys#register-primitive-module
     28 'chicken-stuff
     29 '(->string
     30   alist-ref
     31   alist-update!
     32   always?
     33   any?
     34   atom?
     35   binary-search
     36   butlast
     37   chop
     38   complement
     39   compose
     40   compress
     41   conc
     42   conjoin
     43   constantly
     44   disjoin
     45   each
     46   flatten
     47   flip
     48   identity
     49   intersperse
     50   join
     51   left-section
     52   list->queue
     53   list-of?
     54   make-queue
     55   merge
     56   merge!
     57   never?
     58   none?
     59   noop
     60   o
     61   project
     62   queue->list
     63   queue-add!
     64   queue-empty?
     65   queue-first
     66   queue-last
     67   queue-push-back!
     68   queue-push-back-list!
     69   queue-remove!
     70   queue?
     71   rassoc
     72   right-section
     73   shuffle
     74   sort
     75   sort!
     76   sorted?
     77   topological-sort
     78   string-chomp
     79   string-chop
     80   string-compare3
     81   string-compare3-ci
     82   string-intersperse
     83   string-split
     84   string-translate
     85   string-translate*
     86   substring-ci=?
     87   substring-index
     88   substring-index-ci
     89   substring=?
     90   tail?
     91   format
     92   fprintf
     93   pp
     94   pretty-print
     95   pretty-print-width
     96   printf
     97   random
     98   random-seed
     99   randomize
     100   read-byte
     101   read-file
     102   read-line
     103   read-lines
     104   read-string
     105   read-string!
     106   read-token
     107   sprintf
     108   write-byte
     109   write-line
     110   write-string
     111   delete-file*
     112   file-copy
     113   file-move
     114   make-pathname
     115   directory-null?
     116   make-absolute-pathname
     117   create-temporary-file
     118   decompose-pathname
     119   absolute-pathname?
     120   pathname-directory
     121   pathname-extension
     122   pathname-file
     123   pathname-replace-directory
     124   pathname-replace-extension
     125   pathname-replace-file
     126   pathname-strip-directory
     127   pathname-strip-extension
     128   normalize-pathname
     129   call-with-input-string
     130   call-with-output-string
     131   make-input-port
     132   make-output-port
     133   port-for-each
     134   port-map
     135   port-fold
     136   make-broadcast-port
     137   make-concatenated-port
     138   with-error-output-to-port
     139   with-input-from-port
     140   with-input-from-string
     141   with-output-to-port
     142   with-output-to-string
     143   with-error-output-to-port))
  • rules.make

     
    3131LIBCHICKEN_OBJECTS_1 = \
    3232       library eval data-structures ports files extras lolevel utils tcp srfi-1 srfi-4 srfi-13 \
    3333       srfi-14 srfi-18 srfi-69 $(POSIXFILE) regex scheduler \
    34        profiler stub expand chicken-syntax runtime
     34       profiler stub expand chicken-syntax chicken-stuff runtime
    3535LIBCHICKEN_SHARED_OBJECTS = $(LIBCHICKEN_OBJECTS_1:=$(O))
    3636LIBCHICKEN_STATIC_OBJECTS = $(LIBCHICKEN_OBJECTS_1:=-static$(O))
    3737
    3838LIBUCHICKEN_OBJECTS_1 = \
    3939       ulibrary ueval udata-structures uports ufiles uextras ulolevel uutils utcp usrfi-1 usrfi-4 \
    4040       usrfi-13 usrfi-14 usrfi-18 usrfi-69 u$(POSIXFILE) uregex scheduler \
    41        profiler stub expand chicken-syntax uruntime
     41       profiler stub expand chicken-syntax chicken-stuff uruntime
    4242LIBUCHICKEN_SHARED_OBJECTS = $(LIBUCHICKEN_OBJECTS_1:=$(O))
    4343LIBUCHICKEN_STATIC_OBJECTS = $(LIBUCHICKEN_OBJECTS_1:=-static$(O))
    4444
    4545LIBCHICKENGUI_OBJECTS_1 = \
    4646       library eval data-structures ports files extras lolevel utils tcp srfi-1 srfi-4 srfi-13 \
    4747       srfi-14 srfi-18 srfi-69 $(POSIXFILE) regex scheduler \
    48        profiler stub expand chicken-syntax gui-runtime
     48       profiler stub expand chicken-syntax chicken-stuff gui-runtime
    4949LIBCHICKENGUI_SHARED_OBJECTS = $(LIBCHICKENGUI_OBJECTS_1:=$(O))
    5050LIBCHICKENGUI_STATIC_OBJECTS = $(LIBCHICKENGUI_OBJECTS_1:=-static$(O))
    5151
     
    9595        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
    9696          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
    9797          $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
     98chicken-stuff$(O): chicken-stuff.c chicken.h $(CHICKEN_CONFIG_H)
     99        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
     100          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
     101          $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
    98102library$(O): library.c chicken.h $(CHICKEN_CONFIG_H)
    99103        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
    100104          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
     
    283287          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
    284288          $(C_COMPILER_STATIC_OPTIONS) \
    285289          $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
     290chicken-stuff-static$(O): chicken-stuff.c chicken.h $(CHICKEN_CONFIG_H)
     291        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
     292          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
     293          $(C_COMPILER_STATIC_OPTIONS) \
     294          $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
    286295library-static$(O): library.c chicken.h $(CHICKEN_CONFIG_H)
    287296        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
    288297          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
     
    498507        $(HOST_C_COMPILER) $(HOST_C_COMPILER_OPTIONS) $(HOST_C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) -DC_SHARED \
    499508          $(HOST_C_COMPILER_COMPILE_OPTION) $(HOST_C_COMPILER_OPTIMIZATION_OPTIONS) $(HOST_C_COMPILER_SHARED_OPTIONS) \
    500509          $(HOST_C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(HOST_C_COMPILER_OUTPUT)
     510chicken-stuff.import$(O): chicken-stuff.import.c chicken.h $(CHICKEN_CONFIG_H)
     511        $(HOST_C_COMPILER) $(HOST_C_COMPILER_OPTIONS) $(HOST_C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) -DC_SHARED \
     512          $(HOST_C_COMPILER_COMPILE_OPTION) $(HOST_C_COMPILER_OPTIMIZATION_OPTIONS) $(HOST_C_COMPILER_SHARED_OPTIONS) \
     513          $(HOST_C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(HOST_C_COMPILER_OUTPUT)
    501514posix.import$(O): posix.import.c chicken.h $(CHICKEN_CONFIG_H)
    502515        $(HOST_C_COMPILER) $(HOST_C_COMPILER_OPTIONS) $(HOST_C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) -DC_SHARED \
    503516          $(HOST_C_COMPILER_COMPILE_OPTION) $(HOST_C_COMPILER_OPTIMIZATION_OPTIONS) $(HOST_C_COMPILER_SHARED_OPTIONS) \
     
    884897        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)srfi-1.import.so
    885898        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)srfi-4.import.so
    886899        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)data-structures.import.so
     900        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)chicken-stuff.import.so
    887901        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)ports.import.so
    888902        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)files.import.so
    889903        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)posix.import.so
     
    949963        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) srfi-1.import.scm $(DESTDIR)$(IEGGDIR)
    950964        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) srfi-4.import.scm $(DESTDIR)$(IEGGDIR)
    951965        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) data-structures.import.scm $(DESTDIR)$(IEGGDIR)
     966        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) chicken-stuff.import.scm $(DESTDIR)$(IEGGDIR)
    952967        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) ports.import.scm $(DESTDIR)$(IEGGDIR)
    953968        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) files.import.scm $(DESTDIR)$(IEGGDIR)
    954969        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) posix.import.scm $(DESTDIR)$(IEGGDIR)
     
    973988        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) srfi-1.import.so $(DESTDIR)$(IEGGDIR)
    974989        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) srfi-4.import.so $(DESTDIR)$(IEGGDIR)
    975990        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) data-structures.import.so $(DESTDIR)$(IEGGDIR)
     991        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) chicken-stuff.import.so $(DESTDIR)$(IEGGDIR)
    976992        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) ports.import.so $(DESTDIR)$(IEGGDIR)
    977993        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) files.import.so $(DESTDIR)$(IEGGDIR)
    978994        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) posix.import.so $(DESTDIR)$(IEGGDIR)
     
    10571073        $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ -extend $(SRCDIR)private-namespace.scm
    10581074files.c: $(SRCDIR)files.scm $(SRCDIR)private-namespace.scm
    10591075        $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ -extend $(SRCDIR)private-namespace.scm
     1076chicken-stuff.c: $(SRCDIR)chicken-stuff.scm
     1077        $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@
    10601078extras.c: $(SRCDIR)extras.scm $(SRCDIR)private-namespace.scm
    10611079        $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@ -extend $(SRCDIR)private-namespace.scm
    10621080lolevel.c: $(SRCDIR)lolevel.scm
     
    11411159        $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
    11421160files.import.c: $(SRCDIR)files.import.scm
    11431161        $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
     1162chicken-stuff.import.c: $(SRCDIR)chicken-stuff.import.scm
     1163        $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
    11441164posix.import.c: $(SRCDIR)posix.import.scm
    11451165        $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
    11461166srfi-13.import.c: $(SRCDIR)srfi-13.import.scm
     
    12311251.PHONY: distfiles dist html
    12321252
    12331253distfiles: buildsvnrevision library.c eval.c expand.c chicken-syntax.c \
    1234         data-structures.c ports.c files.c extras.c lolevel.c utils.c \
     1254        data-structures.c ports.c files.c chicken-stuff.c extras.c lolevel.c utils.c \
    12351255        tcp.c srfi-1.c srfi-4.c srfi-13.c srfi-14.c srfi-18.c srfi-69.c \
    12361256        posixunix.c posixwin.c regex.c scheduler.c profiler.c stub.c \
    12371257        ulibrary.c ueval.c udata-structures.c uports.c ufiles.c uextras.c ulolevel.c \
     
    12801300
    12811301spotless: distclean testclean
    12821302        -$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) library.c eval.c data-structures.c \
    1283           ports.c files.c extras.c lolevel.c utils.c chicken-syntax.c \
     1303          ports.c files.c extras.c lolevel.c utils.c chicken-syntax.c chicken-stuff.c \
    12841304          tcp.c srfi-1.c srfi-4.c srfi-13.c srfi-14.c srfi-18.c srfi-69.c expand.c \
    12851305          posixunix.c posixwin.c regex.c scheduler.c profiler.c stub.c \
    12861306          ulibrary.c ueval.c udata-structures.c uports.c ufiles.c uextras.c ulolevel.c \
     
    13431363$(SRCDIR)bootstrap.tar.gz: distfiles
    13441364        tar cfz $@ library.c eval.c data-structures.c ports.c files.c extras.c lolevel.c utils.c tcp.c \
    13451365          srfi-1.c srfi-4.c srfi-13.c srfi-14.c srfi-18.c srfi-69.c posixunix.c posixwin.c regex.c \
    1346           scheduler.c profiler.c stub.c expand.c chicken-syntax.c \
     1366          scheduler.c profiler.c stub.c expand.c chicken-syntax.c chicken-stuff.c \
    13471367          $(COMPILER_OBJECTS_1:=.c)
    13481368
    13491369
  • eval.scm

     
    106106
    107107(define ##sys#core-library-modules
    108108  '(extras lolevel utils files tcp regex regex-extras posix srfi-1 srfi-4 srfi-13
    109            srfi-14 srfi-18 data-structures ports chicken-syntax))
     109           srfi-14 srfi-18 data-structures ports chicken-syntax chicken-stuff))
    110110
    111111(define ##sys#explicit-library-modules '())
    112112
Note: See TracBrowser for help on using the repository browser.