/*	        COMPDV/COMP_DSM STRUCTURE INTERCONNECTION		       */

/*		 TABLES USED BY compdv WHILE PARSING,		       */
/*		NAMES MARKED WITH * ARE internal ONLY		       */
/*	      Tables are generally shown in order generated	       */
/*	       (except for strings, which crop up all over)	       */
			    
/* dcl_l_p(1)>----+						       */
/* dcl_l_p(2)>-+  |				dcls are made first.       */
/*	     |  |	 dcl_*	    		They are strings which     */
/*	     |  |	  ________    		are referenced by name     */
/*	     |  +->|next    >--+		as an aid to understanding */
/*	     |	 |dcl_name|  |		the DSM definition. They   */
/*	     |	 |leng    |  |		are not necessary to do    */
/*	     |	 |dcl_v   |  |		the job.		       */
/*	     |	 |________|  |				       */
/*	     |  +--------------+	Strings used by mediachars are       */
/*	     |  |  dcl_*	    	temporary, i.e. only used by compdv, */
/*	     |  |   ________    	pointers to these go in strl_p(1,*). */
/*	     |  +->|next    >--+				       */
/*	     |	 |dcl_name|  |	Strings used by font, cleanup, etc.  */
/*	     | 	 |leng    |  |	are permanent, i.e. they end up in   */
/*	     |	 |dcl_v   |  |	the DSM, pointers to these go in     */
/*	     |	 |________|  |	strl_p(2,*).		       */
/*	     |  +--------------+				       */
/*	     |  |  dcl_*		strl_p*			       */
/*	     |  |   ________	 _________ 	bstr*	       */
/*	     +--+->|next    >null	|1,1 |2,1 >...	 ____	       */
/*		 |dcl_name|	|1,2 |2,2 >-------->|leng|	       */
/*	 	 |leng    |	.    .    .	|str |	       */
/*	 	 |dcl_v   |	:    :    :	|____|	       */
/*	 	 |________|				       */

dcl str_p		ptr;
dcl 1 bstr	based (str_p),	/* based string used for building    */
      2 leng	fixed bin,	/*  pseudo-char_var strings	       */
      2 str	char (bstr.leng),
      2 dummy	bit (36) aligned;	/* where next structure will go      */

dcl dcl_l_p	(2) ptr;		/* dcl_ list begin/end	       */
dcl dcl_p		ptr;
dcl 1 dcl_	based (dcl_p),	/* ** symbol declaration	       */
      2 next	ptr,		/* linked list next element	       */
      2 dcl_name	char (8),		/* declared name		       */
      2 leng	fixed bin,	/* length of definition string       */
      2 dcl_v	char (dcl_.leng),	/* symbol definition string	       */
      2 dummy	ptr;		/* where next one is based	       */
%page;
/*      mediachars*						       */
/*       _______			Next, all mediachars are defined     */
/*      |count=n|__ 		in terms of dcl'ed symbols or	       */
/*   (1)|name|out_r>----------+	literals.			       */
/*   (2)|name|out_r>...	|		 	bstr*	       */
/*      .    .     .	|		 	 ____	       */
/*      :    :     :	+---------------------------->|leng|	       */
/*   (n)|name|out_r>...			 	|str |	       */
/*      |____|_____|			 	|____|	       */
dcl mediachars_p	ptr;
dcl 1 mediachars	based (mediachars_p),
      2 count	fixed bin,	/* how many have been defined	       */
      2 e		(mediachars.count),
        3 name	char (32),	/* name of the char		       */
        3 out_r	bit (18) aligned;	/* output string to get it	       */

