\section{lib/xdot/xdot.c File Reference}
\label{xdot_8c}\index{lib/xdot/xdot.\-c@{lib/xdot/xdot.\-c}}
{\ttfamily \#include $<$xdot.\-h$>$}\\*
{\ttfamily \#include $<$stdlib.\-h$>$}\\*
{\ttfamily \#include $<$string.\-h$>$}\\*
{\ttfamily \#include $<$ctype.\-h$>$}\\*
Include dependency graph for xdot.\-c\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=290pt]{xdot_8c__incl}
\end{center}
\end{figure}
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct {\bf agxbuf}
\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define {\bf N\-E\-W}(t)~(t$\ast$)calloc(1, sizeof(t))
\item 
\#define {\bf N\-\_\-\-N\-E\-W}(n, t)~(t$\ast$)calloc((n), sizeof(t))
\item 
\#define {\bf agxbputc}(X, {\bf C})
\item 
\#define {\bf agxbuse}(X)~({\bf agxbputc}(X,'\textbackslash{}0'),(char$\ast$)((X)-\/$>$ptr = (X)-\/$>$buf))
\item 
\#define {\bf C\-H\-K}({\bf s})~{\bf if}(!{\bf s})\{$\ast$error=1;return 0;\}
\item 
\#define {\bf X\-D\-B\-S\-I\-Z\-E}~100
\item 
\#define {\bf C\-H\-K1}({\bf s})~{\bf if}(!{\bf s})\{free(stops);return {\bf N\-U\-L\-L};\}
\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef void($\ast$ {\bf pf} )(char $\ast$, void $\ast$)
\item 
typedef void($\ast$ {\bf print\-\_\-op} )({\bf xdot\-\_\-op} $\ast$op, {\bf pf} print, void $\ast${\bf info}, {\bf int} more)
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\bf xdot} $\ast$ {\bf parse\-X\-Dot\-F\-On} (char $\ast${\bf s}, {\bf drawfunc\-\_\-t} fns[$\,$], {\bf int} sz, {\bf xdot} $\ast$x)
\item 
{\bf xdot} $\ast$ {\bf parse\-X\-Dot\-F} (char $\ast${\bf s}, {\bf drawfunc\-\_\-t} fns[$\,$], {\bf int} sz)
\item 
{\bf xdot} $\ast$ {\bf parse\-X\-Dot} (char $\ast${\bf s})
\item 
char $\ast$ {\bf sprint\-X\-Dot} ({\bf xdot} $\ast$x)
\item 
void {\bf fprint\-X\-Dot} (F\-I\-L\-E $\ast$fp, {\bf xdot} $\ast$x)
\item 
void {\bf json\-X\-Dot} (F\-I\-L\-E $\ast$fp, {\bf xdot} $\ast$x)
\item 
void {\bf free\-X\-Dot} ({\bf xdot} $\ast$x)
\item 
{\bf int} {\bf stat\-X\-Dot} ({\bf xdot} $\ast$x, {\bf xdot\-\_\-stats} $\ast$sp)
\item 
{\bf xdot\-\_\-grad\-\_\-type} {\bf color\-Type} (char $\ast$cp)
\item 
char $\ast$ {\bf parse\-X\-Dot\-Color} (char $\ast$cp, {\bf xdot\-\_\-color} $\ast$clr)
\item 
void {\bf free\-X\-Dot\-Color} ({\bf xdot\-\_\-color} $\ast$cp)
\end{DoxyCompactItemize}


\subsection{Macro Definition Documentation}
\index{xdot.\-c@{xdot.\-c}!agxbputc@{agxbputc}}
\index{agxbputc@{agxbputc}!xdot.c@{xdot.\-c}}
\subsubsection[{agxbputc}]{\setlength{\rightskip}{0pt plus 5cm}\#define agxbputc(
\begin{DoxyParamCaption}
\item[{}]{X, }
\item[{}]{{\bf C}}
\end{DoxyParamCaption}
)}\label{xdot_8c_a657ea4fbe5cab99b35127fc44c37e029}
{\bfseries Value\-:}
\begin{DoxyCode}
((((X)->ptr >= (X)->eptr) ? agxbmore(X,1) : 0), \(\backslash\)
          (\textcolor{keywordtype}{void})(*(X)->ptr++ = ((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char})C)))
