\section{aversive\_\-10-03-12/modules/ihm/parse/parse\_\-num.c File Reference}
\label{parse__num_8c}\index{aversive\_\-10-03-12/modules/ihm/parse/parse\_\-num.c@{aversive\_\-10-03-12/modules/ihm/parse/parse\_\-num.c}}
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$inttypes.h$>$}\par
{\tt \#include $<$ctype.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include \char`\"{}parse.h\char`\"{}}\par
{\tt \#include \char`\"{}parse\_\-num.h\char`\"{}}\par
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf debug\_\-printf}(args...)~do \{\} while(0)
\item 
\#define {\bf U08\_\-MIN}~0x00
\item 
\#define {\bf U08\_\-MAX}~0xFF
\item 
\#define {\bf U16\_\-MIN}~0x0000
\item 
\#define {\bf U16\_\-MAX}~0xFFFF
\item 
\#define {\bf U32\_\-MIN}~0x00000000
\item 
\#define {\bf U32\_\-MAX}~0xFFFFFFFF
\item 
\#define {\bf S08\_\-MIN}~0x80
\item 
\#define {\bf S08\_\-MAX}~0x7F
\item 
\#define {\bf S16\_\-MIN}~0x8000
\item 
\#define {\bf S16\_\-MAX}~0x7FFF
\item 
\#define {\bf S32\_\-MIN}~0x80000000
\item 
\#define {\bf S32\_\-MAX}~0x7FFFFFFF
\end{CompactItemize}
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum {\bf num\_\-parse\_\-state\_\-t} \{ \par
{\bf START}, 
{\bf DEC\_\-NEG}, 
{\bf BIN}, 
{\bf HEX}, 
\par
{\bf FLOAT\_\-POS}, 
{\bf FLOAT\_\-NEG}, 
{\bf ERROR}, 
{\bf FIRST\_\-OK}, 
\par
{\bf ZERO\_\-OK}, 
{\bf HEX\_\-OK}, 
{\bf OCTAL\_\-OK}, 
{\bf BIN\_\-OK}, 
\par
{\bf DEC\_\-NEG\_\-OK}, 
{\bf DEC\_\-POS\_\-OK}, 
{\bf FLOAT\_\-POS\_\-OK}, 
{\bf FLOAT\_\-NEG\_\-OK}
 \}
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int8\_\-t {\bf parse\_\-num} ({\bf parse\_\-pgm\_\-token\_\-hdr\_\-t} $\ast$tk, const char $\ast$srcbuf, void $\ast$res)
\item 
int8\_\-t {\bf get\_\-help\_\-num} ({\bf parse\_\-pgm\_\-token\_\-hdr\_\-t} $\ast$tk, char $\ast$dstbuf, uint8\_\-t size)
\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
struct {\bf token\_\-ops} {\bf token\_\-num\_\-ops}
\end{CompactItemize}


\subsection{Define Documentation}
\index{parse\_\-num.c@{parse\_\-num.c}!debug\_\-printf@{debug\_\-printf}}
\index{debug\_\-printf@{debug\_\-printf}!parse_num.c@{parse\_\-num.c}}
\subsubsection[debug\_\-printf]{\setlength{\rightskip}{0pt plus 5cm}\#define debug\_\-printf(args...)~do \{\} while(0)}\label{parse__num_8c_acea5c89f299b0d2ae3db3be26d54114}




Definition at line 10 of file parse\_\-num.c.\index{parse\_\-num.c@{parse\_\-num.c}!S08\_\-MAX@{S08\_\-MAX}}
\index{S08\_\-MAX@{S08\_\-MAX}!parse_num.c@{parse\_\-num.c}}
\subsubsection[S08\_\-MAX]{\setlength{\rightskip}{0pt plus 5cm}\#define S08\_\-MAX~0x7F}\label{parse__num_8c_38d8c342a166fec81079599a02a89fcb}




Definition at line 20 of file parse\_\-num.c.\index{parse\_\-num.c@{parse\_\-num.c}!S08\_\-MIN@{S08\_\-MIN}}
\index{S08\_\-MIN@{S08\_\-MIN}!parse_num.c@{parse\_\-num.c}}
\subsubsection[S08\_\-MIN]{\setlength{\rightskip}{0pt plus 5cm}\#define S08\_\-MIN~0x80}\label{parse__num_8c_d03b1c09b402f6eb191c87685c14f4f2}




Definition at line 19 of file parse\_\-num.c.\index{parse\_\-num.c@{parse\_\-num.c}!S16\_\-MAX@{S16\_\-MAX}}
\index{S16\_\-MAX@{S16\_\-MAX}!parse_num.c@{parse\_\-num.c}}
\subsubsection[S16\_\-MAX]{\setlength{\rightskip}{0pt plus 5cm}\#define S16\_\-MAX~0x7FFF}\label{parse__num_8c_0d07bb025f7bc9920aab710742473092}




Definition at line 22 of file parse\_\-num.c.\index{parse\_\-num.c@{parse\_\-num.c}!S16\_\-MIN@{S16\_\-MIN}}
\index{S16\_\-MIN@{S16\_\-MIN}!parse_num.c@{parse\_\-num.c}}
\subsubsection[S16\_\-MIN]{\setlength{\rightskip}{0pt plus 5cm}\#define S16\_\-MIN~0x8000}\label{parse__num_8c_361c4570b9b7e393dfe4d5c617ba2059}




Definition at line 21 of file parse\_\-num.c.\index{parse\_\-num.c@{parse\_\-num.c}!S32\_\-MAX@{S32\_\-MAX}}
\index{S32\_\-MAX@{S32\_\-MAX}!parse_num.c@{parse\_\-num.c}}
\subsubsection[S32\_\-MAX]{\setlength{\rightskip}{0pt plus 5cm}\#define S32\_\-MAX~0x7FFFFFFF}\label{parse__num_8c_7fef350f849a0cf0b785b7c4acfb3331}




Definition at line 24 of file parse\_\-num.c.\index{parse\_\-num.c@{parse\_\-num.c}!S32\_\-MIN@{S32\_\-MIN}}
\index{S32\_\-MIN@{S32\_\-MIN}!parse_num.c@{parse\_\-num.c}}
\subsubsection[S32\_\-MIN]{\setlength{\rightskip}{0pt plus 5cm}\#define S32\_\-MIN~0x80000000}\label{parse__num_8c_95f2d9ec797e08f3556033649aea51b3}




Definition at line 23 of file parse\_\-num.c.\index{parse\_\-num.c@{parse\_\-num.c}!U08\_\-MAX@{U08\_\-MAX}}
\index{U08\_\-MAX@{U08\_\-MAX}!parse_num.c@{parse\_\-num.c}}
\subsubsection[U08\_\-MAX]{\setlength{\rightskip}{0pt plus 5cm}\#define U08\_\-MAX~0xFF}\label{parse__num_8c_d6b20a8cad32aaeeb80500669592be01}




Definition at line 14 of file parse\_\-num.c.\index{parse\_\-num.c@{parse\_\-num.c}!U08\_\-MIN@{U08\_\-MIN}}
\index{U08\_\-MIN@{U08\_\-MIN}!parse_num.c@{parse\_\-num.c}}
\subsubsection[U08\_\-MIN]{\setlength{\rightskip}{0pt plus 5cm}\#define U08\_\-MIN~0x00}\label{parse__num_8c_5421c6f932a8eb8ca8674577319b6823}




Definition at line 13 of file parse\_\-num.c.\index{parse\_\-num.c@{parse\_\-num.c}!U16\_\-MAX@{U16\_\-MAX}}
\index{U16\_\-MAX@{U16\_\-MAX}!parse_num.c@{parse\_\-num.c}}
\subsubsection[U16\_\-MAX]{\setlength{\rightskip}{0pt plus 5cm}\#define U16\_\-MAX~0xFFFF}\label{parse__num_8c_c580728e242e90fe3082dc7fe45ec6c9}




Definition at line 16 of file parse\_\-num.c.\index{parse\_\-num.c@{parse\_\-num.c}!U16\_\-MIN@{U16\_\-MIN}}
\index{U16\_\-MIN@{U16\_\-MIN}!parse_num.c@{parse\_\-num.c}}
\subsubsection[U16\_\-MIN]{\setlength{\rightskip}{0pt plus 5cm}\#define U16\_\-MIN~0x0000}\label{parse__num_8c_80b4ee16c02644eef90553da09dc0907}




Definition at line 15 of file parse\_\-num.c.\index{parse\_\-num.c@{parse\_\-num.c}!U32\_\-MAX@{U32\_\-MAX}}
\index{U32\_\-MAX@{U32\_\-MAX}!parse_num.c@{parse\_\-num.c}}
\subsubsection[U32\_\-MAX]{\setlength{\rightskip}{0pt plus 5cm}\#define U32\_\-MAX~0xFFFFFFFF}\label{parse__num_8c_4028a1a55fd7b907a44c48d5ca42d6a6}




Definition at line 18 of file parse\_\-num.c.\index{parse\_\-num.c@{parse\_\-num.c}!U32\_\-MIN@{U32\_\-MIN}}
\index{U32\_\-MIN@{U32\_\-MIN}!parse_num.c@{parse\_\-num.c}}
\subsubsection[U32\_\-MIN]{\setlength{\rightskip}{0pt plus 5cm}\#define U32\_\-MIN~0x00000000}\label{parse__num_8c_d0d6d592d964acd9de17674242bf2707}




Definition at line 17 of file parse\_\-num.c.

\subsection{Enumeration Type Documentation}
\index{parse\_\-num.c@{parse\_\-num.c}!num\_\-parse\_\-state\_\-t@{num\_\-parse\_\-state\_\-t}}
\index{num\_\-parse\_\-state\_\-t@{num\_\-parse\_\-state\_\-t}!parse_num.c@{parse\_\-num.c}}
\subsubsection[num\_\-parse\_\-state\_\-t]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf num\_\-parse\_\-state\_\-t}}\label{parse__num_8c_e5118e59829be970564234cd095b932d}


\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{START@{START}!parse\_\-num.c@{parse\_\-num.c}}\index{parse\_\-num.c@{parse\_\-num.c}!START@{START}}\item[{\em 
START\label{parse__num_8c_e5118e59829be970564234cd095b932d13d000b4d7dc70d90239b7430d1eb6b2}
}]\index{DEC\_\-NEG@{DEC\_\-NEG}!parse\_\-num.c@{parse\_\-num.c}}\index{parse\_\-num.c@{parse\_\-num.c}!DEC\_\-NEG@{DEC\_\-NEG}}\item[{\em 
DEC\_\-NEG\label{parse__num_8c_e5118e59829be970564234cd095b932dae73ad00ff731937d677aec2ad6b9928}
}]\index{BIN@{BIN}!parse\_\-num.c@{parse\_\-num.c}}\index{parse\_\-num.c@{parse\_\-num.c}!BIN@{BIN}}\item[{\em 
BIN\label{parse__num_8c_e5118e59829be970564234cd095b932d3dba92f17ebb0d7efe6056d51e9acdc7}
}]\index{HEX@{HEX}!parse\_\-num.c@{parse\_\-num.c}}\index{parse\_\-num.c@{parse\_\-num.c}!HEX@{HEX}}\item[{\em 
HEX\label{parse__num_8c_e5118e59829be970564234cd095b932dd3c20094c5fe3327350484d01c44c137}
}]\index{FLOAT\_\-POS@{FLOAT\_\-POS}!parse\_\-num.c@{parse\_\-num.c}}\index{parse\_\-num.c@{parse\_\-num.c}!FLOAT\_\-POS@{FLOAT\_\-POS}}\item[{\em 
FLOAT\_\-POS\label{parse__num_8c_e5118e59829be970564234cd095b932d67251e005edc108ce8ef5553a7fef42d}
}]\index{FLOAT\_\-NEG@{FLOAT\_\-NEG}!parse\_\-num.c@{parse\_\-num.c}}\index{parse\_\-num.c@{parse\_\-num.c}!FLOAT\_\-NEG@{FLOAT\_\-NEG}}\item[{\em 
FLOAT\_\-NEG\label{parse__num_8c_e5118e59829be970564234cd095b932d722fc7e372e514a75934ad8734d8c58f}
}]\index{ERROR@{ERROR}!parse\_\-num.c@{parse\_\-num.c}}\index{parse\_\-num.c@{parse\_\-num.c}!ERROR@{ERROR}}\item[{\em 
ERROR\label{parse__num_8c_e5118e59829be970564234cd095b932d2fd6f336d08340583bd620a7f5694c90}
}]\index{FIRST\_\-OK@{FIRST\_\-OK}!parse\_\-num.c@{parse\_\-num.c}}\index{parse\_\-num.c@{parse\_\-num.c}!FIRST\_\-OK@{FIRST\_\-OK}}\item[{\em 
FIRST\_\-OK\label{parse__num_8c_e5118e59829be970564234cd095b932de6ff5e60cfc1c77bcf3ba831981d5532}
}]\index{ZERO\_\-OK@{ZERO\_\-OK}!parse\_\-num.c@{parse\_\-num.c}}\index{parse\_\-num.c@{parse\_\-num.c}!ZERO\_\-OK@{ZERO\_\-OK}}\item[{\em 
ZERO\_\-OK\label{parse__num_8c_e5118e59829be970564234cd095b932dbcd6d9436c3742a12fb812bcd63df9fa}
}]\index{HEX\_\-OK@{HEX\_\-OK}!parse\_\-num.c@{parse\_\-num.c}}\index{parse\_\-num.c@{parse\_\-num.c}!HEX\_\-OK@{HEX\_\-OK}}\item[{\em 
HEX\_\-OK\label{parse__num_8c_e5118e59829be970564234cd095b932d76adfafe1148c75ba709cb90956b205d}
}]\index{OCTAL\_\-OK@{OCTAL\_\-OK}!parse\_\-num.c@{parse\_\-num.c}}\index{parse\_\-num.c@{parse\_\-num.c}!OCTAL\_\-OK@{OCTAL\_\-OK}}\item[{\em 
OCTAL\_\-OK\label{parse__num_8c_e5118e59829be970564234cd095b932d1b9285581ea3a23604d48709922a3021}
}]\index{BIN\_\-OK@{BIN\_\-OK}!parse\_\-num.c@{parse\_\-num.c}}\index{parse\_\-num.c@{parse\_\-num.c}!BIN\_\-OK@{BIN\_\-OK}}\item[{\em 
BIN\_\-OK\label{parse__num_8c_e5118e59829be970564234cd095b932ddc1aa78ad6d4d7d191034afb0f3d6bde}
}]\index{DEC\_\-NEG\_\-OK@{DEC\_\-NEG\_\-OK}!parse\_\-num.c@{parse\_\-num.c}}\index{parse\_\-num.c@{parse\_\-num.c}!DEC\_\-NEG\_\-OK@{DEC\_\-NEG\_\-OK}}\item[{\em 
DEC\_\-NEG\_\-OK\label{parse__num_8c_e5118e59829be970564234cd095b932d997c57e5462eada8adeb79f4ae705e2d}
}]\index{DEC\_\-POS\_\-OK@{DEC\_\-POS\_\-OK}!parse\_\-num.c@{parse\_\-num.c}}\index{parse\_\-num.c@{parse\_\-num.c}!DEC\_\-POS\_\-OK@{DEC\_\-POS\_\-OK}}\item[{\em 
DEC\_\-POS\_\-OK\label{parse__num_8c_e5118e59829be970564234cd095b932d1b6e6bedd16935dd70245ee59ababd48}
}]\index{FLOAT\_\-POS\_\-OK@{FLOAT\_\-POS\_\-OK}!parse\_\-num.c@{parse\_\-num.c}}\index{parse\_\-num.c@{parse\_\-num.c}!FLOAT\_\-POS\_\-OK@{FLOAT\_\-POS\_\-OK}}\item[{\em 
FLOAT\_\-POS\_\-OK\label{parse__num_8c_e5118e59829be970564234cd095b932d114b2f5a8551da6e938b7cb725a8bf97}
}]\index{FLOAT\_\-NEG\_\-OK@{FLOAT\_\-NEG\_\-OK}!parse\_\-num.c@{parse\_\-num.c}}\index{parse\_\-num.c@{parse\_\-num.c}!FLOAT\_\-NEG\_\-OK@{FLOAT\_\-NEG\_\-OK}}\item[{\em 
FLOAT\_\-NEG\_\-OK\label{parse__num_8c_e5118e59829be970564234cd095b932db4e1f864213d747ea4cad77255ddb614}
}]\end{description}
\end{Desc}



Definition at line 35 of file parse\_\-num.c.

\subsection{Function Documentation}
\index{parse\_\-num.c@{parse\_\-num.c}!get\_\-help\_\-num@{get\_\-help\_\-num}}
\index{get\_\-help\_\-num@{get\_\-help\_\-num}!parse_num.c@{parse\_\-num.c}}
\subsubsection[get\_\-help\_\-num]{\setlength{\rightskip}{0pt plus 5cm}int8\_\-t get\_\-help\_\-num ({\bf parse\_\-pgm\_\-token\_\-hdr\_\-t} $\ast$ {\em tk}, \/  char $\ast$ {\em dstbuf}, \/  uint8\_\-t {\em size})}\label{parse__num_8c_4460330481777a74f7d99b1c95371544}




Definition at line 423 of file parse\_\-num.c.

References token\_\-num\_\-data::type.\index{parse\_\-num.c@{parse\_\-num.c}!parse\_\-num@{parse\_\-num}}
\index{parse\_\-num@{parse\_\-num}!parse_num.c@{parse\_\-num.c}}
\subsubsection[parse\_\-num]{\setlength{\rightskip}{0pt plus 5cm}int8\_\-t parse\_\-num ({\bf parse\_\-pgm\_\-token\_\-hdr\_\-t} $\ast$ {\em tk}, \/  const char $\ast$ {\em srcbuf}, \/  void $\ast$ {\em res})}\label{parse__num_8c_6e79ca80d8804ebc13d24adf2ac713cb}




Definition at line 88 of file parse\_\-num.c.

References BIN, BIN\_\-OK, debug\_\-printf, DEC\_\-NEG, DEC\_\-NEG\_\-OK, DEC\_\-POS\_\-OK, ERROR, FLOAT, FLOAT\_\-NEG, FLOAT\_\-NEG\_\-OK, FLOAT\_\-POS, FLOAT\_\-POS\_\-OK, HEX, HEX\_\-OK, INT16, INT32, INT8, isendoftoken(), OCTAL\_\-OK, S08\_\-MAX, S16\_\-MAX, S32\_\-MAX, START, token\_\-num\_\-data::type, U08\_\-MAX, U16\_\-MAX, UINT16, UINT32, UINT8, and ZERO\_\-OK.

\subsection{Variable Documentation}
\index{parse\_\-num.c@{parse\_\-num.c}!token\_\-num\_\-ops@{token\_\-num\_\-ops}}
\index{token\_\-num\_\-ops@{token\_\-num\_\-ops}!parse_num.c@{parse\_\-num.c}}
\subsubsection[token\_\-num\_\-ops]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf token\_\-ops} {\bf token\_\-num\_\-ops}}\label{parse__num_8c_d318fecfb5398e80d3a29d145d483e72}


\textbf{Initial value:}

\begin{Code}\begin{verbatim} {
        .parse = parse_num,
        .complete_get_nb = NULL,
        .complete_get_elt = NULL,
        .get_help = get_help_num,
}
\end{verbatim}
\end{Code}


Definition at line 27 of file parse\_\-num.c.