/*	       media*			       
/*	        _______			Then, all media are	       */
/*	 ______|count=m|_________ ... ______	described in terms of the  */
/*     (1)|name|rel_units|w11 |w12 |... |w1n |	mediachars, with the       */
/*     (2)|name|rel_units|w21 |w22 |... | @  |	widths being defined for   */
/*	.    .         .    .    .    .    .	each. Values might not     */
/*	:    :         :    :    :    :    :	exist for all mediachars   */
/*     (m)|name|rel_units|wm1 | @  |... |wmn |	in all media (shown as @). */
/*	|____|_________|____|____|... |____|			       */
/*    mediachar # -->     (1)  (2)  ...  (n)			       */
dcl media_p	ptr;
dcl 1 media	based (media_p),
      2 count	fixed bin,	/* how many have been defined	       */
      2 e		(media.count),
        3 name	char (32),	/* name of the media	       */
        3 rel_units fixed bin,	/* its stroke value		       */
        3 width	(mediachars.count) fixed bin;	  /* for each mediachar    */
%page;
/*	 view*						       */
/*          _______				Views are then made up     */
/*         |count=k|__			from the defined media.    */
/*      (1)|view1|med4|			Views can share a media,   */
/*      (2)|view2|med2|			but will differ media      */
/*         .     .    .			select string. Each Device */
/*         :     :    :			specifies its own set of   */
/*      (k)|viewk|med4|			media select strings.
/*         |_____|____|					       */

dcl view_p	ptr;
dcl 1 view	based (view_p),
      2 count	fixed bin,	/* how many defined		       */
      2 e		(view.count),
        3 name	char (32),	/* viewname		       */
        3 media	fixed bin;	/* media being referenced	       */


/*	Def*						       */
/*	 _______		Def's are a sort of macro definition.	       */
/*	|count=d|_	Whenever a set of Multics chars have the same  */
/*     (1)|name1|pt1|	definition in several fonts, instead of	       */
/*     (2)|name2|pt2|	entering the description again and again, a    */
/*	.     .   .	Def is made containing the needed info and     */
/*	:     :   :	then they are ref'ed in each table as needed.  */
/*     (d)|named|ptd|					       */
/*	|_____|___|					       */

dcl Def_p		ptr;
dcl 1 Def		based (Def_p),
      2 count	fixed bin,	/* how many Def's present	       */
      2 e		(Def.count),
        3 name	char (32),	/* internal name of this Def	       */
        3 pt	ptr;		/* Points to the node in the	       */
				/*  lex_string_ list at which source */
				/*  of the Def begins.  At ref time, */
				/*  this source will be be re-parsed */
				/*  via this pointer.	       */
%page;
/* fntl_p(1)>----+						       */
/* fntl_p(2)>---)|(---------------------+			       */
/*    +----------+			|			       */
/*    |	fnt*		fnt*	|	fnt*		       */
/*    |	 _____		 _____	|	 _____		       */
/*    +-->|next >------------>|next >---+-------->|next >null	       */
/*	|name |		|name |		|name |		       */
/*	|refno|		|refno|		|refno|		       */
/*	|node >...	|node >...	|node >...	       */
/*	|pt   >---+	|pt   >...	|pt   >...	       */
/*	|_____|  	|	|_____|		|_____|		       */
/*    +-------------+					       */
/*    |    font			Fonts are made up by selecting one   */
/*    |    _________		or more mediachars from a view and   */
/*    +-->|units_r  >-----+		associating them to Multics (input)  */
/*	|oput_r   >--+  |		characters. To speed up measuring,   */
/*	|rel_units|  |  |		the width portion of the font table  */
/*	|footsep  |  |  |		is a fixed size.		       */
/*	|min_spb  |  |  |		  To save space, however, the output */
/*	|avg_spb  |  |  |		string portion of the font is only   */
/*	|max_spb  |  |  |		as long as the highest Multics char  */
/*	|_________|  |  |		defined.			       */
/*    +----------------+  |					       */
/*    |	 opu*	      |	 uni*		   The oput and units      */
/*    |    _____	      |	 _____         units   tables often end up     */
/*    +-->|next >...      +-->|next >...     _____   looking like others of  */
/*	|ref_p>---+    	|ref_p>------>|(0)  |  their kind. Thus when   */
/*	|seqno|	|	|seqno|	    |(1)  |  each is completed, it   */
/*	|refno|   |	|refno|	    .     .  is matched against all  */
/*	|_____|	|	|_____|	    :     :  prior ones & logically  */
/*    +-------------+    	       	    |(511)|  removed if already      */
/*    |  	oput	    	       	    |_____|  there, reducing DSM     */
/*    |	 ____________			   size.		       */
/*    +-->|data_count=k|		       			       */
/*     (0)|which|what_r>...					       */
/*     (1)|which|what_r>...			From compdv's point of     */
/*  	.     .      .	    medchar_sel 	view, medchar_sel is a     */
/*  	:     :      :	   ________..._	bstr.		       */
/*     (k)|which|what_r>------->|len|text... |			       */
/*        |_____|______|	  |___|________|			       */
/*		    					       */
/*		    		oput.which references an entry in    */
/*		    		the Device's med_sel_table.	       */
%page;
dcl font_count	fixed bin;	/* # font entries present	       */
dcl fntl_p	(2) ptr;		/* begin/end fnt list	       */
dcl fnt_p		ptr;
dcl 1 fnt		based (fnt_p),	/* === font info entry	       */
      2 next	ptr,		/* next entry		       */
      2 name	char (32),	/* internal reference only	       */
      2 refno	fixed bin,	/* internal reference #	       */
      2 node	ptr,		/* rdc node for Font: statement      */
				/*  used for error messages	       */
      2 pt	ptr,		/* points to the font table	       */
      2 dummy	ptr;		/* where next structure goes	       */

