Apache HTTPD
Classes | Macros | Typedefs | Enumerations | Functions
xmlwf.c File Reference
#include "expat_config.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <math.h>
#include <errno.h>
#include "expat.h"
#include "codepage.h"
#include "internal.h"
#include "xmlfile.h"
#include "xmltchar.h"

Go to the source code of this file.

Classes

struct  NotationList
 
struct  xmlwfUserData
 

Macros

#define NSSEP   T('\001')
 
#define XMLWF_SHIFT_ARG_INTO(constCharStarTarget, argc, argv, i, j)
 

Typedefs

typedef struct NotationList NotationList
 
typedef struct xmlwfUserData XmlwfUserData
 

Enumerations

enum  ExitCode {
  XMLWF_EXIT_SUCCESS = 0 , XMLWF_EXIT_INTERNAL_ERROR = 1 , XMLWF_EXIT_NOT_WELLFORMED = 2 , XMLWF_EXIT_OUTPUT_ERROR = 3 ,
  XMLWF_EXIT_USAGE_ERROR = 4
}
 

Functions

static void XMLCALL characterData (void *userData, const XML_Char *s, int len)
 
static void attributeValue (FILE *fp, const XML_Char *s)
 
static int attcmp (const void *att1, const void *att2)
 
static void XMLCALL startElement (void *userData, const XML_Char *name, const XML_Char **atts)
 
static void XMLCALL endElement (void *userData, const XML_Char *name)
 
static int nsattcmp (const void *p1, const void *p2)
 
static void XMLCALL startElementNS (void *userData, const XML_Char *name, const XML_Char **atts)
 
static void XMLCALL endElementNS (void *userData, const XML_Char *name)
 
static void XMLCALL processingInstruction (void *userData, const XML_Char *target, const XML_Char *data)
 
static XML_Charxcsdup (const XML_Char *s)
 
static void XMLCALL startDoctypeDecl (void *userData, const XML_Char *doctypeName, const XML_Char *sysid, const XML_Char *publid, int has_internal_subset)
 
static void freeNotations (XmlwfUserData *data)
 
static void cleanupUserData (XmlwfUserData *userData)
 
static int xcscmp (const XML_Char *xs, const XML_Char *xt)
 
static int notationCmp (const void *a, const void *b)
 
static void XMLCALL endDoctypeDecl (void *userData)
 
