\section{cmml.h File Reference}
\label{cmml_8h}\index{cmml.h@{cmml.h}}
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$expat.h$>$}\par
\subsection*{Data Structures}
\begin{CompactItemize}
\item 
struct {\bf CMML\_\-UTC}
\item 
struct {\bf CMML\_\-Time}
\item 
struct {\bf \_\-CMML\_\-List}
\item 
struct {\bf CMML\_\-Preamble}
\item 
struct {\bf CMML\_\-ParamElement}
\item 
struct {\bf CMML\_\-ImportElement}
\item 
struct {\bf CMML\_\-Stream}
\item 
struct {\bf CMML\_\-MetaElement}
\item 
struct {\bf CMML\_\-LinkElement}
\item 
struct {\bf CMML\_\-Head}
\item 
struct {\bf CMML\_\-Clip}
\item 
struct {\bf CMML\_\-Element}
\item 
struct {\bf CMML\_\-Error}
\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
typedef void {\bf CMML}
\item 
typedef enum {\bf \_\-CMML\_\-Time\_\-Type} {\bf CMML\_\-Time\_\-Type}
\item 
typedef struct {\bf \_\-CMML\_\-List} {\bf CMML\_\-List}
\item 
typedef void $\ast$($\ast$ {\bf CMML\_\-CloneFunc} )(void $\ast$data)
\item 
typedef void $\ast$($\ast$ {\bf CMML\_\-FreeFunc} )(void $\ast$data)
\item 
typedef int($\ast$ {\bf CMML\_\-CmpFunc} )(void $\ast$cmp\_\-ctx, void $\ast$s1, void $\ast$s2)
\item 
typedef enum {\bf \_\-CMML\_\-Element\_\-Type} {\bf CMML\_\-Element\_\-Type}
\item 
typedef enum {\bf \_\-CMML\_\-Error\_\-Type} {\bf CMML\_\-Error\_\-Type}
\item 
typedef int($\ast$ {\bf CMMLReadStream} )({\bf CMML} $\ast$cmml, const {\bf CMML\_\-Stream} $\ast$stream, void $\ast$user\_\-data)
\item 
typedef int($\ast$ {\bf CMMLReadHead} )({\bf CMML} $\ast$cmml, const {\bf CMML\_\-Head} $\ast$head, void $\ast$user\_\-data)
\item 
typedef int($\ast$ {\bf CMMLReadClip} )({\bf CMML} $\ast$cmml, const {\bf CMML\_\-Clip} $\ast$clip, void $\ast$user\_\-data)
\end{CompactItemize}
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum {\bf \_\-CMML\_\-Time\_\-Type} \{ {\bf CMML\_\-SEC\_\-TIME}, 
{\bf CMML\_\-UTC\_\-TIME}
 \}
\item 
enum {\bf \_\-CMML\_\-Element\_\-Type} \{ \par
{\bf CMML\_\-NONE}, 
{\bf CMML\_\-CMML}, 
{\bf CMML\_\-STREAM}, 
{\bf CMML\_\-IMPORT}, 
\par
{\bf CMML\_\-HEAD}, 
{\bf CMML\_\-CLIP}
 \}
\item 
enum {\bf \_\-CMML\_\-Error\_\-Type} \{ \par
{\bf CMML\_\-OK}, 
{\bf CMML\_\-EOF}, 
{\bf CMML\_\-READ\_\-ERROR}, 
{\bf CMML\_\-TIME\_\-ERROR}, 
\par
{\bf CMML\_\-MALLOC\_\-ERROR}, 
{\bf CMML\_\-EXPAT\_\-ERROR}, 
{\bf CMML\_\-PARSE\_\-ERROR}, 
{\bf CMML\_\-NO\_\-CMML\_\-TAG}, 
\par
{\bf CMML\_\-NO\_\-HEAD\_\-TAG}, 
{\bf CMML\_\-STREAM\_\-NOT\_\-FIRST}, 
{\bf CMML\_\-HEAD\_\-AFTER\_\-CLIP}, 
{\bf CMML\_\-DUPLICATE\_\-STREAM}, 
\par
{\bf CMML\_\-DUPLICATE\_\-HEAD}, 
{\bf CMML\_\-FORMAT\_\-ERROR}, 
{\bf CMML\_\-UNKNOWN\_\-TAG}, 
{\bf CMML\_\-TAG\_\-IGNORED}, 
\par
{\bf CMML\_\-XMLNS\_\-REDEFINED}, 
{\bf CMML\_\-NONSEQUENTIAL\_\-CLIP}
 \}
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
{\bf CMML} $\ast$ {\bf cmml\_\-open} (const char $\ast$XMLfilename)
\item 
{\bf CMML} $\ast$ {\bf cmml\_\-new} (FILE $\ast$file)
\item 
FILE $\ast$ {\bf cmml\_\-destroy} ({\bf CMML} $\ast$cmml)
\item 
{\bf CMML} $\ast$ {\bf cmml\_\-close} ({\bf CMML} $\ast$cmml)
\item 
int {\bf cmml\_\-set\_\-read\_\-callbacks} ({\bf CMML} $\ast$cmml, {\bf CMMLReadStream} read\_\-stream, {\bf CMMLReadHead} read\_\-head, {\bf CMMLReadClip} read\_\-clip, void $\ast$user\_\-data)
\item 
long {\bf cmml\_\-read} ({\bf CMML} $\ast$cmml, long n)
\item 
void {\bf cmml\_\-set\_\-sloppy} ({\bf CMML} $\ast$cmml, int value)
\item 
{\bf CMML\_\-Preamble} $\ast$ {\bf cmml\_\-get\_\-preamble} ({\bf CMML} $\ast$cmml)
\item 
{\bf CMML\_\-Stream} $\ast$ {\bf cmml\_\-get\_\-last\_\-stream} ({\bf CMML} $\ast$cmml)
\item 
{\bf CMML\_\-Head} $\ast$ {\bf cmml\_\-get\_\-last\_\-head} ({\bf CMML} $\ast$cmml)
\item 
{\bf CMML\_\-Clip} $\ast$ {\bf cmml\_\-get\_\-last\_\-clip} ({\bf CMML} $\ast$cmml)
\item 
{\bf CMML\_\-Clip} $\ast$ {\bf cmml\_\-get\_\-previous\_\-clip} ({\bf CMML} $\ast$cmml)
\item 
{\bf CMML\_\-Error} $\ast$ {\bf cmml\_\-get\_\-last\_\-error} ({\bf CMML} $\ast$cmml)
\item 
void {\bf cmml\_\-error\_\-clear} ({\bf CMML} $\ast$cmml)
\item 
int {\bf cmml\_\-set\_\-window} ({\bf CMML} $\ast$cmml, {\bf CMML\_\-Time} $\ast$start, {\bf CMML\_\-Time} $\ast$end)
\item 
double {\bf cmml\_\-skip\_\-to\_\-secs} ({\bf CMML} $\ast$cmml, double seconds)
\item 
double {\bf cmml\_\-skip\_\-to\_\-utc} ({\bf CMML} $\ast$cmml, const char $\ast$utc)
\item 
double {\bf cmml\_\-skip\_\-to\_\-id} ({\bf CMML} $\ast$cmml, const char $\ast$id)
\item 
double {\bf cmml\_\-skip\_\-to\_\-offset} ({\bf CMML} $\ast$cmml, const char $\ast$offset)
\item 
{\bf CMML\_\-Preamble} $\ast$ {\bf cmml\_\-preamble\_\-new} (const char $\ast$encoding, const char $\ast$id, const char $\ast$lang, const char $\ast$dir, const char $\ast$granulerate)
\item 
{\bf CMML\_\-Element} $\ast$ {\bf cmml\_\-element\_\-new} ({\bf CMML\_\-Element\_\-Type} type)
\item 
{\bf CMML\_\-Stream} $\ast$ {\bf cmml\_\-stream\_\-new} (void)
\item 
{\bf CMML\_\-Head} $\ast$ {\bf cmml\_\-head\_\-new} (void)
\item 
{\bf CMML\_\-Clip} $\ast$ {\bf cmml\_\-clip\_\-new} ({\bf CMML\_\-Time} $\ast$start\_\-time, {\bf CMML\_\-Time} $\ast$end\_\-time)
\item 
{\bf CMML\_\-Error} $\ast$ {\bf cmml\_\-error\_\-new} ({\bf CMML\_\-Error\_\-Type} type)
\item 
{\bf CMML\_\-Preamble} $\ast$ {\bf cmml\_\-preamble\_\-clone} ({\bf CMML\_\-Preamble} $\ast$src)
\item 
{\bf CMML\_\-Element} $\ast$ {\bf cmml\_\-element\_\-clone} ({\bf CMML\_\-Element} $\ast$src)
\item 
{\bf CMML\_\-Stream} $\ast$ {\bf cmml\_\-stream\_\-clone} ({\bf CMML\_\-Stream} $\ast$src)
\item 
{\bf CMML\_\-Head} $\ast$ {\bf cmml\_\-head\_\-clone} ({\bf CMML\_\-Head} $\ast$src)
\item 
{\bf CMML\_\-Clip} $\ast$ {\bf cmml\_\-clip\_\-clone} ({\bf CMML\_\-Clip} $\ast$src)
\item 
void {\bf cmml\_\-preamble\_\-destroy} ({\bf CMML\_\-Preamble} $\ast$preamble)
\item 
void {\bf cmml\_\-element\_\-destroy} ({\bf CMML\_\-Element} $\ast$element)
\item 
void {\bf cmml\_\-stream\_\-destroy} ({\bf CMML\_\-Stream} $\ast$stream)
\item 
void {\bf cmml\_\-head\_\-destroy} ({\bf CMML\_\-Head} $\ast$head)
\item 
void {\bf cmml\_\-clip\_\-destroy} ({\bf CMML\_\-Clip} $\ast$clip)
\item 
void {\bf cmml\_\-error\_\-destroy} ({\bf CMML\_\-Error} $\ast$error)
\item 
int {\bf cmml\_\-preamble\_\-snprint} (char $\ast$buf, int n, {\bf CMML\_\-Preamble} $\ast$pre)
\item 
int {\bf cmml\_\-element\_\-snprint} (char $\ast$buf, int n, {\bf CMML\_\-Element} $\ast$elem)
\item 
int {\bf cmml\_\-stream\_\-snprint} (char $\ast$buf, int n, {\bf CMML\_\-Stream} $\ast$stream)
\item 
int {\bf cmml\_\-stream\_\-pretty\_\-snprint} (char $\ast$buf, int n, {\bf CMML\_\-Stream} $\ast$stream)
\item 
int {\bf cmml\_\-head\_\-snprint} (char $\ast$buf, int n, {\bf CMML\_\-Head} $\ast$head)
\item 
int {\bf cmml\_\-head\_\-pretty\_\-snprint} (char $\ast$buf, int n, {\bf CMML\_\-Head} $\ast$head)
\item 
int {\bf cmml\_\-clip\_\-snprint} (char $\ast$buf, int n, {\bf CMML\_\-Clip} $\ast$clip)
\item 
int {\bf cmml\_\-clip\_\-pretty\_\-snprint} (char $\ast$buf, int n, {\bf CMML\_\-Clip} $\ast$clip)
\item 
int {\bf cmml\_\-error\_\-snprint} (char $\ast$buf, int n, {\bf CMML\_\-Error} $\ast$error, {\bf CMML} $\ast$cmml)
\item 
{\bf CMML\_\-List} $\ast$ {\bf cmml\_\-list\_\-new} (void)
\item 
{\bf CMML\_\-List} $\ast$ {\bf cmml\_\-list\_\-clone} ({\bf CMML\_\-List} $\ast$list)
\item 
{\bf CMML\_\-List} $\ast$ {\bf cmml\_\-list\_\-clone\_\-with} ({\bf CMML\_\-List} $\ast$list, {\bf CMML\_\-CloneFunc} clone)
\item 
{\bf CMML\_\-List} $\ast$ {\bf cmml\_\-list\_\-tail} ({\bf CMML\_\-List} $\ast$list)
\item 
{\bf CMML\_\-List} $\ast$ {\bf cmml\_\-list\_\-prepend} ({\bf CMML\_\-List} $\ast$list, void $\ast$data)
\item 
{\bf CMML\_\-List} $\ast$ {\bf cmml\_\-list\_\-append} ({\bf CMML\_\-List} $\ast$list, void $\ast$data)
\item 
{\bf CMML\_\-List} $\ast$ {\bf cmml\_\-list\_\-add\_\-before} ({\bf CMML\_\-List} $\ast$list, void $\ast$data, {\bf CMML\_\-List} $\ast$node)
\item 
{\bf CMML\_\-List} $\ast$ {\bf cmml\_\-list\_\-add\_\-after} ({\bf CMML\_\-List} $\ast$list, void $\ast$data, {\bf CMML\_\-List} $\ast$node)
\item 
{\bf CMML\_\-List} $\ast$ {\bf cmml\_\-list\_\-find} ({\bf CMML\_\-List} $\ast$list, void $\ast$data)
\item 
{\bf CMML\_\-List} $\ast$ {\bf cmml\_\-list\_\-remove} ({\bf CMML\_\-List} $\ast$list, {\bf CMML\_\-List} $\ast$node)
\item 
int {\bf cmml\_\-list\_\-length} ({\bf CMML\_\-List} $\ast$list)
\item 
int {\bf cmml\_\-list\_\-is\_\-empty} ({\bf CMML\_\-List} $\ast$list)
\item 
int {\bf cmml\_\-list\_\-is\_\-singleton} ({\bf CMML\_\-List} $\ast$list)
\item 
{\bf CMML\_\-List} $\ast$ {\bf cmml\_\-list\_\-free\_\-with} ({\bf CMML\_\-List} $\ast$list, {\bf CMML\_\-FreeFunc} free\_\-func)
\item 
{\bf CMML\_\-List} $\ast$ {\bf cmml\_\-list\_\-free} ({\bf CMML\_\-List} $\ast$list)
\item 
{\bf CMML\_\-Time} $\ast$ {\bf cmml\_\-time\_\-new} (const char $\ast$s)
\item 
{\bf CMML\_\-Time} $\ast$ {\bf cmml\_\-sec\_\-new} (const char $\ast$s)
\item 
{\bf CMML\_\-Time} $\ast$ {\bf cmml\_\-time\_\-new\_\-secs} (double seconds)
\item 
{\bf CMML\_\-Time} $\ast$ {\bf cmml\_\-utc\_\-new} (const char $\ast$s)
\item 
int {\bf cmml\_\-time\_\-interval\_\-new} (const char $\ast$s, {\bf CMML\_\-Time} $\ast$$\ast$t\_\-start, {\bf CMML\_\-Time} $\ast$$\ast$t\_\-end)
\item 
{\bf CMML\_\-Time} $\ast$ {\bf cmml\_\-time\_\-new\_\-in\_\-sec} (const char $\ast$s, {\bf CMML\_\-Time} $\ast$ref, double base)
\item 
{\bf CMML\_\-Time} $\ast$ {\bf cmml\_\-time\_\-utc\_\-to\_\-sec} ({\bf CMML\_\-Time} $\ast$t, {\bf CMML\_\-Time} $\ast$ref, double base)
\item 
void {\bf cmml\_\-time\_\-free} ({\bf CMML\_\-Time} $\ast$t)
\item 
{\bf CMML\_\-Time} $\ast$ {\bf cmml\_\-time\_\-clone} ({\bf CMML\_\-Time} $\ast$t)
\item 
double {\bf cmml\_\-sec\_\-parse} (const char $\ast$s)
\item 
{\bf CMML\_\-UTC} $\ast$ {\bf cmml\_\-utc\_\-parse} (const char $\ast$s)
\item 
{\bf CMML\_\-UTC} $\ast$ {\bf cmml\_\-utc\_\-clone} ({\bf CMML\_\-UTC} $\ast$t)
\item 
double {\bf cmml\_\-utc\_\-diff} ({\bf CMML\_\-UTC} $\ast$t2, {\bf CMML\_\-UTC} $\ast$t1)
\item 
int {\bf cmml\_\-npt\_\-snprint} (char $\ast$buf, int n, double seconds)
\item 
int {\bf cmml\_\-utc\_\-snprint} (char $\ast$buf, int n, {\bf CMML\_\-UTC} $\ast$t)
\item 
int {\bf cmml\_\-utc\_\-pretty\_\-snprint} (char $\ast$buf, int n, {\bf CMML\_\-UTC} $\ast$t)
\end{CompactItemize}


