Changeset 2536 in project


Ignore:
Timestamp:
11/27/06 21:03:16 (14 years ago)
Author:
felix winkelmann
Message:

added loopy-loop, scgi fix by pbusser

Files:
6 added
20 edited

Legend:

Unmodified
Added
Removed
  • chicken/Buildfile

    r2488 r2536  
    194194(install-man (dest MANDIR) "chicken.1" "csi.1" "csc.1" "chicken-profile.1" "chicken-setup.1")
    195195(install-file (dest INCDIR) "chicken.h" "chicken-defaults.h" "chicken-config.h")
    196 (install-file (dest DOCDIR) "ChangeLog" "README" "LICENSE")
     196(install-file (dest DOCDIR) #;"ChangeLog" "README" "LICENSE")
    197197(install-file (path (dest DOCDIR) "html") (glob "html/*") )
    198198
     
    233233(depends "pcre.c" "regex-common.scm")
    234234(depends "regexunix.c" "regex-common.scm")
     235
     236(notfile "tags")
     237(actions "tags" ^{etags *.scm runtime.c chicken.h})
  • chicken/README

    r2488 r2536  
    33  (c)2000-2003 Felix L. Winkelmann
    44
    5   Version 2.505
     5  Version 2.506
    66
    77
  • chicken/build.scm

    r2488 r2536  
    1 (define-constant +build-version+ "2.505")
     1(define-constant +build-version+ "2.506")
  • chicken/buildversion

    r2488 r2536  
    1 2.505
     12.506
  • chicken/chicken.h

    r2443 r2536  
    14421442C_fctexport C_char *C_lookup_procedure_id(void *ptr);
    14431443C_fctexport void *C_lookup_procedure_ptr(C_char *id);
     1444C_fctexport C_word C_dunload(C_word name);
    14441445
    14451446#ifdef C_SIXTY_FOUR
  • chicken/csi.scm

    r2488 r2536  
    577577
    578578        (define (descseq name plen pref start)
    579           (##sys#call-with-current-continuation
    580            (lambda (return)
    581              (let ([len (fx- (plen x) start)])
    582                (when name (fprintf out "~A of length ~S~%" name len))
    583                (do ([i 0 (fx+ i 1)])
    584                    ((fx>= i len))
    585                  (when (fx>= i max-describe-lines)
    586                    (fprintf out "~% (~A elements not displayed)~%" (fx- len i))
    587                    (return #f) )
    588                  (fprintf out " ~S: ~S~%" i (pref x (fx+ start i))) ) ) ) ) )
     579          (let ((len (fx- (plen x) start)))
     580            (when name (fprintf out "~A of length ~S~%" name len))
     581            (let loop1 ((i 0))
     582              (cond ((fx>= i len))
     583                    ((fx>= i max-describe-lines)
     584                     (fprintf out "~% (~A elements not displayed)~%" (fx- len i)) )
     585                    (else
     586                     (let ((v (pref x (fx+ start i))))
     587                       (let loop2 ((n 1) (j (fx+ i (fx+ start 1))))
     588                         (cond ((fx>= j len)
     589                                (fprintf out " ~S: ~S" i v)
     590                                (if (fx> n 1)
     591                                    (fprintf out "\t(followed by ~A identical instances)~% ...~%" n)
     592                                    (newline out) )
     593                                (loop1 (fx+ i n)) )
     594                               ((eq? v (pref x j)) (loop2 (fx+ n 1) (fx+ j 1)))
     595                               (else (loop2 n len)) ) ) ) ) ) ) ) )
    589596
    590597        (when (##sys#permanent? x)
  • chicken/eval.scm

    r2488 r2536  
    11461146                           [##sys#current-load-file fname]
    11471147                           [##sys#current-load-path
    1148                             (let ((i (has-sep? fname)))
    1149                               (if i (##sys#substring fname 0 (fx+ i 1)) "") ) ]
     1148                            (and fname
     1149                                 (let ((i (has-sep? fname)))
     1150                                   (if i (##sys#substring fname 0 (fx+ i 1)) "") ) ) ]
    11501151                           [##sys#abort-load (lambda () (abrt #f))] )
    11511152                 (let ([in (if fname (open-input-file fname) input)])
  • chicken/library.scm

    r2443 r2536  
    30943094                 '(exn breakpoint)
    30953095                 (list '(exn . message) "*** breakpoint ***"
    3096                        '(exn . arguments) (cons name args)
     3096                       '(exn . arguments) (list (cons name args))
    30973097                       '(exn . location) name
    30983098                       '(exn . continuation) c) ) ) )
     
    42584258(define string-ref (getter-with-setter string-ref string-set!))
    42594259(define vector-ref (getter-with-setter vector-ref vector-set!))
     4260
     4261(define (##sys#dunload name)
     4262  (and-let* ((r (##core#inline "C_dunload" (##sys#make-c-string name))))
     4263    (##sys#gc #t)
     4264    #t) )
     4265
  • chicken/runtime.c

    r2197 r2536  
    17971797  if (lf_list == node) lf_list = node->next;
    17981798
     1799  C_free(node->module_name);
    17991800  C_free(node);
    18001801}
     
    81408141}
    81418142
     8143
    81428144#ifdef DLOAD_2_DEFINED
    81438145# undef DLOAD_2_DEFINED
     
    83518353}
    83528354#endif
     8355
     8356
     8357C_word C_ccall C_dunload(C_word name)
     8358{
     8359  LF_LIST *m = find_module_handle(C_c_string(name));
     8360
     8361  if(m == NULL) return C_SCHEME_FALSE;
     8362
     8363#ifndef NO_DLOAD2
     8364# if defined(__hpux__) && defined(HAVE_DL_H)
     8365  shl_unload((shl_t)m->module_handle);
     8366# elif defined(HAVE_DLFCN_H)
     8367  if(dlclose(m->module_handle) != 0) return C_SCHEME_FALSE;
     8368# elif defined(HAVE_LOADLIBRARY)
     8369  FreeLibrary(m->module_handle);
     8370# else
     8371  return C_SCHEME_FALSE;
     8372# endif
     8373# else
     8374  return C_SCHEME_FALSE;
     8375#endif
     8376
     8377  C_unregister_lf(m);
     8378  return C_SCHEME_TRUE;
     8379}
    83538380
    83548381
  • matcher/matcher.scm

    r2535 r2536  
    66
    77(module matcher (match match-lambda match-let match-let*)
     8
     9 (import registry)
     10 (import portability)
    811
    912 (define-syntax match
  • qt/main.cpp

    r2255 r2536  
    372372void qt_addcomboboxitem(qtwidget w, char *s) { ((QComboBox *)w)->addItem(s); }
    373373void qt_addlistwidgetitem(qtwidget w, char *s) { ((QListWidget *)w)->addItem(s); }
     374
     375void qt_addtreewidgetitem(qtwidget w, char *s)
     376{
     377  QStringList lst = QString(s).split("|");
     378  ((QTreeWidget *)w)->addTopLevelItem(new QTreeWidgetItem(lst));
     379}
     380
    374381char *qt_listwidgetitem(qtwidget w, int i) { return ((QListWidget *)w)->item(i)->text().toLatin1().data(); }
    375382qtsound qt_sound(char *filename) { return new QSound(filename); }
     
    393400  return QFileDialog::getSaveFileName(p, cap, dir, filter, 0, (QFileDialog::Options)opts).toLatin1().data();
    394401}
     402
     403
     404void qt_setheaders(qtwidget w, char *s) { ((QTreeWidget *)w)->setHeaderLabels(QString(s).split("|")); }
  • qt/prototypes.h

    r2255 r2536  
    4949void qt_addcomboboxitem(qtwidget w, char *s);
    5050void qt_addlistwidgetitem(qtwidget w, char *s);
     51void qt_addtreewidgetitem(qtwidget w, char *s);
    5152char *qt_listwidgetitem(qtwidget w, int i);
    5253char *qt_getexistingdirectory(qtwidget p, char *cap, char *dir, int opts);
    5354char *qt_getopenfilename(qtwidget p, char *cap, char *dir, char *filter, int opts);
    5455char *qt_getsavefilename(qtwidget p, char *cap, char *dir, char *filter, int opts);
     56void qt_setheaders(qtwidget w, char *s);
  • qt/qt-base.scm

    r2443 r2536  
    1111          <qt-receiver> <qt-timer> <qt-sound>
    1212          qt:get-open-filename qt:get-save-filename qt:get-directory
    13           qt:sound qt:play
     13          qt:sound qt:play qt:set-headers
    1414          initialize print-object) )
    1515
     
    138138  (cond ((string=? "QComboBox" (qt:classname w)) (qt:addcomboboxitem w x))
    139139        ((string=? "QListWidget" (qt:classname w)) (qt:addlistwidgetitem w x))
     140        ((string=? "QTreeWidget" (qt:classname w)) (qt:addtreewidgetitem w x))
    140141        (else (error 'qt:add "invalid widget" w x)) ) )
    141142
    142143(define (qt:item w i) (and (positive? i) (qt:listwidgetitem w i)))
    143144(define qt:clear qt:clearlistwidget)
     145
     146(define (qt:set-headers w x)
     147  (cond ((string=? "QTreeWidget" (qt:classname w)) (qt:setheaders w x))
     148        (else (error 'qt:add "invalid widget" w x)) ) )
    144149
    145150(define (file-dialog-options loc os)
  • qt/qt.setup

    r2443 r2536  
    2323  (macosx '("qt.html"))
    2424  (else '("qt.so" "qt.html")))
    25  '((version 0.3)
     25 '((version 0.4)
    2626   (documentation "qt.html") ) )
  • scgi/doc.scm

    r2532 r2536  
    1313     (author (url "http://www.chust.org/" "Thomas Chust"))
    1414     (history
     15      (version "1.1.1" "Replaced deprecated synch operations [Thanks to Peter Busser]")
    1516      (version "1.1.0" "Multiple query parameters of the same name are collected in a list now, single parameters are still atoms")
    1617      (version "1.0.0" "Initial version"))
  • scgi/scgi.html

    r2532 r2536  
    158158<h3>Version</h3>
    159159<ul>
     160<li>1.1.1 Replaced deprecated synch operations [Thanks to Peter Busser]</li>
    160161<li>1.1.0 Multiple query parameters of the same name are collected in a list now, single parameters are still atoms</li>
    161162<li>1.0.0 Initial version</li></ul></div>
  • scgi/scgi.scm

    r427 r2536  
    8282
    8383(define (scgi:request-method-handler name #!optional proc)
    84   (call/synch scgi:request-method-handlers
     84  (call-with/synch scgi:request-method-handlers
    8585    (lambda (ht)
    8686      (if proc
     
    9494
    9595(define (scgi:request-parameter-parser name #!optional proc)
    96   (call/synch scgi:request-parameter-parsers
     96  (call-with/synch scgi:request-parameter-parsers
    9797    (lambda (ht)
    9898      (if proc
     
    128128
    129129(define (scgi:add-resource name proc)
    130   (call/synch (scgi:resources)
     130  (call-with/synch (scgi:resources)
    131131    (lambda (resources)
    132132      (for-each
     
    135135
    136136(define (scgi:find-resource name)
    137   (call/synch (scgi:resources)
     137  (call-with/synch (scgi:resources)
    138138    (cut hash-table-ref/default <> name #f)))
    139139
    140140(define (scgi:remove-resource name)
    141   (call/synch (scgi:resources)
     141  (call-with/synch (scgi:resources)
    142142    (lambda (resources)
    143143      (for-each
     
    305305                "Allow"
    306306                (string-intersperse
    307                  (call/synch scgi:request-method-handlers
     307                 (call-with/synch scgi:request-method-handlers
    308308                   hash-table-keys)
    309309                 ", "))))))))
  • scgi/scgi.setup

    r439 r2536  
    1010  `("scgi.scm" ,so-file
    1111    "scgi.html" "egg.jpg")
    12   '((version "1.1.0") (documentation "scgi.html")))
     12  '((version "1.1.1") (documentation "scgi.html")))
  • syntax-case/syntax-case.scm

    r1928 r2536  
    513513        (and-let* ([a (getprop name '*sc-expander*)])
    514514          (eq? 'macro (car a)) ) ) )
    515     (register-feature! #:hygienic-macros #:syntax-case #:syntax-rules)
     515    (register-feature! #:hygienic-macros #:syntax-case #:syntax-rules #:psyntax)
    516516    (##syncase#install-macro-defs std-defs)
    517517    (##syncase#install-macro-defs srfi-0-def)
  • wiki/qt

    r2351 r2536  
    186186 [procedure] (qt:add WIDGET STRING)
    187187
    188 Adds a new entry to a {{QListWidget}} or {{QComboBox}}.
     188Adds a new entry to a {{QListWidget}}, {{QComboBox}} or {{QTreeWidget}}.
     189In the latter case, the columns should be separated by the {{|}} character (vertical bar).
    189190
    190191==== qt:item
     
    193194
    194195Returns the text of the {{QListWidget}} item with the given index.
     196
     197==== qt:set-headers
     198
     199 [procedure] (qt:set-headers WIDGET STRING)
     200
     201Sets the column headers in a {{QTreeWidget}}. Columns should be separated by the {{|}} character
     202(vertical bar).
    195203
    196204=== Dialogs
     
    331339=== History
    332340
     341; 0.4 : added basic support for
    333342; 0.3 : generated application bundle on Mac OS X
    334343; 0.2 : added file dialogs and QSound support, fixed bug by making qt:show "safe"
Note: See TracChangeset for help on using the changeset viewer.