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


Keyword substitution: kv
Default branch: MAIN


Revision 1.38: download - view: text, markup, annotated - select for diffs
Fri May 17 02:59:08 2024 UTC (8 months ago) by christos
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +10 -2 lines
When calling el_line make sure that we call the resizing function
callback because el_line updates the legacy LineInfo structure and
we need to notify that the cached copy of the the buffer has changed.
Of course the resizing function can call el_line itself to update
the buffer, so prevent recursion. Bug found by Peter Rufer at Arista.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Tue Jan 11 18:30:15 2022 UTC (3 years ago) by christos
Branches: MAIN
CVS tags: netbsd-10-base, netbsd-10-1-RELEASE, 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
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +8 -2 lines
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 - view: text, markup, annotated - select for diffs
Sun Aug 15 10:08:41 2021 UTC (3 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +4 -2 lines
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 - view: text, markup, annotated - select for diffs
Mon Jun 10 22:05:23 2019 UTC (5 years, 7 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.34: preferred, colored; next MAIN 1.35: preferred, colored
Changes since revision 1.34: +6 -8 lines
Sync with HEAD

Revision 1.35: download - view: text, markup, annotated - select for diffs
Fri Apr 26 16:56:57 2019 UTC (5 years, 8 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-4-RELEASE, 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
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +6 -8 lines
Follow the man page for EL_GETTC and not require a NULL terminated argument
list: https://reviews.llvm.org/D61191

Revision 1.34: download - view: text, markup, annotated - select for diffs
Mon May 9 21:37:34 2016 UTC (8 years, 8 months ago) by christos
Branches: 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-3-RELEASE, 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
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +4 -6 lines
Elide gcc warning about intermediate const casts caused by visibility change.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Mon Apr 11 18:56:31 2016 UTC (8 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +8 -8 lines
Get rid of private/public; keep protected (Ingo Schwarze)

Revision 1.32: download - view: text, markup, annotated - select for diffs
Mon Apr 11 00:50:13 2016 UTC (8 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +3 -3 lines
Char -> wchar_t from Ingo Schwarze.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Mon Apr 11 00:22:48 2016 UTC (8 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +8 -8 lines
more macro WIDECHAR undoing from Ingo Schwarze.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Sat Apr 9 18:43:17 2016 UTC (8 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +6 -6 lines
More WIDECHAR elimination (Ingo Schwarze)

Revision 1.29: download - view: text, markup, annotated - select for diffs
Wed Mar 23 22:27:48 2016 UTC (8 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +2 -4 lines
Start removing the WIDECHAR ifdefs; building without it has stopped working
anyway. (Ingo Schwarze)

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sun Feb 28 23:02:24 2016 UTC (8 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -9 lines
remove 4 clause licenses.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Wed Feb 24 17:13:22 2016 UTC (8 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +2 -5 lines
Make the read_char function always take a wchar_t * argument (Ingo Schwarze)

Revision 1.26: download - view: text, markup, annotated - select for diffs
Wed Feb 24 14:25:38 2016 UTC (8 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +4 -2 lines
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 - view: text, markup, annotated - select for diffs
Tue Feb 16 15:53:48 2016 UTC (8 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -4 lines
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 - view: text, markup, annotated - select for diffs
Tue Feb 16 14:08:25 2016 UTC (8 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +3 -2 lines
cleanup chartype.h includes (Ingo Schwarze)

Revision 1.23: download - view: text, markup, annotated - select for diffs
Mon Feb 15 21:56:35 2016 UTC (8 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +3 -3 lines
OpenBSD eln.c rev. 1.3 2011/11/27 21:46:44 pascal
kill a C++-style comment

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun Feb 14 17:06:24 2016 UTC (8 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +15 -6 lines
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 - view: text, markup, annotated - select for diffs
Fri Feb 12 17:23:21 2016 UTC (8 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +5 -3 lines
Avoid c99 for now.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Fri Feb 12 15:36:08 2016 UTC (8 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +2 -11 lines
GC IGNORE_EXTCHARS and simplify code (Ingo Schwarze)

Revision 1.19: download - view: text, markup, annotated - select for diffs
Mon May 18 15:07:04 2015 UTC (9 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +8 -2 lines
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 - view: text, markup, annotated - select for diffs
Wed May 13 13:33:55 2015 UTC (9 years, 8 months ago) by martin
Branches: 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
Diff to: previous 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17: +6 -4 lines
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 - view: text, markup, annotated - select for diffs
Tue Mar 24 21:26:50 2015 UTC (9 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +6 -4 lines
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 - view: text, markup, annotated - select for diffs
Wed Aug 20 00:02:17 2014 UTC (10 years, 5 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.14: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14: +31 -11 lines
Rebase to HEAD as of a few days ago.

Revision 1.15.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:51:57 2014 UTC (10 years, 5 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15: +12 -5 lines
Rebase.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Jun 18 18:12:28 2014 UTC (10 years, 7 months ago) by christos
Branches: MAIN
CVS tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +9 -2 lines
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 - view: text, markup, annotated - select for diffs
Thu May 22 11:36:55 2014 UTC (10 years, 8 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.13.2.1: preferred, colored; branchpoint 1.13: preferred, colored; next MAIN 1.14: preferred, colored
Changes since revision 1.13.2.1: +21 -8 lines
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 - view: text, markup, annotated - select for diffs
Tue May 20 15:05:08 2014 UTC (10 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +5 -5 lines
Always NULL terminate the argv[] array. From OpenBSD.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Wed Feb 26 13:50:29 2014 UTC (10 years, 10 months ago) by christos
Branches: 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
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +21 -8 lines
Add missing EL_REFRESH

Revision 1.13.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:05:27 2012 UTC (12 years, 9 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +3 -3 lines
sync with head

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sun Mar 11 21:15:25 2012 UTC (12 years, 10 months ago) by christos
Branches: 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
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +3 -3 lines
include the NULL in the argv conversion

Revision 1.13: download - view: text, markup, annotated - select for diffs
Tue Aug 16 16:25:15 2011 UTC (13 years, 5 months ago) by christos
Branches: 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
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +5 -5 lines
re-enable -Wconversion

Revision 1.12: download - view: text, markup, annotated - select for diffs
Thu Jul 28 20:50:55 2011 UTC (13 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +3 -3 lines
kill ptr_t and ioctl_t, add  * sizeof(*foo) to all allocations.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Thu Jul 28 01:05:20 2011 UTC (13 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +6 -6 lines
term -> terminal
XXX: need to rename key_ too.

Revision 1.9.4.1: download - view: text, markup, annotated - select for diffs
Thu Jun 23 14:18:38 2011 UTC (13 years, 7 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9: +3 -3 lines
Catchup with rmind-uvmplock merge.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Jun 20 09:11:17 2011 UTC (13 years, 7 months ago) by mrg
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Thu Nov 4 13:53:12 2010 UTC (14 years, 2 months ago) by christos
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231, cherry-xenmp-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: cherry-xenmp
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +3 -4 lines
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 - view: text, markup, annotated - select for diffs
Sat Aug 28 15:44:59 2010 UTC (14 years, 4 months ago) by christos
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +9 -2 lines
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 - view: text, markup, annotated - select for diffs
Thu Apr 15 00:52:48 2010 UTC (14 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +21 -7 lines
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 - view: text, markup, annotated - select for diffs
Wed Jan 20 01:15:52 2010 UTC (15 years ago) by christos
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +6 -4 lines
PR/42646: Joachim Kuebart: Shell crashes in libedit when window size changes
(SIGWINCH). Return NULL if el_gets() gets interrupted.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Jan 19 22:38:08 2010 UTC (15 years ago) by christos
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +7 -2 lines
Fix wrapper for EL_EDITOR, from Michael L. Hitch

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Jan 12 19:40:50 2010 UTC (15 years ago) by christos
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +5 -3 lines
- 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 - view: text, markup, annotated - select for diffs
Thu Dec 31 15:58:26 2009 UTC (15 years ago) by christos
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -2 lines
- Document and enable wide character support.
- Fix read function compatibility.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Wed Dec 30 23:54:52 2009 UTC (15 years ago) by christos
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +10 -9 lines
Fix wide build, test it, but don't turn it on yet.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Wed Dec 30 22:37:40 2009 UTC (15 years ago) by christos
Branches: MAIN
Wide character support (UTF-8) from Johny Mattsson; currently disabled.

Diff request

This form allows you to request diffs 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.

Log view options

CVSweb <webmaster@jp.NetBSD.org>