Move insque/remque/lsearch/lfind from libcompat to libc,

they are in XPG4-UNIX, XSH5.0, mentioned in SUSv3 etc.
Minimal update of the manpages. (more needed)
This commit is contained in:
drochner 2005-07-06 14:43:24 +00:00
parent a5bc956f51
commit e866f2794b
9 changed files with 32 additions and 48 deletions

View File

@ -1,6 +1,6 @@
# $NetBSD: shl.mi,v 1.311 2005/05/15 21:11:59 christos Exp $
# $NetBSD: shl.mi,v 1.312 2005/07/06 14:43:24 drochner Exp $
# Note: libtermcap and libtermlib are hardlinked and share the same version.
./lib/libc.so.12.129 base-sys-shlib
./lib/libc.so.12.130 base-sys-shlib
./lib/libcrypt.so.0.2 base-sys-shlib
./lib/libcrypto.so.2.2 base-crypto-shlib crypto
./lib/libedit.so.2.9 base-sys-shlib

View File

@ -1,4 +1,4 @@
# $NetBSD: shlib_version,v 1.164 2005/05/14 23:51:16 christos Exp $
# $NetBSD: shlib_version,v 1.165 2005/07/06 14:43:24 drochner Exp $
# Remember to update distrib/sets/lists/base/shl.* when changing
#
# things we wish to do on next major version bump:
@ -17,4 +17,4 @@
# - libc/net/getnet{ent,namadr}.c, netdb.h: remove __n_pad0
#
major=12
minor=129
minor=130

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.58 2005/04/03 20:09:29 christos Exp $
# $NetBSD: Makefile.inc,v 1.59 2005/07/06 14:43:24 drochner Exp $
# from: @(#)Makefile.inc 8.3 (Berkeley) 2/4/95
# stdlib sources
@ -8,11 +8,12 @@ SRCS+= _rand48.c _strtoimax.c _strtoumax.c _strtoll.c _strtoull.c \
a64l.c abort.c atexit.c atof.c atoi.c atol.c atoll.c \
bsearch.c calloc.c drand48.c erand48.c exit.c _Exit.c \
getenv.c getopt.c getopt_long.c getsubopt.c \
hcreate.c heapsort.c jrand48.c \
l64a.c lldiv.c lcong48.c lrand48.c malloc.c merge.c mrand48.c \
hcreate.c heapsort.c insque.c jrand48.c \
l64a.c lldiv.c lcong48.c lrand48.c lsearch.c \
malloc.c merge.c mrand48.c \
nrand48.c putenv.c qabs.c qdiv.c qsort.c posix_openpt.c pty.c \
radixsort.c rand.c rand_r.c random.c seed48.c setenv.c srand48.c \
strsuftoll.c strtod.c \
radixsort.c rand.c rand_r.c random.c remque.c \
seed48.c setenv.c srand48.c strsuftoll.c strtod.c \
strtoimax.c strtol.c strtoll.c strtoq.c strtoul.c strtoull.c \
strtoumax.c strtouq.c system.c tdelete.c tfind.c tsearch.c twalk.c \
__unsetenv13.c unsetenv.c \
@ -26,7 +27,8 @@ SRCS+= _rand48.c _strtoimax.c _strtoumax.c _strtoll.c _strtoull.c \
MAN+= a64l.3 abort.3 abs.3 alloca.3 atexit.3 atof.3 atoi.3 atol.3 atoll.3 \
bsearch.3 div.3 exit.3 getenv.3 getopt.3 getopt_long.3 getsubopt.3 \
grantpt.3 hcreate.3 labs.3 ldiv.3 llabs.3 lldiv.3 malloc.3 memory.3 \
grantpt.3 hcreate.3 insque.3 labs.3 ldiv.3 llabs.3 lldiv.3 lsearch.3 \
malloc.3 memory.3 \
posix_openpt.3 ptsname.3 qabs.3 \
qdiv.3 qsort.3 radixsort.3 rand48.3 rand.3 random.3 \
strsuftoll.3 strtod.3 strtol.3 strtoul.3 system.3 tsearch.3 unlockpt.3 \
@ -36,6 +38,8 @@ MLINKS+=a64l.3 l64a.3
MLINKS+=a64l.3 l64a_r.3
MLINKS+=getenv.3 setenv.3 getenv.3 unsetenv.3 getenv.3 putenv.3
MLINKS+=hcreate.3 hdestroy.3 hcreate.3 hsearch.3
MLINKS+=insque.3 remque.3
MLINKS+=lsearch.3 lfind.3
MLINKS+=malloc.3 calloc.3 malloc.3 realloc.3 malloc.3 free.3
MLINKS+=qsort.3 heapsort.3 qsort.3 mergesort.3
MLINKS+=rand.3 rand_r.3

