about summary refs log tree commit diff stats
path: root/src/LYStrings.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2001-08-15 22:23:14 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2001-08-15 22:23:14 -0400
commitfc99820d832c512631aa418520f5bc6a204e8b91 (patch)
tree6822b3a150ca0ef4e7f9bc3dc2d3dc95d63dc7ca /src/LYStrings.c
parent864412f0359169368927737c2908ff357ea343a0 (diff)
downloadlynx-snapshots-fc99820d832c512631aa418520f5bc6a204e8b91.tar.gz
snapshot of project "lynx", label v2-8-5dev_2
Diffstat (limited to 'src/LYStrings.c')
-rw-r--r--src/LYStrings.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/LYStrings.c b/src/LYStrings.c
index 3f4b9d1b..9960f626 100644
--- a/src/LYStrings.c
+++ b/src/LYStrings.c
@@ -703,7 +703,7 @@ PUBLIC int LYmbcsstrlen ARGS3(
 #define GetChar() wgetch(my_subwindow ? my_subwindow : LYwin)
 #endif
 
-#if !defined(GetChar) && defined(PDCURSES)
+#if !defined(GetChar) && defined(PDCURSES) && defined(PDC_BUILD) && PDC_BUILD >= 2401
 /* PDCurses sends back key-modifiers that we don't use, but would waste time
  * upon, e.g., repainting the status line
  */
@@ -2541,6 +2541,18 @@ PUBLIC void LYTrimLeading ARGS1(
 }
 
 /*
+ * Trim trailing newline(s) from a string
+ */
+PUBLIC char * LYTrimNewline ARGS1(
+	char *,		buffer)
+{
+    size_t i = strlen(buffer);
+    while (i != 0 && buffer[i-1] == '\n')
+	buffer[--i] = 0;
+    return buffer;
+}
+
+/*
  * Trim trailing blanks from a string
  */
 PUBLIC void LYTrimTrailing ARGS1(
@@ -4761,13 +4773,8 @@ again:
 		    while (cur_choice < num_options
 		     && strcasecomp(data[cur_choice], MyEdit.buffer) < 0)
 			cur_choice++;
-#ifdef USE_SLANG
-		    old_y = SLsmg_get_row();
-		    old_x = SLsmg_get_column();
-#else
-		    getyx(LYwin, old_y, old_x);
-#endif
 
+		    LYGetYX(old_y, old_x);
 		    cur_choice = LYhandlePopupList(
 			cur_choice,
 			0,
@@ -4783,11 +4790,7 @@ again:
 			    _statusline(": ");
 			reinsertEdit(&MyEdit, data[cur_choice]);
 		    }
-#ifdef USE_SLANG
-		    SLsmg_gotorc(old_y, old_x);
-#else
 		    wmove(LYwin, old_y, old_x);
-#endif
 		    FREE(data);
 		}
 	    } else {