version 1.44, 2000/02/16 17:03:51
|
version 1.45, 2000/02/17 13:15:49
|
Line 475 Document doc;
|
Line 475 Document doc;
|
Element elText; |
Element elText; |
AttributeType attrType; |
AttributeType attrType; |
Attribute attr; |
Attribute attr; |
int len; |
int len, code; |
#define MAX_ENTITY_LENGTH 80 |
#define MAX_ENTITY_LENGTH 80 |
CHAR_T buffer[MAX_ENTITY_LENGTH]; |
CHAR_T buffer[MAX_ENTITY_LENGTH]; |
|
|
if (lang < 0) |
if (lang < 0) |
/* unknown entity */ |
/* unknown entity */ |
{ |
{ |
|
/* by default display a question mark */ |
entityValue[0] = '?'; |
entityValue[0] = '?'; |
entityValue[1] = EOS; |
entityValue[1] = EOS; |
lang = TtaGetLanguageIdFromAlphabet('L'); |
lang = TtaGetLanguageIdFromAlphabet('L'); |
|
/* let's see if we can do more */ |
|
if (entityName[0] == '#') |
|
/* it's a number */ |
|
{ |
|
if (entityName[1] == 'x') |
|
/* it's a hexadecimal number */ |
|
usscanf (&entityName[2], TEXT("%x"), &code); |
|
else |
|
/* it's a decimal number */ |
|
usscanf (&entityName[1], TEXT("%d"), &code); |
|
GetFallbackCharacter (code, entityValue, &lang); |
|
} |
} |
} |
XMLTextToDocument (); |
XMLTextToDocument (); |
elType.ElTypeNum = MathML_EL_TEXT_UNIT; |
elType.ElTypeNum = MathML_EL_TEXT_UNIT; |
Line 508 Document doc;
|
Line 521 Document doc;
|
TtaSetAttributeText (attr, buffer, elText, doc); |
TtaSetAttributeText (attr, buffer, elText, doc); |
} |
} |
|
|
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
CheckTextElement Put the content of input buffer into the document. |
CheckTextElement Put the content of input buffer into the document. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |