The NetBSD Project

CVS log for src/lib/libedit/readline.c

[BACK] Up to [cvs.NetBSD.org] / src / lib / libedit

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.181 / (download) - annotate - [select for diffs], Tue Apr 25 17:51:32 2023 UTC (10 months, 3 weeks ago) by christos
Branch: MAIN
CVS Tags: triaxx-drm, HEAD
Changes since 1.180: +5 -3 lines
Diff to previous 1.180 (colored) to selected 1.144 (colored)

pass lint.

Revision 1.180 / (download) - annotate - [select for diffs], Mon Apr 24 20:02:53 2023 UTC (10 months, 3 weeks ago) by christos
Branch: MAIN
Changes since 1.179: +4 -4 lines
Diff to previous 1.179 (colored) to selected 1.144 (colored)

PR/57376: Jorge Giner: readline file completion does not quote; do the same.

Revision 1.179 / (download) - annotate - [select for diffs], Fri Apr 21 14:56:13 2023 UTC (10 months, 4 weeks ago) by christos
Branch: MAIN
Changes since 1.178: +7 -7 lines
Diff to previous 1.178 (colored) to selected 1.144 (colored)

Align types with readline-8.2 (wiz@)

Revision 1.178 / (download) - annotate - [select for diffs], Fri Dec 2 19:23:15 2022 UTC (15 months, 2 weeks ago) by christos
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.177: +3 -3 lines
Diff to previous 1.177 (colored) to selected 1.144 (colored)

PR/57095: Yilei Yang: Change readline's replace_history_entry to not make a copy
of the string to replace since H_REPLACE already makes a copy (fixes memory leak)

Revision 1.177 / (download) - annotate - [select for diffs], Sun Oct 30 19:11:31 2022 UTC (16 months, 2 weeks ago) by christos
Branch: MAIN
Changes since 1.176: +5 -3 lines
Diff to previous 1.176 (colored) to selected 1.144 (colored)

improvements in malloc/free handling.

Revision 1.176 / (download) - annotate - [select for diffs], Wed Sep 21 01:33:53 2022 UTC (17 months, 3 weeks ago) by christos
Branch: MAIN
Changes since 1.175: +4 -2 lines
Diff to previous 1.175 (colored) to selected 1.144 (colored)

PR/57016: Ricky Zhou: declare lastidx

Revision 1.175 / (download) - annotate - [select for diffs], Tue Sep 20 23:41:14 2022 UTC (17 months, 4 weeks ago) by christos
Branch: MAIN
Changes since 1.174: +5 -3 lines
Diff to previous 1.174 (colored) to selected 1.144 (colored)

PR/57016: Ricky Zhou: Revert to trimming the last newline instead of the
first one so that multi-line commands work again.

