2013-11-24 15:00:12 +00:00
'\" t
. \" Title: libnutclient_general
2022-06-29 10:37:36 +00:00
. \" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
. \" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
. \" Date: 04/26/2022
2013-11-24 15:00:12 +00:00
. \" Manual: NUT Manual
2022-06-29 10:37:36 +00:00
. \" Source: Network UPS Tools 2.8.0
2013-11-24 15:00:12 +00:00
. \" Language: English
. \"
2022-06-29 10:37:36 +00:00
.TH "LIBNUTCLIENT_GENERAL" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual"
2013-11-24 15:00:12 +00:00
. \" -----------------------------------------------------------------
. \" * Define some portability stuff
. \" -----------------------------------------------------------------
. \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
. \" http://bugs.debian.org/507673
. \" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
. \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n (.g .ds Aq \(aq
.el .ds Aq '
. \" -----------------------------------------------------------------
. \" * set default formatting
. \" -----------------------------------------------------------------
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
. \" -----------------------------------------------------------------
. \" * MAIN CONTENT STARTS HERE *
. \" -----------------------------------------------------------------
.SH "NAME"
libnutclient_general, nutclient_destroy, strarr_alloc, strarr_free \- General and utility functions in Network UPS Tools high\- level client access library
.SH "SYNOPSIS"
.sp
.nf
#include <nutclient\& .h>
.fi
.sp
.nf
typedef void* NUTCLIENT_t;
.fi
.sp
.nf
void nutclient_destroy(NUTCLIENT_t client);
.fi
.sp
.nf
typedef char** strarr;
.fi
.sp
.nf
strarr strarr_alloc(unsigned short count);
2022-06-29 10:37:36 +00:00
.fi
.sp
.nf
2013-11-24 15:00:12 +00:00
void strarr_free(strarr arr);
.fi
.SH "DESCRIPTION"
.sp
The \fB nutclient_destroy()\fR function destroys a \fI NUTCLIENT_t\fR or derived (like \fI NUTCLIENT_TCP_t\fR ) connection object, and frees allocated memory\& .
.sp
The \fB strarr\fR type represents an array of C strings (array of char pointer)\& . The array must always be terminated by a NULL pointer\& . Pointed strings must be allocated by (x)calloc or (x)strdup\& .
.sp
The \fB strarr_alloc()\fR function allocates a \fI strarr\fR array with the specified number of (non\- initialized) string pointers\& . Another additional pointer set to 0 is added at the end of the array\& .
.sp
The \fB strarr_free\fR function frees a \fI strarr\fR array\& . It also frees all pointed strings\& .
.sp
\fI dev\fR is the device name\& .
.SH "SEE ALSO"
.sp
\fB libnutclient\fR (3)