DIRECTORY TSTypes, TSGlue; TSGlueImpl: CEDAR PROGRAM IMPORTS TSTypes EXPORTS TSGlue = BEGIN OPEN TSTypes, TSGlue; SetGlue: PUBLIC PROC [desired: Dimn, g: Glue] RETURNS [GlueSet] = BEGIN delta: Dimn _ SubDimn[desired, g.space]; fuzz: Dimn = IntDimn[1,mica]; shrinking: BOOLEAN _ delta<0; v: Dimn _ IF shrinking THEN g.shrink ELSE g.stretch; absDelta: Dimn _ AbsDimn[delta]; IF shrinking AND absDelta.texPts > v.texPts + fuzz.texPts THEN RETURN[overfullGlueSet]; v _ MaxDimn[fuzz, v]; RETURN[[DimnRatio[delta,v]]]; END; GlueBadness: PUBLIC PROC [set: GlueSet] RETURNS [Badness] = BEGIN b: Badness _ IF set.value IN (-1..2000] THEN ABS[100*set.value*set.value*set.value] ELSE infBadness; IF b>=infBadness THEN RETURN[infBadness] ELSE RETURN[b]; END; END. Michael Plass, November 2, 1982 10:10 am. CEDARized. lTSGlueImpl.mesa Michael Plass, November 2, 1982 10:10 am Last Edited by: Beach, May 24, 1983 9:08 am Κa– "cedar" style˜JšΟc™Jš(™(Jš+™+šΟk ˜ J˜J˜—Jšœ ž œžœ žœ ˜:Jšžœžœ˜J˜šΟnœžœžœžœ ˜AJšž˜J˜(J˜Jšœ žœ ˜Jšœ žœ žœ žœ ˜4J˜ šžœ žœ*ž˜>Jšžœ˜—J˜Jšžœ˜Jšžœ˜J˜—šŸ œžœžœžœ ˜;Jšž˜šœ žœ žœ ˜'Jšžœžœ#˜+Jšžœ ˜—šžœžœžœ ˜(Jšžœžœ˜Jšžœ˜J˜——Jšžœ˜J˜4—…—,ω