dmxprint.c File Reference

#include "dmxconfig.h"
#include "dmxparse.h"
#include "dmxprint.h"
#include "parser.h"
#include <stdio.h>
#include <stdarg.h>
#include <ctype.h>

Data Structures

struct  stack

Functions

static void dmxConfigIndent (void)
static void dmxConfigNewline (void)
static void dmxConfigPushState (int base, int comment, int step)
static void dmxConfigPushComment (void)
static void dmxConfigPushStep (void)
static void dmxConfigPopState (void)
static void dmxConfigOutput (int addSpace, int doNewline, const char *comment, const char *format,...)
static void dmxConfigPrintComment (DMXConfigCommentPtr p)
static void dmxConfigPrintTokenFlag (DMXConfigTokenPtr p, int flag)
static void dmxConfigPrintToken (DMXConfigTokenPtr p)
static void dmxConfigPrintTokenNopop (DMXConfigTokenPtr p)
static int dmxConfigPrintQuotedString (const char *s)
static void dmxConfigPrintString (DMXConfigStringPtr p, int quote)
static int dmxConfigPrintPair (DMXConfigPairPtr p, int addSpace)
static void dmxConfigPrintDisplay (DMXConfigDisplayPtr p)
static void dmxConfigPrintWall (DMXConfigWallPtr p)
static void dmxConfigPrintOption (DMXConfigOptionPtr p)
static void dmxConfigPrintParam (DMXConfigParamPtr p)
static void dmxConfigPrintSub (DMXConfigSubPtr p)
static void dmxConfigPrintVirtual (DMXConfigVirtualPtr p)
void dmxConfigPrint (FILE *stream, DMXConfigEntryPtr entry)
void dmxConfigVirtualPrint (FILE *stream, DMXConfigVirtualPtr p)

Variables

static FILE * str = NULL
static int indent = 0
static int pos = 0
static struct stack initialStack

Detailed Description

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.


Function Documentation

static void dmxConfigIndent ( void   )  [static]

References indent, and str.

Referenced by dmxConfigOutput().

static void dmxConfigNewline ( void   )  [static]
static void dmxConfigOutput ( int  addSpace,
int  doNewline,
const char *  comment,
const char *  format,
  ... 
) [static]
static void dmxConfigPopState ( void   )  [static]
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]
static void dmxConfigPrintDisplay ( DMXConfigDisplayPtr  p  )  [static]
static void dmxConfigPrintOption ( DMXConfigOptionPtr  p  )  [static]
static int dmxConfigPrintPair ( DMXConfigPairPtr  p,
int  addSpace 
) [static]
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]
static void dmxConfigPrintToken ( DMXConfigTokenPtr  p  )  [static]
static void dmxConfigPrintTokenFlag ( DMXConfigTokenPtr  p,
int  flag 
) [static]
static void dmxConfigPrintTokenNopop ( DMXConfigTokenPtr  p  )  [static]
static void dmxConfigPrintVirtual ( DMXConfigVirtualPtr  p  )  [static]
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]
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().


Variable Documentation

int indent = 0 [static]
struct stack initialStack [static]
int pos = 0 [static]
FILE* str = NULL [static]

Generated June 29, 2004 for Distributed Multihead X by doxygen 1.3.4.