DIRECTORY NameSymbolTable USING [MakeName], NodeStyle, TJaMOps USING [Begin, defaultFrame, End, Execute, Put, RegisterExplicit, TopDict]; NodeStyleWorksStartImpl: CEDAR PROGRAM IMPORTS NodeStyle, TJaMOps EXPORTS NodeStyleWorks ~ BEGIN OPEN NodeStyleWorks; RunFile: PROC [frame: Frame, name: Name, dictname: LONG STRING] RETURNS [BOOL] = TRUSTED { known: BOOL; [known, ] _ TJaMOps.TryToLoad[frame, name]; IF known THEN RETURN [FALSE]; PushText[frame, dictname]; TJaMOps.Execute[frame, run]; RETURN [TRUE]; }; Start: PROC = { frame: Frame _ TJaMOps.defaultFrame; get _ GetCommand[frame, Atom.MakeAtom[".get"]]; run _ GetCommand[frame, Atom.MakeAtom[".run"]]; load _ GetCommand[frame, Atom.MakeAtom[".load"]]; start _ GetCommand[frame, Atom.MakeAtom[".start"]]; sysdict _ TypeCheckDict[GetObject[frame, Atom.MakeAtom[".sysdict"]]]; IF NOT RunFile[frame, $user ,"start.jam"] THEN TJaMOps.Execute[frame, start]; userdict _ TJaMOps.TopDict[frame.dictstk]; [, styledict] _ InitDict[$TiogaStylesDictionary]; TJaMOps.AttachDict[styledict, userdict]; TJaMOps.End[frame]; TJaMOps.Begin[frame, styledict]; stylesDicts[base] _ InitDict[$TiogaBaseStylesDictionary]; stylesDicts[print] _ InitDict[$TiogaPrintStylesDictionary]; stylesDicts[screen] _ InitDict[$TiogaScreenStylesDictionary]; bindingDict _ InitDict[$TiogaBindingDictionary, 200]; attachmentsDict _ InitDict[$TiogaAttachedStylesDictionary]; [] _ RunFile[frame, $StyleError, "TiogaUtils.jam"]; TJaMOps.RegisterExplicit[frame, $ReportStyleError, ReportStyleErrorOp]; TJaMOps.RegisterExplicit[frame, $StyleName, StyleNameOp]; TJaMOps.RegisterExplicit[frame, $StyleRuleDict, StyleRuleDictOp]; TJaMOps.RegisterExplicit[frame, $PrintRuleDict, PrintRuleDictOp]; TJaMOps.RegisterExplicit[frame, $ScreenRuleDict, ScreenRuleDictOp]; TJaMOps.RegisterExplicit[frame, $OpenPrintStyle, OpenPrintStyleOp]; TJaMOps.RegisterExplicit[frame, $OpenScreenStyle, OpenScreenStyleOp]; TJaMOps.RegisterExplicit[frame, $ResetTestStyle, ResetTestStyleOp]; [] _ RegisterStyleCommand[frame, $BeginStyle, BeginStyleOp]; [] _ RegisterStyleCommand[frame, $EndStyle, EndStyleOp]; [] _ RegisterStyleCommand[frame, $StyleRule, StyleRuleOp]; [] _ RegisterStyleCommand[frame, $PrintRule, PrintRuleOp]; [] _ RegisterStyleCommand[frame, $ScreenRule, ScreenRuleOp]; [] _ RegisterStyleCommand[frame, $AttachStyle, AttachStyleOp]; [] _ RegisterStyleCommand[frame, $clearTabStops, ClearTabStopsOp]; [] _ RegisterStyleCommand[frame, $tabStop, TabStopOp]; [] _ RegisterStyleCommand[frame, $defaultTabStops, DefaultTabStopsOp]; [] _ RegisterStyleCommand[frame, $tabStopLocations, RelativeTabStopsOp]; { frame, frame1, frame2, frame3, frame4: Frame _ NIL; frame1 _ GetFrame[NIL, NameSymbolTable.nullName, screen]; frame2 _ GetFrame[NIL, NameSymbolTable.nullName, screen]; frame3 _ GetFrame[NIL, NameSymbolTable.nullName, screen]; frame4 _ GetFrame[NIL, NameSymbolTable.nullName, screen]; FreeFrame[frame1, NameSymbolTable.nullName, screen]; FreeFrame[frame2, NameSymbolTable.nullName, screen]; FreeFrame[frame3, NameSymbolTable.nullName, screen]; FreeFrame[frame4, NameSymbolTable.nullName, screen]; }; specialOp _ DefineSpecialOp[frame, $SpecialOp, SpecialOp]; TJaMOps.RegisterExplicit[frame, $StyleParam, StyleParamOp]; TJaMOps.RegisterExplicit[frame, $isComment, IsCommentOp]; TJaMOps.RegisterExplicit[frame, $isPrint, IsPrintOp]; TJaMOps.RegisterExplicit[frame, $nestingLevel, NestingLevelOp]; the _ RegisterStyleLiteral[frame, $the]; smaller _ RegisterStyleLiteral[frame, $smaller]; bigger _ RegisterStyleLiteral[frame, $bigger]; percent _ RegisterStyleLiteral[frame, $percent]; regular _ RegisterStyleLiteral[frame, $regular]; bold _ RegisterStyleLiteral[frame, $bold]; italic _ RegisterStyleLiteral[frame, $italic]; bolditalic _ RegisterStyleLiteral[frame, $bold+italic]; plusbold _ RegisterStyleLiteral[frame, $+bold]; plusitalic _ RegisterStyleLiteral[frame, $+italic]; minusbold _ RegisterStyleLiteral[frame, $-bold]; minusitalic _ RegisterStyleLiteral[frame, $-italic]; capsAndLower _ RegisterStyleLiteral[frame, $caps+lowercase]; capsAndSmallCaps _ RegisterStyleLiteral[frame, $caps+smallcaps]; lowerOnly _ RegisterStyleLiteral[frame, $lowercase]; capsOnly _ RegisterStyleLiteral[frame, $caps]; all _ RegisterStyleLiteral[frame, $all]; visible _ RegisterStyleLiteral[frame, $visible]; lettersAndDigits _ RegisterStyleLiteral[frame, Atom.MakeAtom["letters+digits"]]; none _ RegisterStyleLiteral[frame, $none]; justified _ RegisterStyleLiteral[frame, $justified]; flush _ RegisterStyleLiteral[frame, $flush]; flushLeft _ RegisterStyleLiteral[frame, $flushLeft]; flushRight _ RegisterStyleLiteral[frame, $flushRight]; filled _ RegisterStyleLiteral[frame, $filled]; outlined _ RegisterStyleLiteral[frame, $outlined]; filled _ RegisterStyleLiteral[frame, $filled]; filledAndOutlined _ RegisterStyleLiteral[frame, Atom.MakeAtom["filled+outlined"]]; centered _ RegisterStyleLiteral[frame, $centered]; fixed _ RegisterStyleLiteral[frame, $fixed]; relative _ RegisterStyleLiteral[frame, $relative]; looks _ RegisterStyleLiteral[frame, $looks]; breakIfPast _ RegisterStyleLiteral[frame, $breakIfPast]; spaceIfPast _ RegisterStyleLiteral[frame, $spaceIfPast]; blank _ RegisterStyleLiteral[frame, $blank]; leaders _ RegisterStyleLiteral[frame, $leaders]; rule _ RegisterStyleLiteral[frame, $rule]; rules _ RegisterStyleLiteral[frame, $rules]; aligned _ RegisterStyleLiteral[frame, $aligned]; congruent _ RegisterStyleLiteral[frame, $congruent]; WHILE opsList # NIL DO [] _ RegisterStyleCommand[frame, opsList.first.param.opName, opsList.first.op]; opsList _ opsList.rest; ENDLOOP; TJaMOps.End[frame]; -- replace sysdict by userdict TJaMOps.Begin[frame,userdict]; [] _ RegisterStyleCommand[frame, $pt, PointsOp]; [] _ RegisterStyleCommand[frame, $pc, PicasOp]; [] _ RegisterStyleCommand[frame, $in, InchesOp]; [] _ RegisterStyleCommand[frame, $cm, CentimetersOp]; [] _ RegisterStyleCommand[frame, $mm, MillimetersOp]; [] _ RegisterStyleCommand[frame, $dd, DidotPointsOp]; [] _ RegisterStyleCommand[frame, $em, EmsOp]; [] _ RegisterStyleCommand[frame, $en, EnsOp]; [] _ RegisterStyleCommand[frame, $screensp, ScreenSpacesOp]; [] _ RegisterStyleCommand[frame, $printsp, PrintSpacesOp]; [] _ RegisterStyleCommand[frame, $fil, FilOp]; [] _ RegisterStyleCommand[frame, $fill, FillOp]; [] _ RegisterStyleCommand[frame, $filll, FilllOp]; [] _ LoadStyle[defaultStyleName]; }; END. NodeStyleWorksStartImpl.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Rick Beach, March 19, 1985 5:28:11 pm PST Some JaM commands needed to run the style machinery Remember the system dictionary, since the style machinery manipulates the dictionary stack Check if we have run the start jam code: (start.jam) .run This provides a user dictionary into which start.jam loads util.jam and errordefs.jam Remember the user dictionary pointer Create the dicitionary of Tioga style names Replace userdict by styledict for rest of startup Create and register dictionaries for style rules, name bindings, and attached styles Check if have run the Tioga utility jam code: (TiogaUtils.jam) .run Register various style machinery operations that are global to a particular style Register style commands in the binding dictionary Register style commands for that implement tab stop style attributes Initialize the small cache of frames by allocating and freeing some Register style parameter procedures Register various literals used by the style machinery as keywords Register the style attribute operations that were preregistered (this module must obviously be last if there are several modules preregistering style attributes) Dimensions Create a default style Κš˜™Jšœ Οmœ1™˜>K˜KšœD™DKšœB˜BKšœ6˜6KšœF˜FKšœH˜HK˜KšœC™Cšœ˜Kšœ/žœ˜3Kšœžœ$˜9Kšœžœ$˜9Kšœžœ$˜9Kšœžœ$˜9K˜4K˜4K˜4K˜4Jšœ˜—K˜Kšœ#™#Kšœ:˜:K˜;K˜9K˜5K˜?K˜KšœA™AKšœ(˜(Kšœ0˜0Kšœ.˜.Kšœ0˜0Kšœ0˜0Kšœ*˜*Kšœ.˜.Kšœ7˜7Kšœ/˜/Kšœ3˜3Kšœ0˜0Kšœ4˜4Kšœ<˜