Commit graph

61 commits

Author SHA1 Message Date
Warner Losh dc36d6f9bb lib: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by:		Netflix
2023-11-26 22:23:28 -07:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
John Baldwin 7973f26ad6 libedit: Disable -Wuse-after-free for chartype.c.
GCC 12 thinks ct_visual_string can reuse a pointer after it has been
reallocated, but in this case the warning appears false.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D36820
2022-10-03 16:10:43 -07:00
Baptiste Daroussin cbc83e378a ncurses: chase dependency changes in the source tree
Differential Revision:	https://reviews.freebsd.org/D32098
2021-10-04 11:38:24 +02:00
Piotr Pawel Stefaniak b315a7296d sh(1): autocomplete commands
Without this patch, sh can autocomplete file names but not commands from
$PATH. Use libedit's facility to execute custom function for autocomplete,
but yield to the library's standard autocomplete function when cursor is
not at position 0.

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D29361
2021-03-29 11:14:27 +02:00
John Baldwin 0b7f1af804 Bump shared library versions after ncurses bump in 13.
A few shared libraries in the base system link against ncurses.  An
upgrade from a 12.x host to 13 results in ABI breakage for existing
binaries since the newer versions of these libraries link against the
newer ncurses while the binary itself links against the older ncurses.
For example, dialog4ports built on 12.x sometimes crashes on 13 since
it depends on libdialog which links against ncurses internally.

MFC after:	3 days
Reviewed by:	kib, delphij
Differential Revision:	https://reviews.freebsd.org/D28448
2021-02-01 17:11:49 -08:00
Baptiste Daroussin 8156570000 Update libedit to a snapshot from 2019-09-10
This version bring many fixes regarding unicode support
It also adds proper support for filename completion (we do not need our custom
patches anymore)
Improves the libreadline compatibility

Note that the same work was done by Yuichiro Naito in
https://reviews.freebsd.org/D21196 the main difference is in this case we have
reimported libedit in contrib to fix a long standing mess in the previous merges
which prevented a proper update workflow. (discussed long ago with pfg@)

The only difference with upstream libedit is we have added a compatibility shim
for the _elf_fn_sh_complete function which we previously added to support quoting
in filename completion and is not needed anymore.
This was added to continue supported old /bin/sh binaries and not break backward
compatibility (as discussed with jilles@)

Reviewed by:	Yuichiro Naito <naito.yuichiro_gmail.com>
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D21584
2019-09-13 06:50:02 +00:00
Pedro F. Giffuni 6ea268b652 libedit: sort the Makefile in line with NetBSD's version.
NetBSD's libedit has been been cleaned-up considerably so the
non--widecharacter version is no longer an option. Re -sorting the
Makefile should make it easier for some brave soul trying to update it.

No functional change intended.

MFC after:	5 days
2018-01-29 22:38:23 +00:00
Pedro F. Giffuni 98fa04efed libedit: raise the warning level to 3.
NetBSD has the warning level to 5 but that actually triggers -Wcast-qual.
2017-09-14 19:50:07 +00:00
Pedro F. Giffuni 678bbc14b2 MFV 312999:
Update libedit 2016-03-21

Minor cleanups plus some license syncing.

Obtained from:	NetBSD
X-MFC with:	r312997
2017-01-30 23:00:51 +00:00
Pedro F. Giffuni 450aba5b34 MFV r312996:
Re-import libedit 2016-02-27

This reverts r296435: the issues related to lldb and this update appear to
have been identified (in lldb).

Obtained from:	NetBSD
Reported by:	emaste
MFC after:	3 weeks
2017-01-30 22:11:53 +00:00
Marcel Moolenaar 2b4da8aa20 When MAKEOBJDIRPREFIX points to a case-insensitive file system, the
build can break when different source files create the same target
files (case-insensitivity speaking).  This is the case for object
files compiled with -fpic and shared libraries. The former uses
an extension of ".So", and the latter an extension ".so".  Rename
shared object files from *.So to *.pico to match what NetBSD does.

See also r305855

MFC after:	1 month
Sponsored by:	Bracket Computing
Differential Revision:	https://reviews.freebsd.org/D7906
2016-09-24 15:11:27 +00:00
Glen Barber 7e2d468315 MFH
Sponsored by:	The FreeBSD Foundation
2016-03-07 15:44:54 +00:00
Pedro F. Giffuni 1f37f0f18f Revert r296175
Undo update of libedit 2016-02-27

Something in libedit appears to be causing breakage in lldb38.
The changes are not generally huge but they are suficient to
to justify reverting for now.

Reported by:	novel, bapt
2016-03-06 21:32:54 +00:00
Glen Barber 52259a98ad MFH
Sponsored by:	The FreeBSD Foundation
2016-03-02 16:14:46 +00:00
Pedro F. Giffuni e81f248547 MFV r296159
Sync our libedit with NetBSD's libedit 2016-02-27.

Obtained from:	NetBSD
2016-02-29 00:15:25 +00:00
Glen Barber c389411c8a Remove libc, librtld_db, libthr packages, and further increase
the constraints on what needs to be installed in a specific to
maintain consistency during upgrades.