dcl uni_ct	fixed bin init (0);
dcl unil_p	(2) ptr;
dcl uni_p		ptr;
dcl 1 uni		based (uni_p),	/* === units entry		       */
      2 next	ptr,		/* next entry		       */
      2 ref_p	ptr,		/* points to units table	       */
      2 seqno	fixed bin,	/* internal sequence #	       */
      2 refno	fixed bin;	/* internal reference #	       */
				/* when seqno=refno this is a "real" */
				/* entry, otherwise it's a duplicate */

dcl opul_p	(2) ptr;
dcl opu_p		ptr;
dcl 1 opu		based (opu_p),	/* === oputs entry		       */
      2 next	ptr,		/* next entry		       */
      2 ref_p	ptr,		/* points to oput table	       */
      2 seqno	fixed bin,	/* internal sequence #	       */
      2 refno	fixed bin;	/* internal reference #	       */
				/* when seqno=refno this is a "real" */
				/* entry, otherwise it's a duplicate */

%page;
/* 		           dvid*				       */
/*		           _______				       */
/*  dvidl_p(1)>-------------->|next   >------+     dvid*		       */
/*  dvidl_p(2)>----------+	|ndx    |	     |     _______		       */
/*		     |	|real   |	     +--->|next   >null	       */
/*		     |    |refname|	     |	|ndx    |		       */
/*		     |	|devname|	     |	|real   |		       */
/*		     |	|dvt_ndx|	     |	|refname|		       */
/*		     |	|_______|	     |	|devname|		       */
/*		     |		     |	|dvt_ndx|		       */
/*		     +-------------------+	|_______|		       */
dcl comp_dvid_new	bit (1);		/* a new comp_dvid is being started  */
dcl comp_dvid_ct	fixed bin init (0); /* how many actual comp_dvid defined */
dcl dvid_ct	fixed bin;	/* # dvid entries present	       */
dcl dvidl_p	(2) ptr;		/* begin/end of dvid list	       */
dcl dvid_p	ptr;
dcl 1 dvid	based (dvid_p),	/* === comp_dvid data	       */
      2 next	ptr,		/* link to next entry	       */
      2 ndx	fixed bin,	/* which dvid being referenced       */
      2 real	bit (1) aligned,	/* 1- defines a comp_dvid	       */
      2 refname	char (32),	/* external reference name	       */
      2 devname	char (32),	/* comp_dvid.devname	       */
      2 dvt_ndx	fixed bin,	/* comp_dvid.dvt_r derived from this */
      2 dummy	ptr;		/* place where next structure goes   */

