xtag.c File Reference

Include dependency graph for xtag.c:


Data Structures

struct  _XTag
struct  _XAttribute
struct  _XTagParser

Defines

#define MIN(a, b)   ((a)<(b)?(a):(b))
#define MAX(a, b)   ((a)>(b)?(a):(b))
#define X_NONE   0
#define X_WHITESPACE   1<<0
#define X_OPENTAG   1<<1
#define X_CLOSETAG   1<<2
#define X_DQUOTE   1<<3
#define X_SQUOTE   1<<4
#define X_EQUAL   1<<5
#define X_SLASH   1<<6
#define FORWARD(N)

Typedefs

typedef struct _XTag XTag
typedef struct _XAttribute XAttribute
typedef struct _XTagParser XTagParser

Functions

void xtag_free (XTag *xtag)
XTagxtag_new_parse (const char *s, int n)
char * xtag_get_name (XTag *xtag)
char * xtag_get_pcdata (XTag *xtag)
char * xtag_get_attribute (XTag *xtag, const char *attribute)
XTagxtag_first_child (XTag *xtag, const char *name)
XTagxtag_next_child (XTag *xtag, char *name)
int xtag_snprint (char *buf, int n, XTag *xtag)
static int xtag_cin (char c, int char_class)
static int xtag_index (XTagParser *parser, int char_class)
static void xtag_skip_over (XTagParser *parser, int char_class)
static void xtag_skip_whitespace (XTagParser *parser)
static char * xtag_slurp_to (XTagParser *parser, int good_end, int bad_end)
static int xtag_assert_and_pass (XTagParser *parser, int char_class)
static char * xtag_slurp_quoted (XTagParser *parser)
static XAttributextag_parse_attribute (XTagParser *parser)
static XTagxtag_parse_tag (XTagParser *parser)
static int xtag_snprints (char *buf, int n,...)

Define Documentation

#define FORWARD (  ) 

Value:

buf += MIN (n, N); \
  n = MAX (n-N, 0);  \
  written += N;

Referenced by xtag_snprint().

#define MAX ( a,
 )     ((a)>(b)?(a):(b))

#define MIN ( a,
 )     ((a)<(b)?(a):(b))

Referenced by Play(), RGB2HSV(), and xtag_snprints().

#define X_CLOSETAG   1<<2

#define X_DQUOTE   1<<3

Referenced by xtag_cin(), and xtag_slurp_quoted().

#define X_EQUAL   1<<5

Referenced by xtag_cin(), and xtag_parse_attribute().

#define X_NONE   0

Referenced by xtag_parse_tag().

#define X_OPENTAG   1<<1

Referenced by xtag_cin(), and xtag_parse_tag().

#define X_SLASH   1<<6

#define X_SQUOTE   1<<4

Referenced by xtag_cin(), and xtag_slurp_quoted().

#define X_WHITESPACE   1<<0


Typedef Documentation

typedef struct _XAttribute XAttribute

typedef struct _XTag XTag

typedef struct _XTagParser XTagParser


Function Documentation

static int xtag_assert_and_pass ( XTagParser parser,
int  char_class 
) [static]

static int xtag_cin ( char  c,
int  char_class 
) [static]

XTag * xtag_first_child ( XTag xtag,
const char *  name 
)

static void xtag_free ( XTag xtag  ) 

char * xtag_get_attribute ( XTag xtag,
const char *  attribute 
)

static char * xtag_get_name ( XTag xtag  ) 

References _XTag::name.

Referenced by ReaderName().

char * xtag_get_pcdata ( XTag xtag  ) 

static int xtag_index ( XTagParser parser,
int  char_class 
) [static]

static XTag * xtag_new_parse ( const char *  s,
int  n 
)

static XTag * xtag_next_child ( XTag xtag,
char *  name 
)

static XAttribute* xtag_parse_attribute ( XTagParser parser  )  [static]

static XTag* xtag_parse_tag ( XTagParser parser  )  [static]

static void xtag_skip_over ( XTagParser parser,
int  char_class 
) [static]

static void xtag_skip_whitespace ( XTagParser parser  )  [static]

static char* xtag_slurp_quoted ( XTagParser parser  )  [static]

static char* xtag_slurp_to ( XTagParser parser,
int  good_end,
int  bad_end 
) [static]

int xtag_snprint ( char *  buf,
int  n,
XTag xtag 
)

static int xtag_snprints ( char *  buf,
int  n,
  ... 
) [static]

References MIN.

Referenced by xtag_snprint().


Generated on Wed Mar 31 08:05:39 2010 for VLC by  doxygen 1.5.6