\subsection{Detailed Description}
\doxyref{cmml.h}{p.}{cmml_8h} includes definitions of the public API and data types required to parse CMML 2.0 files. 

\subsection{Typedef Documentation}
\index{cmml.h@{cmml.h}!CMML@{CMML}}
\index{CMML@{CMML}!cmml.h@{cmml.h}}
\subsubsection[{CMML}]{\setlength{\rightskip}{0pt plus 5cm}typedef void {\bf CMML}}\label{cmml_8h_491c8a92ced84db6971ab15ae1848542}


A CMML handle. \begin{Desc}
\item[Examples: ]\par
{\bf cmml-parse.c}, {\bf cmml-seek-clip.c}, {\bf cmml-seek-offset.c}, {\bf cmml-seek-utc.c}, {\bf cmml-uri-file.c}, {\bf cmml-validate.c}, and {\bf cmml.dtd}.\end{Desc}
\index{cmml.h@{cmml.h}!CMML\_\-Time\_\-Type@{CMML\_\-Time\_\-Type}}
\index{CMML\_\-Time\_\-Type@{CMML\_\-Time\_\-Type}!cmml.h@{cmml.h}}
\subsubsection[{CMML\_\-Time\_\-Type}]{\setlength{\rightskip}{0pt plus 5cm}typedef enum {\bf \_\-CMML\_\-Time\_\-Type}  {\bf CMML\_\-Time\_\-Type}}\label{cmml_8h_42350190e54f11f44b78ec2e59e49fc8}


CMML\_\-Time\_\-Type: enumerates the different time types \index{cmml.h@{cmml.h}!CMML\_\-List@{CMML\_\-List}}
\index{CMML\_\-List@{CMML\_\-List}!cmml.h@{cmml.h}}
\subsubsection[{CMML\_\-List}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf \_\-CMML\_\-List} {\bf CMML\_\-List}}\label{cmml_8h_d9ad7f21730f5163a0a4214e52d894e6}


CMML\_\-List: A doubly linked list \index{cmml.h@{cmml.h}!CMML\_\-CloneFunc@{CMML\_\-CloneFunc}}
\index{CMML\_\-CloneFunc@{CMML\_\-CloneFunc}!cmml.h@{cmml.h}}
\subsubsection[{CMML\_\-CloneFunc}]{\setlength{\rightskip}{0pt plus 5cm}typedef void$\ast$($\ast$ {\bf CMML\_\-CloneFunc})(void $\ast$data)}\label{cmml_8h_cd56b2dd06348c4697c58ae8afc0f91d}


CMML\_\-CloneFunc: Signature of a cloning function for CMML\_\-List. \index{cmml.h@{cmml.h}!CMML\_\-FreeFunc@{CMML\_\-FreeFunc}}
\index{CMML\_\-FreeFunc@{CMML\_\-FreeFunc}!cmml.h@{cmml.h}}
\subsubsection[{CMML\_\-FreeFunc}]{\setlength{\rightskip}{0pt plus 5cm}typedef void$\ast$($\ast$ {\bf CMML\_\-FreeFunc})(void $\ast$data)}\label{cmml_8h_dc2526a619bdc376287637eae9210f47}


CMML\_\-FreeFunc: Signature of a freeing function. \index{cmml.h@{cmml.h}!CMML\_\-CmpFunc@{CMML\_\-CmpFunc}}
\index{CMML\_\-CmpFunc@{CMML\_\-CmpFunc}!cmml.h@{cmml.h}}
\subsubsection[{CMML\_\-CmpFunc}]{\setlength{\rightskip}{0pt plus 5cm}typedef int($\ast$ {\bf CMML\_\-CmpFunc})(void $\ast$cmp\_\-ctx, void $\ast$s1, void $\ast$s2)}\label{cmml_8h_8d57981e2788a89e19fd0af243f1e0b0}


CMML\_\-CmpFunc: Signature of a comparison function for CMML\_\-List to compares two scalars, returning: +ve, s1 $>$ s2 0, s1 == s2 -ve, s1 $<$ s2 \index{cmml.h@{cmml.h}!CMML\_\-Element\_\-Type@{CMML\_\-Element\_\-Type}}
\index{CMML\_\-Element\_\-Type@{CMML\_\-Element\_\-Type}!cmml.h@{cmml.h}}
\subsubsection[{CMML\_\-Element\_\-Type}]{\setlength{\rightskip}{0pt plus 5cm}typedef enum {\bf \_\-CMML\_\-Element\_\-Type}  {\bf CMML\_\-Element\_\-Type}}\label{cmml_8h_d0739d7576b77426e19f3fbfa8a35602}


CMML\_\-Element\_\-Type: indication of what the \doxyref{CMML\_\-Element}{p.}{structCMML__Element} actually represents. \index{cmml.h@{cmml.h}!CMML\_\-Error\_\-Type@{CMML\_\-Error\_\-Type}}
\index{CMML\_\-Error\_\-Type@{CMML\_\-Error\_\-Type}!cmml.h@{cmml.h}}
\subsubsection[{CMML\_\-Error\_\-Type}]{\setlength{\rightskip}{0pt plus 5cm}typedef enum {\bf \_\-CMML\_\-Error\_\-Type}  {\bf CMML\_\-Error\_\-Type}}\label{cmml_8h_44b333e0a573d975f636d194ca7d2dcb}


CMML\_\-Error\_\-Type: indication of the type of error that occured. There are three classes of errors:\begin{itemize}
\item general processing feedback (CMML\_\-OK, CMML\_\-EOF)\item fatal processing feedback (these errors render the CMML file useless)\item tolerable processing errors (these lead to ignoring certain tags) The user may select to ignore sloppy errors \end{itemize}
\index{cmml.h@{cmml.h}!CMMLReadStream@{CMMLReadStream}}
\index{CMMLReadStream@{CMMLReadStream}!cmml.h@{cmml.h}}
\subsubsection[{CMMLReadStream}]{\setlength{\rightskip}{0pt plus 5cm}typedef int($\ast$ {\bf CMMLReadStream})({\bf CMML} $\ast$cmml, const {\bf CMML\_\-Stream} $\ast$stream, void $\ast$user\_\-data)}\label{cmml_8h_f98b3d5ce085da82f6e9a0695104aeb9}


CMMLReadStream: Signature for a callback called when the CMML stream element is parsed

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]the CMML$\ast$ handle in use \item[{\em stream}]the stream element's content represented in a CMML\_\-Stream$\ast$ \item[{\em user\_\-data}]user defined data\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 on success, 1 on error \end{Desc}
\index{cmml.h@{cmml.h}!CMMLReadHead@{CMMLReadHead}}
\index{CMMLReadHead@{CMMLReadHead}!cmml.h@{cmml.h}}
\subsubsection[{CMMLReadHead}]{\setlength{\rightskip}{0pt plus 5cm}typedef int($\ast$ {\bf CMMLReadHead})({\bf CMML} $\ast$cmml, const {\bf CMML\_\-Head} $\ast$head, void $\ast$user\_\-data)}\label{cmml_8h_158bde360cb3d0cd9cbc7e3d5d330122}