/* This structure contains all the info necessary to generate comp_dvid.     */
%page;
/*					     	 dvt*	       */
/*  dvtl_p(1) >------+			        	 _______	       */
/*  dvtl_p(2) >-----)|(-------------------------------+---->|next   >null    */
/*		 |        dvt*		    |	|ndx    |	       */
/*		 |        _______		    |	|prent  >-...    */
/*		 +------>|next   >----------------+	|med_sel>--...   */
/*		         |ndx    |		          |ref    >-...    */
/*		         |prent  >--------+	          |_______|	       */
/*		         |med_sel>-----+  |			       */
/*		         |ref    >--+  |  |	    	 prent*	       */
/*		         |_______|	|  |  |		 __________      */
/*	    +-------------------------+  |  +------------>|outproc   |     */
/*	    |			   |  		|artproc   |     */
/*	    |      comp_dvt	    	   |   med_sel	|footproc  |     */
/*	    |      _________    	   |    _________	|__________|     */
/*	    +---->| details	|   	   +-->| details |		       */
/*		| below   |	       |  below  |		       */
/*		|_________|   	       |_________|		       */

dcl dvt_ct	fixed bin;	/* # dvt entries present	       */
dcl dvtl_p	(2) ptr;		/* begin/end of dvt list	       */
dcl dvt_p		ptr;
dcl 1 dvt		based (dvt_p),	/* === comp_dvt reference info       */
      2 next	ptr,		/* link to next entry	       */
      2 ndx	fixed bin,	/* which index this represents       */
      2 prent	ptr,		/* ptr to prent data	       */
      2 med_sel	ptr,		/* ptr to associated med_sel array   */
      2 ref	ptr,		/* ptr to comp_dvt		       */
      2 dummy	ptr;		/* place where next structure goes   */
dcl prent_p	ptr;
dcl 1 prent	based (prent_p),	/* === entryname strings, comp_dvt   */
      2 outproc	char (68) var,
      2 artproc	char (68) var,
      2 footproc	char (68) var,
      2 dummy	ptr;		/* place where next structure goes   */

%page;
/*	              mem*					       */
/*	         	    ______				       */
/*  meml_p(1) >----	+->|next  >--+				       */
/*  meml_p(2) >--+ 	   |ref_p >  |				       */
/* 	       |     |seqno |  |				       */
/*	       | 	   |______|  |				       */
/*	       +---------------+				       */
/*	       |     mem*					       */
/*	       |	   ______	          member			       */
/*	       +--->|next  >null      _________			       */
/*		  |ref_p >-------->| details |		       */
/*		  |seqno |         |  below  |		       */
/*		  |______|         |_________|		       */

dcl meml_p	(2) ptr;		/* begin/end member list	       */
dcl mem_ct	fixed bin init (0); /* internal sequence counter	       */
dcl mem_p		ptr;
dcl 1 mem		based (mem_p),	/* === member table (code gen only)  */
      2 next	ptr,		/* next entry		       */
      2 ref_p	ptr,		/* pointer to the member table       */
      2 seqno	fixed bin,	/* internal sequence #	       */
      2 refno	fixed bin,	/* internal reference #	       */
				/* when seqno=refno this is a "real" */
				/* entry, otherwise it's a duplicate */
      2 dummy	ptr;		/* where next structure goes	       */

