%++++++++
%.IDENTIFICATION manpage.tex
%.PURPOSE        Definition of macros related to Man Pages
%.AUTHOR         Francois Ochsenbein
%.VERSION   1.0  18-Jul-1992
%----------
% The normal sequence of a man page is
%\begin{manpage} {sec_num}{Name}{Short Title}{Version}{Keywords}
%\syntax{ how to call }
%\mansec{ Description }
%\mansec{ Options }
%\mansec{ Returned status }
%\mansec{ Environment Variables }
%\mansec{ Restrictions }
%\seealso { Other topics }
%\end{manpage}
%----------

\def\b{$\backslash$}
\def\mansec#1{\item \hspace{-\leftmargin}\makebox[\leftmargin][l]{{\sc#1}}

}
%\def\manpage#1#2#3#4#5{ %  {Section} {Name} {Short title} {Version} {Keywords}
%\def\endmanpage{ \end{list} }
%\ifundefined{mantoc}
%  \message{....'mantoc' undefined, no toc inclusion from Man Pages}\message{}
   \def\mantoc{0}
%\else\message{}
%  \message{....'mantoc' defined as \mantoc}
%  \ifnum\mantoc=0\message{(no }\else\message{(}\fi
%  \message{toc inclusion from Man Pages)}
%  \message{}
%\fi
\newenvironment{manpage}[5] {
  %	\clearpage
  %	\noindent\rule{\textwidth}{1pt} 
	\noindent \ifodd\value{page} %
  	{{\bf (#1)} \quad \if.#4\else({\it Rev.} #4)\fi %
  	\hfill {\em #3} \hfill {\bf#2}}%
  	\else%
  	\noindent {{\bf #2} \quad \if.#4\else({\it Rev.} #4)\fi %
  	\hfill {\em #3} \hfill {\bf(#1)}}
  	\fi \\
  	\rule{\textwidth}{1pt}
	\ifnum\mantoc>0 \addcontentsline{toc}{section}{#2 (#1)}\fi
	\begin{list}{}{\leftmargin=1cm%
		\labelsep=0.75em\labelwidth=\leftmargin%
		\addtolength{\labelwidth}{-\labelsep}%
		\parsep=0.5ex\topsep=\parskip\itemsep=\parskip}
	%\parindent=0pt
  
  	\bigskip
  }{ \end{list} }
\def\syntax#1{ \mansec{Syntax}

   	{{ #1}}
   	%\fbox{{ #1}}
} 

\def\seealso#1{
  	\mansec{See also}

#1
}
\def\option#1{

  \hspace*{-.5\leftmargin} {\bf #1} \quad
}
