about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/LYMainLoop.c6
-rw-r--r--src/LYPrettySrc.c21
-rw-r--r--src/descrip.mms15
-rw-r--r--src/makefile.in4
4 files changed, 27 insertions, 19 deletions
diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c
index 9f40df98..bfe07c5f 100644
--- a/src/LYMainLoop.c
+++ b/src/LYMainLoop.c
@@ -2301,7 +2301,8 @@ PRIVATE int handle_LYK_DWIMEDIT ARGS3(
      *  contents, rather than attempting to edit the html source
      *  document.  KED
      */
-    if (links[curdoc.link].type       == WWW_FORM_LINK_TYPE &&
+    if (nlinks > 0  && 
+	links[curdoc.link].type       == WWW_FORM_LINK_TYPE &&
 	links[curdoc.link].form->type == F_TEXTAREA_TYPE)   {
 	*cmd = LYK_EDIT_TEXTAREA;
 	return 2;
@@ -2318,7 +2319,8 @@ PRIVATE int handle_LYK_DWIMEDIT ARGS3(
      *   auto invocation of the editor on the TEXTAREA's contents
      *   via the above if() statement.]
      */
-    if (links[curdoc.link].type       == WWW_FORM_LINK_TYPE &&
+    if (nlinks > 0 &&
+	links[curdoc.link].type       == WWW_FORM_LINK_TYPE &&
 	links[curdoc.link].form->type == F_TEXT_TYPE)       {
 	HTUserMsg (CANNOT_EDIT_FIELD);
 	return 1;
diff --git a/src/LYPrettySrc.c b/src/LYPrettySrc.c
index 73146629..3f3ca1aa 100644
--- a/src/LYPrettySrc.c
+++ b/src/LYPrettySrc.c
@@ -6,6 +6,7 @@
 #include <LYHash.h>
 #include <LYPrettySrc.h>
 #include <LYStrings.h>
+#include <LYLeaks.h>
 
  /* This file creates too many "leak detected" entries in Lynx.leaks. */
 #define NO_MEMORY_TRACKING
@@ -87,7 +88,7 @@ typedef enum _html_src_check_state
 PRIVATE void append_close_tag ARGS3(
 	    char*,	  tagname,
 	    HT_tagspec**, head,
-	    HT_tagspec**,  tail)
+	    HT_tagspec**, tail)
 {
     int idx, nattr;
     HTTag* tag;
@@ -103,10 +104,10 @@ PRIVATE void append_close_tag ARGS3(
 	exit_immediately(-1);
     }
 
-    subj = (HT_tagspec*) calloc( sizeof(*subj), 1);
+    subj = typecalloc(HT_tagspec);
     subj->element = idx;
-    subj->present = (BOOL*)calloc( nattr*sizeof (BOOL), 1);
-    subj->value = (char**)calloc( nattr*sizeof (char*), 1);
+    subj->present = typecallocn(BOOL, nattr);
+    subj->value = typecallocn(char *, nattr);
     subj->start = FALSE;
 #ifdef USE_COLOR_STYLE
     subj->class_name = NULL;
@@ -125,7 +126,7 @@ PRIVATE void append_open_tag ARGS4(
 	    char*,	  tagname,
 	    char*,	  classname GCC_UNUSED,
 	    HT_tagspec**, head,
-	    HT_tagspec**,  tail)
+	    HT_tagspec**, tail)
 {
     HT_tagspec* subj;
     HTTag* tag;
@@ -137,7 +138,7 @@ PRIVATE void append_open_tag ARGS4(
     subj = *tail;
     subj->start = TRUE;
 
-    tag = HTML_dtd.tags+subj->element;
+    tag = HTML_dtd.tags + subj->element;
 
 #ifdef USE_COLOR_STYLE
     hcode = hash_code_lowercase_on_fly(tagname);
@@ -180,7 +181,7 @@ PUBLIC int html_src_parse_tagspec ARGS4(
     char stop = FALSE, after_excl = FALSE;
     html_src_check_state state = HTSRC_CK_normal;
     HT_tagspec* head = NULL, *tail = NULL;
-    HT_tagspec** slot = ( isstart ? lexeme_start : lexeme_end ) +lexeme;
+    HT_tagspec** slot = ( isstart ? lexeme_start : lexeme_end ) + lexeme;
 
     while (!stop) {
 	switch (state) {
@@ -289,10 +290,14 @@ PUBLIC void html_src_clean_item ARGS1(
 	HTlexeme, l)
 {
     int i;
+
     if (HTL_tagspecs[l])
 	FREE(HTL_tagspecs[l]);
     for(i = 0; i < 2; ++i) {
-	HT_tagspec* cur,** pts = ( i ? lexeme_start : lexeme_end)+l,*ts = *pts;
+	HT_tagspec*	cur;
+	HT_tagspec**	pts = ( i ?  lexeme_start :  lexeme_end) + l;
+	HT_tagspec*	ts = *pts;
+
 	*pts = NULL;
 	while (ts) {
 	    FREE(ts->present);
diff --git a/src/descrip.mms b/src/descrip.mms
index be7aef30..2f8def50 100644
--- a/src/descrip.mms
+++ b/src/descrip.mms
@@ -5,7 +5,7 @@
 !	       chrtrans header files before using this descrip.mms.
 !
 ! History:
-!  1/1/93  creation at KU (Lou montulli@ukanaix.cc.ukans.edu). 
+!  1/1/93  creation at KU (Lou montulli@ukanaix.cc.ukans.edu).
 !  4/12/93 (seb@lns61.tn.cornell.edu)
 !           modified to support either UCX or MULTINET
 !  12/2/93 modified to support Lynx rewrite
@@ -54,15 +54,16 @@
 !	$ MMS /Macro = (TCPWARE=1, GNU_C=1)	for GNUC - OpenCMU TCP/IP
 !	$ MMS /Macro = (DECNET=1, GNU_C=1)	for GNUC - socket emulation over DECnet
 
-OBJS = 	DefaultStyle.obj, GridText.obj, HTAlert.obj, HTFWriter.obj, -
+OBJS =	DefaultStyle.obj, GridText.obj, HTAlert.obj, HTFWriter.obj, -
 	HTInit.obj, HTML.obj, LYBookmark.obj, LYCgi.obj, LYCharSets.obj, -
 	LYCharUtils.obj, LYClean.obj, LYCookie.obj, LYCurses.obj, -
-	LYDownload.obj, LYEdit.obj, LYEditmap.obj, LYexit.obj, LYForms.obj, -
-	LYGetFile.obj, LYHistory.obj, LYJump.obj, LYKeymap.obj, LYLeaks.obj, -
-	LYList.obj, LYMail.obj, LYMain.obj, LYMainLoop.obj, LYMap.obj, -
-	LYNews.obj, LYOptions.obj, LYPrint.obj, LYrcFile.obj, LYReadCFG.obj, -
+	LYDownload.obj, LYEdit.obj, LYEditmap.obj, LYForms.obj, -
+	LYGetFile.obj, LYHistory.obj, LYJump.obj, LYKeymap.obj, -
+	LYLeaks.obj, LYList.obj, LYMail.obj, LYMain.obj, LYMainLoop.obj, -
+	LYMap.obj, LYNews.obj, LYOptions.obj, LYPrint.obj, LYReadCFG.obj, -
 	LYSearch.obj, LYShowInfo.obj, LYStrings.obj, LYTraversal.obj, -
-	LYUpload.obj, LYUtils.obj, UCAuto.obj, UCAux.obj, UCdomap.obj
+	LYUpload.obj, LYUtils.obj, LYexit.obj, LYrcFile.obj, TRSTable.obj, -
+	UCAuto.obj, UCAux.obj, UCdomap.obj
 
 .ifdef WIN_TCP
 TCP = WIN_TCP
diff --git a/src/makefile.in b/src/makefile.in
index 53ea0b33..ca4055b9 100644
--- a/src/makefile.in
+++ b/src/makefile.in
@@ -64,9 +64,9 @@ LYMail.o HTAlert.o GridText.o LYGetFile.o \
 LYMain.o LYMainLoop.o LYCurses.o LYBookmark.o LYUtils.o \
 LYOptions.o LYReadCFG.o LYSearch.o LYHistory.o \
 LYForms.o LYPrint.o LYrcFile.o LYDownload.o LYNews.o LYKeymap.o \
-HTML.o HTFWriter.o HTInit.o DefaultStyle.o LYLocal.o LYUpload.o \
+HTML.o HTFWriter.o HTInit.o DefaultStyle.o LYUpload.o \
 LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \
-LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o \
+LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o \
 LYStyle.o LYHash.o LYPrettySrc.o TRSTable.o $(CHARTRANS_OBJS) @LIBOBJS@
 
 C_SRC	= $(OBJS:.o=.c)