(FILECREATED "17-Jul-86 00:30:11" ("compiled on " {ERIS}LIBRARY>CMLSORT.;12) "15-Jul-86 23:17:21" "COMPILE-FILEd" in "Xerox Lisp 15-Jul-86 ..." dated "15-Jul-86 23:40:47") (FILECREATED " 2-Jul-86 17:17:04" {ERIS}LIBRARY>CMLSORT.;12 13689 changes to: (VARS CMLSORTCOMS) (FUNCTIONS CL:SORT STABLE-SORT CL:MERGE APPLY-PRED %%SORT-VECTOR SORT-PREFIX APPLY-KEY %%SORT-LIST %%STABLE-SORT-VECTOR %%MERGE-LISTS* %%MERGE-VECTORS* %%MERGE-NON-SIMPLE-VECTORS) (FNS STABLE-SORT %%STABLE-SORT-VECTOR %%MERGE-LISTS*) (PROPS (CMLSORT FILETYPE)) previous date: " 1-Jul-86 18:09:23" {ERIS}LIBRARY>CMLSORT.;11) (RPAQQ CMLSORTCOMS ((* * "Section 14.5 Merging and Sorting -- By Kelly Roach.") (DECLARE: DONTCOPY DOEVAL@COMPILE (FILES CMLSEQCOMMON) (FUNCTIONS APPLY-KEY APPLY-PRED SORT-PREFIX)) (FUNCTIONS CL:SORT %%SORT-VECTOR %%SORT-LIST) (FUNCTIONS STABLE-SORT %%STABLE-SORT-VECTOR) (FUNCTIONS CL:MERGE %%MERGE-LISTS* %%MERGE-VECTORS* %%MERGE-NON-SIMPLE-VECTORS) (PROP FILETYPE CMLSORT))) expand-APPLY-KEY D1 (L (1 $$MACRO-ENVIRONMENT 0 $$MACRO-FORM)) !@!H¹HºgIgIJhJhNIL (22Q FUNCALL 16Q CL:IF) () (SETF-MACRO-FUNCTION (QUOTE APPLY-KEY) (QUOTE expand-APPLY-KEY)) expand-APPLY-PRED D1 (L (1 $$MACRO-ENVIRONMENT 0 $$MACRO-FORM)) G@aH¹HZ»J\½L¾gNgMgNIhgNKhhgMIKhhNIL (67Q FUNCALL 51Q FUNCALL 40Q FUNCALL 34Q FUNCALL 30Q CL:IF) () (SETF-MACRO-FUNCTION (QUOTE APPLY-PRED) (QUOTE expand-APPLY-PRED)) expand-SORT-PREFIX D1 (L (1 $$MACRO-ENVIRONMENT 0 $$MACRO-FORM)) oNIL NIL ( 3 (PROG ((STACK NIL) (RES NIL)) CALL (CL:WHEN (NULL LIST) (SETQ RES NIL) (GO RETURN)) (CL:WHEN (< HEIGHT 1) (SETQ RES (RPLACD (PROG1 LIST (CL:POP LIST)) NIL)) (GO RETURN)) (CL:PUSH HEIGHT STACK) (DECF HEIGHT) (CL:PUSH (QUOTE S1) STACK) (GO CALL) S1 (SETQ HEIGHT (1- (CAR STACK))) (CL:PUSH RES STACK) (CL:PUSH (QUOTE S2) STACK) (GO CALL) S2 (SETQ RES (%%MERGE-LISTS* (CL:POP STACK) RES PRED KEY)) (SETQ HEIGHT (CL:POP STACK)) (GO RETURN) RETURN (CASE (CL:POP STACK) (S1 (GO S1)) (S2 (GO S2)) (T (RETURN RES))))) (SETF-MACRO-FUNCTION (QUOTE SORT-PREFIX) (QUOTE expand-SORT-PREFIX)) CL:SORT D1 (L (0 -args-)) ]ekaQlaºHl¼»LdKó²¿h½I^dlð§do²JM agð•LkØa°ßLlÔ\°Ñ ´ IJM gNo (132Q CHECK-TYPE-FAIL 116Q %%SORT-VECTOR 106Q VECTORP 57Q %%SORT-LIST) (122Q SEQUENCE 64Q :KEY) ( 127Q (OR LIST VECTOR) 47Q (NIL)) %%SORT-VECTOR D1 (L (2 KEY 1 PRED 0 VECTOR)) Ïð@ kÕjh¸HH¸[½HH¸\¾B—@L¶YkBƒ@L¶YºNM ³f@M¶_¿B•OkBOJlA²+@_¿N_¿OOO·¿NkÔ^M ³5@N¶_¿JB›OkB‡MkÕ½°µOlA²Û@_¿M_¿OOO·¿MkÕ½°—@_¿N_¿IOO·¿LNkÕýó™LH¸NkÕH¸KMkÔóšMkÔH¸KHX€H’±ÿE@(140Q %%= 57Q %%= 6 CL:LENGTH) NIL () %%SORT-LIST D1 (L (2 KEY 1 PRED 0 LIST)) tj1@¡IHkÔIhº@£h[°9kHóœ@db¿dh¿[°(HJºHkÕ¸gJ°Ûgð²1JJºKAB »JJº¿JJºdgð²Þ¿JkÕ¸KJºgJ°¦KAB ¹¸°“(156Q %%MERGE-LISTS* 104Q %%MERGE-LISTS*) (144Q S2 124Q S1 66Q S2 57Q S1) () STABLE-SORT D1 (L (0 -args-)) ]ekaQlaºHl¼»LdKó²¿h½I^dlð§do²JM agð•LkØa°ßLlÔ\°Ñ ´ IJM gNo (132Q CHECK-TYPE-FAIL 116Q %%STABLE-SORT-VECTOR 106Q VECTORP 57Q %%SORT-LIST) (122Q SEQUENCE 64Q :KEY) ( 127Q (OR LIST VECTOR) 47Q (NIL)) %%STABLE-SORT-VECTOR D1 (L (2 KEY 1 PRED 0 VECTOR)) "@@g AB ¹HIgjgh @(36Q CL:REPLACE 17Q %%SORT-LIST 12Q CL:COERCE) (31Q :END1 25Q :START1 7 LIST) () CL:MERGE D1 (L (0 -args-))  eka± laºla»la¼Hl¾½NdMó¿g_¿Id³°agð•NkØa°ìNlÔ^°Ý_dgð²Z¿J_dlð³ do³ ´J ‹gOo K_dlð³ do³ ´K ‹gOo LO gð®Ogð§Ogð´^J_dlð¦do—g ° ´J‹gOo K_dlð¦do—g ° ´K‹gOo LO (421Q %%MERGE-VECTORS* 413Q CHECK-TYPE-FAIL 373Q VECTORP 366Q LIST-TO-VECTOR* 340Q CHECK-TYPE-FAIL 320Q VECTORP 313Q LIST-TO-VECTOR* 240Q %%MERGE-LISTS 232Q CHECK-TYPE-FAIL 215Q VECTOR-TO-LIST* 207Q VECTORP 162Q CHECK-TYPE-FAIL 145Q VECTOR-TO-LIST* 137Q VECTORP) (402Q SEQUENCE2 363Q VECTOR 327Q SEQUENCE1 310Q VECTOR 262Q STRING 253Q ARRAY 244Q VECTOR 221Q SEQUENCE2 151Q SEQUENCE1 106Q LIST 60Q :KEY 42Q IDENTITY) ( 410Q (OR LIST VECTOR) 356Q (NIL) 335Q (OR LIST VECTOR) 303Q (NIL) 227Q (OR LIST VECTOR) 201Q (NIL) 157Q (OR LIST VECTOR) 131Q (NIL)) %%MERGE-LISTS* D1 (L (3 KEY 2 PRED 1 LIST2 0 LIST1)) LghH¹@“A«@¢IAI@¿HCšAkC@kCƒA@lBIA¿I¹Ab¿°ÎI@¿I¹@b°ÂNIL (2 HEADER) () %%MERGE-VECTORS* D1 (L (3 KEY 2 PRED 1 VECTOR2 0 VECTOR1)) @ABC (6 %%MERGE-NON-SIMPLE-VECTORS) NIL () %%MERGE-NON-SIMPLE-VECTORS D1 (L (3 KEY 2 PRED 1 VECTOR2 0 VECTOR1)) Ì@ áA ¹HIÔZg@ »j\]¾JLó¡KMH ²(LdJ ’±’¿K_¿L_¿AN¶OO·¿LkÔ¼NkÔ¾°ÜNI ²&LdJ ³f¿K_¿L_¿@M¶OO·¿LkÔ¼MkÔ½°ÞCœAN¶kC@M¶kC…AN¶@M¶lB²K_¿L_¿AN¶OO·¿NkÔ¾°K_¿L_¿@M¶OO·¿MkÔ½LkÔ¼±ÿW(136Q %%= 126Q %%= 61Q %%= 51Q %%= 31Q MAKE-ARRAY 26Q ARRAY-ELEMENT-TYPE 12Q CL:LENGTH 3 CL:LENGTH) (22Q :ELEMENT-TYPE) () (PUTPROPS CMLSORT FILETYPE COMPILE-FILE) (PUTPROPS CMLSORT COPYRIGHT ("Xerox Corporation" 1986)) STOP