CMMLReadHead: Signature for a callback called when the CMML head element is parsed

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]the CMML$\ast$ handle in use \item[{\em head}]the head element's content represented in a CMML\_\-Head$\ast$ \item[{\em user\_\-data}]user defined data\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 on success, 1 on error \end{Desc}
\index{cmml.h@{cmml.h}!CMMLReadClip@{CMMLReadClip}}
\index{CMMLReadClip@{CMMLReadClip}!cmml.h@{cmml.h}}
\subsubsection[{CMMLReadClip}]{\setlength{\rightskip}{0pt plus 5cm}typedef int($\ast$ {\bf CMMLReadClip})({\bf CMML} $\ast$cmml, const {\bf CMML\_\-Clip} $\ast$clip, void $\ast$user\_\-data)}\label{cmml_8h_16056b5be19d0c8e1515cc9507d91ce6}


CMMLReadClip: Signature for a callback called when a CMML clip element is parsed

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]the CMML$\ast$ handle in use \item[{\em clip}]the clip element's content represented in a CMML\_\-Clip$\ast$ \item[{\em user\_\-data}]user defined data\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 on success, 1 on error \end{Desc}


\subsection{Enumeration Type Documentation}
\index{cmml.h@{cmml.h}!\_\-CMML\_\-Time\_\-Type@{\_\-CMML\_\-Time\_\-Type}}
\index{\_\-CMML\_\-Time\_\-Type@{\_\-CMML\_\-Time\_\-Type}!cmml.h@{cmml.h}}
\subsubsection[{\_\-CMML\_\-Time\_\-Type}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf \_\-CMML\_\-Time\_\-Type}}\label{cmml_8h_7d25c84b8e1fde3fcc285411745ef1e5}


CMML\_\-Time\_\-Type: enumerates the different time types \begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{CMML\_\-SEC\_\-TIME@{CMML\_\-SEC\_\-TIME}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-SEC\_\-TIME@{CMML\_\-SEC\_\-TIME}}\item[{\em 
CMML\_\-SEC\_\-TIME\label{cmml_8h_7d25c84b8e1fde3fcc285411745ef1e5bd54c3ddc359eb3167ab294df4b5f771}
}]time is seconds \index{CMML\_\-UTC\_\-TIME@{CMML\_\-UTC\_\-TIME}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-UTC\_\-TIME@{CMML\_\-UTC\_\-TIME}}\item[{\em 
CMML\_\-UTC\_\-TIME\label{cmml_8h_7d25c84b8e1fde3fcc285411745ef1e5903006208938cd76ba9b5b3c4b02c857}
}]time is utc \end{description}
\end{Desc}

\index{cmml.h@{cmml.h}!\_\-CMML\_\-Element\_\-Type@{\_\-CMML\_\-Element\_\-Type}}
\index{\_\-CMML\_\-Element\_\-Type@{\_\-CMML\_\-Element\_\-Type}!cmml.h@{cmml.h}}
\subsubsection[{\_\-CMML\_\-Element\_\-Type}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf \_\-CMML\_\-Element\_\-Type}}\label{cmml_8h_30945976dd321bb5a358f447277f77a9}


CMML\_\-Element\_\-Type: indication of what the \doxyref{CMML\_\-Element}{p.}{structCMML__Element} actually represents. \begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{CMML\_\-NONE@{CMML\_\-NONE}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-NONE@{CMML\_\-NONE}}\item[{\em 
CMML\_\-NONE\label{cmml_8h_30945976dd321bb5a358f447277f77a930ce7ea89724892d605af863aef90f64}
}]no element \index{CMML\_\-CMML@{CMML\_\-CMML}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-CMML@{CMML\_\-CMML}}\item[{\em 
CMML\_\-CMML\label{cmml_8h_30945976dd321bb5a358f447277f77a97d6d5b3f091b5c51dfb01f572b107c15}
}]cmml element \index{CMML\_\-STREAM@{CMML\_\-STREAM}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-STREAM@{CMML\_\-STREAM}}\item[{\em 
CMML\_\-STREAM\label{cmml_8h_30945976dd321bb5a358f447277f77a95fda5c07aaedd6209c4b4b72d1c19b11}
}]stream element \index{CMML\_\-IMPORT@{CMML\_\-IMPORT}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-IMPORT@{CMML\_\-IMPORT}}\item[{\em 
CMML\_\-IMPORT\label{cmml_8h_30945976dd321bb5a358f447277f77a9e3d213150d6a62ece1daa0734349099e}
}]import element \index{CMML\_\-HEAD@{CMML\_\-HEAD}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-HEAD@{CMML\_\-HEAD}}\item[{\em 
CMML\_\-HEAD\label{cmml_8h_30945976dd321bb5a358f447277f77a98910e0559e740717d0153cc8fb901328}
}]head element \index{CMML\_\-CLIP@{CMML\_\-CLIP}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-CLIP@{CMML\_\-CLIP}}\item[{\em 
CMML\_\-CLIP\label{cmml_8h_30945976dd321bb5a358f447277f77a95fb7559f8d27437be529d9a283cdfe49}
}]clip element \end{description}
\end{Desc}

\index{cmml.h@{cmml.h}!\_\-CMML\_\-Error\_\-Type@{\_\-CMML\_\-Error\_\-Type}}
\index{\_\-CMML\_\-Error\_\-Type@{\_\-CMML\_\-Error\_\-Type}!cmml.h@{cmml.h}}
\subsubsection[{\_\-CMML\_\-Error\_\-Type}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf \_\-CMML\_\-Error\_\-Type}}\label{cmml_8h_84f1ec284574ee560f24e74ac164fd6d}


CMML\_\-Error\_\-Type: indication of the type of error that occured. There are three classes of errors:\begin{itemize}
\item general processing feedback (CMML\_\-OK, CMML\_\-EOF)\item fatal processing feedback (these errors render the CMML file useless)\item tolerable processing errors (these lead to ignoring certain tags) The user may select to ignore sloppy errors \end{itemize}
\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{CMML\_\-OK@{CMML\_\-OK}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-OK@{CMML\_\-OK}}\item[{\em 
CMML\_\-OK\label{cmml_8h_84f1ec284574ee560f24e74ac164fd6d378cf023e8d0e35e028d056cb5c5b477}
}]everything went fine and EOF was not encountered \index{CMML\_\-EOF@{CMML\_\-EOF}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-EOF@{CMML\_\-EOF}}\item[{\em 
CMML\_\-EOF\label{cmml_8h_84f1ec284574ee560f24e74ac164fd6d2bf3316ce2a2222cf230d0b885943ba4}
}]EOF, but everything went fine \index{CMML\_\-READ\_\-ERROR@{CMML\_\-READ\_\-ERROR}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-READ\_\-ERROR@{CMML\_\-READ\_\-ERROR}}\item[{\em 
CMML\_\-READ\_\-ERROR\label{cmml_8h_84f1ec284574ee560f24e74ac164fd6d40b52c8033e7c75e29c5697d859c29ab}
}]Reading the raw CMML doc into a buffer \index{CMML\_\-TIME\_\-ERROR@{CMML\_\-TIME\_\-ERROR}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-TIME\_\-ERROR@{CMML\_\-TIME\_\-ERROR}}\item[{\em 
CMML\_\-TIME\_\-ERROR\label{cmml_8h_84f1ec284574ee560f24e74ac164fd6d98b21ad56fbd8ab0af700638d14a23ab}
}]Error in formatting of time in a required tag \index{CMML\_\-MALLOC\_\-ERROR@{CMML\_\-MALLOC\_\-ERROR}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-MALLOC\_\-ERROR@{CMML\_\-MALLOC\_\-ERROR}}\item[{\em 
CMML\_\-MALLOC\_\-ERROR\label{cmml_8h_84f1ec284574ee560f24e74ac164fd6da0c1cdc6020195e81fb77181727b2485}
}]Memory allocation error \index{CMML\_\-EXPAT\_\-ERROR@{CMML\_\-EXPAT\_\-ERROR}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-EXPAT\_\-ERROR@{CMML\_\-EXPAT\_\-ERROR}}\item[{\em 
CMML\_\-EXPAT\_\-ERROR\label{cmml_8h_84f1ec284574ee560f24e74ac164fd6d0ab6de362520a1bfccc2baa14dbae5e7}
}]Expat reported an error \index{CMML\_\-PARSE\_\-ERROR@{CMML\_\-PARSE\_\-ERROR}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-PARSE\_\-ERROR@{CMML\_\-PARSE\_\-ERROR}}\item[{\em 
CMML\_\-PARSE\_\-ERROR\label{cmml_8h_84f1ec284574ee560f24e74ac164fd6db25faaa9b573c8d3aa3e10817c132e0f}
}]General parsing error \index{CMML\_\-NO\_\-CMML\_\-TAG@{CMML\_\-NO\_\-CMML\_\-TAG}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-NO\_\-CMML\_\-TAG@{CMML\_\-NO\_\-CMML\_\-TAG}}\item[{\em 
CMML\_\-NO\_\-CMML\_\-TAG\label{cmml_8h_84f1ec284574ee560f24e74ac164fd6decaf9c447c18f923a13167c83e52d64e}
}]No cmml tag was found \index{CMML\_\-NO\_\-HEAD\_\-TAG@{CMML\_\-NO\_\-HEAD\_\-TAG}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-NO\_\-HEAD\_\-TAG@{CMML\_\-NO\_\-HEAD\_\-TAG}}\item[{\em 
CMML\_\-NO\_\-HEAD\_\-TAG\label{cmml_8h_84f1ec284574ee560f24e74ac164fd6d63dfe6fb0bb0da0072426705cd551bd8}
}]No head tag was found \index{CMML\_\-STREAM\_\-NOT\_\-FIRST@{CMML\_\-STREAM\_\-NOT\_\-FIRST}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-STREAM\_\-NOT\_\-FIRST@{CMML\_\-STREAM\_\-NOT\_\-FIRST}}\item[{\em 
CMML\_\-STREAM\_\-NOT\_\-FIRST\label{cmml_8h_84f1ec284574ee560f24e74ac164fd6d3564fe3c9ef5ce4a031ff22fa0b9306a}
}]there is a head or a tag before the stream \index{CMML\_\-HEAD\_\-AFTER\_\-CLIP@{CMML\_\-HEAD\_\-AFTER\_\-CLIP}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-HEAD\_\-AFTER\_\-CLIP@{CMML\_\-HEAD\_\-AFTER\_\-CLIP}}\item[{\em 
CMML\_\-HEAD\_\-AFTER\_\-CLIP\label{cmml_8h_84f1ec284574ee560f24e74ac164fd6dd4b19d5f16cc4b57862aa393d5c361a1}
}]there is a clip tag before the head tag \index{CMML\_\-DUPLICATE\_\-STREAM@{CMML\_\-DUPLICATE\_\-STREAM}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-DUPLICATE\_\-STREAM@{CMML\_\-DUPLICATE\_\-STREAM}}\item[{\em 
CMML\_\-DUPLICATE\_\-STREAM\label{cmml_8h_84f1ec284574ee560f24e74ac164fd6d1832d198d605a65c7c66e1094b1735df}
}]there are two stream tags \index{CMML\_\-DUPLICATE\_\-HEAD@{CMML\_\-DUPLICATE\_\-HEAD}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-DUPLICATE\_\-HEAD@{CMML\_\-DUPLICATE\_\-HEAD}}\item[{\em 
CMML\_\-DUPLICATE\_\-HEAD\label{cmml_8h_84f1ec284574ee560f24e74ac164fd6dd40c480ed67776d34fd601504f0c499e}
}]there are two head tags \index{CMML\_\-FORMAT\_\-ERROR@{CMML\_\-FORMAT\_\-ERROR}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-FORMAT\_\-ERROR@{CMML\_\-FORMAT\_\-ERROR}}\item[{\em 
CMML\_\-FORMAT\_\-ERROR\label{cmml_8h_84f1ec284574ee560f24e74ac164fd6d2254e859bcda02664727f21a330a8a20}
}]error in the formatting of an implied attribute \index{CMML\_\-UNKNOWN\_\-TAG@{CMML\_\-UNKNOWN\_\-TAG}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-UNKNOWN\_\-TAG@{CMML\_\-UNKNOWN\_\-TAG}}\item[{\em 
CMML\_\-UNKNOWN\_\-TAG\label{cmml_8h_84f1ec284574ee560f24e74ac164fd6d73556fe8a9c3319d7606750d21e0a19f}
}]skipping an unknown tag \index{CMML\_\-TAG\_\-IGNORED@{CMML\_\-TAG\_\-IGNORED}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-TAG\_\-IGNORED@{CMML\_\-TAG\_\-IGNORED}}\item[{\em 
CMML\_\-TAG\_\-IGNORED\label{cmml_8h_84f1ec284574ee560f24e74ac164fd6de1ae6e6bb16cd35614e007fa5fc59473}
}]skipping a faulty tag \index{CMML\_\-XMLNS\_\-REDEFINED@{CMML\_\-XMLNS\_\-REDEFINED}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-XMLNS\_\-REDEFINED@{CMML\_\-XMLNS\_\-REDEFINED}}\item[{\em 
CMML\_\-XMLNS\_\-REDEFINED\label{cmml_8h_84f1ec284574ee560f24e74ac164fd6dc3df2e8b162f8bd0bf302ec026fe6bb9}
}]xmlns in cmml tag is wrongly redefined \index{CMML\_\-NONSEQUENTIAL\_\-CLIP@{CMML\_\-NONSEQUENTIAL\_\-CLIP}!cmml.h@{cmml.h}}\index{cmml.h@{cmml.h}!CMML\_\-NONSEQUENTIAL\_\-CLIP@{CMML\_\-NONSEQUENTIAL\_\-CLIP}}\item[{\em 
CMML\_\-NONSEQUENTIAL\_\-CLIP\label{cmml_8h_84f1ec284574ee560f24e74ac164fd6d351724186fdafe87056aca7d91dbc462}
}]clip with start time in the \char`\"{}past\char`\"{} skipped \end{description}
\end{Desc}



