htmlrecode  1.3.1
About: htmlrecode recodes a HTML file using a new character set.
  Fossies Dox: htmlrecode-1.3.1.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

htmlrecode.cc File Reference
#include <cstdio>
#include <unistd.h>
#include <csignal>
#include <sys/wait.h>
#include <cctype>
#include <map>
#include <set>
#include <list>
#include <cerrno>
#include <cstdlib>
#include <cstring>
#include "htmlrecode.hh"
#include "entities.h"
#include <argh.hh>
Include dependency graph for htmlrecode.cc:

Go to the source code of this file.

Classes

struct  Page::Tag
 
class  Page::Tag::Param
 
class  Page::Tag::ParamParam
 
class  Page::Tag::ParamKey
 
class  Page::Tag::ParamComm
 
class  Page::Tag::ParamSpace
 
struct  Page::PI
 
class  Page::ElemBody
 
class  Page::ElemTag
 
class  Page::ElemPI
 
class  Page::ElemRaw
 

Macros

#define DEBUG   0
 
#define ENTITYCOUNT   (sizeof(EnTab) / sizeof(EnTab[0]))
 

Functions

static void operator+= (wstring &s1, const char *s2)
 
static bool IsEqual (const wstring &s1, const char *s2)
 
static bool IsEqual (const wstring &s1, const wstring &s2)
 
static const string Stringify (const wstring &s)
 
static ucs4 Getc (FILE *fp)
 
static ucs4 FindEntity (const wstring &ws)
 
static const wstring makewstr (const char *s)
 
static void ParseInConv (FILE *fp, const char *inset, int fd)
 
int main (int argc, const char *const *argv)
 

Variables

static const char *const midset
 
struct {
   const char *   ent
 
   ucs4   ch
 
EnTab []
 
static unsigned FixedStyleScript = 0
 
static unsigned ParamViolations = 0
 
static bool lossless = true
 
static bool usehex = false
 
static bool strict = false
 
static int verbose = 1
 
static bool xmlmode = false
 
static bool signature = false
 

Macro Definition Documentation

◆ DEBUG

#define DEBUG   0

Definition at line 15 of file htmlrecode.cc.

◆ ENTITYCOUNT

#define ENTITYCOUNT   (sizeof(EnTab) / sizeof(EnTab[0]))

Definition at line 85 of file htmlrecode.cc.

Function Documentation

◆ FindEntity()

static ucs4 FindEntity ( const wstring &  ws)
static

Definition at line 86 of file htmlrecode.cc.

References ent, EnTab, ENTITYCOUNT, and ilseq.

Referenced by Page::htmldecode().

◆ Getc()

static ucs4 Getc ( FILE *  fp)
static

Definition at line 76 of file htmlrecode.cc.

Referenced by Page::ParseUCS4().

◆ IsEqual() [1/2]

static bool IsEqual ( const wstring &  s1,
const char *  s2 
)
static

◆ IsEqual() [2/2]

static bool IsEqual ( const wstring &  s1,
const wstring &  s2 
)
static

Definition at line 54 of file htmlrecode.cc.

◆ main()

◆ makewstr()

static const wstring makewstr ( const char *  s)
static

Definition at line 158 of file htmlrecode.cc.

◆ operator+=()

static void operator+= ( wstring &  s1,
const char *  s2 
)
static

Definition at line 39 of file htmlrecode.cc.

◆ ParseInConv()

static void ParseInConv ( FILE *  fp,
const char *  inset,
int  fd 
)
static

Definition at line 833 of file htmlrecode.cc.

References ilseq, and midset.

Referenced by Page::Parse().

◆ Stringify()

static const string Stringify ( const wstring &  s)
static

Definition at line 68 of file htmlrecode.cc.

Referenced by Page::Parse().

Variable Documentation

◆ ch

ucs4 ch

Definition at line 82 of file htmlrecode.cc.

◆ ent

const char* ent

Definition at line 82 of file htmlrecode.cc.

Referenced by FindEntity().

◆ EnTab

const { ... } EnTab[]
Initial value:
= {
}

Referenced by FindEntity().

◆ FixedStyleScript

unsigned FixedStyleScript = 0
static

Definition at line 107 of file htmlrecode.cc.

Referenced by Page::DumpRaw(), and main().

◆ lossless

bool lossless = true
static

Definition at line 110 of file htmlrecode.cc.

Referenced by Page::htmlencode(), and main().

◆ midset

const char* const midset
static
Initial value:
= (sizeof(wchar_t) == 4)
? ((*(const short *)"\1\0\0\0" == 1) ? "UCS-4LE" : "UCS-4BE")
: (sizeof(wchar_t) == 2)
? ((*(const short *)"\1\0\0\0" == 1) ? "UCS-2LE" : "UCS-2BE")
: NULL

Definition at line 22 of file htmlrecode.cc.

Referenced by Page::Dumper::Dumper(), Page::Parse(), ParseInConv(), and Page::Dumper::SetSet().

◆ ParamViolations

unsigned ParamViolations = 0
static

Definition at line 108 of file htmlrecode.cc.

Referenced by main(), and Page::ParseUCS4().

◆ signature

bool signature = false
static

Definition at line 115 of file htmlrecode.cc.

Referenced by Page::Dump(), main(), and Page::ParseUCS4().

◆ strict

bool strict = false
static

Definition at line 112 of file htmlrecode.cc.

Referenced by Page::htmlencode(), main(), and Page::ParseUCS4().

◆ usehex

bool usehex = false
static

Definition at line 111 of file htmlrecode.cc.

Referenced by Page::htmlencode(), and main().

◆ verbose

int verbose = 1
static

Definition at line 113 of file htmlrecode.cc.

Referenced by main(), Page::Parse(), and Page::Dumper::SetSet().

◆ xmlmode

bool xmlmode = false
static

Definition at line 114 of file htmlrecode.cc.

Referenced by Page::DumpTag(), main(), and Page::ParseUCS4().