diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2005-01-02 23:49:58 -0500 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2005-01-02 23:49:58 -0500 |
commit | 1fc1d8afcb5b9947e2b9665514dbfd1e86c0bf3f (patch) | |
tree | a83fd699321c8545516d56abcda6c9718fd1f4fb /WWW/Library/Implementation/SGML.c | |
parent | bed9a2c79bfdde6e4ec89d9d02a5d6e88ae12f79 (diff) | |
download | lynx-snapshots-1fc1d8afcb5b9947e2b9665514dbfd1e86c0bf3f.tar.gz |
snapshot of project "lynx", label v2-8-6dev_10
Diffstat (limited to 'WWW/Library/Implementation/SGML.c')
-rw-r--r-- | WWW/Library/Implementation/SGML.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c index 988c8d6f..eae3db3d 100644 --- a/WWW/Library/Implementation/SGML.c +++ b/WWW/Library/Implementation/SGML.c @@ -26,6 +26,7 @@ #include <UCAux.h> #include <HTChunk.h> +#include <HTUtils.h> #include <LYCharSets.h> #include <LYCharVals.h> /* S/390 -- gil -- 0635 */ @@ -901,7 +902,7 @@ static void handle_sgmlatt(HTStream *context) * Convenience macros - tags (elements) are identified sometimes by an int or * enum value ('TAGNUM'), sometimes by a pointer to HTTag ('TAGP'). - kw */ -#define TAGNUM_OF_TAGP(t) (t - context->dtd->tags) +#define TAGNUM_OF_TAGP(t) (HTMLElement) (t - context->dtd->tags) #define TAGP_OF_TAGNUM(e) (context->dtd->tags + e) /* @@ -916,7 +917,7 @@ static void handle_sgmlatt(HTStream *context) #define ALT_TAGNUM(e) ((e == HTML_OBJECT) ? HTML_ALT_OBJECT : e) /* return 'TAGNUM' of the normal mode for 'TAGNUM' e which may be alt. */ -#define NORMAL_TAGNUM(e) (((int)(e) >= HTML_ELEMENTS) ? HTML_OBJECT : e) +#define NORMAL_TAGNUM(e) (((int)(e) >= HTML_ELEMENTS) ? HTML_OBJECT : (HTMLElement)e) /* More convenience stuff. - kw */ #define ALT_TAGP_OF_TAGNUM(e) TAGP_OF_TAGNUM(ALT_TAGNUM(e)) @@ -4909,7 +4910,8 @@ void TO_SJIS(const unsigned char *arg, { unsigned char *euc; - euc = malloc(strlen((const char *) arg) + 1); + euc = typeMallocn(unsigned char, strlen((const char *) arg) + 1); + #ifdef CJK_EX if (!euc) outofmem(__FILE__, "TO_SJIS"); @@ -4931,7 +4933,7 @@ void TO_JIS(const unsigned char *arg, jis[0] = 0; return; } - euc = malloc(strlen((const char *) arg) + 1); + euc = typeMallocn(unsigned char, strlen((const char *)arg) + 1); #ifdef CJK_EX if (!euc) outofmem(__FILE__, "TO_JIS"); |