You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GREP: avoids tedit-file formatting, font change chars in Lisp source files, adds TGREP (#1513)
* GREP: avoids tedit-file formatting, font change chars in Lisp source files, adds TGREP
* Oops, TAB is not a fontchange character
* Updated documentation GREP.TEDIT
* Avoids EXPORTS.ALL by doing SYSREC1
* Don't change the outcharfn
* Make it work on Tedit files
* Print out the filename instead of the stream for Tedit files
(* ;; "Edited 18-Jun-2022 10:38 by rmk: Search for linebreaks directly, without calling BFILEPOS or FILEPOS just for EOL character. Also now compatible with external formats (if FFILEPOS is), and upgraded to full directory specification")
30
+
(* Newman "14-May-86 08:04")
30
31
(* Newman "14-May-86 08:04")
31
32
32
33
(* ;;; "Originally coded by Larry Masinter.")
@@ -46,58 +47,89 @@ Copyright (c) 1984-1986 by Xerox Corporation.
46
47
(STREAM (OR (FINDFILE FILES T)
47
48
FILES)
48
49
:DIRECTION :INPUT)
49
-
(bind FOUND for STR inside STRS first (SETFILEINFO STREAM 'ENDOFSTREAMOP
50
-
(FUNCTION NILL))
50
+
(for STR FOUND FILENAME inside STRS first (SETQ FILENAME (FULLNAME STREAM))
(PRINTOUT OUTSTREAM T T .FONT BOLDFONT "(from " FILENAME ")" .FONT
62
+
DEFAULTFONT T)
63
+
(SETQ FOUND T))
57
64
58
65
(* ;; "Copying from the beginning of this line. Originally this used BFILEPOS (backwards FILEPOS?), which did repeated calls to forward FFILEPOS in what appears to be a binary set of probes. But FFILEPOS is really SLOW-POS for a single character, and the last line-start is presumaby not that far back. So just walk backwards.")
59
66
60
-
(COPYCHARS STREAM OUTSTREAM (DO (SELCHARQ (\BACKCCODE.EOLC STREAM
61
-
'ANY)
62
-
(EOL (\INCCODE.EOLC STREAM)
63
-
(RETURN (GETFILEPTR STREAM)))
64
-
(NIL (RETURN 0))
65
-
NIL))
66
-
POS)
67
+
(SETQ STARTPOS (DO (SELCHARQ (\BACKCCODE.EOLC STREAM 'ANY)
0 commit comments