Page 1 of 1

;; [text], [/text] tags for text longer 2048 bytes

Posted: Mon Oct 04, 2004 8:14 pm
by newdep
Hello Lutz,

[text] seems to be enabled for 'read-file and -read-buffer also.

That way im missing the option of reading bigger files in raw data (text)
into a buffer to verify the data for i.e. "\r\n\t"...

Files bigger then 2048 now always popup "formatted" in newlisp with [text]

Is it an option to disable/enable automatic use of [text] in 'read-file 'read-buffer...Or is there another option to bypass this using pack? perhpas?

Or is it just a visual effect?

Norman.

Posted: Wed Oct 06, 2004 4:59 pm
by Lutz
[text], [/text] delimiters leave the text unprocessed, this way you can use it when writing newLISP server with embedded HTML, which is then processed by the function CGI:put-page, and use the tags for other purposes wher you want unprocessed text. You could write a litle (display filename) function, which displayes the text in smaller portions, so you see the encoded characters:

(define (display filename)
(print (replace "\n" (read-file filename) "\\n" 0)))

Lutz

Posted: Wed Oct 06, 2004 5:53 pm
by newdep
ok thanks i see now the use of [text] in read-file/line.