Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/less/dist Resolve conflicts from last import.
details: https://anonhg.NetBSD.org/src/rev/6d960423501f
branches: trunk
changeset: 789716:6d960423501f
user: tron <tron%NetBSD.org@localhost>
date: Wed Sep 04 19:44:21 2013 +0000
description:
Resolve conflicts from last import.
diffstat:
external/bsd/less/dist/brac.c | 7 +-
external/bsd/less/dist/ch.c | 20 +++-
external/bsd/less/dist/charset.c | 7 +-
external/bsd/less/dist/charset.h | 7 +-
external/bsd/less/dist/cmd.h | 12 +-
external/bsd/less/dist/cmdbuf.c | 77 +++++++++++----
external/bsd/less/dist/command.c | 77 +++++++++++-----
external/bsd/less/dist/cvt.c | 32 ++----
external/bsd/less/dist/decode.c | 8 +-
external/bsd/less/dist/defines.h | 26 +++--
external/bsd/less/dist/edit.c | 11 +-
external/bsd/less/dist/filename.c | 55 ++++++++++-
external/bsd/less/dist/forwback.c | 7 +-
external/bsd/less/dist/funcs.h | 3 +-
external/bsd/less/dist/help.c | 29 ++---
external/bsd/less/dist/ifile.c | 7 +-
external/bsd/less/dist/input.c | 9 +-
external/bsd/less/dist/jump.c | 7 +-
external/bsd/less/dist/less.1 | 82 +++++++++++++----
external/bsd/less/dist/less.h | 10 +-
external/bsd/less/dist/lessecho.c | 9 +-
external/bsd/less/dist/lesskey.c | 10 +-
external/bsd/less/dist/lesskey.h | 7 +-
external/bsd/less/dist/lglob.h | 7 +-
external/bsd/less/dist/line.c | 13 +-
external/bsd/less/dist/linenum.c | 7 +-
external/bsd/less/dist/lsystem.c | 7 +-
external/bsd/less/dist/main.c | 8 +-
external/bsd/less/dist/mark.c | 7 +-
external/bsd/less/dist/mkhelp.c | 7 +-
external/bsd/less/dist/optfunc.c | 32 +++++-
external/bsd/less/dist/option.c | 57 ++++++-----
external/bsd/less/dist/option.h | 7 +-
external/bsd/less/dist/opttbl.c | 17 ++-
external/bsd/less/dist/os.c | 7 +-
external/bsd/less/dist/output.c | 33 ++++--
external/bsd/less/dist/pattern.c | 178 +++++++++++++++++++++++--------------
external/bsd/less/dist/pattern.h | 18 ++-
external/bsd/less/dist/pckeys.h | 7 +-
external/bsd/less/dist/position.c | 9 +-
external/bsd/less/dist/position.h | 7 +-
external/bsd/less/dist/prompt.c | 19 +--
external/bsd/less/dist/regexp.c | 2 +-
external/bsd/less/dist/regexp.h | 2 +-
external/bsd/less/dist/screen.c | 11 +-
external/bsd/less/dist/scrsize.c | 7 +-
external/bsd/less/dist/search.c | 83 +++++++++++++----
external/bsd/less/dist/signal.c | 7 +-
external/bsd/less/dist/tags.c | 7 +-
external/bsd/less/dist/ttyin.c | 7 +-
external/bsd/less/dist/version.c | 31 +++++-
51 files changed, 713 insertions(+), 410 deletions(-)
diffs (truncated from 2559 to 300 lines):
diff -r a9736cc6345a -r 6d960423501f external/bsd/less/dist/brac.c
--- a/external/bsd/less/dist/brac.c Wed Sep 04 19:35:02 2013 +0000
+++ b/external/bsd/less/dist/brac.c Wed Sep 04 19:44:21 2013 +0000
@@ -1,13 +1,12 @@
-/* $NetBSD: brac.c,v 1.3 2011/07/03 20:14:12 tron Exp $ */
+/* $NetBSD: brac.c,v 1.4 2013/09/04 19:44:21 tron Exp $ */
/*
- * Copyright (C) 1984-2011 Mark Nudelman
+ * Copyright (C) 1984-2012 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
*
- * For more information about less, or for information on how to
- * contact the author, see the README file.
+ * For more information, see the README file.
*/
diff -r a9736cc6345a -r 6d960423501f external/bsd/less/dist/ch.c
--- a/external/bsd/less/dist/ch.c Wed Sep 04 19:35:02 2013 +0000
+++ b/external/bsd/less/dist/ch.c Wed Sep 04 19:44:21 2013 +0000
@@ -1,13 +1,12 @@
-/* $NetBSD: ch.c,v 1.3 2011/07/03 20:14:12 tron Exp $ */
+/* $NetBSD: ch.c,v 1.4 2013/09/04 19:44:21 tron Exp $ */
/*
- * Copyright (C) 1984-2011 Mark Nudelman
+ * Copyright (C) 1984-2012 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
*
- * For more information about less, or for information on how to
- * contact the author, see the README file.
+ * For more information, see the README file.
*/
@@ -586,6 +585,8 @@
return (NULL_POSITION);
if (ch_flags & CH_HELPFILE)
return (size_helpdata);
+ if (ch_flags & CH_NODATA)
+ return (0);
return (ch_fsize);
}
@@ -810,6 +811,17 @@
}
/*
+ * Force EOF to be at the current read position.
+ * This is used after an ignore_eof read, during which the EOF may change.
+ */
+ public void
+ch_set_eof()
+{
+ ch_fsize = ch_fpos;
+}
+
+
+/*
* Initialize file state for a new file.
*/
public void
diff -r a9736cc6345a -r 6d960423501f external/bsd/less/dist/charset.c
--- a/external/bsd/less/dist/charset.c Wed Sep 04 19:35:02 2013 +0000
+++ b/external/bsd/less/dist/charset.c Wed Sep 04 19:44:21 2013 +0000
@@ -1,13 +1,12 @@
-/* $NetBSD: charset.c,v 1.3 2011/07/03 20:14:12 tron Exp $ */
+/* $NetBSD: charset.c,v 1.4 2013/09/04 19:44:21 tron Exp $ */
/*
- * Copyright (C) 1984-2011 Mark Nudelman
+ * Copyright (C) 1984-2012 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
*
- * For more information about less, or for information on how to
- * contact the author, see the README file.
+ * For more information, see the README file.
*/
diff -r a9736cc6345a -r 6d960423501f external/bsd/less/dist/charset.h
--- a/external/bsd/less/dist/charset.h Wed Sep 04 19:35:02 2013 +0000
+++ b/external/bsd/less/dist/charset.h Wed Sep 04 19:44:21 2013 +0000
@@ -1,13 +1,12 @@
-/* $NetBSD: charset.h,v 1.2 2011/07/03 19:51:26 tron Exp $ */
+/* $NetBSD: charset.h,v 1.3 2013/09/04 19:44:21 tron Exp $ */
/*
- * Copyright (C) 2005-2011 Mark Nudelman
+ * Copyright (C) 1984-2012 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
*
- * For more information about less, or for information on how to
- * contact the author, see the README file.
+ * For more information, see the README file.
*/
#define IS_ASCII_OCTET(c) (((c) & 0x80) == 0)
diff -r a9736cc6345a -r 6d960423501f external/bsd/less/dist/cmd.h
--- a/external/bsd/less/dist/cmd.h Wed Sep 04 19:35:02 2013 +0000
+++ b/external/bsd/less/dist/cmd.h Wed Sep 04 19:44:21 2013 +0000
@@ -1,17 +1,16 @@
-/* $NetBSD: cmd.h,v 1.2 2011/07/03 19:51:26 tron Exp $ */
+/* $NetBSD: cmd.h,v 1.3 2013/09/04 19:44:21 tron Exp $ */
/*
- * Copyright (C) 1984-2011 Mark Nudelman
+ * Copyright (C) 1984-2012 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
*
- * For more information about less, or for information on how to
- * contact the author, see the README file.
+ * For more information, see the README file.
*/
-#define MAX_USERCMD 500
+#define MAX_USERCMD 1000
#define MAX_CMDLEN 16
#define A_B_LINE 2
@@ -68,6 +67,7 @@
#define A_NEXT_TAG 53
#define A_PREV_TAG 54
#define A_FILTER 55
+#define A_F_UNTIL_HILITE 56
#define A_INVALID 100
#define A_NOACTION 101
@@ -80,7 +80,7 @@
#define A_EXTRA 0200
-/* Line editting characters */
+/* Line editing characters */
#define EC_BACKSPACE 1
#define EC_LINEKILL 2
diff -r a9736cc6345a -r 6d960423501f external/bsd/less/dist/cmdbuf.c
--- a/external/bsd/less/dist/cmdbuf.c Wed Sep 04 19:35:02 2013 +0000
+++ b/external/bsd/less/dist/cmdbuf.c Wed Sep 04 19:44:21 2013 +0000
@@ -1,13 +1,12 @@
-/* $NetBSD: cmdbuf.c,v 1.3 2011/07/03 20:14:12 tron Exp $ */
+/* $NetBSD: cmdbuf.c,v 1.4 2013/09/04 19:44:21 tron Exp $ */
/*
- * Copyright (C) 1984-2011 Mark Nudelman
+ * Copyright (C) 1984-2012 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
*
- * For more information about less, or for information on how to
- * contact the author, see the README file.
+ * For more information, see the README file.
*/
@@ -35,6 +34,7 @@
static char *cp; /* Pointer into cmdbuf */
static int cmd_offset; /* Index into cmdbuf of first displayed char */
static int literal; /* Next input char should not be interpreted */
+static int updown_match = -1; /* Prefix length in up/down movement */
#if TAB_COMPLETE_FILENAME
static int cmd_complete __P((int));
@@ -143,6 +143,7 @@
cmd_offset = 0;
literal = 0;
cmd_mbc_buf_len = 0;
+ updown_match = -1;
}
/*
@@ -153,6 +154,7 @@
{
cmd_col = prompt_col = 0;
cmd_mbc_buf_len = 0;
+ updown_match = -1;
}
/*
@@ -525,6 +527,7 @@
/*
* Reprint the tail of the line from the inserted char.
*/
+ updown_match = -1;
cmd_repaint(cp);
cmd_right();
return (CC_OK);
@@ -568,6 +571,7 @@
/*
* Repaint the buffer after the erased char.
*/
+ updown_match = -1;
cmd_repaint(cp);
/*
@@ -664,6 +668,7 @@
cmd_offset = 0;
cmd_home();
*cp = '\0';
+ updown_match = -1;
cmd_repaint(cp);
/*
@@ -696,12 +701,15 @@
#if CMD_HISTORY
/*
* Move up or down in the currently selected command history list.
+ * Only consider entries whose first updown_match chars are equal to
+ * cmdbuf's corresponding chars.
*/
static int
cmd_updown(action)
int action;
{
char *s;
+ struct mlist *ml;
if (curr_mlist == NULL)
{
@@ -711,24 +719,47 @@
bell();
return (CC_OK);
}
- cmd_home();
- clear_eol();
+
+ if (updown_match < 0)
+ {
+ updown_match = cp - cmdbuf;
+ }
+
/*
- * Move curr_mp to the next/prev entry.
+ * Find the next history entry which matches.
*/
- if (action == EC_UP)
- curr_mlist->curr_mp = curr_mlist->curr_mp->prev;
- else
- curr_mlist->curr_mp = curr_mlist->curr_mp->next;
+ for (ml = curr_mlist->curr_mp;;)
+ {
+ ml = (action == EC_UP) ? ml->prev : ml->next;
+ if (ml == curr_mlist)
+ {
+ /*
+ * We reached the end (or beginning) of the list.
+ */
+ break;
+ }
+ if (strncmp(cmdbuf, ml->string, updown_match) == 0)
+ {
+ /*
+ * This entry matches; stop here.
+ * Copy the entry into cmdbuf and echo it on the screen.
+ */
+ curr_mlist->curr_mp = ml;
+ s = ml->string;
+ if (s == NULL)
+ s = "";
+ cmd_home();
+ clear_eol();
+ strcpy(cmdbuf, s);
+ for (cp = cmdbuf; *cp != '\0'; )
+ cmd_right();
+ return (CC_OK);
+ }
+ }
/*
- * Copy the entry into cmdbuf and echo it on the screen.
+ * We didn't find a history entry that matches.
*/
- s = curr_mlist->curr_mp->string;
- if (s == NULL)
- s = "";
- strcpy(cmdbuf, s);
- for (cp = cmdbuf; *cp != '\0'; )
- cmd_right();
+ bell();
return (CC_OK);
}
#endif
@@ -1077,7 +1108,11 @@
tk_text = fcomplete(word);
} else
{
+#if MSDOS_COMPILER
Home |
Main Index |
Thread Index |
Old Index