Create a new clibs package containing libraries that are needed
as a bare minimum for consistency.

With much help and input from:	kib
Sponsored by:	The FreeBSD Foundation
2016-02-05 21:01:08 +00:00
Glen Barber a70cba9582 First pass through library packaging.
Sponsored by:	The FreeBSD Foundation
2016-02-04 21:16:35 +00:00
Baptiste Daroussin 18b2ee82db Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
Baptiste Daroussin 4232f82668 Enforce overwritting SHLIBDIR
Since METAMODE has been added, sys.mk loads bsd.mkopt.mk which ends load loading
bsd.own.mk which then defines SHLIBDIR before all the Makefile.inc everywhere.

This makes /lib being populated again.

Reported by:	many
2015-06-15 15:34:20 +00:00
Baptiste Daroussin c1a66a97f9 Synchronize libedit with NetBSD and activate UTF-8 support [1]
Differences with NetBSD
Reapply our local patches on top of it
Fix Unicode environement detection
Fix reading a line in unicode environment.
It allows /bin/sh to works in UTF-8 envs

Differential Revision:	https://reviews.freebsd.org/D1455
Reviewed by:	jilles, pfg
Obtained from:	NetBSD [1]
MFC after:	1 month
Relnotes:	yes
2015-01-09 07:40:56 +00:00
Baptiste Daroussin 6b129086dc Convert libraries to use LIBADD
While here reduce a bit overlinking
2014-11-25 11:07:26 +00:00
Brooks Davis 80189b3b09 Replace all uses of libncurses and libtermcap with their wide character
variants.  This allows usable file system images (i.e. those with both a
shell and an editor) to be created with only one copy of the curses library.

Exp-run:	antoine
PR:		189842
Discussed with:	bapt
Sponsored by:	DARPA, AFRL
2014-07-17 18:24:34 +00:00
Pedro F. Giffuni c4a1f025cf Sync some (mostly cosmetical) changes from NetBSD
Makefile,v 1.37
tc1.c v 1.3
Rename TEST/test.c tc1.c

common.c,v 1.23
pass lint on _LP64.

emacs.c,v 1.22
pass lint on _LP64.

filecomplete.h,v 1.8
mv NetBSD ID back from 1.9 as we don't
have the widecharacter support.

prompt.c,v 1.14
prompt.h,v 1.9
term.h,v 1.20
read.h,v 1.6
Update NetBSD version strings

sys.h,v 1.12
Misc sun stuff.

tty.c 1.31
handle EINTR in the termios operations
Allow a single process to control multiple ttys (for pthreads using _REENTRANT)
using multiple EditLine objects.
pass lint on _LP64.
Don't depend on side effects inside an assert

MFC after:	1 week
Obtained from:	NetBSD
2014-07-10 17:52:17 +00:00
Jilles Tjoelker 2dea247f6b libedit: Revert r247683 to fix buildworld.
I think r247683 is wrong because libedit.so actually uses symbols from
libcurses.so. Since it breaks the build, revert it now.
2013-03-03 14:42:15 +00:00
Pedro F. Giffuni 0b62a02269 libedit does not need to be linked with ncurses
libedit uses the terminfo headers but doesn't really need
to be linked with ncurses.

Discussed with:		christos@NetBSD
MFC after;		3 days
2013-03-03 02:11:03 +00:00
David E. O'Brien 1e3f14466b * Add the readline(3) API to libedit. The libedit versions of
{readline,history}.h are in /usr/include/edit so as to not conflict with
  the GNU libreadline versions.  To use the libedit readline(3) one should
  add "-I/usr/include/edit" to their Makefile
  (spelled "-I${DESTDIR}/${INCLUDEDIR}/edit" within the FreeBSD source tree).

* Enable its use in the BSD licensed utilities that support readline(3).

* To make it easier to sync libedit development with NetBSD, histedit.h
  is moved into libedit's directory as history shows shown we keep merging
  it into that location.

Obtained from:	NetBSD
Sponsored by:	Juniper Networks
2011-04-05 18:41:01 +00:00
Jilles Tjoelker 96535454fc libedit: Add basic filename completion code from NetBSD.
This will be used to provide filename completion in sh(1).

Changes from the NetBSD code:
* wide character support disabled, as in the rest of libedit
* config.h and related portability stuff reduced/disabled, as in the rest
  of libedit

Submitted by:	Guy Yur
Obtained from:	NetBSD
2010-06-13 17:04:42 +00:00
Ed Schouten daaf575910 Build lib/ with WARNS=6 by default.
Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.

I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.
2010-01-02 09:58:07 +00:00
Ken Smith 3ca3047aee Bump the version of all non-symbol-versioned shared libraries in
preparation for 8.0-RELEASE.  Add the previous version of those
libraries to ObsoleteFiles.inc and bump __FreeBSD_Version.

Reviewed by:    kib
Approved by:    re (rwatson)
2009-07-19 17:25:24 +00:00
Daniel Eischen 419ecd5dee Bump library versions in preparation for 7.0.
Ok'd by:	kan
2007-05-21 02:49:08 +00:00
Stefan Farfeleder 76d00450e6 Sync libedit with recent NetBSD developments. Including improvements to the
vi-mode, removal of clause 3, cleanups and the export of the tokenization
functions.