\subsection{Function Documentation}
\index{cmml.h@{cmml.h}!cmml\_\-open@{cmml\_\-open}}
\index{cmml\_\-open@{cmml\_\-open}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-open}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML}$\ast$ cmml\_\-open (const char $\ast$ {\em XMLfilename})}\label{cmml_8h_5fa5ea94668c910aa42b17e87dba823f}


cmml\_\-open: Takes a filename and opens it as read-only. Then checks whether it is an XML file satisfying the CMML specification with the xml directive and the cmml tag. It returns a CMML object. If you're working on an already opened FILE$\ast$, use cmml\_\-new instead.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em XMLfilename}]a CMML file to open\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a CMML$\ast$ handle \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-seek-clip.c}, {\bf cmml-seek-offset.c}, {\bf cmml-seek-utc.c}, {\bf cmml-uri-file.c}, and {\bf cmml-validate.c}.\end{Desc}


Referenced by main().\index{cmml.h@{cmml.h}!cmml\_\-new@{cmml\_\-new}}
\index{cmml\_\-new@{cmml\_\-new}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-new}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML}$\ast$ cmml\_\-new (FILE $\ast$ {\em file})}\label{cmml_8h_9972b602ec7f5ab979940787d5be294d}


cmml\_\-attach\_\-parser: Takes a FILE pointer to an already-opened CMML document. Returns a CMML object containing internal initialised data structures, etc, which is used in subsequent operations on the CMML file. This function must be called exactly once, after the file descriptor has been opened.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em file}]an open FILE pointer\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a CMML$\ast$ handle \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-parse.c}, and {\bf cmml-validate.c}.\end{Desc}


Referenced by main().\index{cmml.h@{cmml.h}!cmml\_\-destroy@{cmml\_\-destroy}}
\index{cmml\_\-destroy@{cmml\_\-destroy}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-destroy}]{\setlength{\rightskip}{0pt plus 5cm}FILE$\ast$ cmml\_\-destroy ({\bf CMML} $\ast$ {\em cmml})}\label{cmml_8h_1c4b86c80a10c0008d5253c8b1c539d2}


cmml\_\-detach\_\-parser: Close a CMML object. Return the FILE pointer from which the CMML object was derived.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]a CMML$\ast$ handle\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the open FILE pointer \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-parse.c}.\end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-close@{cmml\_\-close}}
\index{cmml\_\-close@{cmml\_\-close}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-close}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML}$\ast$ cmml\_\-close ({\bf CMML} $\ast$ {\em cmml})}\label{cmml_8h_636131e3ade9aa216ddee09537214bb3}


cmml\_\-close: Close a CMML object.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]a CMML$\ast$ handle\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]NULL on success or the unchanged CMML object (e.g. in case of a system error on close()) \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-seek-clip.c}, {\bf cmml-seek-offset.c}, {\bf cmml-seek-utc.c}, {\bf cmml-uri-file.c}, and {\bf cmml-validate.c}.\end{Desc}


Referenced by main().\index{cmml.h@{cmml.h}!cmml\_\-set\_\-read\_\-callbacks@{cmml\_\-set\_\-read\_\-callbacks}}
\index{cmml\_\-set\_\-read\_\-callbacks@{cmml\_\-set\_\-read\_\-callbacks}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-set\_\-read\_\-callbacks}]{\setlength{\rightskip}{0pt plus 5cm}int cmml\_\-set\_\-read\_\-callbacks ({\bf CMML} $\ast$ {\em cmml}, \/  {\bf CMMLReadStream} {\em read\_\-stream}, \/  {\bf CMMLReadHead} {\em read\_\-head}, \/  {\bf CMMLReadClip} {\em read\_\-clip}, \/  void $\ast$ {\em user\_\-data})}\label{cmml_8h_f8219117da4dc4bfe24e7646e76862b3}


cmml\_\-set\_\-read\_\-callbacks: registration function for callbacks.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]a CMML$\ast$ handle \item[{\em read\_\-stream}]a CMMLReadStream callback function for the stream tag \item[{\em read\_\-head}]a CMMLReadHead callback function for the head tag \item[{\em read\_\-clip}]a CMMLReadClip callback function for the a tag \item[{\em user\_\-data}]a pointer to a user defined object being passed to the callbacks\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 on success, -1 on failure \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-parse.c}, {\bf cmml-seek-clip.c}, {\bf cmml-seek-offset.c}, {\bf cmml-seek-utc.c}, {\bf cmml-uri-file.c}, and {\bf cmml-validate.c}.\end{Desc}


Referenced by main().\index{cmml.h@{cmml.h}!cmml\_\-read@{cmml\_\-read}}
\index{cmml\_\-read@{cmml\_\-read}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-read}]{\setlength{\rightskip}{0pt plus 5cm}long cmml\_\-read ({\bf CMML} $\ast$ {\em cmml}, \/  long {\em n})}\label{cmml_8h_ca01f6d6824a31128ce8b2d9aa691c1f}


cmml\_\-read: read n bytes from a file descriptor and parse them. Activates registered callbacks when reaching stream, head or clip end tags and blocks until they have completed. Stores parsed info in status. If an error or EOF occurs, returns -1 in which case you can check the error code with cmml\_\-last\_\-error().

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]a CMML$\ast$ handle \item[{\em n}]number of bytes to read\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the actual number of bytes read \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-parse.c}, {\bf cmml-seek-clip.c}, {\bf cmml-seek-offset.c}, {\bf cmml-seek-utc.c}, {\bf cmml-uri-file.c}, and {\bf cmml-validate.c}.\end{Desc}


Referenced by main().\index{cmml.h@{cmml.h}!cmml\_\-set\_\-sloppy@{cmml\_\-set\_\-sloppy}}
\index{cmml\_\-set\_\-sloppy@{cmml\_\-set\_\-sloppy}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-set\_\-sloppy}]{\setlength{\rightskip}{0pt plus 5cm}void cmml\_\-set\_\-sloppy ({\bf CMML} $\ast$ {\em cmml}, \/  int {\em value})}\label{cmml_8h_7251444e94ff261f46ef8eb06ee4d966}


cmml\_\-set\_\-sloppy: Sets the parsing and error indication to ignore sloppy errors, which are defined below the CMML\_\-FORMAT\_\-ERROR in the CMML\_\-ErrorType struct

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]a CMML$\ast$ handle \item[{\em value}]a bool value to set the sloppy handling \end{description}
\end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-validate.c}.\end{Desc}


Referenced by main().\index{cmml.h@{cmml.h}!cmml\_\-get\_\-preamble@{cmml\_\-get\_\-preamble}}
\index{cmml\_\-get\_\-preamble@{cmml\_\-get\_\-preamble}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-get\_\-preamble}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Preamble}$\ast$ cmml\_\-get\_\-preamble ({\bf CMML} $\ast$ {\em cmml})}\label{cmml_8h_ce4a218a80cf249ddf708b5202813721}


cmml\_\-get\_\-preamble: returns a structure containing some of the parsing informtion received out of a stream.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]a CMML$\ast$ handle\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]1 if CMML tag specificed, 0 otherwise \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-validate.c}.\end{Desc}


Referenced by main().\index{cmml.h@{cmml.h}!cmml\_\-get\_\-last\_\-stream@{cmml\_\-get\_\-last\_\-stream}}
\index{cmml\_\-get\_\-last\_\-stream@{cmml\_\-get\_\-last\_\-stream}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-get\_\-last\_\-stream}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Stream}$\ast$ cmml\_\-get\_\-last\_\-stream ({\bf CMML} $\ast$ {\em cmml})}\label{cmml_8h_a2346d7f6b99e2276a3df166bd627b46}


cmml\_\-get\_\-last\_\-stream: Return a copy of the current stream element.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]a CMML$\ast$ handle\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a CMML\_\-Stream$\ast$ structure with the stream element details; NULL if none existed \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-get\_\-last\_\-head@{cmml\_\-get\_\-last\_\-head}}
\index{cmml\_\-get\_\-last\_\-head@{cmml\_\-get\_\-last\_\-head}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-get\_\-last\_\-head}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Head}$\ast$ cmml\_\-get\_\-last\_\-head ({\bf CMML} $\ast$ {\em cmml})}\label{cmml_8h_5e200eca9d1f5edfba027a091910924d}


cmml\_\-get\_\-last\_\-head: Return a copy of the current head element.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]a CMML$\ast$ handle\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a CMML\_\-Head$\ast$ structure with the head element details; NULL if none existed \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-get\_\-last\_\-clip@{cmml\_\-get\_\-last\_\-clip}}
\index{cmml\_\-get\_\-last\_\-clip@{cmml\_\-get\_\-last\_\-clip}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-get\_\-last\_\-clip}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Clip}$\ast$ cmml\_\-get\_\-last\_\-clip ({\bf CMML} $\ast$ {\em cmml})}\label{cmml_8h_49d94ee9135acde21fc0d51275c899b7}


