(FILECREATED "14-May-86 08:04:43" {DSK}<LISPFILES>GREP.;1 2502   

      changes to:  (FNS DOGREP)

      previous date: " 5-Mar-86 12:15:18" {DANTE}<LISPNEW>LISPUSERS>GREP.;1)


(* Copyright (c) 1984, 1985, 1986 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT GREPCOMS)

(RPAQQ GREPCOMS ((FNS DOGREP GREP PHONE)
		   (FILES BSEARCH)
		   (INITVARS (PHONELISTFILES))))
(DEFINEQ

(DOGREP
  [LAMBDA (STR FILES)                                        (* Newman "14-May-86 08:04")

          (* * Originally coded by Larry Masinter.)



          (* * No longer permanently modifies the DSPFONT when DSPFONT is not the same as the DEFAULTFONT.
	  -DVN "14-May-86 08:03:59")


    (if (LISTP FILES)
	then (for FILE in FILES do (DOGREP STRS FILE))
      elseif (STRPOS "*" FILES)
	then (DOGREP STRS (DIRECTORY FILES NIL "*" ""))
      else (RESETLST (INFILE FILES)
			 (RESETSAVE NIL (LIST (QUOTE CLOSEF?)
						  (INPUT)))
			 (RESETSAVE NIL (LIST (QUOTE DSPFONT)
						  (DSPFONT)))
			 (bind FOUND for STR inside STRS
			    do (SETFILEPTR NIL 0)
				 (bind POS while (SETQ POS
						       (FFILEPOS STR NIL NIL NIL NIL NIL 
								   UPPERCASEARRAY))
				    do (OR FOUND (PROGN (PRINTOUT NIL T .FONT COMMENTFONT 
									"(from "
									(INPUT)
									")" .FONT DEFAULTFONT)
							      (SETQ FOUND T)))
					 (COPYCHARS
					   NIL T (OR (BFILEPOS [CONSTANT
								     (MKSTRING (CHARACTER
										   (CHARCODE CR]
								   (INPUT)
								   0 POS)
						       0)
					   POS)
					 (DSPFONT BOLDFONT)
					 [COPYCHARS NIL T POS (SETQ POS (IPLUS POS
										     (NCHARS STR]
					 (DSPFONT DEFAULTFONT)
					 (COPYCHARS NIL T POS (ADD1 (FILEPOS
									  (CHARACTER (CHARCODE
											 CR))
									  NIL POS])

(GREP
(LAMBDA (STRS FILES) (* lmm " 1-Apr-85 15:27") (RESETLST (DOGREP STRS FILES))))

(PHONE
  [LAMBDA (NAME)                                                       (* lmm 
                                                                           " 5-Mar-86 12:14")
    (GREP NAME (OR PHONELISTFILES (PROMPTFORWORD "Name of directory file: "])
)
(FILESLOAD BSEARCH)

(RPAQ? PHONELISTFILES )
(PUTPROPS GREP COPYRIGHT ("Xerox Corporation" 1984 1985 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (392 2368 (DOGREP 402 . 2000) (GREP 2002 . 2091) (PHONE 2093 . 2366)))))
STOP