#include "dmxconfig.h"
#include "dmxparse.h"
#include "dmxprint.h"
#include "parser.h"
#include <stdio.h>
#include <stdarg.h>
#include <ctype.h>
This file provides support routines and helper functions to be used to pretty-print DMX configurations.
Because the DMX configuration file parsing should be capable of being used in a stand-alone fashion (i.e., independent from the DMX server source tree), no dependencies on other DMX routines are made.
static void dmxConfigIndent | ( | void | ) | [static] |
Referenced by dmxConfigOutput().
static void dmxConfigNewline | ( | void | ) | [static] |
Referenced by dmxConfigOutput(), dmxConfigPopState(), dmxConfigPrint(), dmxConfigPushState(), and dmxConfigVirtualPrint().
static void dmxConfigOutput | ( | int | addSpace, | |
int | doNewline, | |||
const char * | comment, | |||
const char * | format, | |||
... | ||||
) | [static] |
References dmxConfigIndent(), dmxConfigNewline(), dmxConfigPushComment(), pos, and str.
Referenced by dmxConfigPrintComment(), dmxConfigPrintPair(), dmxConfigPrintString(), and dmxConfigPrintTokenFlag().
static void dmxConfigPopState | ( | void | ) | [static] |
References stack::base, dmxConfigFree(), dmxConfigLog(), dmxConfigNewline(), indent, and stack::next.
Referenced by dmxConfigPrintTokenFlag().
void dmxConfigPrint | ( | FILE * | stream, | |
DMXConfigEntryPtr | entry | |||
) |
The configuration information in entry will be pretty-printed to the stream. If stream is NULL, then stdout will be used.
References _DMXConfigEntry::comment, dmxConfigComment, dmxConfigLog(), dmxConfigNewline(), dmxConfigPrintComment(), dmxConfigPrintVirtual(), dmxConfigVirtual, _DMXConfigEntry::next, pos, str, _DMXConfigEntry::type, and _DMXConfigEntry::virtual.
Referenced by dmxConfigWriteFile(), and main().
static void dmxConfigPrintComment | ( | DMXConfigCommentPtr | p | ) | [static] |
References _DMXConfigComment::comment, and dmxConfigOutput().
Referenced by dmxConfigPrint(), and dmxConfigPrintSub().
static void dmxConfigPrintDisplay | ( | DMXConfigDisplayPtr | p | ) | [static] |
References _DMXConfigPartDim::dim, _DMXConfigDisplay::dim, dmxConfigPrintPair(), dmxConfigPrintString(), dmxConfigPrintToken(), _DMXConfigDisplay::dname, _DMXConfigDisplay::end, _DMXConfigDisplay::name, _DMXConfigPartDim::offset, _DMXConfigDisplay::origin, _DMXConfigFullDim::root, _DMXConfigDisplay::rootHeight, _DMXConfigDisplay::rootWidth, _DMXConfigDisplay::rootX, _DMXConfigDisplay::rootXOrigin, _DMXConfigDisplay::rootXSign, _DMXConfigDisplay::rootY, _DMXConfigDisplay::rootYOrigin, _DMXConfigDisplay::rootYSign, _DMXConfigFullDim::scrn, _DMXConfigDisplay::scrnHeight, _DMXConfigDisplay::scrnWidth, _DMXConfigDisplay::scrnX, _DMXConfigDisplay::scrnY, _DMXConfigDisplay::start, _DMXConfigString::string, _DMXConfigPair::x, _DMXConfigPair::xsign, _DMXConfigPair::y, and _DMXConfigPair::ysign.
Referenced by dmxConfigPrintSub().
static void dmxConfigPrintOption | ( | DMXConfigOptionPtr | p | ) | [static] |
References dmxConfigPrintString(), dmxConfigPrintToken(), _DMXConfigOption::end, _DMXConfigOption::start, _DMXConfigOption::string, and _DMXConfigString::string.
Referenced by dmxConfigPrintSub().
static int dmxConfigPrintPair | ( | DMXConfigPairPtr | p, | |
int | addSpace | |||
) | [static] |
References _DMXConfigPair::comment, dmxConfigOutput(), _DMXConfigPair::token, _DMXConfigPair::x, _DMXConfigPair::xsign, _DMXConfigPair::y, and _DMXConfigPair::ysign.
Referenced by dmxConfigPrintDisplay(), dmxConfigPrintVirtual(), and dmxConfigPrintWall().
static void dmxConfigPrintParam | ( | DMXConfigParamPtr | p | ) | [static] |
static int dmxConfigPrintQuotedString | ( | const char * | s | ) | [static] |
Referenced by dmxConfigPrintString().
static void dmxConfigPrintString | ( | DMXConfigStringPtr | p, | |
int | quote | |||
) | [static] |
static void dmxConfigPrintSub | ( | DMXConfigSubPtr | p | ) | [static] |
References _DMXConfigSub::comment, _DMXConfigSub::display, dmxConfigComment, dmxConfigDisplay, dmxConfigLog(), dmxConfigOption, dmxConfigParam, dmxConfigPrintComment(), dmxConfigPrintDisplay(), dmxConfigPrintOption(), dmxConfigPrintParam(), dmxConfigPrintWall(), dmxConfigWall, _DMXConfigSub::next, _DMXConfigSub::option, _DMXConfigSub::param, _DMXConfigSub::type, and _DMXConfigSub::wall.
Referenced by dmxConfigPrintVirtual().
static void dmxConfigPrintToken | ( | DMXConfigTokenPtr | p | ) | [static] |
References dmxConfigPrintTokenFlag().
Referenced by dmxConfigPrintDisplay(), dmxConfigPrintOption(), dmxConfigPrintParam(), dmxConfigPrintVirtual(), and dmxConfigPrintWall().
static void dmxConfigPrintTokenFlag | ( | DMXConfigTokenPtr | p, | |
int | flag | |||
) | [static] |
References _DMXConfigToken::comment, dmxConfigLog(), dmxConfigOutput(), dmxConfigPopState(), dmxConfigPushState(), dmxConfigPushStep(), _DMXConfigToken::line, and _DMXConfigToken::token.
Referenced by dmxConfigPrintToken(), and dmxConfigPrintTokenNopop().
static void dmxConfigPrintTokenNopop | ( | DMXConfigTokenPtr | p | ) | [static] |
References dmxConfigPrintTokenFlag().
Referenced by dmxConfigPrintParam().
static void dmxConfigPrintVirtual | ( | DMXConfigVirtualPtr | p | ) | [static] |
References _DMXConfigVirtual::close, _DMXConfigVirtual::dim, dmxConfigPrintPair(), dmxConfigPrintString(), dmxConfigPrintSub(), dmxConfigPrintToken(), _DMXConfigVirtual::height, _DMXConfigVirtual::name, _DMXConfigVirtual::open, _DMXConfigVirtual::start, _DMXConfigString::string, _DMXConfigVirtual::subentry, _DMXConfigVirtual::vname, _DMXConfigVirtual::width, _DMXConfigPair::x, and _DMXConfigPair::y.
Referenced by dmxConfigPrint(), and dmxConfigVirtualPrint().
static void dmxConfigPrintWall | ( | DMXConfigWallPtr | p | ) | [static] |
static void dmxConfigPushComment | ( | void | ) | [static] |
References indent.
Referenced by dmxConfigOutput().
static void dmxConfigPushState | ( | int | base, | |
int | comment, | |||
int | step | |||
) | [static] |
References dmxConfigAlloc(), dmxConfigNewline(), and indent.
Referenced by dmxConfigPrintTokenFlag().
static void dmxConfigPushStep | ( | void | ) | [static] |
References indent.
Referenced by dmxConfigPrintTokenFlag().
void dmxConfigVirtualPrint | ( | FILE * | stream, | |
DMXConfigVirtualPtr | p | |||
) |
The configuration information in p will be pretty-printed to the stream. If stream is NULL, then stdout will be used.
References dmxConfigNewline(), dmxConfigPrintVirtual(), pos, and str.
Referenced by dmxConfigReadFile(), and dmxConfigSelectCallback().
int indent = 0 [static] |
Referenced by dmxConfigIndent(), dmxConfigPopState(), dmxConfigPushComment(), dmxConfigPushState(), and dmxConfigPushStep().
struct stack initialStack [static] |
int pos = 0 [static] |
Referenced by dmxBERestoreRenderGlyph(), dmxConfigNewline(), dmxConfigOutput(), dmxConfigPrint(), and dmxConfigVirtualPrint().
FILE* str = NULL [static] |