\end{DoxyCode}


Definition at line 28 of file xdot.\-c.

\index{xdot.\-c@{xdot.\-c}!agxbuse@{agxbuse}}
\index{agxbuse@{agxbuse}!xdot.c@{xdot.\-c}}
\subsubsection[{agxbuse}]{\setlength{\rightskip}{0pt plus 5cm}\#define agxbuse(
\begin{DoxyParamCaption}
\item[{}]{X}
\end{DoxyParamCaption}
)~({\bf agxbputc}(X,'\textbackslash{}0'),(char$\ast$)((X)-\/$>$ptr = (X)-\/$>$buf))}\label{xdot_8c_ac952fad85305b7008fc79599ab6a34a2}


Definition at line 30 of file xdot.\-c.



Referenced by sprint\-X\-Dot().

\index{xdot.\-c@{xdot.\-c}!C\-H\-K@{C\-H\-K}}
\index{C\-H\-K@{C\-H\-K}!xdot.c@{xdot.\-c}}
\subsubsection[{C\-H\-K}]{\setlength{\rightskip}{0pt plus 5cm}\#define C\-H\-K(
\begin{DoxyParamCaption}
\item[{}]{{\bf s}}
\end{DoxyParamCaption}
)~{\bf if}(!{\bf s})\{$\ast$error=1;return 0;\}}\label{xdot_8c_a8fd0c21fb3ababc8b4a2223cb17776c4}


Definition at line 257 of file xdot.\-c.

\index{xdot.\-c@{xdot.\-c}!C\-H\-K1@{C\-H\-K1}}
\index{C\-H\-K1@{C\-H\-K1}!xdot.c@{xdot.\-c}}
\subsubsection[{C\-H\-K1}]{\setlength{\rightskip}{0pt plus 5cm}\#define C\-H\-K1(
\begin{DoxyParamCaption}
\item[{}]{{\bf s}}
\end{DoxyParamCaption}
)~{\bf if}(!{\bf s})\{free(stops);return {\bf N\-U\-L\-L};\}}\label{xdot_8c_a4e5be3940d521194c8906bad6817ab16}


Definition at line 1044 of file xdot.\-c.

\index{xdot.\-c@{xdot.\-c}!N\-\_\-\-N\-E\-W@{N\-\_\-\-N\-E\-W}}
\index{N\-\_\-\-N\-E\-W@{N\-\_\-\-N\-E\-W}!xdot.c@{xdot.\-c}}
\subsubsection[{N\-\_\-\-N\-E\-W}]{\setlength{\rightskip}{0pt plus 5cm}\#define N\-\_\-\-N\-E\-W(
\begin{DoxyParamCaption}
\item[{}]{n, }
\item[{}]{t}
\end{DoxyParamCaption}
)~(t$\ast$)calloc((n), sizeof(t))}\label{xdot_8c_aff1e0aa083474362a4f0b485ccaeef41}


Definition at line 19 of file xdot.\-c.

\index{xdot.\-c@{xdot.\-c}!N\-E\-W@{N\-E\-W}}
\index{N\-E\-W@{N\-E\-W}!xdot.c@{xdot.\-c}}
\subsubsection[{N\-E\-W}]{\setlength{\rightskip}{0pt plus 5cm}\#define N\-E\-W(
\begin{DoxyParamCaption}
\item[{}]{t}
\end{DoxyParamCaption}
)~(t$\ast$)calloc(1, sizeof(t))}\label{xdot_8c_ad47bcaeb6a32d146af1ad46876b1e083}


Definition at line 18 of file xdot.\-c.



Referenced by parse\-X\-Dot\-F\-On().

