[[project @ 2000-10-12 18:58:28 by ghouston] ghouston**20001012185828 Ignore-this: c2e1f2c5cc5175dcfb33637f74df0ed0 2000-10-12 Gary Houston * rx/re-low.scm (compile-posix-re->c-struct cre-search, cre-search?): use (regex spencer). * init.scm: use the guilerxspencer module, distributed separately, instead of the regex routines in guile-core. Scsh takes advantage of the support for embedded ASCII nuls in Spencer's library. ] hunk ./ChangeLog 1 +2000-10-12 Gary Houston + + * rx/re-low.scm (compile-posix-re->c-struct cre-search, cre-search?): + use (regex spencer). + + * init.scm: use the guilerxspencer module, distributed + separately, instead of the regex routines in guile-core. + Scsh takes advantage of the support for embedded ASCII nuls + in Spencer's library. + hunk ./INCOMPAT 2 +==== hunk ./INCOMPAT 8 -there's a problem with compiling regular expressions: the POSIX regex -library doesn't support imbedded NUL characters. this probably causes -numerous problems, e.g.,: - -compare the posix string in the result of (rx (- alpha ("ae"))) -with the one in (rx (- alpha ("aei"))): the latter contains garbage -and can't be used. - hunk ./INCOMPAT 9 +======================================== hunk ./README 1 -This is an incomplete port of the scheme shell (scsh) 0.5.2 to Guile. +This is an incomplete port of the scheme shell, scsh 0.5.2 to Guile. hunk ./README 7 +Prerequisites for guile-scsh: + +SLIB must be available to Guile: see the guile reference manual for +information on installing SLIB (FIXME: we may be able to do without +SLIB). + +The guilerxspencer module must be installed. It's available from +http://arglist.com/guile/ +(FIXME: use modules, so that guilerxspencer is only needed if using +the scsh regex stuff). + hunk ./README 24 -The configure prefix must match the one used for Guile itself. +See the INSTALL file for more details. + +For now, the configure prefix must match the one where Guile is installed. +(FIXME: use guile-config to find the installation directory). hunk ./README 39 -Note that SLIB must be available to Guile: see the guile reference -manual for information on installing SLIB. - hunk ./README 41 -using call-with-values or receive. +using call-with-values or receive. FIXME: check modern multiple values +usage in guile-core. + +FIXME: delete the autogenerated files from the repository and remove +the text below. hunk ./init.scm 27 +;; FIXME: check whether slib is still necessary. hunk ./init.scm 56 +(use-modules (regex spencer)) + hunk ./rx/re-low.scm 65 - ;; Guile make-regexp, regexp-exec can't handle REG_NOSUB so ignore "sm?" - ;; for now. - (make-regexp re-string)) + (regcomp re-string (logior REG_EXTENDED REG_PEND (if sm? 0 REG_NOSUB)))) hunk ./rx/re-low.scm 101 - (retcode (regexp-exec C-bytes str start)) + (retcode (regexec C-bytes str REG_STARTEND -1 start)) hunk ./rx/re-low.scm 104 - (vector-set! start-vec 0 (car (vector-ref retcode 1))) - (vector-set! end-vec 0 (cdr (vector-ref retcode 1))) + (vector-set! start-vec 0 (regmatch:start retcode 0)) + (vector-set! end-vec 0 (regmatch:end retcode 0)) hunk ./rx/re-low.scm 110 - (let ((k (car (vector-ref retcode j-scm))) - (l (cdr (vector-ref retcode j-scm)))) + (let ((k (regmatch:start retcode j-scm)) + (l (regmatch:end retcode j-scm))) hunk ./rx/re-low.scm 135 - (let* ((C-bytes (or (cre:bytes cre) + (let* ((C-bytes (or (cre:bytes/nm cre) hunk ./rx/re-low.scm 137 - re-str #t))) - (set-cre:bytes cre C-bytes) - C-bytes))) - (retcode (regexp-exec C-bytes str start))) - (and retcode #t))))) + re-str #f))) + (set-cre:bytes/nm cre C-bytes) + C-bytes)))) + (regexec C-bytes str REG_STARTEND 0 start)))))