metaproxy  1.13.0
Classes | Namespaces | Macros | Functions
html_parser.cpp File Reference
#include "config.hpp"
#include "html_parser.hpp"
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdio.h>
#include <yaz/matchstr.h>
Include dependency graph for html_parser.cpp:

Go to the source code of this file.

Classes

class  metaproxy_1::HTMLParser::Rep
 

Namespaces

 metaproxy_1
 

Macros

#define SPACECHR   " \t\r\n\f"
 

Functions

static int isAlpha (int c)
 
static int skipSpace (const char *cp)
 
static int skipName (const char *cp)
 

Macro Definition Documentation

#define SPACECHR   " \t\r\n\f"

Function Documentation

static int isAlpha ( int  c)
static

Definition at line 86 of file html_parser.cpp.

Referenced by metaproxy_1::HTMLParser::Rep::parse_str().

87 {
88  return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
89 }
static int skipName ( const char *  cp)
static

Definition at line 99 of file html_parser.cpp.

References SPACECHR.

Referenced by metaproxy_1::HTMLParser::Rep::parse_str(), and metaproxy_1::HTMLParser::Rep::skipAttribute().

100 {
101  int i;
102  for (i = 0; cp[i] && !strchr(SPACECHR "/><=", cp[i]); i++)
103  ;
104  return i;
105 }
#define SPACECHR
Definition: html_parser.cpp:29
static int skipSpace ( const char *  cp)
static

Definition at line 91 of file html_parser.cpp.

References SPACECHR.

Referenced by metaproxy_1::HTMLParser::Rep::parse_str(), metaproxy_1::HTMLParser::Rep::skipAttribute(), and metaproxy_1::HTMLParser::Rep::tagAttrs().

92 {
93  int i = 0;
94  while (cp[i] && strchr(SPACECHR, cp[i]))
95  i++;
96  return i;
97 }
#define SPACECHR
Definition: html_parser.cpp:29