\index{xdot.\-c@{xdot.\-c}!X\-D\-B\-S\-I\-Z\-E@{X\-D\-B\-S\-I\-Z\-E}}
\index{X\-D\-B\-S\-I\-Z\-E@{X\-D\-B\-S\-I\-Z\-E}!xdot.c@{xdot.\-c}}
\subsubsection[{X\-D\-B\-S\-I\-Z\-E}]{\setlength{\rightskip}{0pt plus 5cm}\#define X\-D\-B\-S\-I\-Z\-E~100}\label{xdot_8c_a6ba84bc2f6653188ef3efcff12e2b1a2}


Definition at line 427 of file xdot.\-c.



Referenced by parse\-X\-Dot\-F\-On().



\subsection{Typedef Documentation}
\index{xdot.\-c@{xdot.\-c}!pf@{pf}}
\index{pf@{pf}!xdot.c@{xdot.\-c}}
\subsubsection[{pf}]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$ pf)(char $\ast$, void $\ast$)}\label{xdot_8c_acb925fe45e11240edb0b1a373a42357a}


Definition at line 501 of file xdot.\-c.

\index{xdot.\-c@{xdot.\-c}!print\-\_\-op@{print\-\_\-op}}
\index{print\-\_\-op@{print\-\_\-op}!xdot.c@{xdot.\-c}}
\subsubsection[{print\-\_\-op}]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$ print\-\_\-op)({\bf xdot\-\_\-op} $\ast$op, {\bf pf} print, void $\ast${\bf info}, {\bf int} more)}\label{xdot_8c_a287725f9bd46c0cbd7080e4e30b6aa37}


Definition at line 646 of file xdot.\-c.



\subsection{Function Documentation}
\index{xdot.\-c@{xdot.\-c}!color\-Type@{color\-Type}}
\index{color\-Type@{color\-Type}!xdot.c@{xdot.\-c}}
\subsubsection[{color\-Type}]{\setlength{\rightskip}{0pt plus 5cm}{\bf xdot\-\_\-grad\-\_\-type} color\-Type (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{cp}
\end{DoxyParamCaption}
)}\label{xdot_8c_afec21a837f1d471365134d4fc7c83cc3}


Definition at line 1026 of file xdot.\-c.



References xd\-\_\-linear, xd\-\_\-none, and xd\-\_\-radial.

\index{xdot.\-c@{xdot.\-c}!fprint\-X\-Dot@{fprint\-X\-Dot}}
\index{fprint\-X\-Dot@{fprint\-X\-Dot}!xdot.c@{xdot.\-c}}
\subsubsection[{fprint\-X\-Dot}]{\setlength{\rightskip}{0pt plus 5cm}void fprint\-X\-Dot (
\begin{DoxyParamCaption}
\item[{F\-I\-L\-E $\ast$}]{fp, }
\item[{{\bf xdot} $\ast$}]{x}
\end{DoxyParamCaption}
)}\label{xdot_8c_aa8bd44c4cf6c9951b42f533814e7acb4}


Definition at line 894 of file xdot.\-c.

\index{xdot.\-c@{xdot.\-c}!free\-X\-Dot@{free\-X\-Dot}}
\index{free\-X\-Dot@{free\-X\-Dot}!xdot.c@{xdot.\-c}}
\subsubsection[{free\-X\-Dot}]{\setlength{\rightskip}{0pt plus 5cm}void free\-X\-Dot (
\begin{DoxyParamCaption}
\item[{{\bf xdot} $\ast$}]{x}
\end{DoxyParamCaption}
)}\label{xdot_8c_a5313f48fe803aa8b45de142045d4dc8c}


Definition at line 945 of file xdot.\-c.



References xdot\-::cnt, xdot\-::freefunc, xdot\-::ops, and xdot\-::sz.



Referenced by graph\-\_\-cleanup().

\index{xdot.\-c@{xdot.\-c}!free\-X\-Dot\-Color@{free\-X\-Dot\-Color}}
\index{free\-X\-Dot\-Color@{free\-X\-Dot\-Color}!xdot.c@{xdot.\-c}}
\subsubsection[{free\-X\-Dot\-Color}]{\setlength{\rightskip}{0pt plus 5cm}void free\-X\-Dot\-Color (
\begin{DoxyParamCaption}
\item[{{\bf xdot\-\_\-color} $\ast$}]{cp}
\end{DoxyParamCaption}
)}\label{xdot_8c_aa23eceb773f967af303ab221f327392d}


Definition at line 1158 of file xdot.\-c.