cmml\_\-get\_\-last\_\-clip: Return a copy of the current clip element.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]a CMML$\ast$ handle\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a CMML\_\-Clip$\ast$ structure with the clip element details; NULL if none existed \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-get\_\-previous\_\-clip@{cmml\_\-get\_\-previous\_\-clip}}
\index{cmml\_\-get\_\-previous\_\-clip@{cmml\_\-get\_\-previous\_\-clip}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-get\_\-previous\_\-clip}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Clip}$\ast$ cmml\_\-get\_\-previous\_\-clip ({\bf CMML} $\ast$ {\em cmml})}\label{cmml_8h_d04290fd2379d66a3be7ccdbe1b88de5}


cmml\_\-get\_\-previous\_\-clip: Return a copy of the previous clip element.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]a CMML$\ast$ handle\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a CMML\_\-Clip$\ast$ structure with the clip element details; NULL if none existed \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-get\_\-last\_\-error@{cmml\_\-get\_\-last\_\-error}}
\index{cmml\_\-get\_\-last\_\-error@{cmml\_\-get\_\-last\_\-error}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-get\_\-last\_\-error}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Error}$\ast$ cmml\_\-get\_\-last\_\-error ({\bf CMML} $\ast$ {\em cmml})}\label{cmml_8h_f6193565d55aa83d40f21676ba226422}


cmml\_\-get\_\-last\_\-error: Return the error status of the most recently executed cmml command.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]a CMML$\ast$ handle\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a CMML\_\-Error$\ast$ structure with the error details; NULL if none happened \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-validate.c}.\end{Desc}


Referenced by main(), read\_\-clip(), read\_\-head(), and read\_\-stream().\index{cmml.h@{cmml.h}!cmml\_\-error\_\-clear@{cmml\_\-error\_\-clear}}
\index{cmml\_\-error\_\-clear@{cmml\_\-error\_\-clear}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-error\_\-clear}]{\setlength{\rightskip}{0pt plus 5cm}void cmml\_\-error\_\-clear ({\bf CMML} $\ast$ {\em cmml})}\label{cmml_8h_b863fa7c5cea88363728b92cdb41a303}


cmml\_\-error\_\-clear: Clear the last error.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]a CMML$\ast$ handle \end{description}
\end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-set\_\-window@{cmml\_\-set\_\-window}}
\index{cmml\_\-set\_\-window@{cmml\_\-set\_\-window}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-set\_\-window}]{\setlength{\rightskip}{0pt plus 5cm}int cmml\_\-set\_\-window ({\bf CMML} $\ast$ {\em cmml}, \/  {\bf CMML\_\-Time} $\ast$ {\em start}, \/  {\bf CMML\_\-Time} $\ast$ {\em end})}\label{cmml_8h_68b1358fc2168fedca80f86e270c669b}


cmml\_\-set\_\-window: sets the active temporal interval of a cmml stream; all clips outside that interval get ignored

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]a CMML$\ast$ handle \item[{\em start}]the start time of the interval given as CMML\_\-Time$\ast$ structure \item[{\em end}]the end time of the interval given as CMML\_\-Time$\ast$ structure\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]2 if both times could be set, 1 for one only, and 0 if none \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-skip\_\-to\_\-secs@{cmml\_\-skip\_\-to\_\-secs}}
\index{cmml\_\-skip\_\-to\_\-secs@{cmml\_\-skip\_\-to\_\-secs}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-skip\_\-to\_\-secs}]{\setlength{\rightskip}{0pt plus 5cm}double cmml\_\-skip\_\-to\_\-secs ({\bf CMML} $\ast$ {\em cmml}, \/  double {\em seconds})}\label{cmml_8h_791ab0f11ae7617532aff97de349b2b7}


cmml\_\-skip\_\-to\_\-secs: seeks forward thru clip tags to required time offset (no backwards seeking: streaming!).

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]a CMML$\ast$ handle \item[{\em seconds}]the time offset to seek to\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the actual time offset seeked to or -1 on error \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-seek-offset.c}, and {\bf cmml-validate.c}.\end{Desc}


Referenced by main().\index{cmml.h@{cmml.h}!cmml\_\-skip\_\-to\_\-utc@{cmml\_\-skip\_\-to\_\-utc}}
\index{cmml\_\-skip\_\-to\_\-utc@{cmml\_\-skip\_\-to\_\-utc}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-skip\_\-to\_\-utc}]{\setlength{\rightskip}{0pt plus 5cm}double cmml\_\-skip\_\-to\_\-utc ({\bf CMML} $\ast$ {\em cmml}, \/  const char $\ast$ {\em utc})}\label{cmml_8h_6137c87e4bcb21add600f304f4cd35e9}


cmml\_\-skip\_\-to\_\-utc: seeks forward thru clip tags to required time offset (no backwards seeking: streaming!).

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]a CMML$\ast$ handle \item[{\em utc}]the time offset to seek to\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the actual time offset seeked to in seconds or -1 on error \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-seek-utc.c}, and {\bf cmml-validate.c}.\end{Desc}


Referenced by main().\index{cmml.h@{cmml.h}!cmml\_\-skip\_\-to\_\-id@{cmml\_\-skip\_\-to\_\-id}}
\index{cmml\_\-skip\_\-to\_\-id@{cmml\_\-skip\_\-to\_\-id}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-skip\_\-to\_\-id}]{\setlength{\rightskip}{0pt plus 5cm}double cmml\_\-skip\_\-to\_\-id ({\bf CMML} $\ast$ {\em cmml}, \/  const char $\ast$ {\em id})}\label{cmml_8h_060dfeda7d92b6a63817daa00ec9b694}


cmml\_\-skip\_\-to\_\-id: seeks forward thru clip tags to required id (no backwards seeking: streaming!).

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]a CMML$\ast$ handle \item[{\em id}]the name of the clip tag to seek to\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the actual time offset seeked to in seconds or -1 on error \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-seek-clip.c}, and {\bf cmml-validate.c}.\end{Desc}


Referenced by main().\index{cmml.h@{cmml.h}!cmml\_\-skip\_\-to\_\-offset@{cmml\_\-skip\_\-to\_\-offset}}
\index{cmml\_\-skip\_\-to\_\-offset@{cmml\_\-skip\_\-to\_\-offset}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-skip\_\-to\_\-offset}]{\setlength{\rightskip}{0pt plus 5cm}double cmml\_\-skip\_\-to\_\-offset ({\bf CMML} $\ast$ {\em cmml}, \/  const char $\ast$ {\em offset})}\label{cmml_8h_16aa3cc4a71ae2e18fdfbabf95bc4aae}


cmml\_\-skip\_\-to\_\-offset: seek forward thru clip tags and time to required fragment offset (no backwards seeking: streaming!).

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmml}]a CMML$\ast$ handl \item[{\em offset}]the offset given as id or time spec\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the actual time offset seeked to in seconds or -1 on error \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-uri-file.c}.\end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-preamble\_\-new@{cmml\_\-preamble\_\-new}}
\index{cmml\_\-preamble\_\-new@{cmml\_\-preamble\_\-new}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-preamble\_\-new}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Preamble}$\ast$ cmml\_\-preamble\_\-new (const char $\ast$ {\em encoding}, \/  const char $\ast$ {\em id}, \/  const char $\ast$ {\em lang}, \/  const char $\ast$ {\em dir}, \/  const char $\ast$ {\em granulerate})}\label{cmml_8h_1f187f66862f4b7d50df7717907ce554}


cmml\_\-preamble\_\-new: Create a new \doxyref{CMML\_\-Preamble}{p.}{structCMML__Preamble}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em encoding}]the character encoding to be used; UTF-8 if NULL \item[{\em id}]the id attribute of the cmml tag; not used if NULL \item[{\em lang}]the lang attribute of the cmml tag; not used if NULL \item[{\em dir}]the dir attribute of the cmml tag; not used if NULL \item[{\em granulerate}]the granulerate attribute of the cmml tag; not used if NULL\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a CMML preamble \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-write.c}.\end{Desc}


Referenced by main().\index{cmml.h@{cmml.h}!cmml\_\-element\_\-new@{cmml\_\-element\_\-new}}
\index{cmml\_\-element\_\-new@{cmml\_\-element\_\-new}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-element\_\-new}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Element}$\ast$ cmml\_\-element\_\-new ({\bf CMML\_\-Element\_\-Type} {\em type})}\label{cmml_8h_b4d66073d5a6f6cace011836f5b90b3c}


cmml\_\-element\_\-new: Create a new \doxyref{CMML\_\-Element}{p.}{structCMML__Element}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]the element type to create (head, stream, or clip)\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a element of the requested type \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-stream\_\-new@{cmml\_\-stream\_\-new}}
\index{cmml\_\-stream\_\-new@{cmml\_\-stream\_\-new}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-stream\_\-new}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Stream}$\ast$ cmml\_\-stream\_\-new (void)}\label{cmml_8h_e6fd901adf67ed284e1dc2e0830d3a05}


cmml\_\-stream\_\-new: Create a new \doxyref{CMML\_\-Stream}{p.}{structCMML__Stream}.

\begin{Desc}
\item[Returns:]a stream element \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-head\_\-new@{cmml\_\-head\_\-new}}
\index{cmml\_\-head\_\-new@{cmml\_\-head\_\-new}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-head\_\-new}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Head}$\ast$ cmml\_\-head\_\-new (void)}\label{cmml_8h_bd68056f90e67a10f7275e830c1b7d6f}


cmml\_\-head\_\-new: Create a new \doxyref{CMML\_\-Head}{p.}{structCMML__Head}.

\begin{Desc}
\item[Returns:]a head element \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-write.c}.\end{Desc}


Referenced by main().\index{cmml.h@{cmml.h}!cmml\_\-clip\_\-new@{cmml\_\-clip\_\-new}}
\index{cmml\_\-clip\_\-new@{cmml\_\-clip\_\-new}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-clip\_\-new}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Clip}$\ast$ cmml\_\-clip\_\-new ({\bf CMML\_\-Time} $\ast$ {\em start\_\-time}, \/  {\bf CMML\_\-Time} $\ast$ {\em end\_\-time})}\label{cmml_8h_d7da38d4f76aff326bc33dc4046b091a}


cmml\_\-clip\_\-new: Create a new CMML\_\-Anchr.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em start\_\-time}]the start time at which to create a clip \item[{\em end\_\-time}]the end time at which to end the clip\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a clip element \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-write.c}.\end{Desc}


Referenced by main().\index{cmml.h@{cmml.h}!cmml\_\-error\_\-new@{cmml\_\-error\_\-new}}
\index{cmml\_\-error\_\-new@{cmml\_\-error\_\-new}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-error\_\-new}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Error}$\ast$ cmml\_\-error\_\-new ({\bf CMML\_\-Error\_\-Type} {\em type})}\label{cmml_8h_a322c7c465325bdf651f1047ef186188}


cmml\_\-error\_\-new: Create a new \doxyref{CMML\_\-Error}{p.}{structCMML__Error}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]the type of error to create as from the given list\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]an error type \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-preamble\_\-clone@{cmml\_\-preamble\_\-clone}}
\index{cmml\_\-preamble\_\-clone@{cmml\_\-preamble\_\-clone}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-preamble\_\-clone}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Preamble}$\ast$ cmml\_\-preamble\_\-clone ({\bf CMML\_\-Preamble} $\ast$ {\em src})}\label{cmml_8h_c53fee9e43455a1bc5f2917e4eefa04f}


cmml\_\-preamble\_\-clone: Create a copy of a \doxyref{CMML\_\-Preamble}{p.}{structCMML__Preamble}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]the original preamble\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a copy of a CMML preamble \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-element\_\-clone@{cmml\_\-element\_\-clone}}
\index{cmml\_\-element\_\-clone@{cmml\_\-element\_\-clone}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-element\_\-clone}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Element}$\ast$ cmml\_\-element\_\-clone ({\bf CMML\_\-Element} $\ast$ {\em src})}\label{cmml_8h_052a9a91d55c497be00228544b55cbac}


