xtag.c File Reference

#include "stdafx.h"
#include <ctype.h>
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include "xlist.h"
#include "xtag.h"

Include dependency graph for xtag.c:

Include dependency graph

Go to the source code of this file.

Classes

struct  _XTag
struct  _XAttribute
struct  _XTagParser

Defines

#define FALSE   (0)
#define TRUE   (!FALSE)
#define MIN(a, b)   ((a)<(b)?(a):(b))
#define MAX(a, b)   ((a)>(b)?(a):(b))
#define XTAG_INTERNAL
#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 _XTag XTag
typedef _XAttribute XAttribute
typedef _XTagParser XTagParser

Functions

int xtag_cin (char c, int char_class)
int xtag_index (XTagParser *parser, int char_class)
void xtag_skip_over (XTagParser *parser, int char_class)
void xtag_skip_whitespace (XTagParser *parser)
char * xtag_slurp_to (XTagParser *parser, int good_end, int bad_end)
int xtag_assert_and_pass (XTagParser *parser, int char_class)
char * xtag_slurp_quoted (XTagParser *parser)
XAttributextag_parse_attribute (XTagParser *parser)
XTagxtag_parse_tag (XTagParser *parser)
XTagxtag_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, char *attribute)
XTagxtag_first_child (XTag *xtag, char *name)
XTagxtag_next_child (XTag *xtag, char *name)
int xtag_snprints (char *buf, int n,...)
int xtag_snprint (char *buf, int n, XTag *xtag)


Define Documentation

#define FALSE   (0)
 

Definition at line 49 of file xtag.c.

Referenced by AbstractTransformOutputPin::CompleteConnect(), OggDemuxSourcePin::CompleteConnect(), AbstractVideoEncodeOutputPin::CompleteConnect(), AbstractVideoDecodeOutputPin::CompleteConnect(), AbstractAudioEncodeOutputPin::CompleteConnect(), AbstractAudioDecodeOutputPin::CompleteConnect(), NativeFLACSourcePin::CompleteConnect(), DiracDecodeSourcePin::CompleteConnect(), CMMLRawSourcePin::CompleteConnect(), CMMLRawSourcePin::deliverTag(), DllUnregisterServer(), AbstractTransformOutputPin::FillMediaType(), SubtitleVMR9OutputPin::FillMediaType(), AbstractVideoDecodeOutputPin::FillMediaType(), AbstractAudioDecodeOutputPin::FillMediaType(), TheoraDecodeFilter::FillMediaType(), NativeFLACSourcePin::GetMediaType(), AbstractTransformInputPin::SetSampleParams(), AbstractVideoEncodeInputPin::SetSampleParams(), AbstractVideoDecodeInputPin::SetSampleParams(), AbstractAudioEncodeInputPin::SetSampleParams(), AbstractAudioDecodeInputPin::SetSampleParams(), TheoraDecodeFilter::SetSampleParams(), and CMMLDecodeFilter::Transform().

#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))
 

Definition at line 56 of file xtag.c.

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

Definition at line 53 of file xtag.c.

Referenced by OggPaginator::addAsMuchPacketAsPossible(), AnnodexRecomposer::recomposeStreamFrom(), and xtag_snprints().

#define TRUE   (!FALSE)
 

Definition at line 50 of file xtag.c.

Referenced by AbstractTransformOutputPin::CompleteConnect(), OggDemuxSourcePin::CompleteConnect(), AbstractVideoEncodeOutputPin::CompleteConnect(), AbstractVideoDecodeOutputPin::CompleteConnect(), AbstractAudioEncodeOutputPin::CompleteConnect(), AbstractAudioDecodeOutputPin::CompleteConnect(), NativeFLACSourcePin::CompleteConnect(), DiracDecodeSourcePin::CompleteConnect(), CMMLRawSourcePin::CompleteConnect(), NativeFLACSourcePin::deliverData(), OggDemuxSourcePin::deliverOggPacket(), CMMLSourcePin::deliverOggPacket(), CMMLRawSourcePin::deliverTag(), DllRegisterServer(), PropsTheoraEncoder::OnActivate(), CaxAnxOggPlayerCtrl::OnCreate(), AbstractTransformInputPin::SetSampleParams(), AbstractVideoEncodeInputPin::SetSampleParams(), AbstractAudioEncodeInputPin::SetSampleParams(), AbstractAudioDecodeInputPin::SetSampleParams(), and CMMLDecodeFilter::Transform().