References xdot\-\_\-color\-\_\-stop\-::color, xdot\-\_\-color\-::ling, xdot\-\_\-linear\-\_\-grad\-::n\-\_\-stops, xdot\-\_\-radial\-\_\-grad\-::n\-\_\-stops, xdot\-\_\-color\-::ring, xdot\-\_\-linear\-\_\-grad\-::stops, xdot\-\_\-radial\-\_\-grad\-::stops, xdot\-\_\-color\-::type, xdot\-\_\-color\-::u, xd\-\_\-linear, and xd\-\_\-radial.

\index{xdot.\-c@{xdot.\-c}!json\-X\-Dot@{json\-X\-Dot}}
\index{json\-X\-Dot@{json\-X\-Dot}!xdot.c@{xdot.\-c}}
\subsubsection[{json\-X\-Dot}]{\setlength{\rightskip}{0pt plus 5cm}void json\-X\-Dot (
\begin{DoxyParamCaption}
\item[{F\-I\-L\-E $\ast$}]{fp, }
\item[{{\bf xdot} $\ast$}]{x}
\end{DoxyParamCaption}
)}\label{xdot_8c_af74c54cb2ee7420bd7cc3aeb6a86d410}


Definition at line 899 of file xdot.\-c.

\index{xdot.\-c@{xdot.\-c}!parse\-X\-Dot@{parse\-X\-Dot}}
\index{parse\-X\-Dot@{parse\-X\-Dot}!xdot.c@{xdot.\-c}}
\subsubsection[{parse\-X\-Dot}]{\setlength{\rightskip}{0pt plus 5cm}{\bf xdot}$\ast$ parse\-X\-Dot (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{s}
\end{DoxyParamCaption}
)}\label{xdot_8c_a257ace978499f19cb60cf0720a3efaf9}


Definition at line 496 of file xdot.\-c.



References parse\-X\-Dot\-F().

\index{xdot.\-c@{xdot.\-c}!parse\-X\-Dot\-Color@{parse\-X\-Dot\-Color}}
\index{parse\-X\-Dot\-Color@{parse\-X\-Dot\-Color}!xdot.c@{xdot.\-c}}
\subsubsection[{parse\-X\-Dot\-Color}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ parse\-X\-Dot\-Color (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{cp, }
\item[{{\bf xdot\-\_\-color} $\ast$}]{clr}
\end{DoxyParamCaption}
)}\label{xdot_8c_a38958cac41d4d6e7fc4f294b9c9ac820}


Definition at line 1130 of file xdot.\-c.



References xdot\-\_\-color\-::clr, N\-U\-L\-L, xdot\-\_\-color\-::type, xdot\-\_\-color\-::u, and xd\-\_\-none.

\index{xdot.\-c@{xdot.\-c}!parse\-X\-Dot\-F@{parse\-X\-Dot\-F}}
\index{parse\-X\-Dot\-F@{parse\-X\-Dot\-F}!xdot.c@{xdot.\-c}}
\subsubsection[{parse\-X\-Dot\-F}]{\setlength{\rightskip}{0pt plus 5cm}{\bf xdot}$\ast$ parse\-X\-Dot\-F (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{s, }
\item[{{\bf drawfunc\-\_\-t}}]{fns[$\,$], }
\item[{{\bf int}}]{sz}
\end{DoxyParamCaption}
)}\label{xdot_8c_ab40ab7b7867c06b18c4fdc6365252432}


Definition at line 491 of file xdot.\-c.



References N\-U\-L\-L, and parse\-X\-Dot\-F\-On().



Referenced by init\-\_\-xdot(), and parse\-X\-Dot().

\index{xdot.\-c@{xdot.\-c}!parse\-X\-Dot\-F\-On@{parse\-X\-Dot\-F\-On}}
\index{parse\-X\-Dot\-F\-On@{parse\-X\-Dot\-F\-On}!xdot.c@{xdot.\-c}}
\subsubsection[{parse\-X\-Dot\-F\-On}]{\setlength{\rightskip}{0pt plus 5cm}{\bf xdot}$\ast$ parse\-X\-Dot\-F\-On (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{s, }
\item[{{\bf drawfunc\-\_\-t}}]{fns[$\,$], }
\item[{{\bf int}}]{sz, }
\item[{{\bf xdot} $\ast$}]{x}
\end{DoxyParamCaption}
)}\label{xdot_8c_a4d05cde833fd0b26f12e47090d2efc0a}