Revision 1.174 / (download) - annotate - [select for diffs], Fri Apr 8 20:11:31 2022 UTC (23 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.173: +8 -3 lines
Diff to previous 1.173 (colored) to selected 1.144 (colored)

PR/56778: Detlev Casanova: Missing rl_initialize call in rl_copy_text

Revision 1.173 / (download) - annotate - [select for diffs], Sat Feb 19 17:45:02 2022 UTC (2 years ago) by christos
Branch: MAIN
Changes since 1.172: +7 -7 lines
Diff to previous 1.172 (colored) to selected 1.144 (colored)

PR/56695: Walter Lozano: Correct declaration of hook functions.

Revision 1.172 / (download) - annotate - [select for diffs], Tue Feb 8 15:05:10 2022 UTC (2 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.171: +20 -2 lines
Diff to previous 1.171 (colored) to selected 1.144 (colored)

PR/56693: Walter Lozano: Add support for rl_delete_text and rl_set_key

Revision 1.171 / (download) - annotate - [select for diffs], Mon Jan 31 14:44:49 2022 UTC (2 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.170: +6 -3 lines
Diff to previous 1.170 (colored) to selected 1.144 (colored)

PR/56622: Walter Lozano: Improve readline compatibility by adding
rl_readline_state support.

Revision 1.170 / (download) - annotate - [select for diffs], Sat Jan 29 20:52:45 2022 UTC (2 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.169: +5 -3 lines
Diff to previous 1.169 (colored) to selected 1.144 (colored)

Add more refreshes from Walter Lozano. The readline example in
http://www.mcld.co.uk/blog/2009/simple-gnu-readline-callback-style-example.html
still does not work, but it is better.

Revision 1.169 / (download) - annotate - [select for diffs], Tue Jan 11 18:30:15 2022 UTC (2 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.168: +70 -2 lines
Diff to previous 1.168 (colored) to selected 1.144 (colored)

PR/56618: Walter Lozano: Improve libedit compatibility with readline by
implementing:

    rl_copy_text, rl_erase_empty_line, rl_message, rl_on_new_line,
    rl_replace_line, rl_restore_prompt, rl_save_prompt

Revision 1.168 / (download) - annotate - [select for diffs], Fri Sep 10 18:51:36 2021 UTC (2 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.167: +8 -7 lines
Diff to previous 1.167 (colored) to selected 1.144 (colored)

libedit: fix indentation

No change to the resulting object files.

Revision 1.167 / (download) - annotate - [select for diffs], Fri Sep 10 13:29:06 2021 UTC (2 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.166: +3 -5 lines
Diff to previous 1.166 (colored) to selected 1.144 (colored)

rl_startup_hook should be called each time. From Carlos Henrique Lima Melara

Revision 1.166 / (download) - annotate - [select for diffs], Thu Sep 9 20:25:30 2021 UTC (2 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.165: +23 -18 lines
Diff to previous 1.165 (colored) to selected 1.144 (colored)

fix memory issues found by fuzzing (double frees and buffer overflows)

Revision 1.165 / (download) - annotate - [select for diffs], Fri Sep 3 12:20:38 2021 UTC (2 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.164: +150 -118 lines
Diff to previous 1.164 (colored) to selected 1.144 (colored)

Try to refactor this in order to correct some of the memory issues
reported by Christian Holler.

Revision 1.164 / (download) - annotate - [select for diffs], Sat Aug 21 12:38:56 2021 UTC (2 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.163: +4 -5 lines
Diff to previous 1.163 (colored) to selected 1.144 (colored)

PR/56370: mirabilos: libedit change from 2017 kills history in gdb

Revision 1.163 / (download) - annotate - [select for diffs], Sat Aug 21 12:34:59 2021 UTC (2 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.162: +49 -2 lines
Diff to previous 1.162 (colored) to selected 1.144 (colored)

Add more api to make gdb-11 happy (but not gdbtui as usual)

Revision 1.162 / (download) - annotate - [select for diffs], Sun Aug 15 22:22:52 2021 UTC (2 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.161: +6 -9 lines
Diff to previous 1.161 (colored) to selected 1.144 (colored)

libedit: simplify calls to macro ADD_STRING

The lint comments CONSTCOND and LINTED were not necessary.  It is
simpler to just specify what to free.  GCC optimizes free(NULL) to be a
no-op.

No functional change.

Revision 1.161 / (download) - annotate - [select for diffs], Sun Aug 15 22:14:45 2021 UTC (2 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.160: +4 -5 lines
Diff to previous 1.160 (colored) to selected 1.144 (colored)

readline: fix lint warning about effective unconst cast

Calling strchr to avoid the syntactical unconst cast is not necessary
here.  A simple pointer assignment is enough.

No functional change.

Revision 1.160 / (download) - annotate - [select for diffs], Sun Aug 15 10:06:32 2021 UTC (2 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.159: +5 -3 lines
Diff to previous 1.159 (colored) to selected 1.144 (colored)

Add a LINTED comment... Why doesn't NOTREACHED work?

Revision 1.147.2.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:03:12 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.147.2.1: +18 -20 lines
Diff to previous 1.147.2.1 (colored) to branchpoint 1.147 (colored) next main 1.148 (colored) to selected 1.144 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.159 / (download) - annotate - [select for diffs], Wed Oct 9 14:31:07 2019 UTC (4 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.158: +6 -6 lines
Diff to previous 1.158 (colored) to selected 1.144 (colored)

add +1 to strlcpy's (Patrick Welche)

Revision 1.158 / (download) - annotate - [select for diffs], Tue Oct 8 19:17:57 2019 UTC (4 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.157: +7 -11 lines
Diff to previous 1.157 (colored) to selected 1.144 (colored)

Change strncpy to either memcpy (when we know the len), or strlcpy (when
we used to NUL terminate explicitly.

Revision 1.157 / (download) - annotate - [select for diffs], Wed Aug 21 11:11:48 2019 UTC (4 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.156: +5 -3 lines
Diff to previous 1.156 (colored) to selected 1.144 (colored)

Increment offset when adding an element to history to keep it aligned with
the last element entered (Sandy Li Changqing)

Revision 1.156 / (download) - annotate - [select for diffs], Tue Jul 23 10:18:52 2019 UTC (4 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Changes since 1.155: +10 -10 lines
Diff to previous 1.155 (colored) to selected 1.144 (colored)

PR/54399: Sen Tempel: Uninitialized memory access in libedit history.
Initialize the buffer using calloc. While here change all malloc(a * sizeof(b))
to calloc(a, sizeof(b)). XXX: should fix realloc similarly.

Revision 1.147.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:05:23 2019 UTC (4 years, 9 months ago) by christos
Branch: phil-wifi
Changes since 1.147: +41 -15 lines
Diff to previous 1.147 (colored) to selected 1.144 (colored)

Sync with HEAD

Revision 1.155 / (download) - annotate - [select for diffs], Fri Jun 7 15:21:48 2019 UTC (4 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-20190609
Changes since 1.154: +3 -2 lines
Diff to previous 1.154 (colored) to selected 1.144 (colored)

PR/54281: Jonathan Perkins: NUL terminate rl_line_buffer on modification
to avoid completion leak.

Revision 1.154 / (download) - annotate - [select for diffs], Fri Jun 7 15:19:29 2019 UTC (4 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.153: +3 -3 lines
Diff to previous 1.153 (colored) to selected 1.144 (colored)

PR/54280: rl_completer_quote_characters should be const for readline compat

Revision 1.153 / (download) - annotate - [select for diffs], Fri Jun 7 15:18:20 2019 UTC (4 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.152: +10 -4 lines
Diff to previous 1.152 (colored) to selected 1.144 (colored)

PR/54279: Jonathan Perkins: Ignore adjacent start/end prompt ignore.

Revision 1.152 / (download) - annotate - [select for diffs], Fri Apr 26 16:56:57 2019 UTC (4 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.151: +4 -4 lines
Diff to previous 1.151 (colored) to selected 1.144 (colored)

Follow the man page for EL_GETTC and not require a NULL terminated argument
list: https://reviews.llvm.org/D61191

Revision 1.151 / (download) - annotate - [select for diffs], Fri Feb 15 23:20:35 2019 UTC (5 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.150: +10 -8 lines
Diff to previous 1.150 (colored) to selected 1.144 (colored)

PR/53983: Jonathan Perkins: Fix types for readline compatibility

Revision 1.150 / (download) - annotate - [select for diffs], Thu Feb 14 20:09:12 2019 UTC (5 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.149: +4 -3 lines
Diff to previous 1.149 (colored) to selected 1.144 (colored)

PR/53981: Jonathan Perkins: history_list should null-terminate

Revision 1.146.2.3 / (download) - annotate - [select for diffs], Fri Jan 18 08:50:10 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.146.2.2: +3 -3 lines
Diff to previous 1.146.2.2 (colored) to branchpoint 1.146 (colored) next main 1.147 (colored) to selected 1.144 (colored)

Synch with HEAD

Revision 1.149 / (download) - annotate - [select for diffs], Thu Jan 10 18:41:56 2019 UTC (5 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118
Changes since 1.148: +3 -3 lines
Diff to previous 1.148 (colored) to selected 1.144 (colored)

PR/53856: F. Aragon: editline/libedit not prompting colors in readline mode

Revision 1.146.2.2 / (download) - annotate - [select for diffs], Wed Dec 26 14:01:27 2018 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.146.2.1: +18 -2 lines
Diff to previous 1.146.2.1 (colored) to branchpoint 1.146 (colored) to selected 1.144 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.148 / (download) - annotate - [select for diffs], Sun Dec 2 16:58:13 2018 UTC (5 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-compat-1226
Changes since 1.147: +18 -2 lines
Diff to previous 1.147 (colored) to selected 1.144 (colored)

Add a couple more readline compat functions.

Revision 1.146.2.1 / (download) - annotate - [select for diffs], Mon Jun 25 07:25:35 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.146: +7 -10 lines
Diff to previous 1.146 (colored) to selected 1.144 (colored)

Sync with HEAD

Revision 1.147 / (download) - annotate - [select for diffs], Sat Jun 9 17:41:55 2018 UTC (5 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625
Branch point for: phil-wifi
Changes since 1.146: +7 -10 lines
Diff to previous 1.146 (colored) to selected 1.144 (colored)

Provide more compatibility with readline headers; now python-3.6.5 works
when changing 'readline' -> 'edit' in setup.py.
Revert previous conditional setting of unbuffered.

Revision 1.146 / (download) - annotate - [select for diffs], Mon Jan 1 22:32:46 2018 UTC (6 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.145: +4 -4 lines
Diff to previous 1.145 (colored) to selected 1.144 (colored)

Only FLUSH if we are ending libedit; DRAIN if we suspend for readline.
This allows pasting multiline buffers (Gerry Swislow)

Revision 1.145 / (download) - annotate - [select for diffs], Fri Dec 8 16:56:23 2017 UTC (6 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.144: +6 -3 lines
Diff to previous 1.144 (colored)

For applications that don't issue their own prompt (like python)
don't set unbuffered unless they've already printed the prompt.
This avoids printing the prompt before the application has a chance
to process the input line.
From sjg@

Revision 1.144 / (download) - annotate - [selected], Sun Sep 17 08:10:08 2017 UTC (6 years, 6 months ago) by kre
Branch: MAIN
Changes since 1.143: +10 -4 lines
Diff to previous 1.143 (colored)

PR lib/52547 - read_history (readline.c) should now sets history_length.

Patch from Yen Chi Hsuan in the PR, extracted from Apple's version of
readline.c, then modified by me to be consistent about what the return
value really is.

Revision 1.143 / (download) - annotate - [select for diffs], Tue Sep 5 18:07:59 2017 UTC (6 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.142: +13 -5 lines
Diff to previous 1.142 (colored) to selected 1.144 (colored)

For readline emulation, don't reset the tty to "sane" (cooked) mode if we
did not start this way. Also set and reset the tty on entry and exit from
readline() since this is what readline does.

Revision 1.142 / (download) - annotate - [select for diffs], Fri Sep 1 10:19:10 2017 UTC (6 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.141: +38 -6 lines
Diff to previous 1.141 (colored) to selected 1.144 (colored)

PR/51517: Jay West: Tty settings not restored on exit
PR/51518: Jay West: prompt is interleaved with client output

Both these issues are caused by rl_restore_handler not DTRT; fix
it so that it kills the internal libedit state completely. This is
inefficient, but it works.

Also fix:
1. add append_history()/H_NSAVE_FP
2. call the rl_startup_hook before printing the first prompt as documented.
   callint it from rl_initialize breaks python, because the callback ends
   up being invoked before the readline module is installed, and we end up
   dereferencing a NULL pointer.
3. add el_resize_terminal.

With those changes, s/lreadline/ledit/g in python works.

Revision 1.136.2.3 / (download) - annotate - [select for diffs], Wed Apr 26 02:52:55 2017 UTC (6 years, 10 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.136.2.2: +15 -14 lines
Diff to previous 1.136.2.2 (colored) to branchpoint 1.136 (colored) next main 1.137 (colored) to selected 1.144 (colored)

Sync with HEAD

Revision 1.140.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:53:10 2017 UTC (6 years, 10 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.140: +15 -14 lines
Diff to previous 1.140 (colored) next main 1.141 (colored) to selected 1.144 (colored)

Sync with HEAD

Revision 1.141 / (download) - annotate - [select for diffs], Fri Apr 21 05:38:03 2017 UTC (6 years, 10 months ago) by abhinav
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, bouyer-socketcan-base1
Changes since 1.140: +15 -14 lines
Diff to previous 1.140 (colored) to selected 1.144 (colored)

When doing filename autocompletion, append a trailing slash at the end of directory
names. We already do this when there is only one completion option but
in case of of multiple completion options, it wasn't being done.

ok christos@

Revision 1.136.2.2 / (download) - annotate - [select for diffs], Mon Mar 20 06:56:59 2017 UTC (7 years ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.136.2.1: +3 -3 lines
Diff to previous 1.136.2.1 (colored) to branchpoint 1.136 (colored) to selected 1.144 (colored)

Sync with HEAD

Revision 1.140 / (download) - annotate - [select for diffs], Mon Jan 9 03:09:05 2017 UTC (7 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.139: +3 -3 lines
Diff to previous 1.139 (colored) to selected 1.144 (colored)

Make sure we take into account history_base when computing negative history
offsets. (Gerry Swinslow)

Revision 1.136.2.1 / (download) - annotate - [select for diffs], Fri Nov 4 14:48:53 2016 UTC (7 years, 4 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.136: +3 -3 lines
Diff to previous 1.136 (colored) to selected 1.144 (colored)

Sync with HEAD

Revision 1.139 / (download) - annotate - [select for diffs], Fri Oct 28 18:32:26 2016 UTC (7 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, pgoyette-localcount-20161104
Changes since 1.138: +3 -3 lines
Diff to previous 1.138 (colored) to selected 1.144 (colored)

pass the stream to the getc function

Revision 1.138 / (download) - annotate - [select for diffs], Thu Sep 1 13:23:44 2016 UTC (7 years, 6 months ago) by mbalmer
Branch: MAIN
CVS Tags: localcount-20160914
Changes since 1.137: +3 -3 lines
Diff to previous 1.137 (colored) to selected 1.144 (colored)

fix typo

Revision 1.137 / (download) - annotate - [select for diffs], Wed Aug 24 13:10:59 2016 UTC (7 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.136: +67 -78 lines
Diff to previous 1.136 (colored) to selected 1.144 (colored)

more compatible with readline history functions.

Revision 1.136 / (download) - annotate - [select for diffs], Thu Jun 2 21:40:51 2016 UTC (7 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726
Branch point for: pgoyette-localcount
Changes since 1.135: +4 -2 lines
Diff to previous 1.135 (colored) to selected 1.144 (colored)

Fix previous to better match readline behavior (Ingo Schwarze)

Revision 1.135 / (download) - annotate - [select for diffs], Thu Jun 2 15:11:18 2016 UTC (7 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.134: +11 -14 lines
Diff to previous 1.134 (colored) to selected 1.144 (colored)

From Ingo Schwarze:

In libedit, the only way how H_ENTER can fail is memory exhaustion,
too, and of course it is handled gracefully, returning -1 from
history().  So of course, we will continue to handle it gracefully
in add_history() as well, but we are free to decide what to do with
the library state in this case because GNU just dies...

I think the most reasonable course of action is to simply not change
the library state in any way when add_history() fails due to memory
exhaustion, but just return.

If H_ENTER does not fail, we know that the history now contains at
least one entry, so there is no need any longer to check the H_GETSIZE
return value.  And we can of course always set current_history_valid.

While testing these changes, i noticed three problems so closely
related that i'd like to fix them in the same diff.

 1. libedit has the wrong prototype for add_history().
    GNU readline-6.3 defines it as void add_history(const char *).
    Of course, that is very stupid - no way to report problems to
    the caller!  But the whole point of a compatibility mode is
    being compatible, so we should ultimately change this.
    Of course, changing the prototype of a public symbol requires
    a libedit major bump.  I don't want to do that casually.
    Rather, i will take a note and change the prototype the next
    time we need a libedit major bump for more important reasons.
    For now, let's just always return 0.

 2. While *implicitely* pushing an old entry off the history
    increments history_base in GNU readline, testing reveals that
    *explicitly* deleting one does not.  Again, this is not
    documented, but it applies to both remove_history() and
    stifle_history().  So delete history_base manipulation
    from stifle_history(), which also allows to simplify the
    code and delete two automatic variables.

 3. GNU readline add_history(NULL) crashes with a segfault.
    There is nothing wrong with having a public interface
    behave that way.  Many standard interfaces do, including
    strlen(3).  Such crashes can even be useful to catch
    buggy application programs.
    In libedit/readline.c rev. 1.104, Christos made add_history()
    silently ignore this coding error, according to the commit
    message to hide a bug in nslookup(1).  That change was never
    merged to OpenBSD.  I strongly disagree with this change.
    If nslookup(1) is still broken, that program needs to be
    fixed instead.  In any case, delete the bogus check; hiding
    bugs is dangerous.

Revision 1.134 / (download) - annotate - [select for diffs], Tue May 31 19:25:17 2016 UTC (7 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.133: +3 -3 lines
Diff to previous 1.133 (colored) to selected 1.144 (colored)

remove the right history entry (Ingo Schwarze)

Revision 1.133 / (download) - annotate - [select for diffs], Fri May 13 15:55:59 2016 UTC (7 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.132: +8 -5 lines
Diff to previous 1.132 (colored) to selected 1.144 (colored)

From Bastian Maerkisch, via Igno Schwarze:

Even though section "2.3.3 Information About the History List"
of the history(3) info(1) manual only says

  -- Function: int where_history (void)
     Returns the offset of the current history element.

which maybe isn't completely clear, a plausible implementation
is that the offset returned is the same offset that can be used
for history_set_pos(), i.e. that it is 0 for the oldest entry
and increases with time, and that's how the GNU implementation
behaves indeed.

The libedit implementation, on the other hand, returns 1 for the
newest entry and increases going back in time.

Revision 1.132 / (download) - annotate - [select for diffs], Mon May 9 21:27:55 2016 UTC (7 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.131: +27 -5 lines
Diff to previous 1.131 (colored) to selected 1.144 (colored)

GNU readline(3) regards history chronologically, that is, from the
perspective of the dawn of time, so "next" means "newer" and "previous"
means "older".  Libedit, by contrast, uses reverse chronology and
regards history from the perspective of the present, such that "next"
means "longer ago" and "previous" means "not so long ago".

The following patch fixes previous_history() and next_history()
as proposed by Bastian Maerkisch.

But there is a related problem demonstrated by Bastian's regression
tests that his patch did not fix:  next_history() can advance not
only to the newest entry, but beyond it, which core libedit cannot
do.  So that feature must be implemented locally in readline.c.

With that, the last of Bastians tests is fixed, test_movement_direction().

This patch also improves libedit documentation to more clearly state
what "previous" and "next" mean.  GNU readline documentation is
just as unclear, but we can't easily fix that since libedit doesn't
include its own readline.3 manual.

(Ingo Schwarze)

Revision 1.131 / (download) - annotate - [select for diffs], Mon May 9 21:25:11 2016 UTC (7 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.130: +21 -9 lines
Diff to previous 1.130 (colored) to selected 1.144 (colored)

The libedit implementation of history_get() also differs from the GNU
implementation:  libedit goes to the entry with the given number
stored in the HistEvent structure, while GNU subtracts history_base,
then advances that many entries from the oldest one.  If entries were
removed in between, GNU advances further than libedit.

The call sequence H_CURR, H_DELDATA, H_CURR, H_NEXT_EVDATA looks
weird, as if part of that must somehow be redundant.  But actually,
the user interface is so counter-intuitive that every single step
is really required.

 - The first H_CURR is needed to be able to go back after an error.
 - The H_DELDATA is needed to move the cursor.  Even though it takes
   a pointer to ev, that structure is not filled in when the call
   succeeds.  H_DELDATA only moves the cursor, it doesn't tell us
   the new event number.
 - Consequently, the second H_CURR is required to get ev.num filled
   in.  But it doesn't return the data because ev has no field for
   that.
 - So even though the cursor is already positioned correctly,
   H_NEXT_EVDATA is needed as the final step merely to get the data.

(Ingo Schwarze)

Revision 1.130 / (download) - annotate - [select for diffs], Sun May 8 20:15:00 2016 UTC (7 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.129: +15 -3 lines
Diff to previous 1.129 (colored) to selected 1.144 (colored)

In stiffle_history(), trim excessive entries from the history and advance
history_base like the GNU implementation does. (from Bastian Maerkisch)

Revision 1.129 / (download) - annotate - [select for diffs], Fri May 6 21:01:19 2016 UTC (7 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.128: +6 -6 lines
Diff to previous 1.128 (colored) to selected 1.144 (colored)

fix logic (Ingo Schwarze)

Revision 1.128 / (download) - annotate - [select for diffs], Mon Apr 18 17:01:19 2016 UTC (7 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.127: +3 -2 lines
Diff to previous 1.127 (colored) to selected 1.144 (colored)

From Ingo Schwarze:
 * Replace fcns.c by a shorter and simpler func.h
   and include it only in the one file needing it, map.c.
 * Combine help.h and help.c into a simplified help.h
   and include it only in the one file needing it, map.c.
 * Check the very simple, static files editline.c, historyn.c, and
   tokenizern.c into CVS rather than needlessly generating them.
 * So we no longer autogenerate any C files.  :-)
 * Shorten and simplify makelist by deleting the options -n, -e, -bc,
   and -m; the latter was unused and useless in the first place.
 * Move the declaration of el_func_t from fcns.h to the header
   actually needing it, map.h.  Since that header is already
   included by el.h for unrelated reasons, that makes el_func_t
   just as globally available as before.
 * No longer include the simplified fcns.h into el.h,
   include it directly into the *.c files needing it.

Revision 1.127 / (download) - annotate - [select for diffs], Wed Mar 23 22:27:48 2016 UTC (7 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.126: +2 -4 lines
Diff to previous 1.126 (colored) to selected 1.144 (colored)

Start removing the WIDECHAR ifdefs; building without it has stopped working
anyway. (Ingo Schwarze)

Revision 1.126 / (download) - annotate - [select for diffs], Wed Feb 24 17:13:22 2016 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.125: +14 -11 lines
Diff to previous 1.125 (colored) to selected 1.144 (colored)

Make the read_char function always take a wchar_t * argument (Ingo Schwarze)

Revision 1.125 / (download) - annotate - [select for diffs], Wed Feb 17 19:47:49 2016 UTC (8 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.124: +16 -16 lines
Diff to previous 1.124 (colored) to selected 1.144 (colored)

whitespace and header sorting changes (Ingo Schwarze). No functional changes.

Revision 1.124 / (download) - annotate - [select for diffs], Tue Feb 16 19:08:41 2016 UTC (8 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.123: +2 -3 lines
Diff to previous 1.123 (colored) to selected 1.144 (colored)

more include file cleanup (Ingo Schwarze)

Revision 1.123 / (download) - annotate - [select for diffs], Tue Feb 16 15:53:48 2016 UTC (8 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.122: +2 -4 lines
Diff to previous 1.122 (colored) to selected 1.144 (colored)

From Ingo Scharze:
Let "el.h" include everything needed for struct editline,
and don't include that stuff multiple times.  That also improves
consistency, also avoids circular inclusions, and also makes it
easier to follow what is going on, even though not quite as nice.
But it seems like the best we can do...

Revision 1.122 / (download) - annotate - [select for diffs], Tue Feb 16 14:08:25 2016 UTC (8 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.121: +3 -2 lines
Diff to previous 1.121 (colored) to selected 1.144 (colored)

cleanup chartype.h includes (Ingo Schwarze)

Revision 1.121 / (download) - annotate - [select for diffs], Tue Feb 16 14:06:05 2016 UTC (8 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.120: +3 -3 lines
Diff to previous 1.120 (colored) to selected 1.144 (colored)

cleanup inclusion of histedit.h (Ingo Schwarze)

Revision 1.120 / (download) - annotate - [select for diffs], Mon Feb 15 23:36:30 2016 UTC (8 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored) to selected 1.144 (colored)

attribute unused

Revision 1.119 / (download) - annotate - [select for diffs], Mon Feb 15 22:48:59 2016 UTC (8 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.118: +4 -3 lines
Diff to previous 1.118 (colored) to selected 1.144 (colored)

OpenBSD readline.c rev. 1.14 2015/02/06 23:21:58 millert
use SIZE_MAX

Revision 1.118 / (download) - annotate - [select for diffs], Mon Feb 15 21:58:37 2016 UTC (8 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.117: +9 -2 lines
Diff to previous 1.117 (colored) to selected 1.144 (colored)

OpenBSD readline.c rev. 1.13 2015/01/13 08:33:12 reyk
rl_set_keyboard_input_timeout() for readline 4.2 compat

Revision 1.117 / (download) - annotate - [select for diffs], Tue Jun 2 15:35:31 2015 UTC (8 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.116: +7 -7 lines
Diff to previous 1.116 (colored) to selected 1.144 (colored)

Adjust API to a more modern readline (Ryo Onodera)

Revision 1.116 / (download) - annotate - [select for diffs], Tue May 26 19:59:21 2015 UTC (8 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.115: +8 -6 lines
Diff to previous 1.115 (colored) to selected 1.144 (colored)

- fix types of rl_completion_entry_function and rl_add_defun
- call update pos before completion to refresh the screen
From Thomas Eriksson

Revision 1.111.2.1 / (download) - annotate - [select for diffs], Wed May 13 13:33:55 2015 UTC (8 years, 10 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Changes since 1.111: +38 -6 lines
Diff to previous 1.111 (colored) next main 1.112 (colored) to selected 1.144 (colored)

Sync lib/libedit with head, requested by christos in #753:

	lib/libedit/Makefile 1.53
	lib/libedit/chartype.h 1.13
	lib/libedit/editline.3 1.83-1.84
	lib/libedit/editrc.5 1.28-1.29
	lib/libedit/eln.c 1.18
	lib/libedit/filecomplete.c 1.33-1.34
	lib/libedit/readline.c 1.112-1.115

Man page improvements, fix overlapping strcpy, improve readline
compatibility, clang build fix.

Revision 1.115 / (download) - annotate - [select for diffs], Wed Apr 1 15:23:15 2015 UTC (8 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.114: +4 -3 lines
Diff to previous 1.114 (colored) to selected 1.144 (colored)

Fix overlapping strcpy (Gerry Swislow)

Revision 1.114 / (download) - annotate - [select for diffs], Tue Mar 24 21:29:52 2015 UTC (8 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.113: +33 -2 lines
Diff to previous 1.113 (colored) to selected 1.144 (colored)

set some readline compatibility default key settings.
https://bugzilla.redhat.com/attachment.cgi?id=1001895

Revision 1.113 / (download) - annotate - [select for diffs], Sat Oct 18 08:33:23 2014 UTC (9 years, 5 months ago) by snj
Branch: MAIN
Changes since 1.112: +4 -4 lines
Diff to previous 1.112 (colored) to selected 1.144 (colored)

src is too big these days to tolerate superfluous apostrophes.  It's
"its", people!

Revision 1.105.2.4 / (download) - annotate - [select for diffs], Wed Aug 20 00:02:17 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.105.2.3: +14 -4 lines
Diff to previous 1.105.2.3 (colored) next main 1.106 (colored) to selected 1.144 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.112 / (download) - annotate - [select for diffs], Fri Aug 15 13:32:53 2014 UTC (9 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.111: +3 -3 lines
Diff to previous 1.111 (colored) to selected 1.144 (colored)

Fix typo in comment (Tobias Stoeckmann)

Revision 1.110.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:51:57 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.110: +3 -3 lines
Diff to previous 1.110 (colored) next main 1.111 (colored) to selected 1.144 (colored)

Rebase.

Revision 1.111 / (download) - annotate - [select for diffs], Sun Jul 6 18:09:04 2014 UTC (9 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.110: +3 -3 lines
Diff to previous 1.110 (colored) to selected 1.144 (colored)

PR/48957: Federico G. Schwindt: Restore commented out code that broke
rl_callback_handler.

Revision 1.99.2.5 / (download) - annotate - [select for diffs], Thu May 22 11:36:55 2014 UTC (9 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.99.2.4: +23 -6 lines
Diff to previous 1.99.2.4 (colored) to branchpoint 1.99 (colored) next main 1.100 (colored) to selected 1.144 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.110 / (download) - annotate - [select for diffs], Tue Jan 21 13:51:44 2014 UTC (10 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.109: +5 -2 lines
Diff to previous 1.109 (colored) to selected 1.144 (colored)

... if called prior to using_history().  This needed to be worked around
in PHP: http://git.php.net/?p=php-src.git;a=commitdiff;h=31d67bd3

Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1055409

Revision 1.109 / (download) - annotate - [select for diffs], Wed Aug 28 08:05:21 2013 UTC (10 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.108: +12 -5 lines
Diff to previous 1.108 (colored) to selected 1.144 (colored)

get rid of PATH_MAX.

Revision 1.105.2.3 / (download) - annotate - [select for diffs], Sun Jun 23 06:21:06 2013 UTC (10 years, 8 months ago) by tls
Branch: tls-maxphys
Changes since 1.105.2.2: +10 -3 lines
Diff to previous 1.105.2.2 (colored) to selected 1.144 (colored)

resync from head

Revision 1.108 / (download) - annotate - [select for diffs], Tue May 28 00:10:34 2013 UTC (10 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Changes since 1.107: +10 -3 lines
Diff to previous 1.107 (colored) to selected 1.144 (colored)

expose rl_catch_signals and explain what we are doing.

Revision 1.105.2.2 / (download) - annotate - [select for diffs], Mon Feb 25 00:27:56 2013 UTC (11 years ago) by tls
Branch: tls-maxphys
Changes since 1.105.2.1: +4 -4 lines
Diff to previous 1.105.2.1 (colored) to selected 1.144 (colored)

resync with head

Revision 1.99.2.4 / (download) - annotate - [select for diffs], Wed Jan 23 00:05:24 2013 UTC (11 years, 1 month ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.99.2.3: +4 -4 lines
Diff to previous 1.99.2.3 (colored) to branchpoint 1.99 (colored) to selected 1.144 (colored)

sync with head

Revision 1.107 / (download) - annotate - [select for diffs], Sun Jan 13 15:46:57 2013 UTC (11 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, agc-symver-base, agc-symver
Changes since 1.106: +4 -4 lines
Diff to previous 1.106 (colored) to selected 1.144 (colored)

explicitly pass (void *)0 instead of NULL.

Revision 1.105.2.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:00:43 2012 UTC (11 years, 4 months ago) by tls
Branch: tls-maxphys
Changes since 1.105: +8 -8 lines
Diff to previous 1.105 (colored) to selected 1.144 (colored)

Resync to 2012-11-19 00:00:00 UTC

Revision 1.99.2.3 / (download) - annotate - [select for diffs], Tue Oct 30 18:59:09 2012 UTC (11 years, 4 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.99.2.2: +16 -8 lines
Diff to previous 1.99.2.2 (colored) to branchpoint 1.99 (colored) to selected 1.144 (colored)

sync with head

Revision 1.106 / (download) - annotate - [select for diffs], Fri Oct 12 23:35:02 2012 UTC (11 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base7, yamt-pagecache-base6
Changes since 1.105: +8 -8 lines
Diff to previous 1.105 (colored) to selected 1.144 (colored)

Add trailing NULL's to the varargs functions as required. (John Spencer)

Revision 1.105 / (download) - annotate - [select for diffs], Thu Jul 12 18:46:20 2012 UTC (11 years, 8 months ago) by christos
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.104: +7 -2 lines
Diff to previous 1.104 (colored) to selected 1.144 (colored)

PR/46678: Ian Wienand: Add stub implementation for rl_free_line_state()

Revision 1.100.2.1 / (download) - annotate - [select for diffs], Tue Jun 5 20:22:14 2012 UTC (11 years, 9 months ago) by bouyer
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.100: +5 -2 lines
Diff to previous 1.100 (colored) next main 1.101 (colored) to selected 1.144 (colored)

Pull up following revision(s) (requested by christos in ticket #309):
	lib/libedit/readline.c: revision 1.104
don't crash if add_history is called from an empty line. Called from
nslookup in new bind.
XXX: pullup to 6

Revision 1.104 / (download) - annotate - [select for diffs], Tue Jun 5 00:30:22 2012 UTC (11 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.103: +5 -2 lines
Diff to previous 1.103 (colored) to selected 1.144 (colored)

don't crash if add_history is called from an empty line. Called from
nslookup in new bind.
XXX: pullup to 6

Revision 1.99.2.2 / (download) - annotate - [select for diffs], Wed May 23 10:07:31 2012 UTC (11 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.99.2.1: +10 -3 lines
Diff to previous 1.99.2.1 (colored) to branchpoint 1.99 (colored) to selected 1.144 (colored)

sync with head.

Revision 1.103 / (download) - annotate - [select for diffs], Tue May 15 19:07:25 2012 UTC (11 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base5
Changes since 1.102: +3 -2 lines
Diff to previous 1.102 (colored) to selected 1.144 (colored)

define the new variable

Revision 1.102 / (download) - annotate - [select for diffs], Tue May 15 17:30:04 2012 UTC (11 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.101: +9 -3 lines
Diff to previous 1.101 (colored) to selected 1.144 (colored)

Add rl_completion_word_break_hook from:
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/\
5ec6a45fa762b8cbd0305ca06acb8780335a486a

Revision 1.99.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:05:27 2012 UTC (11 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.99: +4 -4 lines
Diff to previous 1.99 (colored) to selected 1.144 (colored)

sync with head

Revision 1.101 / (download) - annotate - [select for diffs], Wed Mar 21 05:33:26 2012 UTC (12 years ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base4
Changes since 1.100: +3 -3 lines
Diff to previous 1.100 (colored) to selected 1.144 (colored)

Use C89 functions definitions.
Remove use of __P

Revision 1.100 / (download) - annotate - [select for diffs], Fri Nov 18 20:38:42 2011 UTC (12 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-6-base
Branch point for: netbsd-6
Changes since 1.99: +3 -3 lines
Diff to previous 1.99 (colored) to selected 1.144 (colored)

Add missing *

Revision 1.99 / (download) - annotate - [select for diffs], Tue Aug 16 16:25:15 2011 UTC (12 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base
Branch point for: yamt-pagecache
Changes since 1.98: +17 -17 lines
Diff to previous 1.98 (colored) to selected 1.144 (colored)

re-enable -Wconversion

Revision 1.98 / (download) - annotate - [select for diffs], Fri Jul 29 23:44:44 2011 UTC (12 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.97: +14 -16 lines
Diff to previous 1.97 (colored) to selected 1.144 (colored)

pass -Wconversion

Revision 1.97 / (download) - annotate - [select for diffs], Fri Jul 29 20:58:07 2011 UTC (12 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.96: +18 -14 lines
Diff to previous 1.96 (colored) to selected 1.144 (colored)

- fix unused params
- unconditionalize vis.h

Revision 1.96 / (download) - annotate - [select for diffs], Fri Jul 29 15:16:33 2011 UTC (12 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.95: +71 -71 lines
Diff to previous 1.95 (colored) to selected 1.144 (colored)

KNF return (\1); -> return \1;

Revision 1.95 / (download) - annotate - [select for diffs], Thu Jul 28 20:50:55 2011 UTC (12 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.94: +60 -56 lines
Diff to previous 1.94 (colored) to selected 1.144 (colored)

kill ptr_t and ioctl_t, add  * sizeof(*foo) to all allocations.

Revision 1.94 / (download) - annotate - [select for diffs], Thu Jul 28 17:33:39 2011 UTC (12 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.93: +18 -9 lines
Diff to previous 1.93 (colored) to selected 1.144 (colored)

handle systems without getpwent_r

Revision 1.93 / (download) - annotate - [select for diffs], Thu Jul 28 00:54:26 2011 UTC (12 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.92: +3 -3 lines
Diff to previous 1.92 (colored) to selected 1.144 (colored)

use vis.h from .

Revision 1.92 / (download) - annotate - [select for diffs], Thu Sep 16 20:08:51 2010 UTC (13 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.91: +82 -91 lines
Diff to previous 1.91 (colored) to selected 1.144 (colored)

unbreak readline history.

Revision 1.91 / (download) - annotate - [select for diffs], Sat Aug 28 15:44:59 2010 UTC (13 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.90: +17 -6 lines
Diff to previous 1.90 (colored) to selected 1.144 (colored)

setup a callback to be invoked on resize buffers so that readline can
reset rl_line_buffer which unfortunately some applications use it directly.

Revision 1.90 / (download) - annotate - [select for diffs], Wed Aug 4 20:29:18 2010 UTC (13 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.89: +8 -2 lines
Diff to previous 1.89 (colored) to selected 1.144 (colored)

provide rl_on_newline

Revision 1.89 / (download) - annotate - [select for diffs], Thu Apr 15 00:57:33 2010 UTC (13 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.88: +6 -3 lines
Diff to previous 1.88 (colored) to selected 1.144 (colored)

From Jess Thrysoee
    - Fix wint_t to Int confusion

Revision 1.88 / (download) - annotate - [select for diffs], Sun Jan 3 18:27:10 2010 UTC (14 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.87: +16 -12 lines
Diff to previous 1.87 (colored) to selected 1.144 (colored)

rename historyw -> history_w for consistency.
add wide tst code and make it the default.

Revision 1.87 / (download) - annotate - [select for diffs], Wed Dec 30 23:54:52 2009 UTC (14 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.86: +6 -6 lines
Diff to previous 1.86 (colored) to selected 1.144 (colored)

Fix wide build, test it, but don't turn it on yet.

Revision 1.86 / (download) - annotate - [select for diffs], Wed Dec 30 22:37:40 2009 UTC (14 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.85: +90 -78 lines
Diff to previous 1.85 (colored) to selected 1.144 (colored)

Wide character support (UTF-8) from Johny Mattsson; currently disabled.

Revision 1.85 / (download) - annotate - [select for diffs], Mon Sep 7 21:24:33 2009 UTC (14 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.84: +267 -23 lines
Diff to previous 1.84 (colored) to selected 1.144 (colored)

apply apple patches from:
http://opensource.apple.com/source/libedit/libedit-11/patches/

Revision 1.84 / (download) - annotate - [select for diffs], Wed Jul 22 15:57:40 2009 UTC (14 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.83: +12 -12 lines
Diff to previous 1.83 (colored) to selected 1.144 (colored)

Fix memory leaks in error paths.
From Michael Cook mcook at bbn dot com

Revision 1.78.2.1 / (download) - annotate - [select for diffs], Wed May 13 19:18:29 2009 UTC (14 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.78: +28 -20 lines
Diff to previous 1.78 (colored) next main 1.79 (colored) to selected 1.144 (colored)

Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html

Revision 1.83 / (download) - annotate - [select for diffs], Wed Apr 8 21:31:31 2009 UTC (14 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.82: +3 -3 lines
Diff to previous 1.82 (colored) to selected 1.144 (colored)

Fix off by one error reported by:  Caleb Welton cwelton at greenplum dot com

Revision 1.82 / (download) - annotate - [select for diffs], Tue Mar 31 17:53:03 2009 UTC (14 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.81: +12 -4 lines
Diff to previous 1.81 (colored) to selected 1.144 (colored)

implement RL_PROMPT_{START,END}_IGNORE

Revision 1.81 / (download) - annotate - [select for diffs], Sat Feb 21 23:31:56 2009 UTC (15 years ago) by christos
Branch: MAIN
Changes since 1.80: +5 -4 lines
Diff to previous 1.80 (colored) to selected 1.144 (colored)

more size_t stuff.

Revision 1.80 / (download) - annotate - [select for diffs], Sun Feb 15 21:55:23 2009 UTC (15 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.79: +13 -11 lines
Diff to previous 1.79 (colored) to selected 1.144 (colored)

pass lint on _LP64.

Revision 1.79 / (download) - annotate - [select for diffs], Thu Feb 12 13:39:49 2009 UTC (15 years, 1 month ago) by sketch
Branch: MAIN
Changes since 1.78: +3 -6 lines
Diff to previous 1.78 (colored) to selected 1.144 (colored)

More fixes for existing portability stuff.

Revision 1.78 / (download) - annotate - [select for diffs], Thu Feb 5 19:15:26 2009 UTC (15 years, 1 month ago) by christos
Branch: MAIN
Branch point for: jym-xensuspend
Changes since 1.77: +22 -15 lines
Diff to previous 1.77 (colored) to selected 1.144 (colored)

add rl_set_prompt

Revision 1.77 / (download) - annotate - [select for diffs], Sun Jan 18 12:17:24 2009 UTC (15 years, 2 months ago) by lukem
Branch: MAIN
Changes since 1.76: +8 -8 lines
Diff to previous 1.76 (colored) to selected 1.144 (colored)

fix -Wsign-compare issues

Revision 1.76 / (download) - annotate - [select for diffs], Sun Jan 11 15:00:23 2009 UTC (15 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.75: +11 -10 lines
Diff to previous 1.75 (colored) to selected 1.144 (colored)

- insert a space after the recognized string if it was an exact match
- initialize properly the string used for completion.
From Alex Bligh alex at alex dot org dot uk
- Make char constants consistent

Revision 1.74.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:30:35 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.74: +2 -5 lines
Diff to previous 1.74 (colored) next main 1.75 (colored) to selected 1.144 (colored)

sync with head.

Revision 1.75 / (download) - annotate - [select for diffs], Tue Apr 29 06:53:01 2008 UTC (15 years, 10 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, hpcarm-cleanup-nbase
Changes since 1.74: +2 -5 lines
Diff to previous 1.74 (colored) to selected 1.144 (colored)

Convert to new 2 clause license

Revision 1.74 / (download) - annotate - [select for diffs], Sat Apr 5 15:53:28 2008 UTC (15 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.73: +3 -5 lines
Diff to previous 1.73 (colored) to selected 1.144 (colored)

add EL_REFRESH for the benefit of readline

Revision 1.73 / (download) - annotate - [select for diffs], Fri Apr 4 21:18:34 2008 UTC (15 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.72: +10 -3 lines
Diff to previous 1.72 (colored) to selected 1.144 (colored)

Add rl_forced_update_display() from Gerry Swislow

Revision 1.72 / (download) - annotate - [select for diffs], Sun Aug 12 07:41:51 2007 UTC (16 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, cube-autoconf-base, cube-autoconf
Changes since 1.71: +7 -6 lines
Diff to previous 1.71 (colored) to selected 1.144 (colored)

patches from Axel Thimm

Revision 1.71 / (download) - annotate - [select for diffs], Sun May 27 19:45:37 2007 UTC (16 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: matt-mips64-base, matt-mips64, hpcarm-cleanup
Changes since 1.70: +64 -6 lines
Diff to previous 1.70 (colored) to selected 1.144 (colored)

Add rl_completion_matches, fix remove_history

Revision 1.70 / (download) - annotate - [select for diffs], Fri Nov 24 00:01:17 2006 UTC (17 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4
Changes since 1.69: +92 -3 lines
Diff to previous 1.69 (colored) to selected 1.144 (colored)

- Add more readline functions, enough for gdb-6.5
- Make el_get varyadic, and implement EL_GETTC.
- XXX: the EL_SETTC api will change in the future.

Revision 1.69 / (download) - annotate - [select for diffs], Mon Aug 21 12:45:30 2006 UTC (17 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.68: +3 -7 lines
Diff to previous 1.68 (colored) to selected 1.144 (colored)

Change to a 3 clause copyright after permission of the holders.

Revision 1.68 / (download) - annotate - [select for diffs], Sun Jul 23 20:21:45 2006 UTC (17 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.67: +8 -5 lines
Diff to previous 1.67 (colored) to selected 1.144 (colored)

PR/34062: Tanaka Akira: rl_deprep_term_function is NULL in libedit.
Default to rl_deprep_terminal as suggested; do the same for
rl_prep_term_function

Revision 1.67 / (download) - annotate - [select for diffs], Sat Mar 25 13:00:11 2006 UTC (17 years, 11 months ago) by rtr
Branch: MAIN
Changes since 1.66: +2 -6 lines
Diff to previous 1.66 (colored) to selected 1.144 (colored)

remove if/free block checking known condition

coverity 2762 / run 11

Revision 1.66 / (download) - annotate - [select for diffs], Tue Mar 21 17:52:50 2006 UTC (18 years ago) by christos
Branch: MAIN
Changes since 1.65: +4 -2 lines
Diff to previous 1.65 (colored) to selected 1.144 (colored)

Coverity CID 2743: Not really a memory leak, but make it obvious that we
always free tmp.

Revision 1.65 / (download) - annotate - [select for diffs], Sat Mar 18 19:22:59 2006 UTC (18 years ago) by christos
Branch: MAIN
Changes since 1.64: +3 -3 lines
Diff to previous 1.64 (colored) to selected 1.144 (colored)

Lint comment.

Revision 1.64 / (download) - annotate - [select for diffs], Sat Mar 18 09:28:23 2006 UTC (18 years ago) by christos
Branch: MAIN
Changes since 1.63: +10 -6 lines
Diff to previous 1.63 (colored) to selected 1.144 (colored)

Coverity CID 1666: Plug memory leak.

Revision 1.63 / (download) - annotate - [select for diffs], Sat Mar 18 09:19:02 2006 UTC (18 years ago) by christos
Branch: MAIN
Changes since 1.62: +8 -6 lines
Diff to previous 1.62 (colored) to selected 1.144 (colored)

Coverity CID 1667: Plug memory leak

Revision 1.62 / (download) - annotate - [select for diffs], Sat Mar 18 09:15:57 2006 UTC (18 years ago) by christos
Branch: MAIN
Changes since 1.61: +10 -3 lines
Diff to previous 1.61 (colored) to selected 1.144 (colored)

Coverity CID 1662: Memory leak.

Revision 1.61 / (download) - annotate - [select for diffs], Mon Mar 6 21:11:03 2006 UTC (18 years ago) by christos
Branch: MAIN
Changes since 1.60: +5 -4 lines
Diff to previous 1.60 (colored) to selected 1.144 (colored)

use the tty chars for reprint and eof instead of hard-coded ^R and ^D

Revision 1.60 / (download) - annotate - [select for diffs], Mon Feb 13 14:12:04 2006 UTC (18 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.59: +4 -4 lines
Diff to previous 1.59 (colored) to selected 1.144 (colored)

PR/32817: Magnus Svensson: write_history and read_history returncode is not
readline compatible.

Revision 1.59 / (download) - annotate - [select for diffs], Sun Feb 12 16:15:07 2006 UTC (18 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.58: +23 -2 lines
Diff to previous 1.58 (colored) to selected 1.144 (colored)

Partial rl_getc_function support from Jess Thrysoee.

Revision 1.58 / (download) - annotate - [select for diffs], Thu Jul 14 15:00:58 2005 UTC (18 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.57: +24 -2 lines
Diff to previous 1.57 (colored) to selected 1.144 (colored)

PR/30747: David N. Williams: libedit is missing remove_history()
Added, please test.

Revision 1.49.2.4 / (download) - annotate - [select for diffs], Tue Jul 12 11:35:03 2005 UTC (18 years, 8 months ago) by tron
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Changes since 1.49.2.3: +7 -5 lines
Diff to previous 1.49.2.3 (colored) to branchpoint 1.49 (colored) next main 1.50 (colored) to selected 1.144 (colored)

Pull up revision 1.52 (requested by lukem in ticket #542):
check for pwd != NULL, fix a missed getpwnam.

Revision 1.49.2.3 / (download) - annotate - [select for diffs], Tue Jul 12 11:33:40 2005 UTC (18 years, 8 months ago) by tron
Branch: netbsd-3
Changes since 1.49.2.2: +6 -4 lines
Diff to previous 1.49.2.2 (colored) to branchpoint 1.49 (colored) to selected 1.144 (colored)

Pull up revision 1.50 (requested by lukem in ticket #542):
use getpwent_r

Revision 1.57 / (download) - annotate - [select for diffs], Sat Jun 11 18:18:59 2005 UTC (18 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.56: +14 -2 lines
Diff to previous 1.56 (colored) to selected 1.144 (colored)

PR/30500: Paul Shupak: Inconsistent definition of tilde_expand().
Provide a layer of indirection between the readline compatibility functions
and our internal implementation, so that we have the freedom to change the
function signature.

Revision 1.56 / (download) - annotate - [select for diffs], Fri Jun 10 20:21:00 2005 UTC (18 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.55: +13 -3 lines
Diff to previous 1.55 (colored) to selected 1.144 (colored)

Bug reported from Martin Dietze:

    The place to change the completion_append_character is
    usually somewhere in the `rl_completion_entry_function'
    callback which is where one usually can distinguish between
    file- or dir-like entries to append a slash for dirs etc.

    This does no longer work since `fn_complete()' takes the
    `append_character' as argument before the callback is executed,
    so that changes to the variable `rl_completion_append_character'
    have in fact no effect for the current completion.

Fix by adding a function that returns the rl_completion_append_character,
when it gets passed in a filename in readline emulation.

Revision 1.49.2.2 / (download) - annotate - [select for diffs], Sat May 28 14:03:25 2005 UTC (18 years, 9 months ago) by tron
Branch: netbsd-3
Changes since 1.49.2.1: +3 -3 lines
Diff to previous 1.49.2.1 (colored) to branchpoint 1.49 (colored) to selected 1.144 (colored)

Pull up revision 1.55 (requested by agc in ticket #353):
Use the correct type for the stored callback function

Revision 1.49.2.1 / (download) - annotate - [select for diffs], Sat May 28 14:02:27 2005 UTC (18 years, 9 months ago) by tron
Branch: netbsd-3
Changes since 1.49: +3 -3 lines
Diff to previous 1.49 (colored) to selected 1.144 (colored)

Pull up revision 1.54 (requested by agc in ticket #353):
Sync the alternative readline interface with reality:
+ the rl_callback_handler_install takes a pointer to a void function
  which has one char * argument (it's called that way in the readline
  emulation source, otherwise there's no way to pass the line buffer
  to the function which processes the line when EOL is encountered)
+ provide a prototype for that function signature and use it
Makes the callback readline interface work now.

Revision 1.55 / (download) - annotate - [select for diffs], Fri May 27 14:01:46 2005 UTC (18 years, 9 months ago) by agc
Branch: MAIN
Changes since 1.54: +3 -3 lines
Diff to previous 1.54 (colored) to selected 1.144 (colored)

Use the correct type for the stored callback function

Revision 1.54 / (download) - annotate - [select for diffs], Fri May 27 11:35:07 2005 UTC (18 years, 9 months ago) by agc
Branch: MAIN
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored) to selected 1.144 (colored)

Sync the alternative readline interface with reality:

+ the rl_callback_handler_install takes a pointer to a void function
  which has one char * argument (it's called that way in the readline
  emulation source, otherwise there's no way to pass the line buffer
  to the function which processes the line when EOL is encountered)

+ provide a prototype for that function signature and use it

Makes the callback readline interface work now.

Revision 1.53 / (download) - annotate - [select for diffs], Sat May 7 16:01:25 2005 UTC (18 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.52: +25 -468 lines
Diff to previous 1.52 (colored) to selected 1.144 (colored)

Separate out the filename completion functions from the readline() code.
Pass in loads of parameters instead of relying on shed-loads of global
variables to modify the behaviour.
The filename completion code can now be enabled by code that uses el_gets().
(eg /bin/sh)

Revision 1.52 / (download) - annotate - [select for diffs], Tue Apr 19 03:29:18 2005 UTC (18 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.51: +7 -5 lines
Diff to previous 1.51 (colored) to selected 1.144 (colored)

check for pwd != NULL, fix a missed getpwnam.

Revision 1.51 / (download) - annotate - [select for diffs], Tue Apr 12 22:01:40 2005 UTC (18 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.50: +17 -3 lines
Diff to previous 1.50 (colored) to selected 1.144 (colored)

PR/29958: Peter Bex: add rl_variable_bind and rl_attempted_completion_over

Revision 1.50 / (download) - annotate - [select for diffs], Sat Apr 2 06:28:10 2005 UTC (18 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.49: +6 -4 lines
Diff to previous 1.49 (colored) to selected 1.144 (colored)

use getpwent_r

Revision 1.49 / (download) - annotate - [select for diffs], Thu Mar 10 19:34:46 2005 UTC (19 years ago) by christos
Branch: MAIN
CVS Tags: netbsd-3-base
Branch point for: netbsd-3
Changes since 1.48: +23 -10 lines
Diff to previous 1.48 (colored) to selected 1.144 (colored)

Always update the position variables before the map function is called.
From Rob Rodgers, thanks!

Revision 1.48 / (download) - annotate - [select for diffs], Wed Mar 9 23:55:35 2005 UTC (19 years ago) by christos
Branch: MAIN
Changes since 1.47: +3 -2 lines
Diff to previous 1.47 (colored) to selected 1.144 (colored)

set UNBUFFERED again after you do the line callback so that the new line
gets refreshed.

Revision 1.47 / (download) - annotate - [select for diffs], Wed Sep 8 18:15:57 2004 UTC (19 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.46: +6 -3 lines
Diff to previous 1.46 (colored) to selected 1.144 (colored)

cut out the middle-man and use el_insertstr() directly.

Revision 1.46 / (download) - annotate - [select for diffs], Fri Feb 27 14:52:18 2004 UTC (20 years ago) by christos
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2
Changes since 1.45: +22 -2 lines
Diff to previous 1.45 (colored) to selected 1.144 (colored)

Better fix for rl_prep_terminal() from Gerry Swislow.

Revision 1.45 / (download) - annotate - [select for diffs], Sat Jan 17 17:57:40 2004 UTC (20 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.44: +4 -4 lines
Diff to previous 1.44 (colored) to selected 1.144 (colored)

portability fixes.

Revision 1.44 / (download) - annotate - [select for diffs], Fri Dec 5 13:37:48 2003 UTC (20 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.43: +3 -4 lines
Diff to previous 1.43 (colored) to selected 1.144 (colored)

Tokenization function enhancements:
* Make tok_init(), tok_end(), tok_reset(), tok_line() and tok_str()
  publically available in <histedit.h>
* Documented the public functions in editline(3)
* Renamed tok_line() -> tok_str()
* Added new tok_line() which takes a "const LineInfo *" instead of
  "const char *" (the former has "cursor" information), and optionally
  return the argv index ("int *cursorc") and offset within that index
  ("int *cursorv").  This means that completion routines can use the
  tokenization code to crack the line and easily find which word the
  cursor is at.  (mmm, context sensitive completion :)
* Fixed TEST/test.c when using "continuation" lines (unmatched quote
  or \ at EOL), and added some more DEBUG messages including highlighting
  where the cursor is (with a `_').

Revision 1.43 / (download) - annotate - [select for diffs], Mon Nov 3 03:22:55 2003 UTC (20 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored) to selected 1.144 (colored)

Fix uninitialized variable.

Revision 1.42 / (download) - annotate - [select for diffs], Sun Nov 2 01:45:14 2003 UTC (20 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.41: +21 -12 lines
Diff to previous 1.41 (colored) to selected 1.144 (colored)

From: Gerry Swislow gerry at certif dot com

1) File name completion should list the files in the current directory
if no text is entered.  The previous version wouldn't list anything if
the text to complete was empty.

2) When listing directories, the entries "." and ".." shouldn't be
shown.

3) The filename completion should be used if the user's
rl_attempted_completion_function doesn't return any matches.  The
previous version didn't do that.

Revision 1.41 / (download) - annotate - [select for diffs], Sat Nov 1 23:39:22 2003 UTC (20 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.40: +3 -2 lines
Diff to previous 1.40 (colored) to selected 1.144 (colored)

initialize ptr.

Revision 1.40 / (download) - annotate - [select for diffs], Mon Oct 27 22:26:35 2003 UTC (20 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.39: +453 -365 lines
Diff to previous 1.39 (colored) to selected 1.144 (colored)

Make readline csh-like history work.
From Gerry Swislow <gerry at certif dot com>.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Oct 19 06:28:35 2003 UTC (20 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.38: +4 -3 lines
Diff to previous 1.38 (colored) to selected 1.144 (colored)

add rl_catch_signals

Revision 1.38 / (download) - annotate - [select for diffs], Thu Oct 16 22:26:32 2003 UTC (20 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.37: +115 -2 lines
Diff to previous 1.37 (colored) to selected 1.144 (colored)

More libedit readline emulation functions from: Gerry Swislow
<gerry at certif dot com>

Revision 1.37 / (download) - annotate - [select for diffs], Wed Oct 15 18:08:40 2003 UTC (20 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.36: +4 -3 lines
Diff to previous 1.36 (colored) to selected 1.144 (colored)

don't limit ^c to alpha c, and add VIS_NOSLASH so that vis(3) does not
produce \^c

Revision 1.36 / (download) - annotate - [select for diffs], Thu Oct 9 00:42:28 2003 UTC (20 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.35: +14 -6 lines
Diff to previous 1.35 (colored) to selected 1.144 (colored)

PR/23107: Nathan Williams: ^D as the first char on the command line does
not DTRT in readline compatibility mode

Revision 1.35 / (download) - annotate - [select for diffs], Fri Sep 26 17:44:51 2003 UTC (20 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.34: +98 -7 lines
Diff to previous 1.34 (colored) to selected 1.144 (colored)

Implement enough of readline's 4.0 async mode to make gdb happy. This is
not complete yet, but it seems to work...
This required to introduce an unbuffered mode to el_gets(), but that was
a minor change.

Revision 1.34 / (download) - annotate - [select for diffs], Sun Sep 14 22:15:23 2003 UTC (20 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.33: +9 -8 lines
Diff to previous 1.33 (colored) to selected 1.144 (colored)

Match the stupid function pointer declarations with actual readline's 4.0.
This is gross.

Revision 1.33 / (download) - annotate - [select for diffs], Sun Sep 14 21:55:39 2003 UTC (20 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.32: +5 -4 lines
Diff to previous 1.32 (colored) to selected 1.144 (colored)

make this compile.

Revision 1.32 / (download) - annotate - [select for diffs], Sun Sep 14 21:48:54 2003 UTC (20 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.31: +38 -15 lines
Diff to previous 1.31 (colored) to selected 1.144 (colored)

- provide enough hooks to compile gdb-5.3
- fix el_get(e, EL_TERMINAL, (char **))

Revision 1.31 / (download) - annotate - [select for diffs], Thu Jun 19 16:04:57 2003 UTC (20 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.30: +5 -4 lines
Diff to previous 1.30 (colored) to selected 1.144 (colored)

From michael@moria.de:
Fix realloc case where we could be running out of space if too many matches.

Revision 1.30 / (download) - annotate - [select for diffs], Thu Jun 19 15:55:06 2003 UTC (20 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.29: +11 -10 lines
Diff to previous 1.29 (colored) to selected 1.144 (colored)

From michael@moria.de:
- use __attribute__((__unused__)) in arguments where appropriate.
- some int -> size_t and char * to const char * conversions.

Revision 1.29 / (download) - annotate - [select for diffs], Sat Mar 29 22:48:38 2003 UTC (20 years, 11 months ago) by wiz
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored) to selected 1.144 (colored)

Consistently spell occurrence with two rs.

Revision 1.28 / (download) - annotate - [select for diffs], Mon Mar 10 01:14:54 2003 UTC (21 years ago) by christos
Branch: MAIN
Changes since 1.27: +10 -10 lines
Diff to previous 1.27 (colored) to selected 1.144 (colored)

null is not 0

Revision 1.27 / (download) - annotate - [select for diffs], Mon Mar 10 00:56:38 2003 UTC (21 years ago) by christos
Branch: MAIN
Changes since 1.26: +5 -2 lines
Diff to previous 1.26 (colored) to selected 1.144 (colored)

include alloca.h for systems that need it.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Jan 21 17:41:38 2003 UTC (21 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.25: +10 -7 lines
Diff to previous 1.25 (colored) to selected 1.144 (colored)

fix directory descriptor leak [from michael at moria dot de]

Revision 1.25 / (download) - annotate - [select for diffs], Sun Oct 27 21:43:35 2002 UTC (21 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored) to selected 1.144 (colored)

remove unused  variables.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Oct 27 21:41:50 2002 UTC (21 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.23: +12 -18 lines
Diff to previous 1.23 (colored) to selected 1.144 (colored)

vi mode and memory fixes from david laight.

Revision 1.23 / (download) - annotate - [select for diffs], Sun Oct 27 20:24:28 2002 UTC (21 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.22: +142 -23 lines
Diff to previous 1.22 (colored) to selected 1.144 (colored)

don't crash in memory shortage conditions.

Revision 1.22 / (download) - annotate - [select for diffs], Tue Apr 9 01:57:34 2002 UTC (21 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Changes since 1.21: +4 -6 lines
Diff to previous 1.21 (colored) to selected 1.144 (colored)

_rl_qsort_string_compare(): Fix casts.  This makes gcc 3.2 happy,
and also allows both LINTED comments to be removed.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Mar 18 16:20:36 2002 UTC (22 years ago) by christos
Branch: MAIN
Changes since 1.20: +4 -2 lines
Diff to previous 1.20 (colored) to selected 1.144 (colored)

Add a couple linted comment and enable WARNS=3

Revision 1.20 / (download) - annotate - [select for diffs], Mon Mar 18 16:00:57 2002 UTC (22 years ago) by christos
Branch: MAIN
Changes since 1.19: +18 -20 lines
Diff to previous 1.19 (colored) to selected 1.144 (colored)

- constify; passes all gcc and lint strict checks.
- add config.h [Jason Evans], to create a portable version of libedit that
  can be easily compiled on other OS's.

Revision 1.19 / (download) - annotate - [select for diffs], Wed Jan 10 08:10:45 2001 UTC (23 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.18: +9 -2 lines
Diff to previous 1.18 (colored) to selected 1.144 (colored)

fix partial completion - we failed to refresh screen in that case

Revision 1.18 / (download) - annotate - [select for diffs], Fri Jan 5 22:45:30 2001 UTC (23 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.17: +14 -2 lines
Diff to previous 1.17 (colored) to selected 1.144 (colored)

depoison the pure editline code from readline compatibility hacks.

Revision 1.17 / (download) - annotate - [select for diffs], Fri Jan 5 21:15:49 2001 UTC (23 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored) to selected 1.144 (colored)

Standard location of readline headers is /usr/include/readline/, so install
them there.
readline.h of libedit had to move to subdirectory 'readline', due to the way
BSD makefiles work; this is better than potentially fragile Makefile hacks

Revision 1.16 / (download) - annotate - [select for diffs], Thu Jan 4 15:55:53 2001 UTC (23 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.15: +7 -4 lines
Diff to previous 1.15 (colored) to selected 1.144 (colored)

fix lint problems.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jan 1 15:52:25 2001 UTC (23 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.14: +29 -9 lines
Diff to previous 1.14 (colored) to selected 1.144 (colored)

Add support for rl_completion_append_character and rl_special_prefixes.
This addresses lib/10513 by Giles Lean. Tested with PostgreSQL 7.0.2 psql.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Jan 1 11:03:16 2001 UTC (23 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.13: +11 -5 lines
Diff to previous 1.13 (colored) to selected 1.144 (colored)

history_tokenize(): fix one off-by-one bug
rl_complete_internal(): only replace the completed string with common part
	of possible matches if there is a possible completion

Revision 1.13 / (download) - annotate - [select for diffs], Sun Dec 31 09:50:32 2000 UTC (23 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.12: +13 -10 lines
Diff to previous 1.12 (colored) to selected 1.144 (colored)

rl_display_match_list():
	* pad entries shorter than 'max' by spaces correctly
	* fix off-by-one error which caused extra newline to be printed
	  if the list fit exactly to a screen
	* fix typo in _rl_qsort_string_compare, which caused the list to not
	  be sorted after all

Revision 1.12 / (download) - annotate - [select for diffs], Sat Dec 23 22:02:20 2000 UTC (23 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.11: +185 -48 lines
Diff to previous 1.11 (colored) to selected 1.144 (colored)

completion_matches(): fix a off-by-one bug, fix variable name typo
implement displaying of possible completions, add hook to display the list
	on second rl_complete() invocation in row (typically, double <TAB>)

This addresses the completion part of lib/11581 by Richard Earnshaw.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Sep 4 22:06:31 2000 UTC (23 years, 6 months ago) by lukem
Branch: MAIN
Changes since 1.10: +274 -267 lines
Diff to previous 1.10 (colored) to selected 1.144 (colored)

convert to new style guide, which includes:
- ansi prototypes & features (such as stdargs)
- 8 space indents

Revision 1.10 / (download) - annotate - [select for diffs], Fri Mar 10 13:06:43 2000 UTC (24 years ago) by jdolecek
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5, minoura-xpg4dl-base, minoura-xpg4dl
Changes since 1.9: +3 -4 lines
Diff to previous 1.9 (colored) to selected 1.144 (colored)

Fix _rl_compat_sub() to really honour 'globally' flag instead
	of making the substitution always globally - affects
	_history_expand_command() and in turn history_expand()

All praise lint :)

Revision 1.9 / (download) - annotate - [select for diffs], Fri Mar 10 12:55:15 2000 UTC (24 years ago) by jdolecek
Branch: MAIN
Changes since 1.8: +11 -8 lines
Diff to previous 1.8 (colored) to selected 1.144 (colored)

readline(): don't dereference NULL pointer if prompt is NULL
history_tokenize(): avoid stepping too far if backslash is last character
	on the passed string
update some comments

This makes gdb \ escaping work reliably and fixes lib/9511 by Assar Westerlund.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Jul 3 11:55:51 1999 UTC (24 years, 8 months ago) by lukem
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, comdex-fall-1999-base, comdex-fall-1999
Changes since 1.7: +2 -3 lines
Diff to previous 1.7 (colored) to selected 1.144 (colored)

don't try to free() something allocated with alloca() in rl_complete_internal().
(noticed while using completion in gdb and getting inundated with warnings from
the new free())

Revision 1.7 / (download) - annotate - [select for diffs], Fri Jul 2 15:21:26 1999 UTC (24 years, 8 months ago) by simonb
Branch: MAIN
Changes since 1.6: +6 -6 lines
Diff to previous 1.6 (colored) to selected 1.144 (colored)

More trailing white space.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Jun 12 18:58:05 1999 UTC (24 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.5: +8 -8 lines
Diff to previous 1.5 (colored) to selected 1.144 (colored)

Make this compile under linux

Revision 1.5 / (download) - annotate - [select for diffs], Sat Dec 12 19:54:16 1998 UTC (25 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4
Changes since 1.4: +66 -50 lines
Diff to previous 1.4 (colored) to selected 1.144 (colored)

many problems; variables hidden by others, size_t <-> confusion

Revision 1.4 / (download) - annotate - [select for diffs], Wed May 20 01:03:06 1998 UTC (25 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.3: +24 -15 lines
Diff to previous 1.3 (colored) to selected 1.144 (colored)

Adjust to the libedit api changes.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Nov 12 21:56:05 1997 UTC (26 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored) to selected 1.144 (colored)

el_gets() takes an int *, not a size_t *.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Oct 23 22:51:59 1997 UTC (26 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.1: +11 -11 lines
Diff to previous 1.1 (colored) to selected 1.144 (colored)

Const de-poisoning :-( Unfortunately the default gnu readline does not
have full prototypes... With those changes, and a single line change in
gdb/top.c, gdb links with -ledit

Revision 1.1 / (download) - annotate - [select for diffs], Thu Oct 23 22:24:12 1997 UTC (26 years, 5 months ago) by christos
Branch: MAIN
Diff to selected 1.144 (colored)

PR/4301: Jaromir Dolecek. Add gnu-readline wrapper for editline.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>