The OpenNET Project / Index page

[ новости /+++ | форум | wiki | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

stringlist ()
  • >> stringlist (3) ( FreeBSD man: Библиотечные вызовы )

  • BSD mandoc
     

    NAME

    stringlist
    
     
    sl_init
    
     
    sl_add
    
     
    sl_free
    
     
    sl_find
    
     - stringlist manipulation functions
    
     
    

    LIBRARY

    Lb libc
    
     
    

    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 char *item);
     

    DESCRIPTION

    The functions manipulate stringlists, which are lists of strings that extend automatically if necessary.

    The Vt StringList structure has the following definition:

    typedef struct _stringlist {
            char    **sl_str;
            size_t    sl_max;
            size_t    sl_cur;
    } StringList;
    

    sl_str
    a pointer to the base of the array containing the list.
    sl_max
    the size of sl_str
    sl_cur
    the offset in sl_str of the current element.

    The following stringlist manipulation functions are available:

    Fn sl_init
    Create a stringlist. Returns a pointer to a Vt StringList , or NULL in case of failure.
    Fn sl_free
    Releases memory occupied by Fa sl and the Fa sl->sl_str array. If Fa freeall is non-zero, then each of the items within Fa sl->sl_str is released as well.
    Fn sl_add
    Add Fa item to Fa sl->sl_str at Fa sl->sl_cur , extending the size of Fa sl->sl_str . Returns zero upon success, -1 upon failure.
    Fn sl_find
    Find Fa item in Fa sl , returning NULL if it is not found.

     

    SEE ALSO

    free(3), malloc(3)  

    HISTORY

    The functions appeared in Fx 2.2.6 and Nx 1.3 .


     

    Index

    NAME
    LIBRARY
    SYNOPSIS
    DESCRIPTION
    SEE ALSO
    HISTORY


    Поиск по тексту MAN-ов: 




    Спонсоры:
    Слёрм
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2020 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру