Heading:qjk40(635)Sil file definitiony756qjk40Page Numbers: Yes  X: 527  Y: 10.5"qjk40DRAFT - DRAFT - DRAFT - DRAFTz18592l4445y748c\f5bDRAFT - DRAFT - DRAFT - DRAFTz18592l4445y14c\f5bInter-Office Memorandumz18592l4445y762\f5bTo	Sil Users	Date	April 26, 1979z18592l4445d2998e21(0,65535)(1,4445)(5,11684)(6,14146)\f1 2f0t2 1t0 9t6 1f1t0 4f0t7 1t0From	Roger Bates	Location	Palo Altoz18592l4445d2998y716e25\f1 4f0t2 1t0 11t6 1f1t0 8f0t7 1t0Subject	Sil file definition	Organization	CSLz18592l4445d2998e25\f1 7f0t2 1t0 19t6 1f1t0 12f0t7 1t0XEROX       z18592l508y644e14(2116)\f2 5f0Filed on: [MAXC]<Bates>SilFileDescription.presse30e10This is a description of the SIL file structure.  The definition of the Sil file format was made solely for the convenience of the Sil program, and is simply a copy of the internal data structure that Sil maintains in memory during operation.z18344j(635)The first word in the file is a check code, that can be used to see that the file is actually a Sil format file.  This word has two possible values, octal 34562 and 34563.  The second value has been adopted as part of the design automation process to indicate the a Sil schematic file has been "build" into a wire-list file via the Build process.z18344e12jFollowing this word are a secession of "item blocks" that describe the contents of the Sil drawing.  An Item block has the following form:z18344e12jword 0:	macro-codez18344l4268e12j(0,6016)(1,65535)(5,65535)(6,65535)If this word equals a character code, then this item is to be added to the list of items for the macro Font 4 character.  All items which are part of macro definitions will appear first in the file.z18344l5538e6j(635)If this code is -1, then this is a normal item (string, line etc) and is to be displayed once as indicated by the following words.z18344l5538e6jword 1:	state and X-min z18344l4268e12j(0,6016)bits 0,,3 are used internally to indicate the current state of an item - normal, selected, or deleted.z18344l5538e6j(635)bits 4,,15 are the minimum X coordinate bit position of the bounding box that the item occupies.z18344l5538e6jword 2:	Y-minz18344l4268e12j(0,6016)bits 0,,15 are the minimum Y coordinate bit position of the bounding box that the item occupies.z18344l5538e6j(635)word 3:	color and X-maxz18344l4268e12j(0,6016)bits 0,,3 are used to indicate the color associated with this item according to the following table:z18344l5538e6j(635)00: Neutral	08: Brown01: Red	09: Orange02: Yellow	10: Lime03: Green	11: Turquise04: Cyan	12: Aqua05: Violet	13: UltraViolet06: Magenta	14: Pink07: White	15: Smokez18344l6808e6j(0,10592)\f1bits 4,,15 are the maximum X coordinate bit position of the bounding box that the item occupies.z18344l5538e6j(635)word 4:	font, face, and Y-maxz18344l4268e12j(0,6016)bits 0,,3 are used to indicate the "font" associated with this item.  Font values are interpreted according to the following table:z18344l5538e6j(635)00: Font 0 01: Font 0 with "boldness" opposite to default value in user.cm02: Font 1 03: Font 1 with "boldness" opposite to default value in user.cm04: Font 2 05: Font 2 with "boldness" opposite to default value in user.cm06: Font 3 07: Font 3 with "boldness" opposite to default value in user.cm08: Font 4 macro09: Font 5 macro10: Font 6 macro11: Font 7 macro12: Font 8 macro13: Font 9 macro14: A line with lingth and width indicated by preceeding coordinates15: A background with area indicated by preceeding coordinatesz18344l6808e6j\f1bit 4 is used to indicate the "italics" opposite to default value in user.cm.  This bit only has significance if the font value is 0 through 7.z18344l5538e6jbits 5,,15 are the maximum Y coordinate bit position of the bounding box that the item occupies.z18344l5538e6jword 5 etc:	optional stringz18344l4268e12jIf the preceeding word indicated an item of fonts 0 through 13, then additional words are required to define the characters in the item string.  This is done with a BCPL string definition, that is, the left byte of word 5 is the number of characters in the string, the right byte is the first character.  Additional words are appended as needed to contain the specified number of character bytes.z18344l5538e6jAll coordinate value are expressed in "Alto Screen" units and are refernece to the upper left hand corner of the screen.  When making a press file, Sil scales all coordinate values by 17780/500.z18344l4268e12jNotice that descriptions of library fonts 5 through 9 characters are not defined within this Sil file.  A table is filled in by Sil during input, and later the library files indicated in user.cm are opened, and the front of the file is scanned for items defining the required character codes for each of the library fonts characters.z18344l4268e12jEditorial commentz18344e12j\b17BNotice that in the preceeding definition, there are several instances of references to the contents of the user.cm to get font family name, default faces, and library file names.  This means that a signifacant part of a Sil picture is not defined by the Sil file at all.  Users of Sil may come back to an old file that they carefully saved away only to find that they really "lost" part of the drawing because they change some of the parameters in their user.cm file for new applications.z18344e12jThis has even more impact for people interested in processing Sil files by other programs, since they must either work around the parameters in user.cm, or deal with user.cmz18344e12jWhen one runs Sil/I, Sil reads user.cm for font information, and file pointers, and saves this information in two files called Sil.fonts, and Sil.fps (file pointers).  The proceedures for reading these two scratch files could easily be lifted from the Sil sources [MAXC]<SIL>SilSources.dm.z18344l4268j\f1Programs should in fact only use user.cm to fill in default values when first needed.  All information should be explicidly saved as part of the output file, so that no future refereneces should be dependant of the contents of user.cmz18344e12j