From d4b55b57874770ebaf0bd0f79b91ff40a6d94b94 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sat, 28 May 2011 07:00:13 +0000 Subject: * lisp/core.lisp.in: Define and export readLine and readbyte. * interp/sys-utility.boot (readByteFromFile): Remove. * boot/tokens.boot: Don't rename readLine and readByte. * boot/includer.boot (shoeReadLine): Remove. (bRgen1): Adjust. Use resdLine. * algebra/net.spad.pamphlet (InputBinaryFile): Use readByte from the runtime system. --- src/boot/strap/includer.clisp | 10 +++++----- src/boot/strap/tokens.clisp | 2 -- src/boot/strap/translator.clisp | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) (limited to 'src/boot/strap') diff --git a/src/boot/strap/includer.clisp b/src/boot/strap/includer.clisp index ad66a280..e74c7ea1 100644 --- a/src/boot/strap/includer.clisp +++ b/src/boot/strap/includer.clisp @@ -24,8 +24,6 @@ (T (READ-FROM-STRING (CONCAT "(" (|subString| |s| |n| (- |l| |n|)) ")")))))))) -(DEFUN |shoeReadLine| (|stream|) (READ-LINE |stream| NIL NIL)) - (DEFUN |shoeConsole| (|line|) (WRITE-LINE |line| *TERMINAL-IO*)) (DEFUN |shoeSpaces| (|n|) (|makeString| |n| (|char| '|.|))) @@ -135,9 +133,11 @@ (DEFUN |bRgen1| (|s|) (PROG (|a|) (RETURN - (COND - ((SETQ |a| (|shoeReadLine| |s|)) (CONS |a| (|bRgen| |s|))) - (T (LIST '|nullstream|)))))) + (PROGN + (SETQ |a| (|readLine| |s|)) + (COND + ((NOT (EQUAL |a| |%nothing|)) (CONS |a| (|bRgen| |s|))) + (T (LIST '|nullstream|))))))) (DEFUN |bIgen| (|n|) (|bDelay| #'|bIgen1| (LIST |n|))) diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp index 7a5a473e..5465289e 100644 --- a/src/boot/strap/tokens.clisp +++ b/src/boot/strap/tokens.clisp @@ -235,9 +235,7 @@ (LIST '|not| 'NOT) (LIST '|null| 'NULL) (LIST '|odd?| 'ODDP) (LIST '|or| 'OR) (LIST '|otherwise| 'T) (LIST '|property| 'GET) - (LIST '|readByte| 'READ-BYTE) (LIST '|readInteger| 'PARSE-INTEGER) - (LIST '|readLine| 'READ-LINE) (LIST '|readLispFromString| 'READ-FROM-STRING) (LIST '|readOnly?| 'CONSTANTP) (LIST '|removeDuplicates| 'REMDUP) diff --git a/src/boot/strap/translator.clisp b/src/boot/strap/translator.clisp index 63cd603a..b7170014 100644 --- a/src/boot/strap/translator.clisp +++ b/src/boot/strap/translator.clisp @@ -1221,7 +1221,7 @@ (PROG (|stream| |b| |a|) (RETURN (PROGN - (SETQ |a| (READ-LINE)) + (SETQ |a| (|readLine| *STANDARD-INPUT*)) (COND ((EQL (LENGTH |a|) 0) (WRITE-LINE "Boot Loop; to exit type ] ") (BOOTLOOP)) @@ -1236,7 +1236,7 @@ (PROG (|stream| |b| |a|) (RETURN (PROGN - (SETQ |a| (READ-LINE)) + (SETQ |a| (|readLine| *STANDARD-INPUT*)) (COND ((EQL (LENGTH |a|) 0) (WRITE-LINE "Boot Loop; to exit type ] ") (BOOTPO)) -- cgit v1.2.3