View File

@ -24,43 +24,28 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $NetBSD: insque.3,v 1.11 2003/04/16 13:34:59 wiz Exp $
.\" $NetBSD: insque.3,v 1.1 2005/07/06 14:43:24 drochner Exp $
.\"
.Dd August 12, 1993
.Dd July 6, 2005
.Dt INSQUE 3
.Sh NAME
.Nm insque ,
.Nm remque
.Nd insert/remove element from a queue
.Sh LIBRARY
.Lb libcompat
.Lb libc
.Sh SYNOPSIS
.In search.h
.Ft struct qelem {
.br
.Ft struct qelem *q_forw;
.br
.Ft struct qelem *q_back;
.br
.Ft char q_data[];
.br
.Ft };
.br
.br
.Ft void
.Fn insque "struct qelem *elem" "struct qelem *pred"
.Fn insque "void *elem" "void *pred"
.Ft void
.Fn remque "struct qelem *elem"
.Fn remque "void *elem"
.Sh DESCRIPTION
.Bf -symbolic
These interfaces are available from the compatibility library, libcompat.
.Ef
.Pp
.Fn insque
and
.Fn remque
manipulate queues built from doubly linked lists.
Each element in the queue must begin with a "struct qelem".
.Sh DIAGNOSTICS
These functions are not atomic unless that machine architecture allows it.
.Sh HISTORY

View File

@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: insque.c,v 1.8 1999/09/20 04:48:03 lukem Exp $");
__RCSID("$NetBSD: insque.c,v 1.1 2005/07/06 14:43:24 drochner Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>

View File

@ -26,9 +26,9 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)lsearch.3 8.1 (Berkeley) 6/4/93
.\" $NetBSD: lsearch.3,v 1.8 2003/08/07 16:44:16 agc Exp $
.\" $NetBSD: lsearch.3,v 1.1 2005/07/06 14:43:24 drochner Exp $
.\"
.Dd June 4, 1993
.Dd July 6, 2005
.Dt LSEARCH 3
.Os
.Sh NAME
@ -36,17 +36,14 @@
.Nm lfind
.Nd linear searching routines
.Sh LIBRARY
.Lb libcompat
.Lb libc
.Sh SYNOPSIS
.In search.h
.Ft char *
.Fn lsearch "const void *key" "const void *base" "size_t *nelp" "size_t width" "int (*compar)(void *, void *)"
.Fn lsearch "const void *key" "const void *base" "size_t *nelp" "size_t width" "int (*compar)(const void *, const void *)"
.Ft char *
.Fn lfind "const void *key" "const void *base" "size_t *nelp" "size_t width" "int (*compar)(void *, void *)"
.Fn lfind "const void *key" "const void *base" "size_t *nelp" "size_t width" "int (*compar)(const void *, const void *)"
.Sh DESCRIPTION
.Bf -symbolic
These interfaces were obsolete before they were written.
They are available from the compatibility library, libcompat.
.Ef
.Pp
The functions
.Fn lsearch ,

View File

@ -35,7 +35,7 @@
#if 0
static char sccsid[] = "@(#)lsearch.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: lsearch.c,v 1.8 2003/08/07 16:44:16 agc Exp $");
__RCSID("$NetBSD: lsearch.c,v 1.1 2005/07/06 14:43:24 drochner Exp $");
#endif
#endif /* LIBC_SCCS and not lint */

View File

@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: remque.c,v 1.8 1999/09/20 04:48:04 lukem Exp $");
__RCSID("$NetBSD: remque.c,v 1.1 2005/07/06 14:43:24 drochner Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.27 2004/04/18 04:31:51 lukem Exp $
# $NetBSD: Makefile,v 1.28 2005/07/06 14:43:24 drochner Exp $
.include <bsd.own.mk>
@ -28,15 +28,13 @@ MLINKS+=stty.3 gtty.3
# compat 4.3 sources
# missing: ecvt.c gcvt.c sibuf.c sobuf.c strout.c
SRCS+= cfree.c lsearch.c regex.c rexec.c
SRCS+= insque.c remque.c ruserpass.c
SRCS+= cfree.c regex.c rexec.c
SRCS+= ruserpass.c
# missing: ecvt.0
MAN+= insque.3 lsearch.3 re_comp.3 rexec.3
MAN+= re_comp.3 rexec.3
#MLINKS+=ecvt.3 fcvt.3 ecvt.3 gcvt.3
MLINKS+=insque.3 remque.3
MLINKS+=lsearch.3 lfind.3
MLINKS+=re_comp.3 re_exec.3