Definition at line 433 of file xdot.\-c.



References xdot\-::cnt, xdot\-::flags, N\-E\-W, N\-U\-L\-L, xdot\-::ops, xdot\-::sz, X\-D\-B\-S\-I\-Z\-E, and X\-D\-O\-T\-\_\-\-P\-A\-R\-S\-E\-\_\-\-E\-R\-R\-O\-R.



Referenced by parse\-X\-Dot\-F().

\index{xdot.\-c@{xdot.\-c}!sprint\-X\-Dot@{sprint\-X\-Dot}}
\index{sprint\-X\-Dot@{sprint\-X\-Dot}!xdot.c@{xdot.\-c}}
\subsubsection[{sprint\-X\-Dot}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ sprint\-X\-Dot (
\begin{DoxyParamCaption}
\item[{{\bf xdot} $\ast$}]{x}
\end{DoxyParamCaption}
)}\label{xdot_8c_a84abce675d50fb98ebfbac73f4a3d61d}


Definition at line 881 of file xdot.\-c.



References agxbfree(), agxbinit(), agxbput(), and agxbuse.

\index{xdot.\-c@{xdot.\-c}!stat\-X\-Dot@{stat\-X\-Dot}}
\index{stat\-X\-Dot@{stat\-X\-Dot}!xdot.c@{xdot.\-c}}
\subsubsection[{stat\-X\-Dot}]{\setlength{\rightskip}{0pt plus 5cm}{\bf int} stat\-X\-Dot (
\begin{DoxyParamCaption}
\item[{{\bf xdot} $\ast$}]{x, }
\item[{{\bf xdot\-\_\-stats} $\ast$}]{sp}
\end{DoxyParamCaption}
)}\label{xdot_8c_a4e95f84c369e492662fad7f068a4dae0}


Definition at line 963 of file xdot.\-c.



References \-\_\-xdot\-\_\-op\-::bezier, xdot\-\_\-polyline\-::cnt, xdot\-::cnt, xdot\-\_\-stats\-::cnt, \-\_\-xdot\-\_\-op\-::kind, xdot\-\_\-stats\-::n\-\_\-bezier, xdot\-\_\-stats\-::n\-\_\-bezier\-\_\-pts, xdot\-\_\-stats\-::n\-\_\-color, xdot\-\_\-stats\-::n\-\_\-ellipse, xdot\-\_\-stats\-::n\-\_\-font, xdot\-\_\-stats\-::n\-\_\-fontchar, xdot\-\_\-stats\-::n\-\_\-gradcolor, xdot\-\_\-stats\-::n\-\_\-image, xdot\-\_\-stats\-::n\-\_\-polygon, xdot\-\_\-stats\-::n\-\_\-polygon\-\_\-pts, xdot\-\_\-stats\-::n\-\_\-polyline, xdot\-\_\-stats\-::n\-\_\-polyline\-\_\-pts, xdot\-\_\-stats\-::n\-\_\-style, xdot\-\_\-stats\-::n\-\_\-text, xdot\-::ops, \-\_\-xdot\-\_\-op\-::polygon, \-\_\-xdot\-\_\-op\-::polyline, xdot\-::sz, \-\_\-xdot\-\_\-op\-::u, xd\-\_\-fill\-\_\-color, xd\-\_\-filled\-\_\-bezier, xd\-\_\-filled\-\_\-ellipse, xd\-\_\-filled\-\_\-polygon, xd\-\_\-font, xd\-\_\-fontchar, xd\-\_\-grad\-\_\-fill\-\_\-color, xd\-\_\-grad\-\_\-pen\-\_\-color, xd\-\_\-image, xd\-\_\-pen\-\_\-color, xd\-\_\-polyline, xd\-\_\-style, xd\-\_\-text, xd\-\_\-unfilled\-\_\-bezier, xd\-\_\-unfilled\-\_\-ellipse, and xd\-\_\-unfilled\-\_\-polygon.



Referenced by init\-\_\-xdot().

