\section{util/dll-src/srecload.c File Reference}
\label{srecload_8c}\index{util/dll-src/srecload.c@{util/dll-src/srecload.c}}
load symbol-srec files 

{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$ctype.h$>$}\par
{\tt \#include \char`\"{}srec.h\char`\"{}}\par
{\tt \#include \char`\"{}srecload.h\char`\"{}}\par
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf IMG\_\-LOWEST}\ 0x0000
\item 
\#define {\bf IMG\_\-HIGHEST}\ 0xffff
\item 
\#define {\bf IMG\_\-MAXSIZE}\ 0x10000
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int {\bf symbols\_\-load} ({\bf image\_\-t} $\ast$img, FILE $\ast$file)
\begin{CompactList}\small\item\em load symbols from symbolsrec file \item\end{CompactList}\item 
void {\bf image\_\-load} ({\bf image\_\-t} $\ast$img, const char $\ast$filename)
\begin{CompactList}\small\item\em load an RCX s-record file and return its image \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
load symbol-srec files 

\begin{Desc}
\item[Author:]Markus L. Noga $<${\tt markus@noga.de}$>$\end{Desc}


Definition in file {\bf srecload.c}.

\subsection{Define Documentation}
\index{srecload.c@{srecload.c}!IMG_HIGHEST@{IMG\_\-HIGHEST}}
\index{IMG_HIGHEST@{IMG\_\-HIGHEST}!srecload.c@{srecload.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define IMG\_\-HIGHEST\ 0xffff}\label{srecload_8c_a1}




Definition at line 50 of file srecload.c.\index{srecload.c@{srecload.c}!IMG_LOWEST@{IMG\_\-LOWEST}}
\index{IMG_LOWEST@{IMG\_\-LOWEST}!srecload.c@{srecload.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define IMG\_\-LOWEST\ 0x0000}\label{srecload_8c_a0}




Definition at line 49 of file srecload.c.\index{srecload.c@{srecload.c}!IMG_MAXSIZE@{IMG\_\-MAXSIZE}}
\index{IMG_MAXSIZE@{IMG\_\-MAXSIZE}!srecload.c@{srecload.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define IMG\_\-MAXSIZE\ 0x10000}\label{srecload_8c_a2}




Definition at line 51 of file srecload.c.

\subsection{Function Documentation}
\index{srecload.c@{srecload.c}!image_load@{image\_\-load}}
\index{image_load@{image\_\-load}!srecload.c@{srecload.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void image\_\-load ({\bf image\_\-t} $\ast$ {\em img}, const char $\ast$ {\em filename})}\label{srecload_8c_a4}


load an RCX s-record file and return its image 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em filename}]file to load \item[{\em img}]image to store to \end{description}
\end{Desc}


Definition at line 158 of file srecload.c.

References srec\_\-t::addr, image\_\-t::base, calloc(), srec\_\-t::count, srec\_\-t::data, image\_\-t::data\_\-size, exit(), memcpy(), image\_\-t::offset, S\_\-INVALID\_\-CHAR, S\_\-INVALID\_\-CKSUM, S\_\-INVALID\_\-HDR, S\_\-INVALID\_\-TYPE, S\_\-NULL, S\_\-TOO\_\-LONG, S\_\-TOO\_\-SHORT, srec\_\-decode(), symbols\_\-load(), image\_\-t::text, image\_\-t::text\_\-size, and srec\_\-t::type.

Referenced by main().\index{srecload.c@{srecload.c}!symbols_load@{symbols\_\-load}}
\index{symbols_load@{symbols\_\-load}!srecload.c@{srecload.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int symbols\_\-load ({\bf image\_\-t} $\ast$ {\em img}, FILE $\ast$ {\em file})\hspace{0.3cm}{\tt  [static]}}\label{srecload_8c_a3}


load symbols from symbolsrec file 

\begin{Desc}
\item[Returns:]current line in file\end{Desc}
the symbol section is enclosed in \$\$ symbol line format is SYMBOL \$ADDR 

Definition at line 60 of file srecload.c.

References image\_\-t::base, image\_\-t::bss\_\-size, image\_\-t::data\_\-size, exit(), NULL, image\_\-t::offset, strcmp(), and image\_\-t::text\_\-size.

Referenced by image\_\-load().