80 {
"iexcl",
"\241", 0 },
81 {
"cent",
"\242", 0 },
82 {
"pound",
"\243", 0 },
83 {
"curren",
"\244", 0 },
85 {
"brvbar",
"\246", 0 },
86 {
"sect",
"\247", 0 },
88 {
"copy",
"\251", 0 },
89 {
"ordf",
"\252", 0 },
90 {
"laquo",
"\253", 0 },
94 {
"macr",
"\257", 0 },
96 {
"plusmn",
"\261", 0 },
97 {
"sup2",
"\262", 0 },
98 {
"sup3",
"\263", 0 },
99 {
"acute",
"\264", 0 },
100 {
"micro",
"\265", 0 },
101 {
"para",
"\266", 0 },
102 {
"middot",
"\267", 0 },
103 {
"cedil",
"\270", 0 },
104 {
"sup1",
"\271", 0 },
105 {
"ordm",
"\272", 0 },
106 {
"raquo",
"\273", 0 },
107 {
"frac14",
"\274", 0 },
108 {
"frac12",
"\275", 0 },
109 {
"frac34",
"\276", 0 },
110 {
"iquest",
"\277", 0 },
111 {
"Agrave",
"\300", 0 },
112 {
"Aacute",
"\301", 0 },
113 {
"Acirc",
"\302", 0 },
114 {
"Atilde",
"\303", 0 },
115 {
"Auml",
"\304", 0 },
116 {
"Aring",
"\305", 0 },
117 {
"AElig",
"\306", 0 },
118 {
"Ccedil",
"\307", 0 },
119 {
"Egrave",
"\310", 0 },
120 {
"Eacute",
"\311", 0 },
121 {
"Ecirc",
"\312", 0 },
122 {
"Euml",
"\313", 0 },
123 {
"Igrave",
"\314", 0 },
124 {
"Iacute",
"\315", 0 },
125 {
"Icirc",
"\316", 0 },
126 {
"Iuml",
"\317", 0 },
127 {
"ETH",
"\320", 0 },
128 {
"Ntilde",
"\321", 0 },
129 {
"Ograve",
"\322", 0 },
130 {
"Oacute",
"\323", 0 },
131 {
"Ocirc",
"\324", 0 },
132 {
"Otilde",
"\325", 0 },
133 {
"Ouml",
"\326", 0 },
134 {
"times",
"\327", 0 },
135 {
"Oslash",
"\330", 0 },
136 {
"Ugrave",
"\331", 0 },
137 {
"Uacute",
"\332", 0 },
138 {
"Ucirc",
"\333", 0 },
139 {
"Uuml",
"\334", 0 },
140 {
"Yacute",
"\335", 0 },
141 {
"THORN",
"\336", 0 },
142 {
"szlig",
"\337", 0 },
143 {
"agrave",
"\340", 0 },
144 {
"aacute",
"\341", 0 },
145 {
"acirc",
"\342", 0 },
146 {
"atilde",
"\343", 0 },
147 {
"auml",
"\344", 0 },
148 {
"aring",
"\345", 0 },
149 {
"aelig",
"\346", 0 },
150 {
"ccedil",
"\347", 0 },
151 {
"egrave",
"\350", 0 },
152 {
"eacute",
"\351", 0 },
153 {
"ecirc",
"\352", 0 },
154 {
"euml",
"\353", 0 },
155 {
"igrave",
"\354", 0 },
156 {
"iacute",
"\355", 0 },
157 {
"icirc",
"\356", 0 },
158 {
"iuml",
"\357", 0 },
159 {
"eth",
"\360", 0 },
160 {
"ntilde",
"\361", 0 },
161 {
"ograve",
"\362", 0 },
162 {
"oacute",
"\363", 0 },
163 {
"ocirc",
"\364", 0 },
164 {
"otilde",
"\365", 0 },
165 {
"ouml",
"\366", 0 },
166 {
"divide",
"\367", 0 },
167 {
"oslash",
"\370", 0 },
168 {
"ugrave",
"\371", 0 },
169 {
"uacute",
"\372", 0 },
170 {
"ucirc",
"\373", 0 },
171 {
"uuml",
"\374", 0 },
172 {
"yacute",
"\375", 0 },
173 {
"thorn",
"\376", 0 },
174 {
"yuml",
"\377", 0 },
182#define ESC_HASH_SIZE (sizeof(gEscSequences)/sizeof(gEscSequences[0])+7)
201 while ((
c = *
zName) != 0) {
232 if (cnt > max) max =
cnt;
234 printf(
"Longest chain=%d avg=%g slots=%d empty=%d (%g%%)\n",
329 if (z[from] ==
'&') {
330 if (z[from+1] ==
'#') {
334 v =
v*10 + z[i] -
'0';
337 if (z[i] ==
';') { i++; }
342 if (
v >= 0x80 &&
v < 0xa0) {
354 while (z[i] &&
isalnum(z[i])) ++i;
359 while (
p &&
strcmp(
p->fZName, &z[from+1]) != 0)
p =
p->fPNext;
363 for (
j = 0;
p->fValue[
j]; ++
j) z[to++] =
p->fValue[
j];
365 if (
c ==
';') from++;
375 }
else if (((
unsigned char) z[from]) >= 0x80 &&
376 ((
unsigned char) z[from]) < 0xa0) {
414 while ((
c = *
zName) != 0) {
450 if (cnt > max) max =
cnt;
453 printf(
"longest chain=%d avg=%g slots=%d empty=%d (%g%%)\n",
511 pNew->fElId =
p->fElId;
513 pNew->fPPrev =
p->fPPrev;
514 if (
p->fPPrev)
p->fPPrev->fPNext =
pNew;
531 case '\t':
return (
iCol | 7) + 1;
532 default:
return iCol+1;
585 static char null[1] = {
"" };
594 while ((
c = z[
n]) != 0) {
596 if (
c == -64 && z[
n+1] == -128) {
616 zEnd =
"</noscript>";
619 zEnd =
"</noframes>";
625 if (
pScr->fNStart < 0) {
630 for (i =
n ; z[i]; i++) {
631 if (z[i] ==
'\'' || z[i] ==
'"') {
633 }
else if (z[i] ==
'\n') {
636 if (z[i] ==
'<' && z[i+1] ==
'/' &&
638 if (
zEnd[3] ==
'c' && ((
sqcnt % 2) == 1))
continue;
639 pScr->fNScript = i -
n;
647 pScr->fNScript = i -
n;
689 else if (
isspace((
unsigned char)
c)) {
693 (
c = z[
n+i]) != 0 &&
isspace((
unsigned char)
c) &&
c !=
'\n' &&
c !=
'\r';
695 if (
c ==
'\r' && z[
n+i+1] ==
'\n') ++i;
701 if (
c ==
'\n' ||
c ==
'\r') {
709 for (
j = 0;
j < i;
j++) {
719 (!
isalpha(z[
n+1]) && z[
n+1] !=
'/' && z[
n+1] !=
'!' && z[
n+1] !=
'?')) {
722 for (i = 1; (
c = z[
n+i]) != 0 && !
isspace((
unsigned char)
c) &&
c !=
'<'; i++) {}
727 if (i >= 10 &&
strncasecmp(&z[
n],
"</listing>", 10) == 0) {
741 if (i >= 11 &&
strncasecmp(&z[
n],
"</textarea>", 11) == 0) {
766 }
else if (
strncmp(&z[
n],
"<!--", 4) == 0) {
769 for (i = 4; z[
n+i]; i++) {
770 if (z[
n+i] ==
'-' &&
strncmp(&z[
n+i],
"-->", 3) == 0)
break;
788 for (
j = 0;
j < i+3;
j++) {
803 (
c = z[
n+i]) != 0 && !
isspace((
unsigned char)
c) &&
c !=
'>' && (i < 2 ||
c !=
'/');
810 while (
isspace((
unsigned char)z[
n+i])) ++i;
811 while ((
c = z[
n+i]) != 0 &&
c !=
'>' && (
c !=
'/' || z[
n+i+1] !=
'>')) {
815 while ((
c = z[
n+i+
j]) != 0 && !
isspace((
unsigned char)
c) &&
c !=
'>' &&
816 c !=
'=' && (
c !=
'/' || z[
n+i+
j+1] !=
'>')) ++
j;
839 if (
c ==
'\'' ||
c ==
'"') {
849 for (
j = 0; (
c = z[
n+i+
j]) != 0 && !
isspace((
unsigned char)
c) &&
c !=
'>';
j++) {}
865 for (
j = 0;
j < i+1;
j++) {
883 if (
pMap == 0)
continue;
919 switch (
pMap->fType) {
1123 if (
pElem == 0)
return 0;
1131 if (
pElem == 0)
return 0;
1137 if (
pMap == 0)
return 0;
1142 if (
pElem == 0)
return 0;
1156 if (
pElem == 0)
return 1;
1199 if (
argv[2][0] ==
'b') {
1200 if (!
istxt)
return 1;
1201 if (i == 0 || i ==
l)
return 1;
1210 if ((!
istxt) || (!
l) || (!i)) {
1213 RemoveElements(
p,
p);
1217 RemoveElements(
p,
p);
1225 cp[--
p->fCount] = 0;
1226 if (
ins.i-- <= 0)
ins.i = 0;
1230 if (
c ==
'\n' ||
c ==
'\r') {
1239 if (
text->fZText == (
char*) ((&
text->fZText)+1)) {
1253 delete[]
text->fZText;
1309 return pMap->fZName;
1321 static char zBuf[200];
1344 if (
block->fN > 0) {
1346 if (
n > 150)
n = 150;
1362 for (
j = 1 ;
j <
p->fCount;
j += 2) {
1392 for (i = 0; i + 1 <
pElem->fCount; i += 2) {
1393 str->Append(
pElem->fArgv[i]);
1395 str->Append(
pElem->fArgv[i+1]);
1405 static char zBuf[200];
1462 str->Append(
"{ Text \"");
1464 str->Append(
"\" } ");
1474 str->Append(
"Unknown ");
1478 str->Append(
"{ Markup ");
1487 for (i = 0; i <
p->fCount; ++i) {
1507 for (
p = first;
p != last;
p =
p->fPNext) {
1510 const char *z =
block->fZ;
1512 if (
n == 0 || z == 0) {
1516 printf(
"Block flags=%02x cnt=%d x=%d..%d y=%d..%d z=\"%.*s\"\n",
1520 printf(
"Token font=%2d color=%2d align=%d flags=0x%04x name=%s\n",
1521 p->fStyle.fFont,
p->fStyle.fColor,
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void HtmlTranslateEscapes(char *z)
Translate escape sequences in the string "z".
void ToLower(char *z)
Convert a string to all lower-case letters.
static int EscHash(const char *zName)
static int HtmlHash(const char *zName)
static int NextColumn(int iCol, char c)
Compute the new column index following the given character.
static SHtmlTokenMap_t * gApMap[HTML_MARKUP_HASH_SIZE]
void HtmlTranslateEscapes(char *z)
Translate escape sequences in the string "z".
SHtmlTokenMap_t HtmlMarkupMap[]
static struct SgEsc_t gEscSequences[]
static void HtmlHashInit(void)
static struct SgEsc_t * gApEscHash[(sizeof(gEscSequences)/sizeof(gEscSequences[0])+7)]
#define HTML_MARKUP_HASH_SIZE
#define HTML_MARKUP_COUNT
#define O_HtmlImageMarkup
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char text
TGString * ListTokens(TGHtmlElement *p, TGHtmlElement *pEnd)
Return all tokens between the two elements as a string list.
void AppToken(TGHtmlElement *pNew, TGHtmlElement *p, int offs)
Insert token pNew before token p.
int TextInsertCmd(int argc, char **argv)
Insert text into text token, or break token into two text tokens.
void TokenizerAppend(const char *text)
Append text to the tokenizer engine.
void AddStyle(TGHtmlElement *p)
This routine adds information to the input texts that doesn't change when the display is resized or w...
virtual char * ProcessScript(TGHtmlScript *)
TGHtmlElement * InsertToken(TGHtmlElement *pToken, char *zType, char *zArgs, int offs)
This routine takes a text representation of a token, converts it into an TGHtmlElement object and ins...
const char * TypeToName(int type)
Convert a type into a symbolic name.
int Tokenize()
Process as much of the input HTML as possible.
int NameToType(char *zType)
Convert a markup name into a type integer.
void AppendArglist(TGString *str, TGHtmlMarkupElement *pElem)
Append all the arguments of the given markup to the given TGString.
void AppendElement(TGHtmlElement *pElem)
Append the given TGHtmlElement to the tokenizers list of elements.
virtual int ProcessToken(TGHtmlElement *, const char *, int)
TGHtmlMarkupElement * MakeMarkupEntry(int objType, int type, int argc, int arglen[], char *argv[])
Make one markup entry.
SHtmlTokenMap_t * GetMarkupMap(int n)
Returns token map at location n.
SHtmlTokenMap_t * NameToPmap(char *zType)
Returns token map matching zType name.
char * DumpToken(TGHtmlElement *p)
For debugging purposes, print information about a token.
char * GetTokenName(TGHtmlElement *p)
Returns token name of html element p.
int GetIndex(const char *zIndex, TGHtmlElement **ppToken, int *pIndex)
This routine decodes a complete index specification.
void PrintList(TGHtmlElement *first, TGHtmlElement *last)
Print a list of tokens.
void AddFormInfo(TGHtmlElement *p)
Add the DOM control information for form elements.
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
SHtmlTokenMap_t * fPCollide
static uint64_t sum(uint64_t i)