(FILECREATED "17-Jun-87 15:48:00" {QV}<NOTECARDS>1.3K>NEXT>RGPATCH049.;2 1760   

      changes to:  (VARS RGPATCH049COMS)
		   (FNS \TEDIT.SUBST.FN2)

      previous date: "17-Jun-87 15:43:30" {QV}<NOTECARDS>1.3K>NEXT>RGPATCH049.;1)


(* Copyright (c) 1987 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT RGPATCH049COMS)

(RPAQQ RGPATCH049COMS ((* * rg 6/17/87 bugfix for fixed-width wildcard search bug)
			 (* * new for KOTOTEDITPATCHES)
			 (FNS \TEDIT.SUBST.FN2)))
(* * rg 6/17/87 bugfix for fixed-width wildcard search bug)

(* * new for KOTOTEDITPATCHES)

(DEFINEQ

(\TEDIT.SUBST.FN2
  [LAMBDA (TEXTOBJ TARGETLIST TRIALSTART# END#)            (* Randy.Gobbel "17-Jun-87 15:40")
                                                             (* will return the start char of a wildcarded 
							     selection. returns NIL if selection is beyond bounds)
    (LET (INDEX)
         (COND
	   ((NULL TARGETLIST)
	     TRIALSTART#)
	   [(LITATOM (CAR TARGETLIST))
	     (COND
	       ((MEMBER (CAR TARGETLIST)
			  (QUOTE (%#)))                    (* fixed width wildcard)
		 (SETQ INDEX (\TEDIT.SUBST.FN1 TEXTOBJ (CDR TARGETLIST)
						   (ADD1 TRIALSTART#)
						   END#))
		 (AND (NUMBERP INDEX)
			(SUB1 INDEX)))
	       (T                                            (* variable width wildcard, so forget them)
		  (\TEDIT.SUBST.FN2 TEXTOBJ (CDR TARGETLIST)
				      TRIALSTART# END#]
	   (T                                                (* it's a string)
	      (TEDIT.FIND TEXTOBJ (CAR TARGETLIST)
			    TRIALSTART# END# NIL])
)
(PUTPROPS RGPATCH049 COPYRIGHT ("Xerox Corporation" 1987))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (596 1679 (\TEDIT.SUBST.FN2 606 . 1677)))))
STOP