core: Remove string-append.
* string.c (string_append): Remove. * module/mes/type-0.mes (string-append): New function. * module/mes/base-0.mes: Include type-0 without using string-append.
This commit is contained in:
parent
9d3e079a6d
commit
745b58e419
|
@ -112,6 +112,13 @@
|
|||
(list 'set-current-input-port (list open-input-file file))
|
||||
(list 'primitive-load)
|
||||
(list 'set-current-input-port (list 'pop! '*input-ports*))))
|
||||
|
||||
(define include load)
|
||||
(define-macro (include-from-path file)
|
||||
(list 'load (list string-append "module/" file)))
|
||||
|
||||
(include "module/mes/type-0.mes")
|
||||
|
||||
(define (memq x lst)
|
||||
(if (null? lst) #f
|
||||
(if (eq? x (car lst)) lst
|
||||
|
@ -148,11 +155,6 @@
|
|||
;; (list newline (list current-error-port))
|
||||
(list 'load (list string-append '*mes-prefix* (module->file module)))))))
|
||||
|
||||
(define include load)
|
||||
(define-macro (include-from-path file)
|
||||
(list 'load (list string-append "module/" file)))
|
||||
|
||||
(mes-use-module (mes type-0))
|
||||
(mes-use-module (srfi srfi-0))
|
||||
(mes-use-module (mes base))
|
||||
(mes-use-module (mes quasiquote))
|
||||
|
|
|
@ -114,8 +114,11 @@
|
|||
|
||||
|
||||
;;; core: accessors
|
||||
(define (string . lst)
|
||||
(make-cell <cell:string> lst 0))
|
||||
|
||||
(define (string->list s)
|
||||
(core:car s))
|
||||
|
||||
(define (string . lst)
|
||||
(make-cell <cell:string> lst 0))
|
||||
(define (string-append . rest)
|
||||
(apply string (apply append (map1 string->list rest))))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# -*-scheme-*-
|
||||
MES_ARENA=${MES_ARENA-5000000}
|
||||
MES_ARENA=${MES_ARENA-10000000}
|
||||
export MES_ARENA
|
||||
prefix=module/
|
||||
cat $prefix/mes/base-0.mes $0 /dev/stdin | $(dirname $0)/mes $MES_FLAGS "$@"
|
||||
|
|
14
string.c
14
string.c
|
@ -18,20 +18,6 @@
|
|||
* along with Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
SCM
|
||||
string_append (SCM x) ///((arity . n))
|
||||
{
|
||||
SCM p = cell_nil;
|
||||
while (x != cell_nil)
|
||||
{
|
||||
SCM s = car (x);
|
||||
assert (TYPE (s) == STRING);
|
||||
p = append2 (p, STRING (s));
|
||||
x = cdr (x);
|
||||
}
|
||||
return MAKE_STRING (p);
|
||||
}
|
||||
|
||||
SCM
|
||||
list_to_string (SCM x)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue