(FILECREATED " 6-AUG-83 16:46:34" {INDIGO}<LOOPS>COURSE>TRANSLATE.;3 5026   

      changes to:  (VARS TurtleIconFns)
		   (FNS InitializeTurtleIcons MakeLoopsMethod)

      previous date: " 5-AUG-83 14:43:51" {INDIGO}<LOOPS>LOOPSCOURSE>TRANSLATE.;1)


(PRETTYCOMPRINT TRANSLATECOMS)

(RPAQQ TRANSLATECOMS ((FNS InitializeTurtleIcons MakeLoopsMethod TranslateFunction ProcessForm)
		      (MACROS ←P)
		      (VARS TurtleIconFns PrettyTurtleFns SimpleTurtleFns TurtleIvs TurtleCvs)))
(DEFINEQ

(InitializeTurtleIcons
  [LAMBDA NIL                                                (* sg: " 6-AUG-83 16:33")
    (PutClassValue ($ Turtle)
		   (QUOTE WINDOW)
		   (fetch (TURTLE WINDOW) of TURTLE))
    (PROG ((OtherMethods SimpleTurtleFns))
          (for F in TurtleIconFns do (MakeLoopsMethod ($ Turtle)
						      F F T])

(MakeLoopsMethod
  [LAMBDA (Class Function Selector DontPrint)                (* sg: " 6-AUG-83 16:30")
    (PROG (DEF Ivs Cvs Methods)
          (COND
	    ((NULL Selector)
	      (SETQ Selector Function)))
          (SETQ Ivs (← Class List!(QUOTE Ivs)))
          (SETQ Cvs (← Class List!(QUOTE Cvs)))
          [SETQ Methods (CONS Function (← Class List!(QUOTE Methods]
          [COND
	    ((BOUNDP (QUOTE OtherMethods))
	      (SETQ Methods (APPEND OtherMethods Methods]
          (SETQ DEF (TranslateFunction Function Ivs Cvs Methods))
          [SETQ DEF (DM Class Selector (CADR DEF)
			(CONS [COND
				((EQ (CAAR (NTH DEF 4))
				     (QUOTE *))
				  (CAR (NTH DEF 4)))
				(T (QUOTE (* Created by MakeLoopsMethod]
			      (CDDR DEF]
          (COND
	    ((NULL DontPrint)
	      (printout T "Function " DEF " created" T)))
          (RETURN DEF])

(TranslateFunction
  [LAMBDA (Fn InstanceVars ClassVars Methods)                (* edited: "25-JUL-83 09:39")
    (PROG (DEF)
          [SETQ DEF (COPY (GETDEF Fn (QUOTE FNS]
          (RPLACA (CDR DEF)
		  (CONS (QUOTE self)
			(CADR DEF)))
          (RPLACD (CDR DEF)
		  (for Form in (CDDR DEF) collect (ProcessForm Form InstanceVars ClassVars Methods)))
          (RETURN DEF])

(ProcessForm
  [LAMBDA (Form InstanceVars ClassVars Methods)              (* sg: "26-JUL-83 14:29")
    (COND
      ((STRINGP Form)
	Form)
      ((ATOM Form)
	(COND
	  ((MEMBER Form InstanceVars)
	    (LIST (QUOTE @)
		  Form))
	  ((MEMBER Form ClassVars)
	    (LIST (QUOTE @@)
		  Form))
	  (Form)))
      ((SELECTQ (CAR Form)
		[COND (CONS (QUOTE COND)
			    (for F in (CDR Form) collect (CONS (ProcessForm (CAR F)
									    InstanceVars ClassVars 
									    Methods)
							       (for C in (CDR F)
								  collect (ProcessForm C InstanceVars 
										       ClassVars 
										       Methods]
		[SETQ (COND
			((MEMBER (CADR Form)
				 InstanceVars)
			  (LIST (QUOTE ←@)
				(CADR Form)
				(ProcessForm (CADDR Form)
					     InstanceVars ClassVars Methods)))
			(T (LIST (QUOTE SETQ)
				 (ProcessForm (CADR Form)
					      InstanceVars ClassVars Methods)
				 (ProcessForm (CADDR Form)
					      InstanceVars ClassVars Methods]
		[PROG (CONS (QUOTE PROG)
			    (CONS (CADR Form)
				  (for F in (CDDR Form) collect (ProcessForm F InstanceVars ClassVars 
									     Methods]
		(replace (COND
			   ((MEMBER (CADR Form)
				    InstanceVars)
			     (LIST (QUOTE ←@)
				   (CADR Form)
				   (ProcessForm (CAR (LAST Form))
						InstanceVars ClassVars Methods)))
			   ((MEMBER (CADR Form)
				    ClassVars)
			     (LIST (QUOTE ←@@)
				   (CADR Form)
				   (ProcessForm (CAR (LAST Form))
						InstanceVars ClassVars Methods)))
			   (T Form)))
		(fetch (COND
			 ((MEMBER (CADR Form)
				  InstanceVars)
			   (LIST (QUOTE @)
				 (CADR Form)))
			 ((MEMBER (CADR Form)
				  ClassVars)
			   (LIST (QUOTE @@)
				 (CADR Form)))
			 (T Form)))
		(* Form)
		(COND
		  [(MEMBER (CAR Form)
			   Methods)
		    (APPEND (LIST (QUOTE ←)
				  (QUOTE self)
				  (CAR Form))
			    (for F in (CDR Form) collect (ProcessForm F InstanceVars ClassVars 
								      Methods]
		  (T (CONS (CAR Form)
			   (for F in (CDR Form) collect (ProcessForm F InstanceVars ClassVars Methods]
)
)
(DECLARE: EVAL@COMPILE 

(PUTPROPS ←P MACRO [(obj action . args)
		    (PROG ((oBj obj))
		          (DECLARE (LOCALVARS oBj))
		          (RETURN (ADD.PROCESS (LIST (QUOTE DOAPPLY*)
						     (KWOTE (FetchMethodOrHelp oBj (QUOTE action)))
						     oBj . args)
					       (MKATOM (CONCAT (QUOTE obj)
							       "-"
							       (QUOTE action])
)

(RPAQQ TurtleIconFns (ComputeTurtleArrayIndex DrawTurtle EraseTurtle DRAW TREE TRITRI))

(RPAQQ PrettyTurtleFns (PRETTY0 PRETTY1 PRETTY2 PRETTY3))

(RPAQQ SimpleTurtleFns (FORWARD JUMP POINT CENTER CLEAR TURN))

(RPAQQ TurtleIvs ((ERASED? T)
		  (CURRENTX 0)
		  (CURRENTY 0)
		  (HEADING 0)))

(RPAQQ TurtleCvs (WINDOW (fetch (TURTLE WINDOW)
				of TURTLE)))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (492 4261 (InitializeTurtleIcons 502 . 861) (MakeLoopsMethod 863 . 1737) (
TranslateFunction 1739 . 2144) (ProcessForm 2146 . 4259)))))
STOP