Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sl_init(3) [netbsd man page]

STRINGLIST(3)						   BSD Library Functions Manual 					     STRINGLIST(3)

NAME
stringlist, sl_init, sl_add, sl_free, sl_find, sl_delete -- stringlist manipulation functions LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <stringlist.h> StringList * sl_init(); int sl_add(StringList *sl, char *item); void sl_free(StringList *sl, int freeall); char * sl_find(StringList *sl, const char *item); int sl_delete(StringList *sl, const char *item, int freeit); DESCRIPTION
The stringlist functions manipulate stringlists, which are lists of strings that extend automatically if necessary. The StringList structure has the following definition: typedef struct _stringlist { char **sl_str; size_t sl_max; size_t sl_cur; } StringList; where: sl_str is a pointer to the base of the array containing the list, sl_max is the size of sl_str, and sl_cur is the offset in sl_str of the current element. The following stringlist manipulation functions are available: sl_init() Create a stringlist. Returns a pointer to a StringList, or NULL in case of failure. sl_free() Releases memory occupied by sl and the sl->sl_str array. If freeall is non-zero, then each of the items within sl->sl_str is released as well. sl_add() Add item to sl->sl_str at sl->sl_cur, extending the size of sl->sl_str. Returns zero upon success, -1 upon failure. sl_find() Find item in sl, returning NULL if it's not found. sl_delete() Remove item from the list. If freeit is non-zero, the string is freed. Returns 0 if the name is found and -1 if the name is not found. SEE ALSO
free(3), malloc(3) HISTORY
The stringlist functions appeared in NetBSD 1.3. BSD
May 6, 2010 BSD

Check Out this Related Man Page

STRINGLIST(3)						   BSD Library Functions Manual 					     STRINGLIST(3)

NAME
stringlist, sl_init, sl_add, sl_free, sl_find, sl_delete -- stringlist manipulation functions LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <stringlist.h> StringList * sl_init(); int sl_add(StringList *sl, char *item); void sl_free(StringList *sl, int freeall); char * sl_find(StringList *sl, const char *item); int sl_delete(StringList *sl, const char *item, int freeit); DESCRIPTION
The stringlist functions manipulate stringlists, which are lists of strings that extend automatically if necessary. The StringList structure has the following definition: typedef struct _stringlist { char **sl_str; size_t sl_max; size_t sl_cur; } StringList; where: sl_str is a pointer to the base of the array containing the list, sl_max is the size of sl_str, and sl_cur is the offset in sl_str of the current element. The following stringlist manipulation functions are available: sl_init() Create a stringlist. Returns a pointer to a StringList, or NULL in case of failure. sl_free() Releases memory occupied by sl and the sl->sl_str array. If freeall is non-zero, then each of the items within sl->sl_str is released as well. sl_add() Add item to sl->sl_str at sl->sl_cur, extending the size of sl->sl_str. Returns zero upon success, -1 upon failure. sl_find() Find item in sl, returning NULL if it's not found. sl_delete() Remove item from the list. If freeit is non-zero, the string is freed. Returns 0 if the name is found and -1 if the name is not found. SEE ALSO
free(3), malloc(3) HISTORY
The stringlist functions appeared in NetBSD 1.3. BSD
May 6, 2010 BSD
Man Page

7 More Discussions You Might Find Interesting

1. Linux

Dsl Configure on Conectiva Linux 9.0

i've been tring to configure a dsl link on the Conectiva Linux 9.0 but i can't. Ever time when i run de adsl-init script a messenger such ERROR /usr/sbin/adsl-start : line 195 : 2224 Terminated $CONNECT "$@">/dev/null 2>&1 appears and i don't know what does it mean. I also have edited the... (0 Replies)
Discussion started by: Dmitri-br
0 Replies

2. UNIX for Dummies Questions & Answers

Please help!!

Ok allow me to give you background first, I never worked with Unix before and the company that i work for has TWO unix boxes. I didn't even know we had them until yesterday evening when one of them crashed. I do the networking and PC support here but not for the Unix boxes. I'm hoping if I type... (3 Replies)
Discussion started by: Dory
3 Replies

3. Solaris

Apache upgrading error

hi every one , i am facing a problem and i am stuck i need you help : i am trying to upgrade apache 2.0.63 to apache 2.0.64 with ssl option enabled when i try to compile by using make command i face the below error : ssl_engine_init.c: In function `ssl_init_ctx_protocol': ... (3 Replies)
Discussion started by: core99
3 Replies

4. Red Hat

How do I invoke second copy of apache when running service httpd start?

Hi all I'm using the following for my os # cat /etc/redhat-release CentOS release 6.4 (Final) when I execute the following # ls -lrth /etc/init.d/httpd -rwxr-xr-x. 1 root root 3.3K Feb 22 19:20 /etc/init.d/httpd # /etc/init.d/httpd start Starting httpd: httpd: Syntax error... (1 Reply)
Discussion started by: jediwannabe
1 Replies

5. AIX

Mozilla firefox browser is not working

Hello, We enabled X11 and xming is riunning. we used to open firefox window using below command on AIX. /usr/bin/firefox Xclock is working fine now. But for some reason firefox stopped working on one of our AIX LPAR. Can you please look in to below error. />/usr/bin/firefox... (5 Replies)
Discussion started by: aaron8667
5 Replies

6. AIX

Samba 3.6.22 on AIX 7.1 with Windows AD (Kerberos and winbind)

Hi all, I have installed samba 3.6.22 on AIX 7.1 and join a windows AD with success. All seem to work fine, I have configured smb.conf, methods.cfg, kerberos, user .... the following command work fine wbinfo -u, wbinfo -g, wbinfo -i, wbinfo -s, wbinfo -S, lsuser, id... The unique... (20 Replies)
Discussion started by: PhilippeA
20 Replies

7. Solaris

Sudo not working on LDAP client machine

Hi, I have configured ldap manually on solaris 10/11 machine with below entries: # ldapclient list |grep sudo NS_LDAP_SERVICE_SEARCH_DESC= sudoers:ou=SUDOers,dc=exm,dc=ple,dc=com # cat /etc/nsswitch.conf |grep -i sudo sudoers: files ldap # But groups available in LDAP server... (8 Replies)
Discussion started by: Sridaran
8 Replies