cmml\_\-element\_\-clone: Create a copy of an element.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]the original element\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a copy of the element \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-stream\_\-clone@{cmml\_\-stream\_\-clone}}
\index{cmml\_\-stream\_\-clone@{cmml\_\-stream\_\-clone}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-stream\_\-clone}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Stream}$\ast$ cmml\_\-stream\_\-clone ({\bf CMML\_\-Stream} $\ast$ {\em src})}\label{cmml_8h_b7a94907a009219c6be18da9192e6a8d}


cmml\_\-stream\_\-clone: Create a copy of a stream element.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]the original stream element\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a copy of the stream element \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-head\_\-clone@{cmml\_\-head\_\-clone}}
\index{cmml\_\-head\_\-clone@{cmml\_\-head\_\-clone}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-head\_\-clone}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Head}$\ast$ cmml\_\-head\_\-clone ({\bf CMML\_\-Head} $\ast$ {\em src})}\label{cmml_8h_a50aade93921afdea7273a34b9b88186}


cmml\_\-head\_\-clone: Create a copy of a head element.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]the original head element\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a copy of the head element \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-clip\_\-clone@{cmml\_\-clip\_\-clone}}
\index{cmml\_\-clip\_\-clone@{cmml\_\-clip\_\-clone}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-clip\_\-clone}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Clip}$\ast$ cmml\_\-clip\_\-clone ({\bf CMML\_\-Clip} $\ast$ {\em src})}\label{cmml_8h_09e50eb59a7fbc8664baaf50ad0115f5}


cmml\_\-clip\_\-clone: Create a copy of a clip element.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]the original clip element\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a copy of the clip element \end{Desc}


Referenced by read\_\-clip().\index{cmml.h@{cmml.h}!cmml\_\-preamble\_\-destroy@{cmml\_\-preamble\_\-destroy}}
\index{cmml\_\-preamble\_\-destroy@{cmml\_\-preamble\_\-destroy}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-preamble\_\-destroy}]{\setlength{\rightskip}{0pt plus 5cm}void cmml\_\-preamble\_\-destroy ({\bf CMML\_\-Preamble} $\ast$ {\em preamble})}\label{cmml_8h_9084c7faed8f0a632b2d03919d4fcd33}


cmml\_\-preamble\_\-destroy: Free all memory associated with a \doxyref{CMML\_\-Preamble}{p.}{structCMML__Preamble}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em preamble}]the preamble to free \end{description}
\end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-write.c}.\end{Desc}


Referenced by main().\index{cmml.h@{cmml.h}!cmml\_\-element\_\-destroy@{cmml\_\-element\_\-destroy}}
\index{cmml\_\-element\_\-destroy@{cmml\_\-element\_\-destroy}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-element\_\-destroy}]{\setlength{\rightskip}{0pt plus 5cm}void cmml\_\-element\_\-destroy ({\bf CMML\_\-Element} $\ast$ {\em element})}\label{cmml_8h_477d23469ed9ad50c1942f0c15382f6e}


cmml\_\-element\_\-destroy: Free all memory associated with a \doxyref{CMML\_\-Element}{p.}{structCMML__Element}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em element}]the element to free \end{description}
\end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-stream\_\-destroy@{cmml\_\-stream\_\-destroy}}
\index{cmml\_\-stream\_\-destroy@{cmml\_\-stream\_\-destroy}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-stream\_\-destroy}]{\setlength{\rightskip}{0pt plus 5cm}void cmml\_\-stream\_\-destroy ({\bf CMML\_\-Stream} $\ast$ {\em stream})}\label{cmml_8h_26142cb0731c1bbd022ac44cd1e4bf44}


cmml\_\-stream\_\-destroy: Free a stream element.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em stream}]the stream element to free \end{description}
\end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-head\_\-destroy@{cmml\_\-head\_\-destroy}}
\index{cmml\_\-head\_\-destroy@{cmml\_\-head\_\-destroy}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-head\_\-destroy}]{\setlength{\rightskip}{0pt plus 5cm}void cmml\_\-head\_\-destroy ({\bf CMML\_\-Head} $\ast$ {\em head})}\label{cmml_8h_fe10cf81384d7582af0c7ada5f58d717}


cmml\_\-head\_\-destroy: Free a head element.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em head}]the head element to free \end{description}
\end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-write.c}.\end{Desc}


Referenced by main().\index{cmml.h@{cmml.h}!cmml\_\-clip\_\-destroy@{cmml\_\-clip\_\-destroy}}
\index{cmml\_\-clip\_\-destroy@{cmml\_\-clip\_\-destroy}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-clip\_\-destroy}]{\setlength{\rightskip}{0pt plus 5cm}void cmml\_\-clip\_\-destroy ({\bf CMML\_\-Clip} $\ast$ {\em clip})}\label{cmml_8h_504acdba3b36d2a8b5325736b8aa231b}


cmml\_\-clip\_\-destroy: Free a clip element.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em clip}]the clip element to free \end{description}
\end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-write.c}.\end{Desc}


Referenced by main(), and read\_\-clip().\index{cmml.h@{cmml.h}!cmml\_\-error\_\-destroy@{cmml\_\-error\_\-destroy}}
\index{cmml\_\-error\_\-destroy@{cmml\_\-error\_\-destroy}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-error\_\-destroy}]{\setlength{\rightskip}{0pt plus 5cm}void cmml\_\-error\_\-destroy ({\bf CMML\_\-Error} $\ast$ {\em error})}\label{cmml_8h_38fa1127cc94298adb0772a462f36d19}


cmml\_\-error\_\-destroy: Free an error streucture.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em error}]the error structure to free \end{description}
\end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-preamble\_\-snprint@{cmml\_\-preamble\_\-snprint}}
\index{cmml\_\-preamble\_\-snprint@{cmml\_\-preamble\_\-snprint}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-preamble\_\-snprint}]{\setlength{\rightskip}{0pt plus 5cm}int cmml\_\-preamble\_\-snprint (char $\ast$ {\em buf}, \/  int {\em n}, \/  {\bf CMML\_\-Preamble} $\ast$ {\em pre})}\label{cmml_8h_61c5aa16f364e3b705ad42a63fe77d81}


cmml\_\-preamble\_\-snprint: Prints the preamble as given in the cmml structure into the buffer buf of size n.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]the buffer to print into \item[{\em n}]the size of the buffer buf \item[{\em pre}]the preamble to print\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the number of characters written to the buffer (including the terminating $\backslash$0) or -1 if buffer too small. \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-validate.c}, and {\bf cmml-write.c}.\end{Desc}


Referenced by main().\index{cmml.h@{cmml.h}!cmml\_\-element\_\-snprint@{cmml\_\-element\_\-snprint}}
\index{cmml\_\-element\_\-snprint@{cmml\_\-element\_\-snprint}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-element\_\-snprint}]{\setlength{\rightskip}{0pt plus 5cm}int cmml\_\-element\_\-snprint (char $\ast$ {\em buf}, \/  int {\em n}, \/  {\bf CMML\_\-Element} $\ast$ {\em elem})}\label{cmml_8h_c3a254bd3dc23dfa2280a8b964ef374c}


cmml\_\-element\_\-snprint: Given a buffer buf of size n, write a CMML representation of a \doxyref{CMML\_\-Element}{p.}{structCMML__Element} into it.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]the buffer to print into \item[{\em n}]the size of the buffer buf \item[{\em elem}]the element to print\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the number of characters written to the buffer (including the terminating $\backslash$0) or -1 if buffer too small. \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-stream\_\-snprint@{cmml\_\-stream\_\-snprint}}
\index{cmml\_\-stream\_\-snprint@{cmml\_\-stream\_\-snprint}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-stream\_\-snprint}]{\setlength{\rightskip}{0pt plus 5cm}int cmml\_\-stream\_\-snprint (char $\ast$ {\em buf}, \/  int {\em n}, \/  {\bf CMML\_\-Stream} $\ast$ {\em stream})}\label{cmml_8h_c01325158a89a654d401ae1e96041b33}


cmml\_\-stream\_\-snprint: Prints a stream element into a buffer.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]the buffer to print into \item[{\em n}]the size of the buffer buf \item[{\em stream}]the stream element structure\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the number of characters written to the buffer (including the terminating $\backslash$0) or -1 if buffer too small. \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-stream\_\-pretty\_\-snprint@{cmml\_\-stream\_\-pretty\_\-snprint}}
\index{cmml\_\-stream\_\-pretty\_\-snprint@{cmml\_\-stream\_\-pretty\_\-snprint}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-stream\_\-pretty\_\-snprint}]{\setlength{\rightskip}{0pt plus 5cm}int cmml\_\-stream\_\-pretty\_\-snprint (char $\ast$ {\em buf}, \/  int {\em n}, \/  {\bf CMML\_\-Stream} $\ast$ {\em stream})}\label{cmml_8h_87898eafdb0d01dee8b3336bbf96692b}


cmml\_\-stream\_\-pretty\_\-snprint: Prints a stream element into a buffer.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]the buffer to print into \item[{\em n}]the size of the buffer buf \item[{\em stream}]the stream element structure\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the number of characters written to the buffer (including the terminating $\backslash$0) or -1 if buffer too small. \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-validate.c}.\end{Desc}


Referenced by read\_\-stream().\index{cmml.h@{cmml.h}!cmml\_\-head\_\-snprint@{cmml\_\-head\_\-snprint}}
\index{cmml\_\-head\_\-snprint@{cmml\_\-head\_\-snprint}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-head\_\-snprint}]{\setlength{\rightskip}{0pt plus 5cm}int cmml\_\-head\_\-snprint (char $\ast$ {\em buf}, \/  int {\em n}, \/  {\bf CMML\_\-Head} $\ast$ {\em head})}\label{cmml_8h_122f056d7e6ba46bf95c01b72a49a9e2}


cmml\_\-head\_\-snprint: Prints a head element into a buffer.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]the buffer to print into \item[{\em n}]the size of the buffer buf \item[{\em head}]the head element structure\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the number of characters written to the buffer (including the terminating $\backslash$0) or -1 if buffer too small. \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-write.c}.\end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-head\_\-pretty\_\-snprint@{cmml\_\-head\_\-pretty\_\-snprint}}
\index{cmml\_\-head\_\-pretty\_\-snprint@{cmml\_\-head\_\-pretty\_\-snprint}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-head\_\-pretty\_\-snprint}]{\setlength{\rightskip}{0pt plus 5cm}int cmml\_\-head\_\-pretty\_\-snprint (char $\ast$ {\em buf}, \/  int {\em n}, \/  {\bf CMML\_\-Head} $\ast$ {\em head})}\label{cmml_8h_0d2218b4dcd2f8b6486a73f24207ff87}


cmml\_\-head\_\-pretty\_\-snprint: Prints a head element into a buffer.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]the buffer to print into \item[{\em n}]the size of the buffer buf \item[{\em head}]the head element structure\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the number of characters written to the buffer (including the terminating $\backslash$0) or -1 if buffer too small. \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-validate.c}.\end{Desc}


Referenced by main(), and read\_\-head().\index{cmml.h@{cmml.h}!cmml\_\-clip\_\-snprint@{cmml\_\-clip\_\-snprint}}
\index{cmml\_\-clip\_\-snprint@{cmml\_\-clip\_\-snprint}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-clip\_\-snprint}]{\setlength{\rightskip}{0pt plus 5cm}int cmml\_\-clip\_\-snprint (char $\ast$ {\em buf}, \/  int {\em n}, \/  {\bf CMML\_\-Clip} $\ast$ {\em clip})}\label{cmml_8h_49c51358d878214dd9843be538d3e2f4}


