diff options
author | obrien <obrien@FreeBSD.org> | 2003-01-19 01:16:01 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2003-01-19 01:16:01 +0000 |
commit | 8af24a10fdd1ff689c2d91440dad34dd07112831 (patch) | |
tree | 870c7ff6e57603f6419efe7c8a9eb33c99364ee1 /lib/libc/gen/stringlist.3 | |
parent | 4f8d2d71f0038c143c254adf5df01f4885649f3d (diff) | |
download | FreeBSD-src-8af24a10fdd1ff689c2d91440dad34dd07112831.zip FreeBSD-src-8af24a10fdd1ff689c2d91440dad34dd07112831.tar.gz |
Sync with NetBSD -- sl_add() now returns an int.
Diffstat (limited to 'lib/libc/gen/stringlist.3')
-rw-r--r-- | lib/libc/gen/stringlist.3 | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/lib/libc/gen/stringlist.3 b/lib/libc/gen/stringlist.3 index 496ad98..4665176 100644 --- a/lib/libc/gen/stringlist.3 +++ b/lib/libc/gen/stringlist.3 @@ -1,6 +1,6 @@ -.\" $NetBSD: stringlist.3,v 1.2 1997/04/09 08:59:25 kleink Exp $ +.\" $NetBSD: stringlist.3,v 1.5 1999/03/22 19:44:46 garbled Exp $ .\" -.\" Copyright (c) 1997 The NetBSD Foundation, Inc. +.\" Copyright (c) 1997, 1999 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This file was contributed to The NetBSD Foundation by Luke Mewburn. @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 24, 1997 +.Dd November 28, 1999 .Os .Dt STRINGLIST 3 .Sh NAME @@ -51,7 +51,7 @@ .In stringlist.h .Ft StringList * .Fn sl_init -.Ft void +.Ft int .Fn sl_add "StringList *sl" "char *item" .Ft void .Fn sl_free "StringList *sl" "int freeall" @@ -91,7 +91,10 @@ The following stringlist manipulation functions are available: .It Fn sl_init Create a stringlist. Returns a pointer to a -.Vt StringList . +.Vt StringList , +or +.Dv NULL +in case of failure. .It Fn sl_free Releases memory occupied by .Fa sl @@ -111,7 +114,8 @@ to at .Fa sl->sl_cur , extending the size of -.Fa sl->sl_str +.Fa sl->sl_str . +Returns zero upon success, -1 upon failure. .It Fn sl_find Find .Fa item @@ -122,3 +126,10 @@ returning NULL if it's not found. .Sh SEE ALSO .Xr free 3 , .Xr malloc 3 +.Sh HISTORY +The +.Nm +functions appeared in +.Fx 2.2.6 +and +.Nx 1.3 . |