% -*- Mode:Text -*- 

%----------------------------------------------------------------
		% SHIP SCHEMATICS FILE
% Read line-by-line a file (typically generated by awk) listing
% the schematics sheets to be entered in the current appendix;
% the file must contain no blank lines.
% Process each sheet line with the macro \processspecs.
% Typically, this will input a verbatim file or make a \special for
% a PostScript file, and correspondingly will make an entry
% in the appropriate table of contents.

\newread\sors
\newif\ifnoEOF

\def\shipspecs#1{
{\onecolumn
\openin\sors=#1
\def\noEOFtest{\if\par\buffer\noEOFfalse\else\noEOFtrue\fi}
\loop \read\sors to\buffer\noEOFtest
      \ifnoEOF\expandafter\processspecs\buffer
\repeat
\closein\sors
\twocolumn}
}
%----------------------------------------------------------------
		% LOCATION AND TYPE OF SCHEMATICS
% ...{filename}{typeset filename}{path}

\newcommand{\chipsch}[3]{
	\newpage
	\dataheader{\whichchip}{#2.ps}{}
	\datacaption{#2.ps}{}\vfill\hfill
	\epsfig{file=#3/#1.ps,
	height=8.9in,bbllx=30,bblly=20,bburx=575,bbury=734}\hfill\vfill
}
\newcounter{basepage}
\newcommand{\chipfsm}[3]{{% extra group to hide redefinit. of \thedatapage
	\newpage
	\setcounter{basepage}{\value{page}}
	\def\thedatapage{\setcounter{datapage}{\value{page}}
		\addtocounter{datapage}{-\value{basepage}}
		\addtocounter{datapage}{1}
		[\arabic{datapage}]}
	\dataheader{\whichchip\ schematics}{#2.sm}{\thedatapage}
	\datacaption{#2.sm}{}{\small
	\verbatiminput{#3/#1.sm}}}}


