(FILECREATED "20-Jul-86 15:26:26" {ERIS}<TAMARIN>UCODE>RIVER.;7 3759
changes to: (FNS MakeCifRiverOutput RiverRoute DisplayRiverRoute)
previous date: "15-Jul-86 19:32:08" {ERIS}<TAMARIN>UCODE>RIVER.;1)
(* Copyright (c) 1986 by Xerox Corporation. All rights reserved.)
(PRETTYCOMPRINT RIVERCOMS)
(RPAQQ RIVERCOMS ((FNS DisplayRiverRoute MakeCifRiver MakeCifRiverOutput MakeDatRteSpec RiverRoute)
(VARS RouteSpec)))
(DEFINEQ
(DisplayRiverRoute
[LAMBDA (res) (* agb: "17-Jul-86 17:34")
(CLEARW xWIN)
(for i in res do (for j in i as height from 0 by 3 bind lpoint
do (* PRINT (LIST height j))
(DRAWLINE (IQUOTIENT (CAR j)
5)
height
(IQUOTIENT (IPLUS 0 (CADR j))
5)
height NIL NIL xWIN)
(DRAWLINE (IQUOTIENT (CADR j)
5)
height
(IQUOTIENT (CADR j)
5)
(IPLUS height 2)
NIL NIL xWIN])
(MakeCifRiver
[LAMBDA (rte file) (* agb: "25-Feb-86 21:47")
(PROG (size)
(ChipHdr file)
[SETQ size (PLUS 16 (TIMES 8 (LENGTH rte]
(MakeCifRiverOutput rte file 10 200)
(ChipTrailer])
(MakeCifRiverOutput
[LAMBDA (res file bot top base) (* agb: "19-Jul-86 13:17")
(for i in res bind lpoint maxH
do (ChipWire 3 3 (CAAR i)
base
(CAAR i)
bot)
(for j in i as height from bot by 6
do (* PRINT (LIST height j))
(ChipWire 3 3 (MIN (CAR j)
(CADR j))
height
(IPLUS 3 (MAX (CAR j)
(CADR j)))
height)
(ChipWire 3 3 (CADR j)
height
(CADR j)
(IPLUS height 6))
(SETQ maxH height)
(SETQ lpoint (CADR j)))
(ChipWire 3 3 lpoint maxH lpoint top])
(MakeDatRteSpec
[LAMBDA NIL (* agb: "25-Feb-86 22:24")
(* This needs to skip the seal ring and to handle the
Ras/cas lines)
(SETQ DatRteSpec (for i from 0 to 28 as j from 3 to 32
collect (LIST (ITIMES 144 i)
(PLUS -140 (TIMES 40 (IREMAINDER j 4))
(TIMES 180 (IQUOTIENT j 4])
(RiverRoute
[LAMBDA (spec) (* agb: "17-Jul-86 20:17")
(PROG (taken res last)
[for elt in spec when (IGEQ (CAR elt)
(CADR elt))
do (SETQ last (CAR elt))
(SETQ res (CONS NIL res))
[for limit in taken as limitLoc on taken until (EQ last (CADR
elt))
do [RPLACA res (NCONC (CAR res)
(LIST (LIST last (MAX limit (CADR elt]
(RPLACA limitLoc (IPLUS last 6))
(SETQ last (MAX limit (CADR elt]
(if (NEQ last (CADR elt))
then (SETQ taken (NCONC1 taken (IPLUS last 6)))
(RPLACA res (NCONC (CAR res)
(LIST (LIST last (CADR elt]
(RETURN (LIST res taken])
)
(RPAQQ RouteSpec ((50 0)
(100 10)
(150 20)
(200 30)
(250 40)))
(PUTPROPS RIVER COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
(FILEMAP (NIL (452 3591 (DisplayRiverRoute 462 . 1151) (MakeCifRiver 1153 . 1440) (MakeCifRiverOutput
1442 . 2185) (MakeDatRteSpec 2187 . 2688) (RiverRoute 2690 . 3589)))))
STOP