cmml\_\-clip\_\-snprint: Prints a clip element into a buffer.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]the buffer to print into \item[{\em n}]the size of the buffer buf \item[{\em clip}]the clip element structure\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the number of characters written to the buffer (including the terminating $\backslash$0) or -1 if buffer too small. \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-write.c}.\end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-clip\_\-pretty\_\-snprint@{cmml\_\-clip\_\-pretty\_\-snprint}}
\index{cmml\_\-clip\_\-pretty\_\-snprint@{cmml\_\-clip\_\-pretty\_\-snprint}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-clip\_\-pretty\_\-snprint}]{\setlength{\rightskip}{0pt plus 5cm}int cmml\_\-clip\_\-pretty\_\-snprint (char $\ast$ {\em buf}, \/  int {\em n}, \/  {\bf CMML\_\-Clip} $\ast$ {\em clip})}\label{cmml_8h_d5caeeabea9df462139f74483f135870}


cmml\_\-clip\_\-pretty\_\-snprint: Prints a clip element into a buffer.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]the buffer to print into \item[{\em n}]the size of the buffer buf \item[{\em clip}]the clip element structure\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the number of characters written to the buffer (including the terminating $\backslash$0) or -1 if buffer too small. \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-validate.c}.\end{Desc}


Referenced by main(), and read\_\-clip().\index{cmml.h@{cmml.h}!cmml\_\-error\_\-snprint@{cmml\_\-error\_\-snprint}}
\index{cmml\_\-error\_\-snprint@{cmml\_\-error\_\-snprint}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-error\_\-snprint}]{\setlength{\rightskip}{0pt plus 5cm}int cmml\_\-error\_\-snprint (char $\ast$ {\em buf}, \/  int {\em n}, \/  {\bf CMML\_\-Error} $\ast$ {\em error}, \/  {\bf CMML} $\ast$ {\em cmml})}\label{cmml_8h_b70286b877d598c1628698be3708fceb}


cmml\_\-error\_\-snprint: Prints a string description of the \doxyref{CMML\_\-Error}{p.}{structCMML__Error}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]the buffer to print into \item[{\em n}]the size of the buffer buf \item[{\em error}]the error structure \item[{\em cmml}]the cmml status structure (required for expat errors)\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the number of characters written to the buffer (including the terminating $\backslash$0) or -1 if buffer too small. \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-validate.c}.\end{Desc}


Referenced by main(), read\_\-clip(), read\_\-head(), and read\_\-stream().\index{cmml.h@{cmml.h}!cmml\_\-list\_\-new@{cmml\_\-list\_\-new}}
\index{cmml\_\-list\_\-new@{cmml\_\-list\_\-new}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-list\_\-new}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-List}$\ast$ cmml\_\-list\_\-new (void)}\label{cmml_8h_b1c852df0176ad8edabfd28dcea5d598}


cmml\_\-list\_\-new: Create a new list.

\begin{Desc}
\item[Returns:]a new list \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-list\_\-clone@{cmml\_\-list\_\-clone}}
\index{cmml\_\-list\_\-clone@{cmml\_\-list\_\-clone}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-list\_\-clone}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-List}$\ast$ cmml\_\-list\_\-clone ({\bf CMML\_\-List} $\ast$ {\em list})}\label{cmml_8h_6077bc4338e20c19864779c936883dc5}


cmml\_\-list\_\-clone: Copy a list using the default cloning function.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em list}]the list to clone\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a newly cloned list \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-list\_\-clone\_\-with@{cmml\_\-list\_\-clone\_\-with}}
\index{cmml\_\-list\_\-clone\_\-with@{cmml\_\-list\_\-clone\_\-with}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-list\_\-clone\_\-with}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-List}$\ast$ cmml\_\-list\_\-clone\_\-with ({\bf CMML\_\-List} $\ast$ {\em list}, \/  {\bf CMML\_\-CloneFunc} {\em clone})}\label{cmml_8h_40d220932b7a74bd7206e4421509830b}


cmml\_\-list\_\-clone\_\-with: Clone a list using a custom clone function.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em list}]the list to clone \item[{\em clone}]the function to use to clone a list item\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a newly cloned list \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-list\_\-tail@{cmml\_\-list\_\-tail}}
\index{cmml\_\-list\_\-tail@{cmml\_\-list\_\-tail}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-list\_\-tail}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-List}$\ast$ cmml\_\-list\_\-tail ({\bf CMML\_\-List} $\ast$ {\em list})}\label{cmml_8h_f7a26d103dbec7a83351529b1733fd3b}


cmml\_\-list\_\-tail: Returns the tail element of a list.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em list}]the list\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the tail element \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-list\_\-prepend@{cmml\_\-list\_\-prepend}}
\index{cmml\_\-list\_\-prepend@{cmml\_\-list\_\-prepend}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-list\_\-prepend}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-List}$\ast$ cmml\_\-list\_\-prepend ({\bf CMML\_\-List} $\ast$ {\em list}, \/  void $\ast$ {\em data})}\label{cmml_8h_2a2228fbc98b7dc4307d421c06c6d0d5}


cmml\_\-list\_\-prepend: Prepend a new node to a list containing given data.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em list}]the list \item[{\em data}]the data element of the newly created node\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the new list head \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-list\_\-append@{cmml\_\-list\_\-append}}
\index{cmml\_\-list\_\-append@{cmml\_\-list\_\-append}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-list\_\-append}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-List}$\ast$ cmml\_\-list\_\-append ({\bf CMML\_\-List} $\ast$ {\em list}, \/  void $\ast$ {\em data})}\label{cmml_8h_e13ffc4e7813bab37eb1a8f5629f0795}


cmml\_\-list\_\-append: Append a new node to a list containing given data.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em list}]the list \item[{\em data}]the data element of the newly created node\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the head of the list \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-list\_\-add\_\-before@{cmml\_\-list\_\-add\_\-before}}
\index{cmml\_\-list\_\-add\_\-before@{cmml\_\-list\_\-add\_\-before}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-list\_\-add\_\-before}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-List}$\ast$ cmml\_\-list\_\-add\_\-before ({\bf CMML\_\-List} $\ast$ {\em list}, \/  void $\ast$ {\em data}, \/  {\bf CMML\_\-List} $\ast$ {\em node})}\label{cmml_8h_3d30e034cbc871717987eb5aeef2b00b}


cmml\_\-list\_\-add\_\-before: Add a new node containing given data before a given node

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em list}]the list \item[{\em data}]the data element of the newly created node \item[{\em node}]the node before which to add the newly created node\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the head of the list (which may have changed) \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-list\_\-add\_\-after@{cmml\_\-list\_\-add\_\-after}}
\index{cmml\_\-list\_\-add\_\-after@{cmml\_\-list\_\-add\_\-after}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-list\_\-add\_\-after}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-List}$\ast$ cmml\_\-list\_\-add\_\-after ({\bf CMML\_\-List} $\ast$ {\em list}, \/  void $\ast$ {\em data}, \/  {\bf CMML\_\-List} $\ast$ {\em node})}\label{cmml_8h_40da731a5ea7933d61c222eba403ce0b}


cmml\_\-list\_\-add\_\-after: Add a new node containing given data after a given node.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em list}]the list \item[{\em data}]the data element of the newly created node \item[{\em node}]the node after which to add the newly created node\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the head of the list \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-list\_\-find@{cmml\_\-list\_\-find}}
\index{cmml\_\-list\_\-find@{cmml\_\-list\_\-find}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-list\_\-find}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-List}$\ast$ cmml\_\-list\_\-find ({\bf CMML\_\-List} $\ast$ {\em list}, \/  void $\ast$ {\em data})}\label{cmml_8h_5afc88a583780def9b4d3fb00d5a2fa4}


cmml\_\-list\_\-find: Find the first node containing given data in a list.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em list}]the list \item[{\em data}]the data element to find\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the first node containing given data, or NULL if it is not found \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-list\_\-remove@{cmml\_\-list\_\-remove}}
\index{cmml\_\-list\_\-remove@{cmml\_\-list\_\-remove}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-list\_\-remove}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-List}$\ast$ cmml\_\-list\_\-remove ({\bf CMML\_\-List} $\ast$ {\em list}, \/  {\bf CMML\_\-List} $\ast$ {\em node})}\label{cmml_8h_f9fb8340008d6109f14fe0fffff4c642}


cmml\_\-list\_\-remove: Remove a node from a list.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em list}]the list \item[{\em node}]the node to remove\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the head of the list (which may have changed) \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-list\_\-length@{cmml\_\-list\_\-length}}
\index{cmml\_\-list\_\-length@{cmml\_\-list\_\-length}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-list\_\-length}]{\setlength{\rightskip}{0pt plus 5cm}int cmml\_\-list\_\-length ({\bf CMML\_\-List} $\ast$ {\em list})}\label{cmml_8h_1d3185a4dc182afa800c710f409f45b0}


cmml\_\-list\_\-length: Query the number of items in a list.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em list}]the list\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the number of nodes in the list \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-list\_\-is\_\-empty@{cmml\_\-list\_\-is\_\-empty}}
\index{cmml\_\-list\_\-is\_\-empty@{cmml\_\-list\_\-is\_\-empty}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-list\_\-is\_\-empty}]{\setlength{\rightskip}{0pt plus 5cm}int cmml\_\-list\_\-is\_\-empty ({\bf CMML\_\-List} $\ast$ {\em list})}\label{cmml_8h_d6c49d186a26f50384aecbef0d6300b7}


cmml\_\-list\_\-is\_\-empty: Query if a list is empty, ie. contains no items.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em list}]the list\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]1 if the list is empty, 0 otherwise \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-list\_\-is\_\-singleton@{cmml\_\-list\_\-is\_\-singleton}}
\index{cmml\_\-list\_\-is\_\-singleton@{cmml\_\-list\_\-is\_\-singleton}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-list\_\-is\_\-singleton}]{\setlength{\rightskip}{0pt plus 5cm}int cmml\_\-list\_\-is\_\-singleton ({\bf CMML\_\-List} $\ast$ {\em list})}\label{cmml_8h_b97ff99ef399d0022e67ca5a74a8221e}


cmml\_\-list\_\-is\_\-singleton: Query if the list is singleton, ie. contains exactly one item

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em list}]the list\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]1 if the list is singleton, 0 otherwise \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-list\_\-free\_\-with@{cmml\_\-list\_\-free\_\-with}}
\index{cmml\_\-list\_\-free\_\-with@{cmml\_\-list\_\-free\_\-with}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-list\_\-free\_\-with}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-List}$\ast$ cmml\_\-list\_\-free\_\-with ({\bf CMML\_\-List} $\ast$ {\em list}, \/  {\bf CMML\_\-FreeFunc} {\em free\_\-func})}\label{cmml_8h_e44c294cb71dca69d0e9bc3a58660c5f}


cmml\_\-list\_\-free\_\-with: Free a list, using a given function to free each data element

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em list}]the list \item[{\em free\_\-func}]a function to free each data element\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]NULL on success \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-list\_\-free@{cmml\_\-list\_\-free}}
\index{cmml\_\-list\_\-free@{cmml\_\-list\_\-free}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-list\_\-free}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-List}$\ast$ cmml\_\-list\_\-free ({\bf CMML\_\-List} $\ast$ {\em list})}\label{cmml_8h_6716e6f19172ec674c18c0571e227521}


