Start: PROC = { frame: Frame; frame _ TJaMOps.defaultFrame; realArray _ NEW[ARRAY RealCode OF RealInit0]; intArray _ NEW[ARRAY RealCode OF INTEGER]; NodeStyleStart.StartExtra[]; NodeStyleStart.StartApply[]; NodeStyleStart.StartImpl2[]; [] _ StyleCommand[frame,"pt",Points]; [] _ StyleCommand[frame,"pc",Picas]; [] _ StyleCommand[frame,"in",Inches]; [] _ StyleCommand[frame,"cm",Centimeters]; [] _ StyleCommand[frame,"mm",Millimeters]; [] _ StyleCommand[frame,"dd",DidotPoints]; [] _ StyleCommand[frame,"em",Ems]; [] _ StyleCommand[frame,"en",Ens]; [] _ StyleCommand[frame,"screensp", ScreenSpaces]; [] _ StyleCommand[frame,"printsp", PrintSpaces]; [] _ StyleCommand[frame,"fil",Fil]; [] _ StyleCommand[frame,"fill",Fill]; [] _ StyleCommand[frame,"filll",Filll]; [] _ LoadStyle[defaultStyleName]; }; StartExtra: PUBLIC SAFE PROC = TRUSTED { frame, frame1, frame2, frame3, frame4: Frame _ NIL; topDictName: Name; IF (startCount _ startCount+1)>1 THEN RETURN; frame _ TJaMOps.defaultFrame; get _ GetCommand[frame,MakeName[".get"]]; run _ GetCommand[frame,MakeName[".run"]]; load _ GetCommand[frame,MakeName[".load"]]; sysdict _ TypeCheckDict[GetObject[frame,MakeName[".sysdict"]]]; IF ~RunFile[frame,MakeName["user"],"start.jam"] THEN TJaMOps.Execute[frame,CVX[NameToObject[MakeName[".start"]]]]; userdict _ TJaMOps.TopDict[frame.dictstk]; InitStyleDict[]; TJaMOps.End[frame]; -- replace userdict by styledict for rest of startup TJaMOps.Begin[frame,styledict]; topDictName _ MakeName["topDictName"]; TJaMOps.Put[sysdict,NameToObject[topDictName],NameToObject[MakeName[".sysdict"]]]; TJaMOps.Put[userdict,NameToObject[topDictName],NameToObject[MakeName["userdict"]]]; TJaMOps.Put[styledict,NameToObject[topDictName], NameToObject[MakeName["TiogaStylesDictionary"]]]; styleerror _ MakeName["StyleError"]; kindNames[screen] _ MakeName["screen"]; kindNames[print] _ MakeName["print"]; kindNames[base] _ MakeName["base"]; styleRuleDictNames[base] _ MakeName["##BaseStyleRuleDictName"]; styleRuleDictNames[screen] _ MakeName["##ScreenStyleRuleDictName"]; styleRuleDictNames[print] _ MakeName["##PrintStyleRuleDictName"]; styleDictNames[base] _ MakeName["##BaseStyleDictName"]; styleDictNames[screen] _ MakeName["##ScreenStyleDictName"]; styleDictNames[print] _ MakeName["##PrintStyleDictName"]; InitStylesDict[]; InitBindingDict[]; InitAttachmentsDict[]; [] _ RunFile[frame,styleerror,"TiogaUtils.jam"]; [] _ RegCom[frame,"ReportStyleError",ReportStyleError]; [] _ RegCom[frame,"StyleName",StyleName]; [] _ RegCom[frame,"StyleRuleDict",StyleRuleDict]; [] _ RegCom[frame,"PrintRuleDict",PrintRuleDict]; [] _ RegCom[frame,"ScreenRuleDict",ScreenRuleDict]; [] _ RegCom[frame,"OpenPrintStyle",OpenPrintStyleOp]; [] _ RegCom[frame,"OpenScreenStyle",OpenScreenStyleOp]; [] _ RegCom[frame,"ResetTestStyle",ResetTestStyle]; [] _ StyleCommand[frame,"BeginStyle",BeginStyleOp]; [] _ StyleCommand[frame,"EndStyle",EndStyleOp]; [] _ StyleCommand[frame,"StyleRule",StyleRuleOp]; [] _ StyleCommand[frame,"PrintRule",PrintRuleOp]; [] _ StyleCommand[frame,"ScreenRule",ScreenRuleOp]; [] _ StyleCommand[frame,"AttachStyle",AttachStyleOp]; [] _ StyleCommand[frame,"clearTabStops",ClearTabStopsOp]; [] _ StyleCommand[frame,"tabStop",TabStopOp]; [] _ StyleCommand[frame,"defaultTabStops",DefaultTabStopsOp]; [] _ StyleCommand[frame,"tabStopLocations",RelativeTabStopsOp]; 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]; NodeProps.Register[name: $StyleDef, reader: ReadSpecsProc, writer: WriteSpecsProc, copier: CopyInfoProc]; }; StartApply: PUBLIC PROC = { changeSet: EditNotify.ChangeSet; frame: Frame _ NIL; IF (startCount _ startCount+1)>1 THEN RETURN; frame _ TJaMOps.defaultFrame; changeSet[ChangingProp] _ TRUE; changeSet[ChangingFormat] _ TRUE; changeSet[MovingNodes] _ TRUE; changeSet[NodeNesting] _ TRUE; changeSet[InsertingNode] _ TRUE; EditNotify.AddNotifyProc[Notify,after,high,changeSet]; defaultStyle _ Create[]; defaultName _ MakeName["default"]; rootName _ MakeName["root"]; InitLookNames[]; InitApplyCacheRecord[]; InitRuleCacheInfo[]; InitLooksCacheInfo[]; InitObjectCacheInfo[]; ClearCaches[TRUE]; SetDefaultStyle["Cedar"]; }; StartImpl2: PUBLIC PROC = TRUSTED { -- exported to NodeStyleStart frame: Frame; PointsPerInch: REAL = 1.0/0.0138370; startCount _ startCount+1; frame _ TJaMOps.defaultFrame; defaultStyle.name[style] _ defaultStyleName; defaultStyle.name[fontFamily] _ MakeName["Helvetica"]; SetReal[defaultStyle,fontSize,10]; SetReal[defaultStyle,leading,12]; SetReal[defaultStyle,tabStops,4]; SetReal[defaultStyle,pageWidth,8.5*PointsPerInch]; SetReal[defaultStyle,pageLength,11*PointsPerInch]; SetReal[defaultStyle,leftMargin,1*PointsPerInch]; SetReal[defaultStyle,rightMargin,1*PointsPerInch]; SetReal[defaultStyle,topMargin,1*PointsPerInch]; SetReal[defaultStyle,bottomMargin,1*PointsPerInch]; SetReal[defaultStyle,lineLength,6.5*PointsPerInch]; specialOp _ DefineSpecialOp[frame,"SpecialOp",SpecialOp]; getFreeVarOp _ DefineSpecialOp[frame,"GetFreeVarOp",GetFreeVarOp]; getFreeVarObjOp _ DefineSpecialOp[frame,"GetFreeVarObjOp",GetFreeVarObjOp]; TJaMOps.RegisterExplicit[frame,"StyleParam",StyleParam]; TJaMOps.RegisterExplicit[frame,"isComment",IsComment]; TJaMOps.RegisterExplicit[frame,"isPrint",IsPrint]; TJaMOps.RegisterExplicit[frame,"nestingLevel",NestingLevel]; the _ StyleLiteral[frame,"the"]; smaller _ StyleLiteral[frame,"smaller"]; bigger _ StyleLiteral[frame,"bigger"]; percent _ StyleLiteral[frame,"percent"]; regular _ StyleLiteral[frame,"regular"]; bold _ StyleLiteral[frame,"bold"]; italic _ StyleLiteral[frame,"italic"]; bolditalic _ StyleLiteral[frame,"bold+italic"]; plusbold _ StyleLiteral[frame,"+bold"]; plusitalic _ StyleLiteral[frame,"+italic"]; minusbold _ StyleLiteral[frame,"-bold"]; minusitalic _ StyleLiteral[frame,"-italic"]; capsAndLower _ StyleLiteral[frame,"caps+lowercase"]; capsAndSmallCaps _ StyleLiteral[frame,"caps+smallcaps"]; lowerOnly _ StyleLiteral[frame,"lowercase"]; capsOnly _ StyleLiteral[frame,"caps"]; all _ StyleLiteral[frame,"all"]; visible _ StyleLiteral[frame,"visible"]; lettersAndDigits _ StyleLiteral[frame,"letters+digits"]; none _ StyleLiteral[frame,"none"]; justified _ StyleLiteral[frame,"justified"]; flush _ StyleLiteral[frame,"flush"]; flushLeft _ StyleLiteral[frame,"flushLeft"]; flushRight _ StyleLiteral[frame,"flushRight"]; filled _ StyleLiteral[frame,"filled"]; outlined _ StyleLiteral[frame,"outlined"]; filled _ StyleLiteral[frame,"filled"]; filledAndOutlined _ StyleLiteral[frame,"filled+outlined"]; centered _ StyleLiteral[frame,"centered"]; fixed _ StyleLiteral[frame,"fixed"]; relative _ StyleLiteral[frame,"relative"]; looks _ StyleLiteral[frame,"looks"]; breakIfPast _ StyleLiteral[frame,"breakIfPast"]; spaceIfPast _ StyleLiteral[frame,"spaceIfPast"]; blank _ StyleLiteral[frame,"blank"]; leaders _ StyleLiteral[frame,"leaders"]; rule _ StyleLiteral[frame,"rule"]; rules _ StyleLiteral[frame,"rules"]; aligned _ StyleLiteral[frame,"aligned"]; congruent _ StyleLiteral[frame,"congruent"]; fontFaceOps _ NEW [OpsRec _ [FontFaceLoad, StoreError, AddRealError, PercentError, FontFaceSetName]]; fontFaceParam _ NEW[misc ParamRec _ [fontFaceOps, StyleCommand[frame,"face",FontFaceOp], misc[]]]; fontAlphabetsOps _ NEW [OpsRec _ [FontAlphabetsLoad, StoreError, AddRealError, PercentError, FontAlphabetsSetName]]; fontAlphabetsParam _ NEW[misc ParamRec _ [fontAlphabetsOps, StyleCommand[frame,"alphabets",FontAlphabetsOp], misc[]]]; underliningOps _ NEW [OpsRec _ [UnderliningLoad, StoreError, AddRealError, PercentError, UnderliningSetName]]; underliningParam _ NEW [misc ParamRec _ [underliningOps, StyleCommand[frame,"underlining",UnderliningOp], misc[]]]; strikeoutOps _ NEW [OpsRec _ [StrikeoutLoad, StoreError, AddRealError, PercentError, StrikeoutSetName]]; strikeoutParam _ NEW [misc ParamRec _ [strikeoutOps, StyleCommand[frame,"strikeout",StrikeoutOp], misc[]]]; lineFormattingOps _ NEW [OpsRec _ [LineFormattingLoad, StoreError, AddRealError, PercentError, LineFormattingSetName]]; lineFormattingParam _ NEW [misc ParamRec _ [lineFormattingOps, StyleCommand[frame,"lineFormatting",LineFormattingOp], misc[]]]; pathTypeOps _ NEW [OpsRec _ [PathTypeLoad, StoreError, AddRealError, PercentError, PathTypeSetName]]; pathTypeParam _ NEW [misc ParamRec _ [pathTypeOps, StyleCommand[frame,"pathType",PathTypeOp], misc[]]]; nameOps _ NEW [OpsRec _ [LoadNameParam, StoreError, AddRealError, PercentError, SetNameParam]]; styleParam _ DefineNameOp[frame, "style", StyleNameOp, style]; fontFamilyParam _ DefineNameOp[frame, "family", FontFamilyOp, fontFamily]; realOps _ NEW [OpsRec _ [RealOpLoad, RealOpSetReal, RealOpAddReal, RealOpPercent, SetNameError]]; glueOps _ NEW [OpsRec _ [GlueOpLoad, GlueOpSetReal, GlueOpAddReal, GlueOpPercent, SetNameError]]; colorOps _ NEW [OpsRec _ [ColorOpLoad, ColorOpSetReal, ColorOpAddReal, ColorOpPercent, SetNameError]]; fontSizeParam _ DefineRealOp[frame, "size", FontSizeOp, fontSize]; leftIndentParam _ DefineRealOp[frame, "leftIndent", LeftIndentOp, leftIndent]; rightIndentParam _ DefineRealOp[frame, "rightIndent", RightIndentOp, rightIndent]; firstIndentParam _ DefineRealOp[frame, "firstIndent", FirstIndentOp, firstIndent]; restIndentParam _ DefineRealOp[frame, "restIndent", RestIndentOp, restIndent]; topIndentParam _ DefineRealOp[frame, "topIndent", TopIndentOp, topIndent]; bottomIndentParam _ DefineRealOp[frame, "bottomIndent", BottomIndentOp, bottomIndent]; lineLeadingSizeParam _ DefineRealOp[frame, "leading", LineLeadingSizeOp, leading]; lineLeadingStretchParam _ DefineRealOp[frame, "leadingStretch", LineLeadingStretchOp, leadingStretch]; lineLeadingShrinkParam _ DefineRealOp[frame, "leadingShrink", LineLeadingShrinkOp, leadingShrink]; lineLeadingGlueParam _ DefineGlueOp[frame, "leadingGlue", LineLeadingGlueOp, leading, leadingStretch, leadingShrink]; topLeadingSizeParam _ DefineRealOp[frame, "topLeading", TopLeadingSizeOp, topLeading]; topLeadingStretchParam _ DefineRealOp[frame, "topLeadingStretch", TopLeadingStretchOp, topLeadingStretch]; topLeadingShrinkParam _ DefineRealOp[frame, "topLeadingShrink", TopLeadingShrinkOp, topLeadingShrink]; topLeadingGlueParam _ DefineGlueOp[frame, "topLeadingGlue", TopLeadingGlueOp, topLeading, topLeadingStretch, topLeadingShrink]; bottomLeadingSizeParam _ DefineRealOp[frame, "bottomLeading", BottomLeadingSizeOp, bottomLeading]; bottomLeadingStretchParam _ DefineRealOp[frame, "bottomLeadingStretch", BottomLeadingStretchOp, bottomLeadingStretch]; bottomLeadingShrinkParam _ DefineRealOp[frame, "bottomLeadingShrink", BottomLeadingShrinkOp, bottomLeadingShrink]; bottomLeadingGlueParam _ DefineGlueOp[frame, "bottomLeadingGlue", BottomLeadingGlueOp, bottomLeading, bottomLeadingStretch, bottomLeadingShrink]; vshiftParam _ DefineRealOp[frame, "vShift", VShiftOp, vshift]; tabStopsParam _ DefineRealOp[frame, "tabStops", TabStopsOp, tabStops]; minLineGapParam _ DefineRealOp[frame, "minLineGap", MinLineGapOp, minLineGap]; lineWeightParam _ DefineRealOp[frame, "lineWeight", LineWeightOp, lineWeight]; pageWidthParam _ DefineRealOp[frame, "pageWidth", PageWidthOp, pageWidth]; pageLengthParam _ DefineRealOp[frame, "pageLength", PageLengthOp, pageLength]; leftMarginParam _ DefineRealOp[frame, "leftMargin", LeftMarginOp, leftMargin]; rightMarginParam _ DefineRealOp[frame, "rightMargin", RightMarginOp, rightMargin]; topMarginParam _ DefineRealOp[frame, "topMargin", TopMarginOp, topMargin]; bottomMarginParam _ DefineRealOp[frame, "bottomMargin", BottomMarginOp, bottomMargin]; headerMarginParam _ DefineRealOp[frame, "headerMargin", HeaderMarginOp, headerMargin]; footerMarginParam _ DefineRealOp[frame, "footerMargin", FooterMarginOp, footerMargin]; bindingMarginParam _ DefineRealOp[frame, "bindingMargin", BindingMarginOp, bindingMargin]; lineLengthParam _ DefineRealOp[frame, "lineLength", LineLengthOp, lineLength]; columnParam _ DefineRealOp[frame, "column", ColumnOp, column]; textRotationParam _ DefineRealOp[frame, "textRotation", TextRotationOp, textRotation]; areaHueParam _ DefineRealOp[frame, "areaHue", AreaHueOp, areaHue]; areaSaturationParam _ DefineRealOp[frame, "areaSaturation", AreaSaturationOp, areaSaturation]; areaBrightnessParam _ DefineRealOp[frame, "areaBrightness", AreaBrightnessOp, areaBrightness]; areaColorParam _ DefineColorOp[frame, "areaColor", AreaColorOp, areaHue, areaSaturation, areaBrightness]; outlineHueParam _ DefineRealOp[frame, "outlineHue", OutlineHueOp, outlineHue]; outlineSaturationParam _ DefineRealOp[frame, "outlineSaturation", OutlineSaturationOp, outlineSaturation]; outlineBrightnessParam _ DefineRealOp[frame, "outlineBrightness", OutlineBrightnessOp, outlineBrightness]; outlineColorParam _ DefineColorOp[frame, "outlineColor", OutlineColorOp, outlineHue, outlineSaturation, outlineBrightness]; textHueParam _ DefineRealOp[frame, "textHue", TextHueOp, textHue]; textSaturationParam _ DefineRealOp[frame, "textSaturation", TextSaturationOp, textSaturation]; textBrightnessParam _ DefineRealOp[frame, "textBrightness", TextBrightnessOp, textBrightness]; textColorParam _ DefineColorOp[frame, "textColor", TextColorOp, textHue, textSaturation, textBrightness]; pageBreakPenaltyParam _ DefineRealOp[frame, "pageBreakPenalty", PageBreakPenaltyOp, pageBreakPenalty]; pageBreakPenalty2Param _ DefineRealOp[frame, "pageBreakAfterFirstLinePenalty", PageBreakPenalty2Op, pageBreakAfterFirstLinePenalty]; pageBreakPenalty3Param _ DefineRealOp[frame, "pageBreakAfterLastLinePenalty", PageBreakPenalty3Op, pageBreakAfterLastLinePenalty]; pageBreakPenalty4Param _ DefineRealOp[frame, "pageBreakBeforeFirstLinePenalty", PageBreakPenalty4Op, pageBreakBeforeFirstLinePenalty]; pageBreakPenalty5Param _ DefineRealOp[frame, "pageBreakBeforeLastLinePenalty", PageBreakPenalty5Op, pageBreakBeforeLastLinePenalty]; TJaMOps.End[frame]; -- replace sysdict by userdict TJaMOps.Begin[frame,userdict]; }; $NodeStyleStartEverythingImpl.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. -- check if have done (start.jam) .run -- check if have done (TiogaUtils.jam) .run -- style commands for tabs -- allocate and free some frames to initialize the cache initialize the params Κά˜™!Jšœ Οmœ1™<—J™codešΟnœΟkœ˜Kšœ ˜ K˜K˜Kšœ ŸœŸœ Ÿœ ˜-Kš œ ŸœŸœ ŸœŸœ˜*K˜K˜K˜K˜K˜K˜%K˜$K˜%K˜*K˜*K˜*K˜"K˜"K˜2K˜0K˜#K˜%K˜'K™Kšœ!˜!K˜Kšœ˜K˜—š ž œŸœŸœŸœŸœ˜(Kšœ/Ÿœ˜3K˜K˜KšŸœŸœŸœ˜-K˜K˜K˜K˜)K˜)K˜+K˜K˜?K˜Kšœ&™&šŸœ.Ÿ˜4KšœŸœ$˜=K˜—K˜*K˜KšœΟc4˜HK˜K˜K˜&K˜RK˜S˜0K˜1K˜—K˜$K˜K˜'K˜%K˜#K˜K˜?K˜CK˜AK˜K˜7K˜;K˜9K˜K˜;K˜Kšœ+™+K˜0K˜K˜7K˜)K˜1K˜1K˜3K˜5K˜7K˜3K˜K˜3K˜/K˜1K˜1K˜3K˜5K˜Kšœ™Kšœ9˜9Kšœ-˜-Kšœ=˜=Kšœ?˜?K˜Kšœ8™8KšœŸœ$˜9KšœŸœ$˜9KšœŸœ$˜9KšœŸœ$˜9K˜4K˜4K˜4K˜4K˜Kšœj˜jK˜šœ˜K˜——šž œŸœŸœ˜K˜ KšœŸœ˜K˜KšŸœŸœŸœ˜-K˜K˜K˜KšœŸœ˜KšœŸœ˜!KšœŸœ˜KšœŸœ˜KšœŸœ˜ K˜6K˜K˜K˜"K˜K˜K˜K˜K˜K˜K˜Kšœ Ÿœ˜K˜K˜K˜Kšœ˜K˜—š ž œŸœŸœŸœ ˜AK˜ KšœŸœ˜$K˜Kšœ˜K˜K˜K˜K˜,K˜6K˜"K˜!K˜!K˜2K˜2K˜1K˜2K˜0K˜3K˜3K˜Kšœ9˜9KšœB˜BKšœK˜KK˜K˜8K˜6K˜2K˜K˜@K˜—šœŸœ%˜6K˜.—šœŸœ˜2K˜4K˜—šœ Ÿœ&˜3K˜+—K˜>K˜JK˜šœ Ÿœ ˜K˜I—šœ Ÿœ ˜K˜I—šœ Ÿœ ˜K˜MK˜—K˜BK˜NK˜RK˜RK˜NK˜J˜K˜BK˜—˜K˜;—˜K˜L—˜K˜I—˜9K˜