about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/GridText.c11
-rw-r--r--src/HTML.c9
-rw-r--r--src/LYKeymap.c13
-rw-r--r--src/LYMain.c9
-rw-r--r--src/LYMainLoop.c3
-rw-r--r--src/UCdomap.c6
6 files changed, 34 insertions, 17 deletions
diff --git a/src/GridText.c b/src/GridText.c
index 4aa200f3..489c5ce8 100644
--- a/src/GridText.c
+++ b/src/GridText.c
@@ -1,4 +1,7 @@
-/*		Character grid hypertext object
+/*
+ * $LynxId: GridText.c,v 1.140 2007/05/13 20:42:37 Takeshi.Hataguchi Exp $
+ *
+ *		Character grid hypertext object
  *		===============================
  */
 
@@ -1709,14 +1712,14 @@ static void display_title(HText *text)
 	sprintf(percent, " (l%d of %d)",
 		text->top_of_screen, text->Lines);
     } else if ((text->Lines >= display_lines) && (display_lines > 0)) {
-	int total_pages = ((text->Lines + display_lines - 1)
+	int total_pages = ((text->Lines + display_lines)
 			   / display_lines);
 	int start_of_last_page = ((text->Lines <= display_lines)
 				  ? 0
 				  : (text->Lines - display_lines));
 
 	sprintf(percent, " (p%d of %d)",
-		((text->top_of_screen >= start_of_last_page)
+		((text->top_of_screen > start_of_last_page)
 		 ? total_pages
 		 : ((text->top_of_screen + display_lines) / (display_lines))),
 		total_pages);
@@ -7290,7 +7293,7 @@ BOOL HText_canScrollDown(void)
     HText *text = HTMainText;
 
     return (BOOL) ((text != 0)
-		   && ((text->top_of_screen + display_lines) < text->Lines));
+		   && ((text->top_of_screen + display_lines) <= text->Lines));
 }
 
 /*		Scroll actions
diff --git a/src/HTML.c b/src/HTML.c
index 80112b9d..962993e1 100644
--- a/src/HTML.c
+++ b/src/HTML.c
@@ -1,4 +1,7 @@
-/*		Structured stream to Rich hypertext converter
+/*
+ * $LynxId: HTML.c,v 1.112 2007/05/10 00:20:31 tom Exp $
+ *
+ *		Structured stream to Rich hypertext converter
  *		============================================
  *
  *	This generates a hypertext object.  It converts from the
@@ -5726,7 +5729,7 @@ static int HTML_end_element(HTStructured * me, int element_number,
 	     element_number == HTML_H2 ||
 	     element_number == HTML_H3 ||
 	     element_number == HTML_H4 ||
-	     element_number == HTML_H6 ||
+	     element_number == HTML_H5 ||
 	     element_number == HTML_H6)) {
 	    /*
 	     * Set the break flag if we're popping a dummy HTML_LH substituted
@@ -5792,7 +5795,7 @@ static int HTML_end_element(HTStructured * me, int element_number,
 		    element_number == HTML_H2 ||
 		    element_number == HTML_H3 ||
 		    element_number == HTML_H4 ||
-		    element_number == HTML_H6 ||
+		    element_number == HTML_H5 ||
 		    element_number == HTML_H6)) {
 	    /*
 	     * It's an H# for which we substituted an HTML_LH, which we've
diff --git a/src/LYKeymap.c b/src/LYKeymap.c
index 4cb45b8d..c948e859 100644
--- a/src/LYKeymap.c
+++ b/src/LYKeymap.c
@@ -1,3 +1,4 @@
+/* $LynxId: LYKeymap.c,v 1.64 2007/05/13 15:34:50 Thorsten.Glaser Exp $ */
 #include <HTUtils.h>
 #include <LYUtils.h>
 #include <LYGlobalDefs.h>
@@ -72,14 +73,8 @@ LYK_ABORT,          LYK_END,        LYK_NEXT_PAGE,     0,
 LYK_HISTORY,    LYK_FASTFORW_LINK,  LYK_ACTIVATE,  LYK_COOKIE_JAR,
 /* bs */            /* ht */        /* nl */       /* ^K */
 
-#ifdef KANJI_CODE_OVERRIDE
-LYK_CHG_KCODE,    LYK_ACTIVATE,     LYK_DOWN_TWO,      0,
-/* ^L */            /* cr */        /* ^N */       /* ^O */
-
-#else
 LYK_REFRESH,      LYK_ACTIVATE,     LYK_DOWN_TWO,      0,
 /* ^L */            /* cr */        /* ^N */       /* ^O */
-#endif
 
 LYK_UP_TWO,       LYK_CHG_CENTER,   LYK_RELOAD,    LYK_TO_CLIPBOARD,
 /* ^P */            /* XON */       /* ^R */       /* ^S */
@@ -128,8 +123,14 @@ LYK_RAW_TOGGLE,      LYK_ADDRLIST, LYK_PREV_PAGE,   LYK_CHDIR,
 LYK_DOWNLOAD,        LYK_ELGOTO,  LYK_DIRED_MENU,   LYK_ECGOTO,
 /* D */              /* E */         /* F */        /* G */
 
+#ifdef KANJI_CODE_OVERRIDE
+LYK_HELP,            LYK_INDEX,      LYK_CHG_KCODE, LYK_KEYMAP,
+/* H */              /* I */         /* J */        /* K */
+
+#else
 LYK_HELP,            LYK_INDEX,      LYK_JUMP,      LYK_KEYMAP,
 /* H */              /* I */         /* J */        /* K */
+#endif
 
 LYK_LIST,          LYK_MAIN_MENU,    LYK_PREV,      LYK_OPTIONS,
 /* L */              /* M */         /* N */        /* O */
diff --git a/src/LYMain.c b/src/LYMain.c
index bcacb611..53d2fbd4 100644
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYMain.c,v 1.170 2007/05/06 21:36:43 tom Exp $ */
+/* $LynxId: LYMain.c,v 1.171 2007/05/13 22:45:47 Chuck.Houpt Exp $ */
 #include <HTUtils.h>
 #include <HTTP.h>
 #include <HTParse.h>
@@ -1721,6 +1721,13 @@ int main(int argc,
 #endif
 
     /*
+     * Check for a help file URL in the environment. Overiding
+     * compiled-in default and configuration file setting, if found.
+     */
+    if ((cp = LYGetEnv("LYNX_HELPFILE")) != NULL)
+	StrAllocCopy(helpfile, cp);
+
+    /*
      * Set up our help and about file base paths. - FM
      */
     StrAllocCopy(helpfilepath, helpfile);
diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c
index 38440fda..95e16bdd 100644
--- a/src/LYMainLoop.c
+++ b/src/LYMainLoop.c
@@ -1,3 +1,4 @@
+/* $LynxId: LYMainLoop.c,v 1.146 2007/05/13 16:16:30 tom Exp $ */
 #include <HTUtils.h>
 #include <HTAccess.h>
 #include <HTParse.h>
@@ -6991,7 +6992,7 @@ int mainloop(void)
 #endif
 
 #ifdef KANJI_CODE_OVERRIDE
-	case LYK_CHG_KCODE:	/* ^L */
+	case LYK_CHG_KCODE:
 	    if (LYRawMode && (HTCJK == JAPANESE)) {
 		switch (last_kcode) {
 		case NOKANJI:
diff --git a/src/UCdomap.c b/src/UCdomap.c
index 452a0a09..20a47059 100644
--- a/src/UCdomap.c
+++ b/src/UCdomap.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: UCdomap.c,v 1.64 2007/05/06 18:20:48 tom Exp $
+ * $LynxId: UCdomap.c,v 1.65 2007/05/13 16:09:19 Thorsten.Glaser Exp $
  *
  *  UCdomap.c
  *  =========
@@ -954,6 +954,8 @@ int UCTransUniCharStr(char *outbuf,
 	    HTSprintf0(&tocode, "%s//TRANSLIT", LYCharSet_UC[charset_out].MIMEname);
 	    cd = iconv_open(tocode, "UTF-16BE");
 	    FREE(tocode);
+	    if (cd == (iconv_t) - 1)
+		cd = iconv_open(LYCharSet_UC[charset_out].MIMEname, "UTF-16BE");
 	    rc = iconv(cd, &pin, &inleft, &pout, &outleft);
 	    iconv_close(cd);
 	    if ((pout - outbuf) == 3) {
@@ -1596,7 +1598,7 @@ int UCGetLYhndl_byMIME(const char *value)
  * "old method".  Maybe not nice (maybe not even necessary any more), but it
  * works (as far as it goes..).
  *
- * We try to be conservative and only allocate new memory for this if needed. 
+ * We try to be conservative and only allocate new memory for this if needed.
  * If not needed, just point to SevenBitApproximations[i].  [Could do the same
  * for ISO_Latin1[] if it's identical to that, but would make it even *more*
  * messy than it already is...] This the only function in this file that knows,