cmml\_\-list\_\-free: Free a list, using anx\_\-free() to free each data element.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em list}]the list\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]NULL on success else the original list. \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-time\_\-new@{cmml\_\-time\_\-new}}
\index{cmml\_\-time\_\-new@{cmml\_\-time\_\-new}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-time\_\-new}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Time}$\ast$ cmml\_\-time\_\-new (const char $\ast$ {\em s})}\label{cmml_8h_a999a92211aaaefe18d27bda2da296b7}


cmml\_\-time\_\-new: Creates a time struct from a string that contains a name-value time spec pair.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s}]name-value time specification string\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a time struct with appropriate time type (utc or seconds). \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-write.c}.\end{Desc}


Referenced by main().\index{cmml.h@{cmml.h}!cmml\_\-sec\_\-new@{cmml\_\-sec\_\-new}}
\index{cmml\_\-sec\_\-new@{cmml\_\-sec\_\-new}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-sec\_\-new}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Time}$\ast$ cmml\_\-sec\_\-new (const char $\ast$ {\em s})}\label{cmml_8h_8d702633ccf65300468334ecd97f1c24}


cmml\_\-sec\_\-new: Creates a time struct only from name-value sec specs.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s}]name-value time specification string\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a time struct. \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-time\_\-new\_\-secs@{cmml\_\-time\_\-new\_\-secs}}
\index{cmml\_\-time\_\-new\_\-secs@{cmml\_\-time\_\-new\_\-secs}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-time\_\-new\_\-secs}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Time}$\ast$ cmml\_\-time\_\-new\_\-secs (double {\em seconds})}\label{cmml_8h_cbb4fe90144346a4d0ae23218295f2df}


cmml\_\-time\_\-new\_\-sec: Creates a time struct from a npt sec specs.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em seconds}]sec spec to be used for creating a new time struct\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a time struct. \end{Desc}


Referenced by read\_\-clip().\index{cmml.h@{cmml.h}!cmml\_\-utc\_\-new@{cmml\_\-utc\_\-new}}
\index{cmml\_\-utc\_\-new@{cmml\_\-utc\_\-new}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-utc\_\-new}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Time}$\ast$ cmml\_\-utc\_\-new (const char $\ast$ {\em s})}\label{cmml_8h_4c99fb65f2279121c2aff77fe43dea1f}


cmml\_\-utc\_\-new: Creates a time struct only from name-value utc specs.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s}]name-value time specification string\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a time struct. \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-time\_\-interval\_\-new@{cmml\_\-time\_\-interval\_\-new}}
\index{cmml\_\-time\_\-interval\_\-new@{cmml\_\-time\_\-interval\_\-new}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-time\_\-interval\_\-new}]{\setlength{\rightskip}{0pt plus 5cm}int cmml\_\-time\_\-interval\_\-new (const char $\ast$ {\em s}, \/  {\bf CMML\_\-Time} $\ast$$\ast$ {\em t\_\-start}, \/  {\bf CMML\_\-Time} $\ast$$\ast$ {\em t\_\-end})}\label{cmml_8h_278f5e328ace0e4854864fcce4d2b4c0}


cmml\_\-time\_\-interval\_\-new: Handles start and end times for clip tags, where we will only store sec offsets.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s}]the time construct; examples: npt:40-79 or smpte-25:00:20:20-00:21:30,00:40:21 \item[{\em t\_\-start}]the start time returned \item[{\em t\_\-end}]the end time (if any) returned\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]creates two time constructs if the string was a time range, otherwise just a t\_\-start time, and returns the number of times created or -1 otherwise. \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-time\_\-new\_\-in\_\-sec@{cmml\_\-time\_\-new\_\-in\_\-sec}}
\index{cmml\_\-time\_\-new\_\-in\_\-sec@{cmml\_\-time\_\-new\_\-in\_\-sec}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-time\_\-new\_\-in\_\-sec}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Time}$\ast$ cmml\_\-time\_\-new\_\-in\_\-sec (const char $\ast$ {\em s}, \/  {\bf CMML\_\-Time} $\ast$ {\em ref}, \/  double {\em base})}\label{cmml_8h_66d2cbc7ef250647e49195c9b7a36c46}


cmml\_\-time\_\-new\_\-in\_\-sec: For parsing/converting start and end time specs in clips into a seconds representation, which is the only one libcmml stores internally for clips.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s}]the string that contains the time spec \item[{\em ref}]the reference utc time if given in the stream tag \item[{\em base}]the basetime in seconds as given in the stream tag\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a time structure in seconds \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-time\_\-utc\_\-to\_\-sec@{cmml\_\-time\_\-utc\_\-to\_\-sec}}
\index{cmml\_\-time\_\-utc\_\-to\_\-sec@{cmml\_\-time\_\-utc\_\-to\_\-sec}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-time\_\-utc\_\-to\_\-sec}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Time}$\ast$ cmml\_\-time\_\-utc\_\-to\_\-sec ({\bf CMML\_\-Time} $\ast$ {\em t}, \/  {\bf CMML\_\-Time} $\ast$ {\em ref}, \/  double {\em base})}\label{cmml_8h_a78b60933aa18199bbc9d5b80122cab1}


cmml\_\-time\_\-utc\_\-to\_\-sec: Convert a time from utc to seconds with reference to a basetime

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em t}]the given time struct \item[{\em ref}]the reference utc time if given in the stream tag \item[{\em base}]the basetime in seconds as given in the stream tag\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a time structure in seconds \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-time\_\-free@{cmml\_\-time\_\-free}}
\index{cmml\_\-time\_\-free@{cmml\_\-time\_\-free}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-time\_\-free}]{\setlength{\rightskip}{0pt plus 5cm}void cmml\_\-time\_\-free ({\bf CMML\_\-Time} $\ast$ {\em t})}\label{cmml_8h_a25de35a74581e118e5d58dc1234ad8a}


cmml\_\-time\_\-free: Free time struct

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em t}]the given time struct \end{description}
\end{Desc}


Referenced by read\_\-clip().\index{cmml.h@{cmml.h}!cmml\_\-time\_\-clone@{cmml\_\-time\_\-clone}}
\index{cmml\_\-time\_\-clone@{cmml\_\-time\_\-clone}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-time\_\-clone}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-Time}$\ast$ cmml\_\-time\_\-clone ({\bf CMML\_\-Time} $\ast$ {\em t})}\label{cmml_8h_d124bb375afa493f9440664fa4a60627}


cmml\_\-time\_\-clone: Copying times

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em t}]the given time struct\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the cloned time struct \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-sec\_\-parse@{cmml\_\-sec\_\-parse}}
\index{cmml\_\-sec\_\-parse@{cmml\_\-sec\_\-parse}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-sec\_\-parse}]{\setlength{\rightskip}{0pt plus 5cm}double cmml\_\-sec\_\-parse (const char $\ast$ {\em s})}\label{cmml_8h_2f52fb4e44cace4deccaac7ab50c4ed0}


cmml\_\-sec\_\-parse: for parsing sec specs with \char`\"{}npt:\char`\"{}, \char`\"{}smpte:\char`\"{} etc.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s}]the string containing the name-value time specification\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the parsed seconds as a double \end{Desc}


Referenced by read\_\-clip().\index{cmml.h@{cmml.h}!cmml\_\-utc\_\-parse@{cmml\_\-utc\_\-parse}}
\index{cmml\_\-utc\_\-parse@{cmml\_\-utc\_\-parse}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-utc\_\-parse}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-UTC}$\ast$ cmml\_\-utc\_\-parse (const char $\ast$ {\em s})}\label{cmml_8h_fdd94aca1f4755c801222fa7c6e76151}


cmml\_\-utc\_\-parse: for parsing utc times with \char`\"{}clock:\char`\"{}

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s}]the string containing only the utc string as YYYYMMDDTHHmmss.hhZ\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a utc time structure \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-utc\_\-clone@{cmml\_\-utc\_\-clone}}
\index{cmml\_\-utc\_\-clone@{cmml\_\-utc\_\-clone}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-utc\_\-clone}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CMML\_\-UTC}$\ast$ cmml\_\-utc\_\-clone ({\bf CMML\_\-UTC} $\ast$ {\em t})}\label{cmml_8h_620f8e45848c914095cca568e46c5ec6}


cmml\_\-utc\_\-clone: for copying utc times

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em t}]the src utc time structure\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the copied utc time structure \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-utc\_\-diff@{cmml\_\-utc\_\-diff}}
\index{cmml\_\-utc\_\-diff@{cmml\_\-utc\_\-diff}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-utc\_\-diff}]{\setlength{\rightskip}{0pt plus 5cm}double cmml\_\-utc\_\-diff ({\bf CMML\_\-UTC} $\ast$ {\em t2}, \/  {\bf CMML\_\-UTC} $\ast$ {\em t1})}\label{cmml_8h_dfd33203381ba73efe7c7a03f95a1c46}


cmml\_\-utc\_\-diff: for calculating the difference between two utc times as t2-t1 in seconds

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em t2}]the more recent utc time \item[{\em t1}]the less recent utc time\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the difference between the two utc times in seconds \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-npt\_\-snprint@{cmml\_\-npt\_\-snprint}}
\index{cmml\_\-npt\_\-snprint@{cmml\_\-npt\_\-snprint}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-npt\_\-snprint}]{\setlength{\rightskip}{0pt plus 5cm}int cmml\_\-npt\_\-snprint (char $\ast$ {\em buf}, \/  int {\em n}, \/  double {\em seconds})}\label{cmml_8h_a1215ede53ab99645e4fb8a67d933d9d}


cmml\_\-npt\_\-snprint: prints npt time to a string

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]buffer to print string to \item[{\em n}]the size of the buffer buf \item[{\em seconds}]the npt time in seconds as a double\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]number of characters written to the buffer (including the terminating $\backslash$0) or a negative value on failure. \end{Desc}
\begin{Desc}
\item[Examples: ]\par
{\bf cmml-write.c}.\end{Desc}


Referenced by main().\index{cmml.h@{cmml.h}!cmml\_\-utc\_\-snprint@{cmml\_\-utc\_\-snprint}}
\index{cmml\_\-utc\_\-snprint@{cmml\_\-utc\_\-snprint}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-utc\_\-snprint}]{\setlength{\rightskip}{0pt plus 5cm}int cmml\_\-utc\_\-snprint (char $\ast$ {\em buf}, \/  int {\em n}, \/  {\bf CMML\_\-UTC} $\ast$ {\em t})}\label{cmml_8h_4ac61b2a950ccd4fd504acb826476830}


cmml\_\-utc\_\-snprint: for printing utc times

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]the buffer to print into \item[{\em n}]the size of the buffer buf \item[{\em t}]the utc time structure\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the number of characters written to the buffer (including the terminating $\backslash$0) or -1 if buffer too small. \end{Desc}
\index{cmml.h@{cmml.h}!cmml\_\-utc\_\-pretty\_\-snprint@{cmml\_\-utc\_\-pretty\_\-snprint}}
\index{cmml\_\-utc\_\-pretty\_\-snprint@{cmml\_\-utc\_\-pretty\_\-snprint}!cmml.h@{cmml.h}}
\subsubsection[{cmml\_\-utc\_\-pretty\_\-snprint}]{\setlength{\rightskip}{0pt plus 5cm}int cmml\_\-utc\_\-pretty\_\-snprint (char $\ast$ {\em buf}, \/  int {\em n}, \/  {\bf CMML\_\-UTC} $\ast$ {\em t})}\label{cmml_8h_5b20808a0a523bc32786a10a7cea9338}


cmml\_\-utc\_\-pretty\_\-snprint: for printing utc times

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]the buffer to print into \item[{\em n}]the size of the buffer buf \item[{\em t}]the utc time structure\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the number of characters written to the buffer (including the terminating $\backslash$0) or -1 if buffer too small. \end{Desc}
