The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.37 / (download) - annotate - [select for diffs], Tue Jan 11 18:30:15 2022 UTC (2 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, 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, HEAD
Changes since 1.36: +8 -2 lines
Diff to previous 1.36 (colored) to selected 1.6 (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.36 / (download) - annotate - [select for diffs], Sun Aug 15 10:08:41 2021 UTC (2 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.35: +4 -2 lines
Diff to previous 1.35 (colored) to selected 1.6 (colored)

Disable attempts to handle EINTR and non-blocking I/O by default. It is
confusing to other programs and unexpected behavior. Reported by Ingo Schwarze.
This behavior is now controlled with EL_SAFEREAD.

Revision 1.34.16.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:05:23 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.34: +6 -8 lines
Diff to previous 1.34 (colored) next main 1.35 (colored) to selected 1.6 (colored)

Sync with HEAD

Revision 1.35 / (download) - annotate - [select for diffs], Fri Apr 26 16:56:57 2019 UTC (4 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, 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, 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.34: +6 -8 lines
Diff to previous 1.34 (colored) to selected 1.6 (colored)

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

Revision 1.34 / (download) - annotate - [select for diffs], Mon May 9 21:37:34 2016 UTC (7 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, 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, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: phil-wifi
Changes since 1.33: +4 -6 lines
Diff to previous 1.33 (colored) to selected 1.6 (colored)

Elide gcc warning about intermediate const casts caused by visibility change.

Revision 1.33 / (download) - annotate - [select for diffs], Mon Apr 11 18:56:31 2016 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.32: +8 -8 lines
Diff to previous 1.32 (colored) to selected 1.6 (colored)

Get rid of private/public; keep protected (Ingo Schwarze)

Revision 1.32 / (download) - annotate - [select for diffs], Mon Apr 11 00:50:13 2016 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored) to selected 1.6 (colored)

Char -> wchar_t from Ingo Schwarze.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Apr 11 00:22:48 2016 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.30: +8 -8 lines
Diff to previous 1.30 (colored) to selected 1.6 (colored)

more macro WIDECHAR undoing from Ingo Schwarze.

Revision 1.30 / (download) - annotate - [select for diffs], Sat Apr 9 18:43:17 2016 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.29: +6 -6 lines
Diff to previous 1.29 (colored) to selected 1.6 (colored)

More WIDECHAR elimination (Ingo Schwarze)

Revision 1.29 / (download) - annotate - [select for diffs], Wed Mar 23 22:27:48 2016 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.28: +2 -4 lines
Diff to previous 1.28 (colored) to selected 1.6 (colored)

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

Revision 1.28 / (download) - annotate - [select for diffs], Sun Feb 28 23:02:24 2016 UTC (8 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.27: +2 -9 lines
Diff to previous 1.27 (colored) to selected 1.6 (colored)

remove 4 clause licenses.

Revision 1.27 / (download) - annotate - [select for diffs], Wed Feb 24 17:13:22 2016 UTC (8 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.26: +2 -5 lines
Diff to previous 1.26 (colored) to selected 1.6 (colored)

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

Revision 1.26 / (download) - annotate - [select for diffs], Wed Feb 24 14:25:38 2016 UTC (8 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.25: +4 -2 lines
Diff to previous 1.25 (colored) to selected 1.6 (colored)

Get split el_getc and el_wgetc completely and call el_wgetc internally.
Change some character constants to they wide versions. (Ingo Schwarze)

Revision 1.25 / (download) - annotate - [select for diffs], Tue Feb 16 15:53:48 2016 UTC (8 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.24: +2 -4 lines
Diff to previous 1.24 (colored) to selected 1.6 (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.24 / (download) - annotate - [select for diffs], Tue Feb 16 14:08:25 2016 UTC (8 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.23: +3 -2 lines
Diff to previous 1.23 (colored) to selected 1.6 (colored)

cleanup chartype.h includes (Ingo Schwarze)

Revision 1.23 / (download) - annotate - [select for diffs], Mon Feb 15 21:56:35 2016 UTC (8 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored) to selected 1.6 (colored)

OpenBSD eln.c rev. 1.3 2011/11/27 21:46:44 pascal
kill a C++-style comment

Revision 1.22 / (download) - annotate - [select for diffs], Sun Feb 14 17:06:24 2016 UTC (8 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.21: +15 -6 lines
Diff to previous 1.21 (colored) to selected 1.6 (colored)

From Ingo Schwarze:

el_getc() for the WIDECHAR case, that is, the version in eln.c.
For a UTF-8 locale, it is broken in four ways:

 1. If the character read is outside the ASCII range, the function
    does an undefined cast from wchar_t to char.  Even if wchar_t
    is internally represented as UCS-4, that is wrong and dangerous
    because characters beyond codepoint U+0255 get their high bits
    truncated, meaning that perfectly valid printable Unicode
    characters get mapped to arbitrary bytes, even the ASCII escape
    character for some Unicode characters.  But wchar_t need not
    be implemented in terms of UCS-4, so the outcome of this function
    is undefined for any and all input.

 2. If insufficient space is available for the result, the function
    fails to detect failure and returns garbage rather than -1 as
    specified in the documentation.

 3. The documentation says that errno will be set on failure, but
    that doesn't happen either in the above case.

 4. Even for ASCII characters, the results may be wrong if wchar_t
    is not using UCS-4.

Revision 1.21 / (download) - annotate - [select for diffs], Fri Feb 12 17:23:21 2016 UTC (8 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.20: +5 -3 lines
Diff to previous 1.20 (colored) to selected 1.6 (colored)

Avoid c99 for now.

Revision 1.20 / (download) - annotate - [select for diffs], Fri Feb 12 15:36:08 2016 UTC (8 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.19: +2 -11 lines
Diff to previous 1.19 (colored) to selected 1.6 (colored)

GC IGNORE_EXTCHARS and simplify code (Ingo Schwarze)

Revision 1.19 / (download) - annotate - [select for diffs], Mon May 18 15:07:04 2015 UTC (8 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.18: +8 -2 lines
Diff to previous 1.18 (colored) to selected 1.6 (colored)

make el_gets() return the number of characters read in wide mode (not the
number of wide characters) From khorben@ by FreeBSD:
https://svnweb.freebsd.org/ports/head/devel/libedit/files/patch-src_eln.c?\
revision=382458&view=markup
XXX: Pullup-7

Revision 1.17.2.1 / (download) - annotate - [select for diffs], Wed May 13 13:33:55 2015 UTC (8 years, 11 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.17: +6 -4 lines
Diff to previous 1.17 (colored) next main 1.18 (colored) to selected 1.6 (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.18 / (download) - annotate - [select for diffs], Tue Mar 24 21:26:50 2015 UTC (9 years ago) by christos
Branch: MAIN
Changes since 1.17: +6 -4 lines
Diff to previous 1.17 (colored) to selected 1.6 (colored)

save and restore IGNORE_EXTCHARS like we do in the getc case. From:
https://bugzilla.redhat.com/attachment.cgi?id=1001894

Revision 1.14.2.1 / (download) - annotate - [select for diffs], Wed Aug 20 00:02:17 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-maxphys
Changes since 1.14: +31 -11 lines
Diff to previous 1.14 (colored) next main 1.15 (colored) to selected 1.6 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.15.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:51:57 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.15: +12 -5 lines
Diff to previous 1.15 (colored) next main 1.16 (colored) to selected 1.6 (colored)

Rebase.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Jun 18 18:12:28 2014 UTC (9 years, 10 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.16: +9 -2 lines
Diff to previous 1.16 (colored) to selected 1.6 (colored)

Don't depend on weak aliases to define the vi "alias" expansion function,
provide an API instead to set it.

Revision 1.13.2.2 / (download) - annotate - [select for diffs], Thu May 22 11:36:55 2014 UTC (9 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.13.2.1: +21 -8 lines
Diff to previous 1.13.2.1 (colored) to branchpoint 1.13 (colored) next main 1.14 (colored) to selected 1.6 (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.16 / (download) - annotate - [select for diffs], Tue May 20 15:05:08 2014 UTC (9 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.15: +5 -5 lines
Diff to previous 1.15 (colored) to selected 1.6 (colored)

Always NULL terminate the argv[] array. From OpenBSD.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Feb 26 13:50:29 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.14: +21 -8 lines
Diff to previous 1.14 (colored) to selected 1.6 (colored)

Add missing EL_REFRESH

Revision 1.13.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:05:27 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored) to selected 1.6 (colored)

sync with head

Revision 1.14 / (download) - annotate - [select for diffs], Sun Mar 11 21:15:25 2012 UTC (12 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored) to selected 1.6 (colored)

include the NULL in the argv conversion

Revision 1.13 / (download) - annotate - [select for diffs], Tue Aug 16 16:25:15 2011 UTC (12 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, 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, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: yamt-pagecache
Changes since 1.12: +5 -5 lines
Diff to previous 1.12 (colored) to selected 1.6 (colored)

re-enable -Wconversion

Revision 1.12 / (download) - annotate - [select for diffs], Thu Jul 28 20:50:55 2011 UTC (12 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored) to selected 1.6 (colored)

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

Revision 1.11 / (download) - annotate - [select for diffs], Thu Jul 28 01:05:20 2011 UTC (12 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.10: +6 -6 lines
Diff to previous 1.10 (colored) to selected 1.6 (colored)

term -> terminal
XXX: need to rename key_ too.

Revision 1.9.4.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:18:38 2011 UTC (12 years, 9 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored) next main 1.10 (colored) to selected 1.6 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Jun 20 09:11:17 2011 UTC (12 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored) to selected 1.6 (colored)

various build fixes for gcc 4.5.  from chuq.  XXX i'm not sure all of
these work properly wtf pointer aliasing, but there are no casts at
least...

the lib/libpuffs/puffs_priv.h is definately a real bug fix.

from chuq.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Nov 4 13:53:12 2010 UTC (13 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, cherry-xenmp-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: cherry-xenmp
Changes since 1.8: +3 -4 lines
Diff to previous 1.8 (colored) to selected 1.6 (colored)

PR/43998, PR/44021: In narrow history emulation, don't treat UTF-8 character
sets specially as far as history goes since we always need to do the conversion
from narrow [history] to wide [editline].

Revision 1.8 / (download) - annotate - [select for diffs], Sat Aug 28 15:44:59 2010 UTC (13 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.7: +9 -2 lines
Diff to previous 1.7 (colored) to selected 1.6 (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.7 / (download) - annotate - [select for diffs], Thu Apr 15 00:52:48 2010 UTC (14 years ago) by christos
Branch: MAIN
Changes since 1.6: +21 -7 lines
Diff to previous 1.6 (colored)

From Jess Thrysoee
- NARROW_HISTORY and IGNORE_EXTCHARS should not take effect if locale is UTF-8
- account for multi byte char length in

Revision 1.6 / (download) - annotate - [selected], Wed Jan 20 01:15:52 2010 UTC (14 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.5: +6 -4 lines
Diff to previous 1.5 (colored)

PR/42646: Joachim Kuebart: Shell crashes in libedit when window size changes
(SIGWINCH). Return NULL if el_gets() gets interrupted.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Jan 19 22:38:08 2010 UTC (14 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.4: +7 -2 lines
Diff to previous 1.4 (colored) to selected 1.6 (colored)

Fix wrapper for EL_EDITOR, from Michael L. Hitch

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jan 12 19:40:50 2010 UTC (14 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.3: +5 -3 lines
Diff to previous 1.3 (colored) to selected 1.6 (colored)

- call the mapping function directly instead of el_wset().
- save the strings passed to the mapping function so that they don't get
  re-used. This leaks. To fix it properly we could either pass a flag to
  free particular entries before re-using, or allocate all of them.
  Allocating all of them wastes memory, allocating some of them makes
  the code more complex.
This fixes compatibility binding (shell tab completion for example)

Revision 1.3 / (download) - annotate - [select for diffs], Thu Dec 31 15:58:26 2009 UTC (14 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.2: +3 -2 lines
Diff to previous 1.2 (colored) to selected 1.6 (colored)

- Document and enable wide character support.
- Fix read function compatibility.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Dec 30 23:54:52 2009 UTC (14 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.1: +10 -9 lines
Diff to previous 1.1 (colored) to selected 1.6 (colored)

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

Revision 1.1 / (download) - annotate - [select for diffs], Wed Dec 30 22:37:40 2009 UTC (14 years, 3 months ago) by christos
Branch: MAIN
Diff to selected 1.6 (colored)

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

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>