Fixed compiler warnings
[grace.git] / patches / XmHTML.patch
blobc0c6932e90b023836fb4a5f1a517f1c717246ade
1 The patch fixes:
2 1) <HR> placement
3 2) formatting inside <PRE></PRE> (not really nice HTML, but any browser
4 supports it)
5 3) "Can't convert XmHTML_DEFAULT_GAMMA" runtime warning
7 --- XmHTML-1.1.7/lib/common/layout.c.orig Thu Jan 28 02:10:17 1999
8 +++ XmHTML-1.1.7/lib/common/layout.c Mon Jun 12 21:55:01 2000
9 @@ -2377,14 +2377,16 @@
10 * Linefeeds in rules are divided accross the rule: half above and
11 * half below.
12 *****/
13 - if(data->linefeed)
14 + if(data->linefeed) {
15 + box->y += data->linefeed;
16 y_offset = data->linefeed/2;
17 - else
18 + } else {
19 y_offset = data->font->height/2;
20 + }
22 data->y = box->y + y_offset;
24 - /* take height of rule into account as well */
26 + /* take height of rule into account as well */
27 y_offset += data->height/2;
29 /* full height of the box */
30 --- XmHTML-1.1.7/lib/common/parse.c.orig Wed Jan 20 07:13:08 1999
31 +++ XmHTML-1.1.7/lib/common/parse.c Mon Jun 12 01:40:19 2000
32 @@ -1258,6 +1258,24 @@
33 current == HT_U || current == HT_VAR ||
34 current == HT_FONT || current == HT_ZTEXT)
35 return(True);
37 + /* allow most container elements as well if we can relax */
38 + if(!parser->strict_checking &&
39 + (current == HT_TABLE || current == HT_TR || current == HT_TH ||
40 + current == HT_TD || current == HT_OL || current == HT_UL ||
41 + current == HT_DL || current == HT_P || current == HT_DIV ||
42 + current == HT_BLOCKQUOTE || current == HT_CENTER ||
43 + current == HT_FORM || current == HT_CAPTION ||
44 + current == HT_H1 || current == HT_H2 || current == HT_H3 ||
45 + current == HT_H4 || current == HT_H5 || current == HT_H6))
46 + {
47 +#ifdef MINIPARSE
48 + tag_is_wrong_but_allowed = True;
49 +#endif
50 + /* but always issue a warning */
51 + parserCallback(parser, current, state, HTML_VIOLATION);
52 + return(True);
53 + }
54 break;
56 case HT_ZTEXT:
57 --- XmHTML-1.1.7/include/XmHTML/resources.h.orig Sun Dec 13 14:48:46 1998
58 +++ XmHTML-1.1.7/include/XmHTML/resources.h Tue Jun 13 02:29:30 2000
59 @@ -102,7 +102,9 @@
60 #define _resources_h_
62 #define Offset(field) XtOffsetOf(XmHTMLRec, html.field)
63 -#define Stringify(VAL) #VAL
64 +/* Must use cpp prescan for two levels of macros */
65 +#define Stringify(VAL) _Stringify(VAL)
66 +#define _Stringify(VAL) #VAL
68 static XtResource resources [] =