#define X_CLOSETAG   1<<2
 

Definition at line 96 of file xtag.c.

Referenced by xtag_parse_attribute(), and xtag_parse_tag().

#define X_DQUOTE   1<<3
 

Definition at line 97 of file xtag.c.

#define X_EQUAL   1<<5
 

Definition at line 99 of file xtag.c.

Referenced by xtag_parse_attribute().

#define X_NONE   0
 

Definition at line 93 of file xtag.c.

Referenced by xtag_parse_tag().

#define X_OPENTAG   1<<1
 

Definition at line 95 of file xtag.c.

Referenced by xtag_parse_tag().

#define X_SLASH   1<<6
 

Definition at line 100 of file xtag.c.

Referenced by xtag_parse_attribute(), and xtag_parse_tag().

#define X_SQUOTE   1<<4
 

Definition at line 98 of file xtag.c.

Referenced by xtag_slurp_quoted().

#define X_WHITESPACE   1<<0
 

Definition at line 94 of file xtag.c.

Referenced by xtag_parse_attribute(), xtag_parse_tag(), and xtag_skip_whitespace().

#define XTAG_INTERNAL
 

Definition at line 62 of file xtag.c.


Typedef Documentation

typedef struct _XAttribute XAttribute
 

Definition at line 59 of file xtag.c.

Referenced by xtag_free(), xtag_get_attribute(), xtag_parse_attribute(), xtag_parse_tag(), and xtag_snprint().

typedef struct _XTag XTag
 

Definition at line 58 of file xtag.c.

Referenced by CMMLParser::parseAnchorTag(), CMMLParser::parseBaseTag(), CMMLParser::parseClipTag(), CMMLParser::parseCMMLRootTag(), CMMLParser::parseDescTag(), CMMLParser::parseHeadTag(), CMMLParser::parseImageTag(), CMMLParser::parseImportTag(), CMMLParser::parseMetaTag(), CMMLParser::parseParamTag(), CMMLParser::parseRootTag(), CMMLParser::parseStreamTag(), CMMLParser::parseTitleTag(), xtag_first_child(), xtag_free(), xtag_get_pcdata(), xtag_new_parse(), xtag_next_child(), xtag_parse_tag(), and xtag_snprint().

typedef struct _XTagParser XTagParser
 

Definition at line 60 of file xtag.c.

Referenced by xtag_new_parse().


Function Documentation

int xtag_assert_and_pass XTagParser parser,
int  char_class
[static]
 

Definition at line 216 of file xtag.c.

References _XTagParser::start, _XTagParser::valid, and xtag_cin().

Referenced by xtag_parse_attribute(), xtag_parse_tag(), and xtag_slurp_quoted().

Here is the call graph for this function:

int xtag_cin char  c,
int  char_class
[static]
 

Definition at line 103 of file xtag.c.

Referenced by xtag_assert_and_pass(), xtag_index(), xtag_parse_tag(), xtag_skip_over(), xtag_slurp_quoted(), and xtag_slurp_to().

XTag* xtag_first_child XTag xtag,
char *  name
 

Definition at line 546 of file xtag.c.

References _XTag::children, _XTag::current_child, _XList::data, _XTag::name, _XList::next, XList, and XTag.

Referenced by xtag_next_child().

XTag* xtag_free XTag xtag  ) 
 

Definition at line 415 of file xtag.c.

References _XTag::attributes, _XTag::children, _XList::data, _XTag::name, _XAttribute::name, _XList::next, _XTag::pcdata, _XAttribute::value, XAttribute, XList, xlist_free(), and XTag.

Referenced by CMMLParser::parseClipTag(), CMMLParser::parseCMMLRootTag(), CMMLParser::parseHeadTag(), and xtag_new_parse().

Here is the call graph for this function:

char* xtag_get_attribute XTag xtag,
char *  attribute
 

Definition at line 528 of file xtag.c.

References _XTag::attributes, _XList::data, _XAttribute::name, _XList::next, _XAttribute::value, XAttribute, and XList.

char* xtag_get_name XTag xtag  ) 
 

Definition at line 504 of file xtag.c.

References _XTag::name.

Referenced by CMMLParser::parseClipTag(), CMMLParser::parseCMMLRootTag(), and CMMLParser::parseHeadTag().

