about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/HTML.c188
-rw-r--r--src/LYCgi.c4
-rw-r--r--src/LYCharUtils.c4
-rw-r--r--src/LYCurses.c12
-rw-r--r--src/LYLocal.c4
-rw-r--r--src/LYStyle.c4
-rw-r--r--src/LYStyle.h2
-rw-r--r--src/LYUtils.c6
-rw-r--r--src/chrtrans/makefile.in20
-rw-r--r--src/makefile.in36
10 files changed, 144 insertions, 136 deletions
diff --git a/src/HTML.c b/src/HTML.c
index 1c59d7a5..ebe3162e 100644
--- a/src/HTML.c
+++ b/src/HTML.c
@@ -519,6 +519,9 @@ char prevailing_class[TEMPSTRINGSIZE];
     char myHash[128];
     int hcode;
 #endif
+
+#define CHECK_ID(code) LYCheckForID(me, present, (CONST char **)value, (int)code)
+
 /*	Start Element
 **	-------------
 */
@@ -526,7 +529,7 @@ PRIVATE void HTML_start_element ARGS5(
 	HTStructured *, 	me,
 	int,			element_number,
 	CONST BOOL*,	 	present,
-	CONST char **,		value,
+	char **,		value,
 	char **,		include)
 {
     char *alt_string = NULL;
@@ -636,7 +639,7 @@ PRIVATE void HTML_start_element ARGS5(
 	    char *base = NULL;
 	    char *related = NULL;
 
-	    StrAllocCopy(base, (char *)value[HTML_BASE_HREF]);
+	    StrAllocCopy(base, value[HTML_BASE_HREF]);
 	    if (!(url_type = LYLegitimizeHREF(me, (char**)&base,
 	    				      TRUE, TRUE))) {
 	        if (TRACE)
@@ -1155,7 +1158,7 @@ PRIVATE void HTML_start_element ARGS5(
     case HTML_BODY:
 	if (!me->text)
 	    UPDATE_STYLE;
-	LYCheckForID(me, present, value, (int)HTML_BODY_ID);
+	CHECK_ID(HTML_BODY_ID);
 	if (HText_hasToolbar(me->text))
 	    HText_appendParagraph(me->text);
 	break;
@@ -1223,7 +1226,7 @@ PRIVATE void HTML_start_element ARGS5(
 	        HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
 	    HTML_put_character(me, ' ');
 	    me->in_word = NO;
-	    LYCheckForID(me, present, value, (int)HTML_FRAME_ID);
+	    CHECK_ID(HTML_FRAME_ID);
 	    HText_beginAnchor(me->text, me->inUnderline, me->CurrentA);
 	    if (me->inBoldH == FALSE)
 		HText_appendCharacter(me->text, LY_BOLD_START_CHAR);
@@ -1234,7 +1237,7 @@ PRIVATE void HTML_start_element ARGS5(
 	    HText_endAnchor(me->text, 0);
 	    LYEnsureSingleSpace(me);
 	} else {
-	    LYCheckForID(me, present, value, (int)HTML_FRAME_ID);
+	    CHECK_ID(HTML_FRAME_ID);
 	}
 	FREE(id_string);
 	break;
@@ -1303,7 +1306,7 @@ PRIVATE void HTML_start_element ARGS5(
 	        HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
 	    HTML_put_character(me, ' ');
 	    me->in_word = NO;
-	    LYCheckForID(me, present, value, (int)HTML_IFRAME_ID);
+	    CHECK_ID(HTML_IFRAME_ID);
 	    HText_beginAnchor(me->text, me->inUnderline, me->CurrentA);
 	    if (me->inBoldH == FALSE)
 		HText_appendCharacter(me->text, LY_BOLD_START_CHAR);
@@ -1314,7 +1317,7 @@ PRIVATE void HTML_start_element ARGS5(
 	    HText_endAnchor(me->text, 0);
 	    LYEnsureSingleSpace(me);
 	} else {
-	    LYCheckForID(me, present, value, (int)HTML_IFRAME_ID);
+	    CHECK_ID(HTML_IFRAME_ID);
 	}
 	FREE(id_string);
 	break;
@@ -1335,7 +1338,7 @@ PRIVATE void HTML_start_element ARGS5(
 	    HText_endAnchor(me->text, 0);
 	    HText_setToolbar(me->text);
 	}
-	LYCheckForID(me, present, value, (int)HTML_GEN_ID);
+	CHECK_ID(HTML_GEN_ID);
 	break;
 
     case HTML_CENTER:
@@ -1376,7 +1379,7 @@ PRIVATE void HTML_start_element ARGS5(
 	    UPDATE_STYLE;
 	    me->current_default_alignment = styles[HTML_DLEFT]->alignment;
 	}
-	LYCheckForID(me, present, value, (int)HTML_DIV_ID);
+	CHECK_ID(HTML_DIV_ID);
 	break;
 
     case HTML_H1:
@@ -1433,7 +1436,7 @@ PRIVATE void HTML_start_element ARGS5(
 		me->in_word = NO;
 		me->inP = FALSE;
 	    }
-	    LYCheckForID(me, present, value, (int)HTML_H_ID);
+	    CHECK_ID(HTML_H_ID);
 	    break;
 	}
 
@@ -1460,7 +1463,7 @@ PRIVATE void HTML_start_element ARGS5(
     	    change_paragraph_style(me, styles[ElementNumber]);
 	}
 	UPDATE_STYLE;
-	LYCheckForID(me, present, value, (int)HTML_H_ID);
+	CHECK_ID(HTML_H_ID);
 	    
 	if ((bold_headers == TRUE ||
 	     (ElementNumber == HTML_H1 && bold_H1 == TRUE)) &&
@@ -1542,7 +1545,7 @@ PRIVATE void HTML_start_element ARGS5(
 	        me->sp->style->alignment = HT_LEFT;
 	}
 
-	LYCheckForID(me, present, value, (int)HTML_P_ID);
+	CHECK_ID(HTML_P_ID);
 
 	/*
 	 *  Mark that we are starting a new paragraph
@@ -1555,7 +1558,7 @@ PRIVATE void HTML_start_element ARGS5(
 
     case HTML_BR:
         UPDATE_STYLE;
-	LYCheckForID(me, present, value, (int)HTML_GEN_ID);
+	CHECK_ID(HTML_GEN_ID);
 	if ((LYCollapseBRs == FALSE) ||
 	    HText_LastLineSize(me->text, FALSE)) {
 	    HText_setLastChar(me->text, ' ');  /* absorb white space */
@@ -1567,14 +1570,14 @@ PRIVATE void HTML_start_element ARGS5(
 
     case HTML_WBR:
         UPDATE_STYLE;
-	LYCheckForID(me, present, value, (int)HTML_GEN_ID);
+	CHECK_ID(HTML_GEN_ID);
 	HText_setBreakPoint(me->text);
 	break;
 
     case HTML_HY:
     case HTML_SHY:
         UPDATE_STYLE;
-	LYCheckForID(me, present, value, (int)HTML_GEN_ID);
+	CHECK_ID(HTML_GEN_ID);
 	HText_appendCharacter(me->text, LY_SOFT_HYPHEN);
 	break;
 
@@ -1601,7 +1604,7 @@ PRIVATE void HTML_start_element ARGS5(
 	    /*
 	     *  Add an ID link if needed. - FM
 	     */
-	    LYCheckForID(me, present, value, (int)HTML_HR_ID);
+	    CHECK_ID(HTML_HR_ID);
 
            /*
 	    *  Center lines within the current margins, if
@@ -1820,7 +1823,7 @@ PRIVATE void HTML_start_element ARGS5(
     case HTML_STRONG:
 	UPDATE_STYLE;
 	me->Underline_Level++;
-	LYCheckForID(me, present, value, (int)HTML_GEN_ID);
+	CHECK_ID(HTML_GEN_ID);
 	/*
 	 *  Ignore this if inside of a bold anchor or header.
 	 *  Can't display both underline and bold at same time.
@@ -1857,7 +1860,7 @@ PRIVATE void HTML_start_element ARGS5(
     case HTML_VAR:
         if (!me->text)
 	    UPDATE_STYLE;
-	LYCheckForID(me, present, value, (int)HTML_GEN_ID);
+	CHECK_ID(HTML_GEN_ID);
 	break; /* ignore */
 
     case HTML_DEL:
@@ -1865,7 +1868,7 @@ PRIVATE void HTML_start_element ARGS5(
     case HTML_STRIKE:
         if (!me->text)
 	    UPDATE_STYLE;
-	LYCheckForID(me, present, value, (int)HTML_GEN_ID);
+	CHECK_ID(HTML_GEN_ID);
 	if (me->inUnderline == FALSE)
 	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
 	HTML_put_string(me, "[DEL:");
@@ -1878,7 +1881,7 @@ PRIVATE void HTML_start_element ARGS5(
     case HTML_INS:
         if (!me->text)
 	    UPDATE_STYLE;
-	LYCheckForID(me, present, value, (int)HTML_GEN_ID);
+	CHECK_ID(HTML_GEN_ID);
 	if (me->inUnderline == FALSE)
 	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
 	HTML_put_string(me, "[INS:");
@@ -1891,7 +1894,7 @@ PRIVATE void HTML_start_element ARGS5(
     case HTML_Q:
 	if (!me->text)
 	    UPDATE_STYLE;
-	LYCheckForID(me, present, value, (int)HTML_GEN_ID);
+	CHECK_ID(HTML_GEN_ID);
         /*
 	 *  Should check LANG and/or DIR attributes, and the
 	 *  me->node_anchor->charset and/or yet to be added
@@ -1916,7 +1919,7 @@ PRIVATE void HTML_start_element ARGS5(
     case HTML_PLAINTEXT:
 	change_paragraph_style(me, styles[ElementNumber]);
 	UPDATE_STYLE;
-	LYCheckForID(me, present, value, (int)HTML_GEN_ID);
+	CHECK_ID(HTML_GEN_ID);
     	if (me->comment_end)
     	    HText_appendText(me->text, me->comment_end);
 	break;
@@ -1927,7 +1930,7 @@ PRIVATE void HTML_start_element ARGS5(
 	UPDATE_STYLE;
 	if (me->sp->tag_number == ElementNumber)
 	    LYEnsureDoubleSpace(me);
-	LYCheckForID(me, present, value, (int)HTML_BQ_ID);
+	CHECK_ID(HTML_BQ_ID);
 	break;
 
     case HTML_NOTE:
@@ -1935,7 +1938,7 @@ PRIVATE void HTML_start_element ARGS5(
 	UPDATE_STYLE;
 	if (me->sp->tag_number == ElementNumber)
 	    LYEnsureDoubleSpace(me);
-	LYCheckForID(me, present, value, (int)HTML_NOTE_ID);
+	CHECK_ID(HTML_NOTE_ID);
 	{
 	    char *note = NULL;
 
@@ -1979,7 +1982,7 @@ PRIVATE void HTML_start_element ARGS5(
 	UPDATE_STYLE;
 	if (me->sp->tag_number == ElementNumber)
 	    LYEnsureDoubleSpace(me);
-	LYCheckForID(me, present, value, (int)HTML_ADDRESS_ID);
+	CHECK_ID(HTML_ADDRESS_ID);
 	break;
 
     case HTML_DL:
@@ -1998,7 +2001,7 @@ PRIVATE void HTML_start_element ARGS5(
 		 : styles[(HTML_DL1 - 1) + me->List_Nesting_Level]);
 	}
 	UPDATE_STYLE;	  /* update to the new style */
-	LYCheckForID(me, present, value, (int)HTML_DL_ID);
+	CHECK_ID(HTML_DL_ID);
 	break;
 	
     case HTML_DLC:
@@ -2014,13 +2017,13 @@ PRIVATE void HTML_start_element ARGS5(
                             styles[(HTML_DLC1 - 1) + me->List_Nesting_Level]);
         }
 	UPDATE_STYLE;	  /* update to the new style */
-	LYCheckForID(me, present, value, (int)HTML_DL_ID);
+	CHECK_ID(HTML_DL_ID);
         break;
 
     case HTML_DT:
 	if (!me->text)
 	    UPDATE_STYLE;
-	LYCheckForID(me, present, value, (int)HTML_GEN_ID);
+	CHECK_ID(HTML_GEN_ID);
         if (!me->style_change) {
 	    HText_appendParagraph(me->text);
 	    me->in_word = NO;
@@ -2032,7 +2035,7 @@ PRIVATE void HTML_start_element ARGS5(
     case HTML_DD:
 	if (!me->text)
 	    UPDATE_STYLE;
-	LYCheckForID(me, present, value, (int)HTML_GEN_ID);
+	CHECK_ID(HTML_GEN_ID);
 	HText_setLastChar(me->text, ' ');  /* absorb white space */
         if (!me->style_change)  {
 	    if (HText_LastLineSize(me->text, FALSE))
@@ -2150,7 +2153,7 @@ PRIVATE void HTML_start_element ARGS5(
 		          styles[HTML_OL1 + me->List_Nesting_Level - 1]);
 	}
 	UPDATE_STYLE;  /* update to the new style */
-	LYCheckForID(me, present, value, (int)HTML_OL_ID);
+	CHECK_ID(HTML_OL_ID);
 	break;
 
     case HTML_UL:
@@ -2192,7 +2195,7 @@ PRIVATE void HTML_start_element ARGS5(
 	    }
 	}
 	UPDATE_STYLE;  /* update to the new style */
-	LYCheckForID(me, present, value, (int)HTML_UL_ID);
+	CHECK_ID(HTML_UL_ID);
 	break;
 
     case HTML_MENU:
@@ -2210,13 +2213,13 @@ PRIVATE void HTML_start_element ARGS5(
 		          styles[HTML_MENU1 + me->List_Nesting_Level - 1]);
 	}
 	UPDATE_STYLE;  /* update to the new style */
-	LYCheckForID(me, present, value, (int)HTML_UL_ID);
+	CHECK_ID(HTML_UL_ID);
 	break;
 	
     case HTML_LH:
         UPDATE_STYLE;  /* update to the new style */
 	HText_appendParagraph(me->text);
-	LYCheckForID(me, present, value, (int)HTML_GEN_ID);
+	CHECK_ID(HTML_GEN_ID);
 	HTML_put_character(me, HT_NON_BREAK_SPACE);
 	HText_setLastChar(me->text, ' ');
 	me->in_word = NO;
@@ -2227,7 +2230,7 @@ PRIVATE void HTML_start_element ARGS5(
         UPDATE_STYLE;  /* update to the new style */
 	HText_appendParagraph(me->text);
 	me->sp->style->alignment = HT_LEFT;
-	LYCheckForID(me, present, value, (int)HTML_LI_ID);
+	CHECK_ID(HTML_LI_ID);
 	if (me->sp[0].tag_number == HTML_OL) {
 	    char number_string[20];
 	    int counter, seqnum;
@@ -2369,7 +2372,7 @@ PRIVATE void HTML_start_element ARGS5(
     case HTML_SPAN:
 	if (!me->text)
 	    UPDATE_STYLE;
-	LYCheckForID(me, present, value, (int)HTML_GEN_ID);
+	CHECK_ID(HTML_GEN_ID);
         /*
 	 *  Should check LANG and/or DIR attributes, and the
 	 *  me->node_anchor->charset and/or yet to be added
@@ -2380,7 +2383,7 @@ PRIVATE void HTML_start_element ARGS5(
     case HTML_BDO:
 	if (!me->text)
 	    UPDATE_STYLE;
-	LYCheckForID(me, present, value, (int)HTML_GEN_ID);
+	CHECK_ID(HTML_GEN_ID);
         /*
 	 *  Should check DIR (and LANG) attributes, and the
 	 *  me->node_anchor->charset and/or yet to be added
@@ -2391,7 +2394,7 @@ PRIVATE void HTML_start_element ARGS5(
     case HTML_SPOT:
 	if (!me->text)
 	    UPDATE_STYLE;
-	LYCheckForID(me, present, value, (int)HTML_GEN_ID);
+	CHECK_ID(HTML_GEN_ID);
 	break;
 
     case HTML_FN:
@@ -2399,7 +2402,7 @@ PRIVATE void HTML_start_element ARGS5(
 	UPDATE_STYLE;
 	if (me->sp->tag_number == ElementNumber)
 	    LYEnsureDoubleSpace(me);
-	LYCheckForID(me, present, value, (int)HTML_FN_ID);
+	CHECK_ID(HTML_FN_ID);
 	if (me->inUnderline == FALSE)
 	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
 	HTML_put_string(me, "FOOTNOTE:");
@@ -3259,7 +3262,7 @@ PRIVATE void HTML_start_element ARGS5(
 	break;
 
     case HTML_BODYTEXT:
-        LYCheckForID(me, present, value, (int)HTML_BODYTEXT_ID);
+        CHECK_ID(HTML_BODYTEXT_ID);
         /*
 	 *  We may need to look at this someday to deal with
 	 *  OBJECTs optimally, but just ignore it for now. - FM
@@ -3267,7 +3270,7 @@ PRIVATE void HTML_start_element ARGS5(
 	break;
 
     case HTML_TEXTFLOW:
-        LYCheckForID(me, present, value, (int)HTML_BODYTEXT_ID);
+        CHECK_ID(HTML_BODYTEXT_ID);
         /*
 	 *  We may need to look at this someday to deal with
 	 *  APPLETs optimally, but just ignore it for now. - FM
@@ -3291,7 +3294,7 @@ PRIVATE void HTML_start_element ARGS5(
 	    me->inFIGwithP = FALSE;
 	    HTML_put_character(me, ' ');  /* space char may be ignored */
 	}
-	LYCheckForID(me, present, value, (int)HTML_FIG_ID);
+	CHECK_ID(HTML_FIG_ID);
 	me->in_word = NO;
 	me->inP = FALSE;
 
@@ -3880,7 +3883,7 @@ PRIVATE void HTML_start_element ARGS5(
 	LYEnsureDoubleSpace(me);
 	LYResetParagraphAlignment(me);
 	me->inCREDIT = TRUE;
-	LYCheckForID(me, present, value, (int)HTML_CREDIT_ID);
+	CHECK_ID(HTML_CREDIT_ID);
 	if (me->inUnderline == FALSE)
 	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
 	HTML_put_string(me, "CREDIT:");
@@ -3913,7 +3916,7 @@ PRIVATE void HTML_start_element ARGS5(
 	LYEnsureDoubleSpace(me);
 	LYResetParagraphAlignment(me);
 	me->inCAPTION = TRUE;
-	LYCheckForID(me, present, value, (int)HTML_CAPTION_ID);
+	CHECK_ID(HTML_CAPTION_ID);
 	if (me->inUnderline == FALSE)
 	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
 	HTML_put_string(me, "CAPTION:");
@@ -4080,7 +4083,7 @@ PRIVATE void HTML_start_element ARGS5(
 	    FREE(enctype);
 	    FREE(title);
 	}
-	LYCheckForID(me, present, value, (int)HTML_FORM_ID);
+	CHECK_ID(HTML_FORM_ID);
 	break;
 
     case HTML_FIELDSET:
@@ -4088,7 +4091,7 @@ PRIVATE void HTML_start_element ARGS5(
 	    UPDATE_STYLE;
 	LYEnsureDoubleSpace(me);
 	LYResetParagraphAlignment(me);
-        LYCheckForID(me, present, value, (int)HTML_FIELDSET_ID);
+        CHECK_ID(HTML_FIELDSET_ID);
         break;
 
     case HTML_LEGEND:
@@ -4096,15 +4099,15 @@ PRIVATE void HTML_start_element ARGS5(
 	    UPDATE_STYLE;
 	LYEnsureDoubleSpace(me);
 	LYResetParagraphAlignment(me);
-        LYCheckForID(me, present, value, (int)HTML_LEGEND_ID);
+        CHECK_ID(HTML_LEGEND_ID);
         break;
 
     case HTML_LABEL:
-        LYCheckForID(me, present, value, (int)HTML_LABEL_ID);
+        CHECK_ID(HTML_LABEL_ID);
         break;
 
     case HTML_KEYGEN:
-        LYCheckForID(me, present, value, (int)HTML_KEYGEN_ID);
+        CHECK_ID(HTML_KEYGEN_ID);
         break;
 
     case HTML_BUTTON:
@@ -4122,12 +4125,12 @@ PRIVATE void HTML_start_element ARGS5(
 	    UPDATE_STYLE;
 	    if ((present && present[HTML_BUTTON_TYPE] &&
 	         value[HTML_BUTTON_TYPE]) &&
-		(!strcasecomp((char *)value[HTML_BUTTON_TYPE], "submit") ||
-		 !strcasecomp((char *)value[HTML_BUTTON_TYPE], "reset"))) {
+		(!strcasecomp(value[HTML_BUTTON_TYPE], "submit") ||
+		 !strcasecomp(value[HTML_BUTTON_TYPE], "reset"))) {
 	        /*
 		 *  It's a button for submitting or resetting a form. - FM
 		 */
-		I.type = (char *)value[HTML_BUTTON_TYPE];
+		I.type = value[HTML_BUTTON_TYPE];
 	    } else {
 	        /*
 		 *  Ugh, it's a button for a script. - FM
@@ -4175,7 +4178,7 @@ PRIVATE void HTML_start_element ARGS5(
 	    HTML_put_character(me, '(');
 
 	    if (present && present[HTML_BUTTON_NAME] && value[HTML_BUTTON_NAME])
-		I.name = (char *)value[HTML_BUTTON_NAME];
+		I.name = value[HTML_BUTTON_NAME];
 	    else
 	        I.name = "";
 
@@ -4184,16 +4187,15 @@ PRIVATE void HTML_start_element ARGS5(
 	        /*
 		 *  Convert any HTML entities or decimal escaping. - FM
 		 */
-		int CurrentCharSet = current_char_set;
 		int len;
 
 		me->UsePlainSpace = TRUE;
 		if (current_char_set) {
 		    LYExpandString((char **)&value[HTML_BUTTON_VALUE]);
 		}
-	        LYUnEscapeEntities((char *)value[HTML_BUTTON_VALUE],
+	        LYUnEscapeEntities(value[HTML_BUTTON_VALUE],
 				   me->UsePlainSpace, me->HiddenValue);
-		I.value = (char *)value[HTML_BUTTON_VALUE];
+		I.value = value[HTML_BUTTON_VALUE];
 		/*
 		 *  Convert any newlines or tabs to spaces,
 		 *  and trim any lead or trailing spaces. - FM
@@ -4212,17 +4214,17 @@ PRIVATE void HTML_start_element ARGS5(
 
 	    if (present && present[HTML_BUTTON_CLASS] && /* Not yet used. */
 	        value[HTML_BUTTON_CLASS] && *value[HTML_BUTTON_CLASS])
-		I.class = (char *)value[HTML_BUTTON_CLASS];
+		I.class = value[HTML_BUTTON_CLASS];
 
 	    if (present && present[HTML_BUTTON_ID] &&
 	        value[HTML_BUTTON_ID] && *value[HTML_BUTTON_ID]) {
-		I.id = (char *)value[HTML_BUTTON_ID];
-		LYCheckForID(me, present, value, (int)HTML_BUTTON_ID);
+		I.id = value[HTML_BUTTON_ID];
+		CHECK_ID(HTML_BUTTON_ID);
 	    }
 
 	    if (present && present[HTML_BUTTON_LANG] && /* Not yet used. */
 	        value[HTML_BUTTON_LANG] && *value[HTML_BUTTON_LANG])
-		I.lang = (char *)value[HTML_BUTTON_LANG];
+		I.lang = value[HTML_BUTTON_LANG];
 
 	    chars = HText_beginInput(me->text, me->inUnderline, &I);
 	    /*
@@ -4325,13 +4327,13 @@ PRIVATE void HTML_start_element ARGS5(
 	     */
 	    if (present && present[HTML_INPUT_TYPE] &&
 	        value[HTML_INPUT_TYPE] && *value[HTML_INPUT_TYPE]) {
-		I.type = (char *)value[HTML_INPUT_TYPE];
+		I.type = value[HTML_INPUT_TYPE];
 
 		if (!strcasecomp(I.type, "range")) {
 		    if (present[HTML_INPUT_MIN])
-		        I.min = (char *)value[HTML_INPUT_MIN];
+		        I.min = value[HTML_INPUT_MIN];
 		    if (present[HTML_INPUT_MAX])
-		        I.max = (char *)value[HTML_INPUT_MAX];
+		        I.max = value[HTML_INPUT_MAX];
 		    /*
 		     *  Not yet implemented.
 		     */
@@ -4344,7 +4346,7 @@ PRIVATE void HTML_start_element ARGS5(
 
 		} else if (!strcasecomp(I.type, "file")) {
 		    if (present[HTML_INPUT_ACCEPT])
-		        I.accept = (char *)value[HTML_INPUT_ACCEPT];
+		        I.accept = value[HTML_INPUT_ACCEPT];
 		    /*
 		     *  Not yet implemented.
 		     */
@@ -4408,7 +4410,7 @@ PRIVATE void HTML_start_element ARGS5(
 	     *  Handle the INPUT as for a FORM. - FM
 	     */
 	    if (present && present[HTML_INPUT_NAME] && value[HTML_INPUT_NAME])
-		I.name = (char *)value[HTML_INPUT_NAME];
+		I.name = value[HTML_INPUT_NAME];
 	    else
 	        I.name = "";
 	    if ((present && present[HTML_INPUT_ALT] &&
@@ -4429,7 +4431,7 @@ PRIVATE void HTML_start_element ARGS5(
 	        present && present[HTML_INPUT_SRC] &&
 	        value[HTML_INPUT_SRC] && *value[HTML_INPUT_SRC] &&
 		I.type && !strcasecomp(I.type, "image")) {
-		StrAllocCopy(href, (char *)value[HTML_INPUT_SRC]);
+		StrAllocCopy(href, value[HTML_INPUT_SRC]);
 		/*
 		 *  We have a TYPE="image" with a non-zero-length SRC
 		 *  attribute and want clickable images.  Make the
@@ -4511,12 +4513,12 @@ PRIVATE void HTML_start_element ARGS5(
 			    (char **)&value[HTML_INPUT_ALT] :
 			    (char **)&value[HTML_INPUT_VALUE]));
 	        LYUnEscapeEntities(((UseALTasVALUE == TRUE) ?
-			      (char *)value[HTML_INPUT_ALT] :
-			      (char *)value[HTML_INPUT_VALUE]),
+			      value[HTML_INPUT_ALT] :
+			      value[HTML_INPUT_VALUE]),
 				   me->UsePlainSpace, me->HiddenValue);
 		I.value = ((UseALTasVALUE == TRUE) ?
-		     (char *)value[HTML_INPUT_ALT] :
-		     (char *)value[HTML_INPUT_VALUE]);
+		     value[HTML_INPUT_ALT] :
+		     value[HTML_INPUT_VALUE]);
 		if (me->UsePlainSpace == TRUE) {
 		    /*
 		     *  Convert any newlines or tabs to spaces,
@@ -4553,39 +4555,39 @@ PRIVATE void HTML_start_element ARGS5(
 		I.checked = YES;
 	    if (present && present[HTML_INPUT_SIZE] &&
 	        value[HTML_INPUT_SIZE] && *value[HTML_INPUT_SIZE])
-		I.size = (char *)value[HTML_INPUT_SIZE];
+		I.size = value[HTML_INPUT_SIZE];
 	    if (present && present[HTML_INPUT_MAXLENGTH] &&
 	        value[HTML_INPUT_MAXLENGTH] && *value[HTML_INPUT_MAXLENGTH])
-		I.maxlength = (char *)value[HTML_INPUT_MAXLENGTH];
+		I.maxlength = value[HTML_INPUT_MAXLENGTH];
 	    if (present && present[HTML_INPUT_DISABLED])
 		I.disabled = YES;
 
 	    if (present && present[HTML_INPUT_ALIGN] && /* Not yet used. */
 	        value[HTML_INPUT_ALIGN] && *value[HTML_INPUT_ALIGN])
-		I.align = (char *)value[HTML_INPUT_ALIGN];
+		I.align = value[HTML_INPUT_ALIGN];
 	    if (present && present[HTML_INPUT_CLASS] && /* Not yet used. */
 	        value[HTML_INPUT_CLASS] && *value[HTML_INPUT_CLASS])
-		I.class = (char *)value[HTML_INPUT_CLASS];
+		I.class = value[HTML_INPUT_CLASS];
 	    if (present && present[HTML_INPUT_ERROR] && /* Not yet used. */
 	        value[HTML_INPUT_ERROR] && *value[HTML_INPUT_ERROR])
-		I.error = (char *)value[HTML_INPUT_ERROR];
+		I.error = value[HTML_INPUT_ERROR];
 	    if (present && present[HTML_INPUT_HEIGHT] && /* Not yet used. */
 	        value[HTML_INPUT_HEIGHT] && *value[HTML_INPUT_HEIGHT])
-		I.height = (char *)value[HTML_INPUT_HEIGHT];
+		I.height = value[HTML_INPUT_HEIGHT];
 	    if (present && present[HTML_INPUT_WIDTH] && /* Not yet used. */
 	        value[HTML_INPUT_WIDTH] && *value[HTML_INPUT_WIDTH])
-		I.width = (char *)value[HTML_INPUT_WIDTH];
+		I.width = value[HTML_INPUT_WIDTH];
 	    if (present && present[HTML_INPUT_ID] &&
 	        value[HTML_INPUT_ID] && *value[HTML_INPUT_ID]) {
-		I.id = (char *)value[HTML_INPUT_ID];
-		LYCheckForID(me, present, value, (int)HTML_INPUT_ID);
+		I.id = value[HTML_INPUT_ID];
+		CHECK_ID(HTML_INPUT_ID);
 	    }
 	    if (present && present[HTML_INPUT_LANG] && /* Not yet used. */
 	        value[HTML_INPUT_LANG] && *value[HTML_INPUT_LANG])
-		I.lang = (char *)value[HTML_INPUT_LANG];
+		I.lang = value[HTML_INPUT_LANG];
 	    if (present && present[HTML_INPUT_MD] && /* Not yet used. */
 	        value[HTML_INPUT_MD] && *value[HTML_INPUT_MD])
-		I.md = (char *)value[HTML_INPUT_MD];
+		I.md = value[HTML_INPUT_MD];
 
 	    chars = HText_beginInput(me->text, me->inUnderline, &I);
 	    /*
@@ -4875,7 +4877,7 @@ PRIVATE void HTML_start_element ARGS5(
 		if (TRACE)
 		    fprintf(stderr,
 		    	    "HTML: Ignoring SIZE=\"%s\" for SELECT.\n",
-		    	    (char *)value[HTML_SELECT_SIZE]);
+		    	    value[HTML_SELECT_SIZE]);
 #endif /* NOTDEFINED */
 	    }
 
@@ -4907,7 +4909,7 @@ PRIVATE void HTML_start_element ARGS5(
 		me->in_word = NO;
 	    }
 
-	    LYCheckForID(me, present, value, (int)HTML_SELECT_ID);
+	    CHECK_ID(HTML_SELECT_ID);
 
 	    HText_beginSelect(name, multiple, size);
 	    FREE(name);
@@ -5014,7 +5016,7 @@ PRIVATE void HTML_start_element ARGS5(
 			LYUseDefaultRawMode = TRUE;
 			HTMLSetCharacterHandling(current_char_set);
 		    }
-	            LYUnEscapeEntities((char *)value[HTML_OPTION_VALUE],
+	            LYUnEscapeEntities(value[HTML_OPTION_VALUE],
 		    		       me->UsePlainSpace, me->HiddenValue);
 		    if (CurrentCharSet) {
 		        current_char_set = CurrentCharSet;
@@ -5024,7 +5026,7 @@ PRIVATE void HTML_start_element ARGS5(
 			HTCJK = CurrentHTCJK;
 		    }
 
-		    I.value = (char *)value[HTML_OPTION_VALUE];
+		    I.value = value[HTML_OPTION_VALUE];
 		}
 
 	        if (me->select_disabled ||
@@ -5040,7 +5042,7 @@ PRIVATE void HTML_start_element ARGS5(
 				    (HTLinkType*)0)) != NULL) {	   /* Type */
 			HText_beginAnchor(me->text, me->inUnderline, ID_A);
 			HText_endAnchor(me->text, 0);
-		        I.id = (char *)value[HTML_OPTION_ID];
+		        I.id = value[HTML_OPTION_ID];
 		    }
 		}
 
@@ -5151,7 +5153,7 @@ PRIVATE void HTML_start_element ARGS5(
 	    UPDATE_STYLE;
 	    me->current_default_alignment = styles[HTML_DLEFT]->alignment;
 	}
-	LYCheckForID(me, present, value, (int)HTML_TABLE_ID);
+	CHECK_ID(HTML_TABLE_ID);
 	break;
 
     case HTML_TR:
@@ -5189,7 +5191,7 @@ PRIVATE void HTML_start_element ARGS5(
 	        me->sp->style->alignment = HT_LEFT;
 	}
 
-	LYCheckForID(me, present, value, (int)HTML_TR_ID);
+	CHECK_ID(HTML_TR_ID);
 	me->inP = FALSE;
         break;
 
@@ -5200,7 +5202,7 @@ PRIVATE void HTML_start_element ARGS5(
 	 *  Not yet implemented.  Just check for an ID link. - FM
 	 */
         UPDATE_STYLE;
-	LYCheckForID(me, present, value, (int)HTML_TR_ID);
+	CHECK_ID(HTML_TR_ID);
         break;
     
     case HTML_COL:
@@ -5209,12 +5211,12 @@ PRIVATE void HTML_start_element ARGS5(
 	 *  Not yet implemented.  Just check for an ID link. - FM
 	 */
         UPDATE_STYLE;
-	LYCheckForID(me, present, value, (int)HTML_COL_ID);
+	CHECK_ID(HTML_COL_ID);
         break;
     
     case HTML_TH:
         UPDATE_STYLE;
-	LYCheckForID(me, present, value, (int)HTML_TD_ID);
+	CHECK_ID(HTML_TD_ID);
         /*
 	 *  Not yet implemented.  Just add a collapsible space and break. - FM
 	 */
@@ -5224,7 +5226,7 @@ PRIVATE void HTML_start_element ARGS5(
 
     case HTML_TD:
         UPDATE_STYLE;
-	LYCheckForID(me, present, value, (int)HTML_TD_ID);
+	CHECK_ID(HTML_TD_ID);
         /*
 	 *  Not yet implemented.  Just add a collapsible space and break. - FM
 	 */
@@ -5240,7 +5242,7 @@ PRIVATE void HTML_start_element ARGS5(
 	if (!me->text)
 	    UPDATE_STYLE;
 	HTChunkClear(&me->math);
-	LYCheckForID(me, present, value, (int)HTML_GEN_ID);
+	CHECK_ID(HTML_GEN_ID);
 	break;
 
     default:
@@ -5326,6 +5328,8 @@ PRIVATE void HTML_start_element ARGS5(
 #endif /* USE_COLOR_STYLE */
 }
 
+#undef CHECK_ID  /* LYCheckForID() */
+
 /*		End Element
 **		-----------
 **
diff --git a/src/LYCgi.c b/src/LYCgi.c
index 3e825502..44a85bd4 100644
--- a/src/LYCgi.c
+++ b/src/LYCgi.c
@@ -289,7 +289,7 @@ PRIVATE int LYLoadCGI ARGS4(
 	int fd1[2], fd2[2];
 	char buf[1024];
 	pid_t pid;
-#if HAVE_TYPE_UNION_WAIT && !HAVE_WAITPID
+#if HAVE_TYPE_UNIONWAIT && !HAVE_WAITPID
 	union wait wstatus;
 #else
 	int wstatus;
@@ -376,7 +376,7 @@ PRIVATE int LYLoadCGI ARGS4(
 		    
 		    (*target->isa->put_block)(target, buf, chars);
 		}
-#if HAVE_TYPE_UNION_WAIT && !HAVE_WAITPID
+#if HAVE_TYPE_UNIONWAIT && !HAVE_WAITPID
 		while (wait(&wstatus) != pid)
 		    ; /* do nothing */
 #else
diff --git a/src/LYCharUtils.c b/src/LYCharUtils.c
index 678bbab8..d7729cf4 100644
--- a/src/LYCharUtils.c
+++ b/src/LYCharUtils.c
@@ -2778,7 +2778,7 @@ PUBLIC void LYCheckForContentBase ARGS1(
 {
     char *cp = NULL;
     BOOL present[HTML_BASE_ATTRIBUTES];
-    CONST char *value[HTML_BASE_ATTRIBUTES];
+    char *value[HTML_BASE_ATTRIBUTES];
     int i;
 
     if (!(me && me->node_anchor))
@@ -2831,7 +2831,7 @@ PUBLIC void LYCheckForContentBase ARGS1(
     for (i = 0; i < HTML_BASE_ATTRIBUTES; i++)
 	 present[i] = NO;
     present[HTML_BASE_HREF] = YES;
-    value[HTML_BASE_HREF] = (CONST char *)cp;
+    value[HTML_BASE_HREF] = cp;
     (*me->isa->start_element)(me, HTML_BASE, present, value, 0);
     FREE(cp);
 }
diff --git a/src/LYCurses.c b/src/LYCurses.c
index e4a7718a..f609100e 100644
--- a/src/LYCurses.c
+++ b/src/LYCurses.c
@@ -35,7 +35,10 @@ extern int _NOSHARE(COLS);
 #ifdef USE_COLOR_STYLE
 #include "AttrList.h"
 #include "LYHash.h"
-int has_color = 0;
+#endif
+
+#if defined(COLOR_CURSES)
+int lynx_uses_color = 0;
 #endif
 
 /*
@@ -208,7 +211,7 @@ PRIVATE int LYAttrset ARGS3(WINDOW*,win,int,color,int,mono)
 {
 	if (TRACE)
 		fprintf(stderr, "CSS:LYAttrset (%d, %d)\n", color, mono);
-	if (has_color && LYShowColor >= SHOW_COLOR_ON && color > -1)
+	if (lynx_uses_color && LYShowColor >= SHOW_COLOR_ON && color > -1)
 	{
 		wattrset(win,color);
 #if 0
@@ -360,7 +363,6 @@ void attribute ARGS2(int,style,int,dir)
  * special case of initialization before 'initscr()' is called.
  * 1997/1/19 - T.E.Dickey <dickey@clark.net>
  */
-PRIVATE int lynx_uses_color;
 PRIVATE int lynx_called_initscr;
 
 PRIVATE struct {
@@ -702,8 +704,8 @@ PUBLIC void start_curses NOARGS
 #endif
 
 #ifdef USE_COLOR_STYLE
-	has_color = has_colors();
-	if (has_color)
+	lynx_uses_color = has_colors();
+	if (lynx_uses_color)
 		start_color();
 	parse_userstyles();
 #endif
diff --git a/src/LYLocal.c b/src/LYLocal.c
index 98f29ce4..a458ebe5 100644
--- a/src/LYLocal.c
+++ b/src/LYLocal.c
@@ -2205,7 +2205,7 @@ PUBLIC int LYExecv ARGS3(
     int rc;
     char tmpbuf[512];
     pid_t pid;
-#if HAVE_TYPE_UNION_WAIT && !HAVE_WAITPID
+#if HAVE_TYPE_UNIONWAIT && !HAVE_WAITPID
     union wait wstatus;
 #else
     int wstatus;
@@ -2224,7 +2224,7 @@ PUBLIC int LYExecv ARGS3(
 	    execv(path, argv);
 	    exit(-1);	/* execv failed, give wait() something to look at */
 	default:  /* parent */
-#if HAVE_TYPE_UNION_WAIT && !HAVE_WAITPID
+#if HAVE_TYPE_UNIONWAIT && !HAVE_WAITPID
 	    while (wait(&wstatus) != pid)
 		; /* do nothing */
 #else
diff --git a/src/LYStyle.c b/src/LYStyle.c
index dd4d12fd..0d9d0724 100644
--- a/src/LYStyle.c
+++ b/src/LYStyle.c
@@ -1,6 +1,6 @@
 /* character level styles for Lynx
  * (c) 1996 Rob Partington -- donated to the Lyncei (if they want it :-)
- * $Id: LYStyle.c,v 1.1 1997/05/25 00:14:19 tom Exp $
+ * $Id: LYStyle.c,v 1.2 1997/09/17 23:34:13 tom Exp $
  */
 #include "HTUtils.h"
 #include "HTML.h"
@@ -123,7 +123,7 @@ PRIVATE void parse_attributes ARGS5(char*,mono,char*,fg,char*,bg,int,style,char*
   * If we have colour, and space to create a new colour attribute,
   * and we have a valid colour description, then add this style
   */
- if (has_color && colorPairs < COLOR_PAIRS-1 && fA!=-1)
+ if (lynx_uses_color && colorPairs < COLOR_PAIRS-1 && fA!=-1)
  {
 	colorPairs++;
 	init_pair(colorPairs, fA, bA);
diff --git a/src/LYStyle.h b/src/LYStyle.h
index cfc4ae69..02eab3d9 100644
--- a/src/LYStyle.h
+++ b/src/LYStyle.h
@@ -12,7 +12,7 @@ extern CONST SGML_dtd HTML_dtd;
 extern HTCharStyle displayStyles[DSTYLE_ELEMENTS];
 
 /* Can we do colour? - RP */
-extern int has_color;
+extern int lynx_uses_color;
 
 /* Set all the buckets in the hash table to be empty */
 extern void style_initialiseHashTable NOPARAMS;
diff --git a/src/LYUtils.c b/src/LYUtils.c
index 388d6adb..a4b5225a 100644
--- a/src/LYUtils.c
+++ b/src/LYUtils.c
@@ -1892,7 +1892,7 @@ PUBLIC void statusline ARGS1(
 		int a=(strncmp(buffer, "Alert", 5) || !hashStyles[s_alert].name ? s_status : s_alert);
 		LynxChangeStyle (a, ABS_ON, 1);
 		addstr(buffer);
-		wbkgdset(stdscr, (has_color
+		wbkgdset(stdscr, (lynx_uses_color
 			? hashStyles[a].color
 			: hashStyles[a].mono) | ' ');
 		clrtoeol();
@@ -2754,9 +2754,9 @@ PUBLIC BOOLEAN inlocaldomain NOARGS
 ** This bit of code catches window size change signals
 **/
 
-#if !defined(VMS) && !defined(ISC) && !defined(DOSPATH)
+#ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
-#endif /* !VMS && !ISC */
+#endif
 
 /* For systems that have both, but both can't be included, duh */
 #ifdef TERMIO_AND_TERMIOS
diff --git a/src/chrtrans/makefile.in b/src/chrtrans/makefile.in
index a15d5da7..0122ecf1 100644
--- a/src/chrtrans/makefile.in
+++ b/src/chrtrans/makefile.in
@@ -14,12 +14,12 @@ VPATH		= $(srcdir)
 
 WWWINC		= WWW/Library/Implementation
 SITE_DEFS	= # FIXME: set in parent makefile
-MCFLAGS		= # FIXME: set in parent makefile
 
 CC		= @CC@
 CPP		= @CPP@
-CPPOPTS		= @DEFS@ @CPPFLAGS@ -I.. -I../.. -I../../$(WWWINC) $(MCFLAGS)
-CFLAGS		= $(CPPOPTS) @CFLAGS@
+CFLAGS		= @CFLAGS@
+CPP_OPTS	= @DEFS@ @CPPFLAGS@ -I.. -I../.. -I../../$(WWWINC) $(SITE_DEFS)
+CC_OPTS		= $(CPP_OPTS) $(CFLAGS)
 
 #
 # This file contains the font map for the default (hardware) font
@@ -31,8 +31,6 @@ FONTMAP_INC = iso01_uni.h# default, if not set by recursive call
 
 ### fastdep: $(FONTMAP_INC)
 
-### MCFLAGS=-g -DUNIX -DLINUX -DNO_KEYPAD -DNO_TTYTYPE -DEXP_CHARTRANS -I.. -I../../WWW/Library/Implementation -I../..
-
 CHRTR=
 
 TABLES= $(CHRTR)iso02_uni.h \
@@ -65,17 +63,17 @@ default: $(FONTMAP_INC)
 tables: $(TABLES)
 
 makeuctb: makeuctb.c UCkd.h
-	$(CC) $(CFLAGS) -o makeuctb makeuctb.c
+	$(CC) $(CC_OPTS) -o makeuctb makeuctb.c
 
 .SUFFIXES : .tbl .i
 
 .c.o:
-@SHOW_CC@
-	@ECHO_CC@$(CC) $(CPPOPTS) $(CFLAGS) -c $(srcdir)/$*.c
+@RULE_CC@
+	@ECHO_CC@$(CC) $(CC_OPTS) -c $(srcdir)/$*.c
 
 .c.i:
-@SHOW_CC@
-	@ECHO_CC@$(CPP) -C $(CPPOPTS) $*.c >$@
+@RULE_CC@
+	@ECHO_CC@$(CPP) -C $(CPP_OPTS) $*.c >$@
 
 .tbl.h:
 	./makeuctb $*.tbl > $@
@@ -115,6 +113,6 @@ distclean: clean
 	rm -f core *.bak *.sav *~ *.h_old
 
 depend :
-	makedepend -fmakefile -- $(CFLAGS) -- $(C_SRC)
+	makedepend -fmakefile -- $(CPP_OPTS) -- $(C_SRC)
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/src/makefile.in b/src/makefile.in
index d42883b9..e1f35c23 100644
--- a/src/makefile.in
+++ b/src/makefile.in
@@ -8,7 +8,17 @@ exec_prefix	= @exec_prefix@
 srcdir		= @srcdir@
 VPATH		= $(srcdir)
 
-MCFLAGS		= # FIXME: set in parent makefile
+# Symbols which the configure script can set in each makefile:
+CC		= @CC@
+CPP		= @CPP@
+CFLAGS		= @CFLAGS@
+DEFS		= @DEFS@
+CPPFLAGS	= @CPPFLAGS@
+
+LIBS		= @LIBS@ $(RESOLVLIB) $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)
+LDFLAGS		= @LDFLAGS@
+
+# Symbols inherited from the top-level makefile
 RESOLVLIB	= # FIXME: set in parent makefile
 SITE_DEFS	= # FIXME: set in parent makefile
 SITE_LIBS	= # FIXME: set in parent makefile
@@ -18,17 +28,12 @@ WAISLIB		= # FIXME: set in parent makefile
 WWWINC		= WWW/Library/Implementation
 WWWLIB		= ../WWW/Library/unix/libwww.a
 
-CC		= @CC@
-CPP		= @CPP@
-CPPOPTS		= @DEFS@ @CPPFLAGS@ -I.. -I../$(WWWINC) $(MCFLAGS) $(SITE_DEFS)
-CFLAGS		= $(CPPOPTS) @CFLAGS@
+CPP_OPTS	= $(DEFS) $(CPPFLAGS) -I.. -I../$(WWWINC) $(SITE_DEFS)
+CC_OPTS		= $(CPP_OPTS) $(CFLAGS)
 
 LINT		= @LINT@
 LINTOPTS	=
 
-LIBS		= @LIBS@ $(RESOLVLIB) $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)
-LDFLAGS		= @LDFLAGS@
-
 CHARTRANS_OBJS=UCdomap.o UCAux.o UCAuto.o
 OBJS=  LYClean.o LYShowInfo.o LYEdit.o LYStrings.o \
 LYMail.o HTAlert.o GridText.o LYGetFile.o \
@@ -47,16 +52,16 @@ all: lynx
 .SUFFIXES : .i
 
 .c.o:
-@SHOW_CC@
-	@ECHO_CC@$(CC) $(CFLAGS) -c $(srcdir)/$*.c
+@RULE_CC@
+	@ECHO_CC@$(CC) $(CC_OPTS) -c $(srcdir)/$*.c
 
 .c.i:
-@SHOW_CC@
-	@ECHO_CC@$(CPP) -C $(CPPOPTS) $*.c >$@
+@RULE_CC@
+	@ECHO_CC@$(CPP) -C $(CPP_OPTS) $*.c >$@
 
 lynx:   message @EXTRA_DEPS@ $(OBJS) $(WWWLIB)
 	@echo "Linking and creating Lynx executable"
-	$(CC) $(CFLAGS) $(LDFLAGS) -o lynx  $(OBJS) $(WWWLIB) $(LIBS)
+	$(CC) $(CC_OPTS) $(LDFLAGS) -o lynx  $(OBJS) $(WWWLIB) $(LIBS)
 	@echo "Copying Lynx executable into top-level directory"
 	cp lynx ..
 	@echo "Welcome to Lynx!"
@@ -66,12 +71,11 @@ message:
 
 do_chartrans_stuff:
 	-cd chrtrans && $(MAKE) \
-		MCFLAGS="$(MCFLAGS)" \
 		SITE_DEFS="$(SITE_DEFS)" \
 		CC="$(CC)" tables
 
 lint:
-	$(LINT) $(LINTOPTS) $(CPPOPTS) *.c  > ../lint.out
+	$(LINT) $(LINTOPTS) $(CPP_OPTS) *.c  > ../lint.out
 
 clean:
 	rm -f lynx core *.[ob] *.bak
@@ -133,6 +137,6 @@ UCAux.o : UCAux.c $(CMN)UCAux.h $(CMN)UCDefs.h
 LYCookie.o: ../userdefs.h
 
 depend :
-	makedepend -fmakefile -- $(CFLAGS) -- $(C_SRC)
+	makedepend -fmakefile -- $(CC_OPTS) -- $(C_SRC)
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.