Not included: config.h, filecomplete.{c,h}
2005-08-07 20:55:59 +00:00
Ken Smith a84020c2b9 Bump the shared library version number of all libraries that have not
been bumped since RELENG_5.

Reviewed by:	ru
Approved by:	re (not needed for commit check but in principle...)
2005-07-22 17:19:05 +00:00
David E. O'Brien 4f4a104ee8 style.Makefile(5) 2003-08-18 15:25:39 +00:00
Gordon Tetlow 41d8423f71 Stage 3 of dynamic root support. Make all the libraries needed to run
binaries in /bin and /sbin installed in /lib. Only the versioned files
reside in /lib, the .so symlink continues to live /usr/lib so the
toolchain doesn't need to be modified.
2003-08-17 08:28:46 +00:00
Peter Wemm 224af215a6 Zap now-unused SHLIB_MINOR 2002-09-28 00:25:32 +00:00
Ruslan Ermilov 357bbe4abe -ltermcap is spelled -lncurses nowadays. 2002-04-09 13:04:31 +00:00
David E. O'Brien 4f375b90fc Clean this up after the NetBSD syncing. 2001-10-01 23:10:48 +00:00
David E. O'Brien be4f05c4f6 Our histedit.h lives in src/include. 2001-10-01 21:08:03 +00:00
David E. O'Brien 3c19577344 + Sync with NetBSD, bringing in feature enhancements.
+ Convert to ANSI-C function definitions
+ style(9)

Submitted by:	kris
2001-10-01 08:41:27 +00:00
Andrey A. Chernov 6055a95fee Back out history.3 link removing - conflict fixed in libreadline instead 2001-04-12 09:57:12 +00:00
Andrey A. Chernov 45b655df03 Comment out one of many editline.3 MLINKS conflicting with libreadline
(history.3)
2001-04-12 03:33:13 +00:00
Ruslan Ermilov 4a558355e5 MAN[1-9] -> MAN. 2001-03-27 17:27:19 +00:00
Marcel Moolenaar 1b779c59bf Fix style bugs
Submitted by: bde
1999-10-03 10:41:40 +00:00
Marcel Moolenaar 3cf3c5d9dd sigset_t change (part 5 of 5)
-----------------------------

Most of the userland changes are in libc. For both the alpha
and the i386 setjmp has been changed to accomodate for the
new sigset_t. Internally, libc is mostly rewritten to use the
new syscalls. The exception is in compat-43/sigcompat.c

The POSIX thread library has also been rewritten to use the
new sigset_t. Except, that it currently only handles NSIG
signals instead of the maximum _SIG_MAXSIG. This should not
be a problem because current applications don't use any
signals higher than NSIG.

There are version bumps for the following libraries:
  libdialog
  libreadline
  libc
  libc_r
  libedit
  libftpio
  libss

These libraries either a) have one of the modified structures
visible in the interface, or b) use sigset_t internally and
may cause breakage if new binaries are used against libraries
that don't have the sigset_t change. This not an immediate
issue, but will be as soon as applications start using the
new range to its fullest.

NOTE: libncurses already had an version bump and has not been
      given one now.

NOTE: doscmd is a real casualty and has been disconnected for
      the moment. Reconnection will eventually happen after
      doscmd has been fixed. I'm aware that being the last one
      to touch it, I'm automaticly promoted to being maintainer.
      According to good taste this means that I will receive a
      badge which either will be glued or mechanically stapled,
      drilled or otherwise violently forced onto me :-)

NOTE: pcvt/vttest cannot be compiled with -traditional. The
      change cause sys/types to be included along the way which
      contains the const and volatile modifiers. I don't consider
      this a solution, but more a workaround.
1999-09-29 15:18:46 +00:00
Matthew N. Dodd 70ff7ab750 Fix MLINKS.
Noticed by: Norman C. Rice <nrice@emu.sourcee.com>
1999-08-20 17:37:22 +00:00
Matthew N. Dodd 90cc1fbc53 Add 2 functions: el_data_set() and el_data_get() which do what you
would expect.  (Allow user data to be associated with an EditLine context).

As this changes no existing interfaces and doesn't alter any structs
visable to the user I've been told that its not necessary to bump
the version of the library.
1999-08-20 01:17:12 +00:00
John Polstra f92bdbd010 Switch to using ".So" as the extension for PIC object files rather
than ".so".  The old extension conflicted with well-established
naming conventions for dynamically loadable modules.

The "clean" targets continue to remove ".so" files too, to deal with
old systems.
1999-01-09 21:51:00 +00:00
Mike Smith fb4289da2a Improve dependancy behaviour a little more.
This is still pretty disgusting.

Submitted by:	bde
1997-07-28 03:33:04 +00:00
Mike Smith a39c8cb67d List help.h a a dependancy for editline.c
Use 'beforedepend' instead of '.depend' to hang automatically-generated
headers off.

XXX the latter is bogus without a 'beforeall' target and explicit ordering
of dependancy generation for targets.
1997-07-27 10:47:49 +00:00