static void XMLCALL notationDecl (void *userData, const XML_Char *notationName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
 
static void XMLCALL defaultCharacterData (void *userData, const XML_Char *s, int len)
 
static void XMLCALL defaultStartElement (void *userData, const XML_Char *name, const XML_Char **atts)
 
static void XMLCALL defaultEndElement (void *userData, const XML_Char *name)
 
static void XMLCALL defaultProcessingInstruction (void *userData, const XML_Char *target, const XML_Char *data)
 
static void XMLCALL nopCharacterData (void *userData, const XML_Char *s, int len)
 
static void XMLCALL nopStartElement (void *userData, const XML_Char *name, const XML_Char **atts)
 
static void XMLCALL nopEndElement (void *userData, const XML_Char *name)
 
static void XMLCALL nopProcessingInstruction (void *userData, const XML_Char *target, const XML_Char *data)
 
static void XMLCALL markup (void *userData, const XML_Char *s, int len)
 
static void metaLocation (XML_Parser parser)
 
static void metaStartDocument (void *userData)
 
static void metaEndDocument (void *userData)
 
static void XMLCALL metaStartElement (void *userData, const XML_Char *name, const XML_Char **atts)
 
static void XMLCALL metaEndElement (void *userData, const XML_Char *name)
 
static void XMLCALL metaProcessingInstruction (void *userData, const XML_Char *target, const XML_Char *data)
 
static void XMLCALL metaComment (void *userData, const XML_Char *data)
 
static void XMLCALL metaStartCdataSection (void *userData)
 
static void XMLCALL metaEndCdataSection (void *userData)
 
static void XMLCALL metaCharacterData (void *userData, const XML_Char *s, int len)
 
static void XMLCALL metaStartDoctypeDecl (void *userData, const XML_Char *doctypeName, const XML_Char *sysid, const XML_Char *pubid, int has_internal_subset)
 
static void XMLCALL metaEndDoctypeDecl (void *userData)
 
static void XMLCALL metaNotationDecl (void *userData, const XML_Char *notationName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
 
static void XMLCALL metaEntityDecl (void *userData, const XML_Char *entityName, int is_param, const XML_Char *value, int value_length, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName)
 
static void XMLCALL metaStartNamespaceDecl (void *userData, const XML_Char *prefix, const XML_Char *uri)
 
static void XMLCALL metaEndNamespaceDecl (void *userData, const XML_Char *prefix)
 
static int XMLCALL unknownEncodingConvert (void *data, const char *p)
 
static int XMLCALL unknownEncoding (void *userData, const XML_Char *name, XML_Encoding *info)
 
static int XMLCALL notStandalone (void *userData)
 
static void showVersion (XML_Char *prog)
 
static void usage (const XML_Char *prog, int rc)
 
int main (int argc, XML_Char **argv)
 

Macro Definition Documentation

◆ NSSEP

#define NSSEP   T('\001')

Definition at line 92 of file xmlwf.c.

◆ XMLWF_SHIFT_ARG_INTO

#define XMLWF_SHIFT_ARG_INTO (   constCharStarTarget,
  argc,
  argv,
  i,
 
)
Value:
{ \
if (argv[i][j + 1] == T('\0')) { \
if (++i == argc) { \
/* usage called exit(..), never gets here */ \
} \
} else { \
constCharStarTarget = argv[i] + j + 1; \
} \
i++; \
j = 0; \
}
apr_size_t size
apr_pool_t int argc
Definition apr_getopt.h:104
const char * argv[3]
int i
Definition mod_so.c:347
#define T(x)
Definition xmltchar.h:61
@ XMLWF_EXIT_USAGE_ERROR
Definition xmlwf.c:73

Definition at line 948 of file xmlwf.c.

Typedef Documentation

◆ NotationList

◆ XmlwfUserData

Enumeration Type Documentation

◆ ExitCode

Enumerator
XMLWF_EXIT_SUCCESS 
XMLWF_EXIT_INTERNAL_ERROR 
XMLWF_EXIT_NOT_WELLFORMED 
XMLWF_EXIT_OUTPUT_ERROR 
XMLWF_EXIT_USAGE_ERROR 

Definition at line 68 of file xmlwf.c.

Function Documentation

◆ attcmp()

static int attcmp ( const void *  att1,
const void *  att2 
)
static

Definition at line 181 of file xmlwf.c.

◆ attributeValue()

static void attributeValue ( FILE fp,
const XML_Char s 
)
static

Definition at line 130 of file xmlwf.c.

◆ characterData()

static void XMLCALL characterData ( void *  userData,
const XML_Char s,
int  len 
)
static

Definition at line 95 of file xmlwf.c.

◆ cleanupUserData()

static void cleanupUserData ( XmlwfUserData userData)
static

Definition at line 349 of file xmlwf.c.

◆ defaultCharacterData()

static void XMLCALL defaultCharacterData ( void *  userData,
const XML_Char s,
int  len 
)
static

Definition at line 496 of file xmlwf.c.

◆ defaultEndElement()

static void XMLCALL defaultEndElement ( void *  userData,
const XML_Char name 
)
static

Definition at line 511 of file xmlwf.c.

◆ defaultProcessingInstruction()

static void XMLCALL defaultProcessingInstruction ( void *  userData,
const XML_Char target,
const XML_Char data 
)
static

Definition at line 517 of file xmlwf.c.

◆ defaultStartElement()

static void XMLCALL defaultStartElement ( void *  userData,
const XML_Char name,
const XML_Char **  atts 
)
static

Definition at line 503 of file xmlwf.c.

◆ endDoctypeDecl()

static void XMLCALL endDoctypeDecl ( void *  userData)
static

Definition at line 381 of file xmlwf.c.

◆ endElement()

static void XMLCALL endElement ( void *  userData,
const XML_Char name 
)
static

Definition at line 209 of file xmlwf.c.

◆ endElementNS()

static void XMLCALL endElementNS ( void *  userData,
const XML_Char name 
)
static

Definition at line 275 of file xmlwf.c.

◆ freeNotations()

static void freeNotations ( XmlwfUserData data)
static

Definition at line 334 of file xmlwf.c.

◆ main()

int main ( int  argc,
XML_Char **  argv 
)

Definition at line 964 of file xmlwf.c.

◆ markup()

static void XMLCALL markup ( void *  userData,
const XML_Char s,
int  len 
)
static

Definition at line 553 of file xmlwf.c.

◆ metaCharacterData()

static void XMLCALL metaCharacterData ( void *  userData,
const XML_Char s,
int  len 
)
static

Definition at line 675 of file xmlwf.c.

◆ metaComment()

static void XMLCALL metaComment ( void *  userData,
const XML_Char data 
)
static

Definition at line 643 of file xmlwf.c.

◆ metaEndCdataSection()

static void XMLCALL metaEndCdataSection ( void *  userData)
static

Definition at line 665 of file xmlwf.c.

◆ metaEndDoctypeDecl()

static void XMLCALL metaEndDoctypeDecl ( void *  userData)
static

Definition at line 702 of file xmlwf.c.

◆ metaEndDocument()

static void metaEndDocument ( void *  userData)
static

Definition at line 581 of file xmlwf.c.

◆ metaEndElement()

static void XMLCALL metaEndElement ( void *  userData,
const XML_Char name 
)
static

Definition at line 620 of file xmlwf.c.

◆ metaEndNamespaceDecl()

static void XMLCALL metaEndNamespaceDecl ( void *  userData,
const XML_Char prefix 
)
static

Definition at line 788 of file xmlwf.c.

◆ metaEntityDecl()

static void XMLCALL metaEntityDecl ( void *  userData,
const XML_Char entityName,
int  is_param,
const XML_Char value,
int  value_length,
const XML_Char base,
const XML_Char systemId,
const XML_Char publicId,
const XML_Char notationName 
)
static

Definition at line 732 of file xmlwf.c.

◆ metaLocation()

static void metaLocation ( XML_Parser  parser)
static

Definition at line 560 of file xmlwf.c.

◆ metaNotationDecl()

static void XMLCALL metaNotationDecl ( void *  userData,
const XML_Char notationName,
const XML_Char base,
const XML_Char systemId,
const XML_Char publicId 
)
static

Definition at line 712 of file xmlwf.c.

◆ metaProcessingInstruction()

static void XMLCALL metaProcessingInstruction ( void *  userData,
const XML_Char target,
const XML_Char data 
)
static

Definition at line 630 of file xmlwf.c.

◆ metaStartCdataSection()

static void XMLCALL metaStartCdataSection ( void *  userData)
static

Definition at line 655 of file xmlwf.c.

◆ metaStartDoctypeDecl()

static void XMLCALL metaStartDoctypeDecl ( void *  userData,
const XML_Char doctypeName,
const XML_Char sysid,
const XML_Char pubid,
int  has_internal_subset 
)
static

Definition at line 687 of file xmlwf.c.

◆ metaStartDocument()

static void metaStartDocument ( void *  userData)
static

Definition at line 575 of file xmlwf.c.

◆ metaStartElement()

static void XMLCALL metaStartElement ( void *  userData,
const XML_Char name,
const XML_Char **  atts 
)
static

Definition at line 587 of file xmlwf.c.

◆ metaStartNamespaceDecl()

static void XMLCALL metaStartNamespaceDecl ( void *  userData,
const XML_Char prefix,
const XML_Char uri 
)
static

Definition at line 771 of file xmlwf.c.

◆ nopCharacterData()

static void XMLCALL nopCharacterData ( void *  userData,
const XML_Char s,
int  len 
)
static

Definition at line 525 of file xmlwf.c.

◆ nopEndElement()

static void XMLCALL nopEndElement ( void *  userData,
const XML_Char name 
)
static

Definition at line 539 of file xmlwf.c.

◆ nopProcessingInstruction()

static void XMLCALL nopProcessingInstruction ( void *  userData,
const XML_Char target,
const XML_Char data 
)
static

Definition at line 545 of file xmlwf.c.

◆ nopStartElement()

static void XMLCALL nopStartElement ( void *  userData,
const XML_Char name,
const XML_Char **  atts 
)
static

Definition at line 532 of file xmlwf.c.

◆ notationCmp()

static int notationCmp ( const void *  a,
const void *  b 
)
static

Definition at line 373 of file xmlwf.c.

◆ notationDecl()

static void XMLCALL notationDecl ( void *  userData,
const XML_Char notationName,
const XML_Char base,
const XML_Char systemId,
const XML_Char publicId 
)
static

Definition at line 448 of file xmlwf.c.

◆ notStandalone()

static int XMLCALL notStandalone ( void *  userData)
static

Definition at line 840 of file xmlwf.c.

◆ nsattcmp()

static int nsattcmp ( const void *  p1,
const void *  p2 
)
static

Definition at line 218 of file xmlwf.c.

◆ processingInstruction()

static void XMLCALL processingInstruction ( void *  userData,
const XML_Char target,
const XML_Char data 
)
static

Definition at line 292 of file xmlwf.c.

◆ showVersion()

static void showVersion ( XML_Char prog)
static

Definition at line 846 of file xmlwf.c.

◆ startDoctypeDecl()

static void XMLCALL startDoctypeDecl ( void *  userData,
const XML_Char doctypeName,
const XML_Char sysid,
const XML_Char publid,
int  has_internal_subset 
)
static

Definition at line 323 of file xmlwf.c.

◆ startElement()

static void XMLCALL startElement ( void *  userData,
const XML_Char name,
const XML_Char **  atts 
)
static

Definition at line 186 of file xmlwf.c.

◆ startElementNS()

static void XMLCALL startElementNS ( void *  userData,
const XML_Char name,
const XML_Char **  atts 
)
static

Definition at line 229 of file xmlwf.c.

◆ unknownEncoding()

static int XMLCALL unknownEncoding ( void *  userData,
const XML_Char name,
XML_Encoding info 
)
static

Definition at line 804 of file xmlwf.c.

◆ unknownEncodingConvert()

static int XMLCALL unknownEncodingConvert ( void *  data,
const char p 
)
static

Definition at line 799 of file xmlwf.c.

◆ usage()

static void usage ( const XML_Char prog,
int  rc 
)
static

Definition at line 879 of file xmlwf.c.

◆ xcscmp()

static int xcscmp ( const XML_Char xs,
const XML_Char xt 
)
static

Definition at line 356 of file xmlwf.c.

◆ xcsdup()

static XML_Char * xcsdup ( const XML_Char s)
static

Definition at line 305 of file xmlwf.c.