/*		 EXTERNAL INTERCONNECTION in the DSM		       */
/*  linkage						       */
/*  section				             comp_dvid     */
/*  ______     +-----------------------------------------+     _______       */
/* |      |    |				       +--->|       |      */
/* |name1 >----+				            |devname|      */
/* |name2 >---)|(-------------------+    comp_dvid            |dvt_r  >--+   */
/* |name3 >----+   comp_dvid	      |    _______	            |_______|  |   */
/* |name4 >--+     _______	      +-->|       |	    comp_dvt	   |   */
/* | etc. |  +--->|       |	          |devname|	    ________	   |   */
/* |______|       |devname|	          |dvt_r  >--->| ...		   |   */
/*                |dvt_r  >--+          |_______|    |		   |   */
/*                |_______|  |				   |   */
/*  +-------<----------------+-----------------------------------<-------+   */
/*  |    comp_dvt						       */
/*  |    _____________			             bstr	       */
/*  +-->|             |			             ___________   */
/*      |atd_r        >-------------------------------------->|len|str... |  */
/*      |dvc_r        >...			    	  |___|_______|  */
/*      |med_sel_tab_r>-----------------+    med_sel_tab		       */
/*      | ...         |		|    _______       	   med_sel       */
/*      |family_ct=F  |		+-->|count=K|      	   ___________   */
/*   (1)|.member_r    >--+		 (1)|ref_r>---------->|len|str... |  */
/*   (1)|.name        |  |		    .     .           |___|_______|  */
/*      | ...         |  |		 (n)|ref_r>nullo		       */
/*      |_____________|  |		    .     .		       */
/*       +---------------+		 (K)|ref_r>...	 sizel	       */
/*       |    member		    |_____| 	 ________	       */
/*       |    _______	 +--------------------------->|val_ct=S|       */
/*       +-->|count=L|_________|________________	       (1)|val     |       */
/*	(1)|font_r> size_r>  | lex|Scaley|name|		.        .       */
/*	(2)|font_r> size_r>--+ lex|Scaley|name|		:        :       */
/*	   .      .       .       .      .    .	       (S)|val     |       */
/*	   :      :       :       :      :    :		|________|       */
/*	(L)|font_r>---+   > Scalex|Scaley|name|			       */
/*	   |______|___|___|_______|______|____|			       */
/*	              |					       */
/*    +-----------------+					       */
/*    |    font					units	       */
/*    |    _________				_____	       */
/*    +-->|units_r  >-------------------------------------->|(0)  |	       */
/*	|oput_r   >---+ 				|(1)  |	       */
/*	|rel_units|   |		  		.     .	       */
/*	|footsep  |   |  	oput	    	       	:     :	       */
/*	|min_spb  |   |    _________		       	|(511)|	       */
/*	|avg_spb  |   +-->|data_ct=k|__		|_____|	       */
/*	|max_spb  |    (0)|which|what_r>...			       */
/*	|_________|    (1)|which|what_r>...			       */
/*		        .     .      .	    medchar_sel	       */
/*		        :     :      :	   ________..._	       */
/*		     (k)|which|what_r>--------->|len|text... |	       */
/*		        |_____|______|	  |___|________|	       */
/*							       */
/*		    		oput.which references an entry in    */
/*		    		the Device's med_sel_table.	       */


*/
                                          -----------------------------------------------------------


Historical Background

This edition of the Multics software materials and documentation is provided and donated
to Massachusetts Institute of Technology by Group Bull including Bull HN Information Systems Inc. 
as a contribution to computer science knowledge.  
This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology,
Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell Bull Inc., Groupe Bull
and Bull HN Information Systems Inc. to the development of this operating system. 
Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970),
renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership
of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for 
managing computer hardware properly and for executing programs. Many subsequent operating systems 
incorporated Multics principles.
Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., 
as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. .

                                          -----------------------------------------------------------

Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without
fee is hereby granted,provided that the below copyright notice and historical background appear in all copies
and that both the copyright notice and historical background and this permission notice appear in supporting
documentation, and that the names of MIT, HIS, Bull or Bull HN not be used in advertising or publicity pertaining
to distribution of the programs without specific prior written permission.
    Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc.
    Copyright 2006 by Bull HN Information Systems Inc.
    Copyright 2006 by Bull SAS
    All Rights Reserved

*/
