
\chapter{Conventions}

\section{\#define Conventions}

	Only numbers $>$0 should be passed between modules.  All negative
numbers will be reserved for passing within modules. 


\section{Menu Actions and Arguments}

	A Callback/Dispath method.   Each function will have a:

\begin{verbatim}
	KGetArgFUNCTIONTYPE
	KExecuteFUNCTIONTYPE  
\end{verbatim}

	where FUNCTIONTYPE  will vary with each function. 

\vskip3ex


	The dispatcher will be: \\
\verb+KMenuDispath(kcontext, function, matrix, linklist);+
\begin{description}		
	\item[kcontext] kernel context

	\item[function] all functions will be externally
declared in a header file. 

	\item[matrix] will be the currently selected matrix (or NULL if	none)
	
	\item[linklist] will be the LinkList representation of the
		arguemnts needed for function unless it's KGetArgFUNCTIONTYPE 
		in which case linklist will get NULL
\end{description}

	\subsection{Return Values}

	The return value from the dispatcher will be either a token
message or a link list.  If it is a \verb+KGetArg+ call, the return
value is a linklist which will have (in order):  

\begin{description}
	\item[char *] the message to be displayed on the status bar.
NULL is valid. 
	\item[argument type]  An enum type which will specify the
arguement type needed.  Possibilities are {\em Integer}, {\em String},
{\em Filename}, etc
	\item[additional args] The number of these vary, and are
dependant. For example, a {\em Filename} arguement request should also
have the path name sent
\end{description}