char* xtag_get_pcdata XTag xtag  ) 
 

Definition at line 510 of file xtag.c.

References _XTag::children, _XList::data, _XList::next, _XTag::pcdata, XList, and XTag.

int xtag_index XTagParser parser,
int  char_class
[static]
 

Definition at line 130 of file xtag.c.

References _XTagParser::end, _XTagParser::start, and xtag_cin().

Referenced by xtag_slurp_to().

Here is the call graph for this function:

XTag* xtag_new_parse const char *  s,
int  n
 

Definition at line 447 of file xtag.c.

References _XTag::attributes, _XTag::children, _XTag::current_child, _XTagParser::current_tag, _XTagParser::end, _XTag::name, _XTag::parent, _XTag::pcdata, _XTagParser::start, _XTagParser::valid, xlist_append(), XTag, xtag_free(), xtag_parse_tag(), and XTagParser.

Referenced by CMMLParser::parseClipTag(), CMMLParser::parseCMMLRootTag(), and CMMLParser::parseHeadTag().

Here is the call graph for this function:

XTag* xtag_next_child XTag xtag,
char *  name
 

Definition at line 575 of file xtag.c.

References _XTag::current_child, _XList::data, _XTag::name, _XList::next, XList, XTag, and xtag_first_child().

Here is the call graph for this function:

XAttribute* xtag_parse_attribute XTagParser parser  )  [static]
 

Definition at line 270 of file xtag.c.

References _XAttribute::name, _XTagParser::start, _XTagParser::valid, _XAttribute::value, X_CLOSETAG, X_EQUAL, X_SLASH, X_WHITESPACE, XAttribute, xtag_assert_and_pass(), xtag_skip_whitespace(), xtag_slurp_quoted(), and xtag_slurp_to().

Referenced by xtag_parse_tag().

Here is the call graph for this function:

XTag* xtag_parse_tag XTagParser parser  )  [static]
 

Definition at line 320 of file xtag.c.

References _XTag::attributes, _XTag::children, _XTagParser::current_tag, _XTag::name, _XTag::parent, _XTag::pcdata, _XTagParser::start, _XTagParser::valid, X_CLOSETAG, X_NONE, X_OPENTAG, X_SLASH, X_WHITESPACE, XAttribute, xlist_append(), XTag, xtag_assert_and_pass(), xtag_cin(), xtag_parse_attribute(), xtag_skip_whitespace(), and xtag_slurp_to().

Referenced by xtag_new_parse().

Here is the call graph for this function:

void xtag_skip_over XTagParser parser,
int  char_class
[static]
 

Definition at line 145 of file xtag.c.

References _XTagParser::end, _XTagParser::start, _XTagParser::valid, and xtag_cin().

Referenced by xtag_skip_whitespace().

Here is the call graph for this function:

void xtag_skip_whitespace XTagParser parser  )  [static]
 

Definition at line 165 of file xtag.c.

References X_WHITESPACE, and xtag_skip_over().

Referenced by xtag_parse_attribute(), xtag_parse_tag(), and xtag_slurp_quoted().

Here is the call graph for this function:

char* xtag_slurp_quoted XTagParser parser  )  [static]
 

Definition at line 235 of file xtag.c.

References _XTagParser::start, _XTagParser::valid, X_SQUOTE, xtag_assert_and_pass(), xtag_cin(), and xtag_skip_whitespace().

Referenced by xtag_parse_attribute().

Here is the call graph for this function:

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

Definition at line 193 of file xtag.c.

References _XTagParser::start, _XTagParser::valid, xtag_cin(), and xtag_index().

Referenced by xtag_parse_attribute(), and xtag_parse_tag().

Here is the call graph for this function:

int xtag_snprint char *  buf,
int  n,
XTag xtag
 

Definition at line 640 of file xtag.c.

References _XTag::attributes, buf, _XTag::children, _XList::data, FORWARD, _XTag::name, _XAttribute::name, _XList::next, _XTag::pcdata, _XAttribute::value, XAttribute, XList, XTag, and xtag_snprints().

Here is the call graph for this function:

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

Definition at line 614 of file xtag.c.

References buf, and MIN.

Referenced by xtag_snprint().


Generated on Tue Feb 15 14:56:11 2005 for oggdsf by  doxygen 1.3.9