File: libnutclient_general.txt

package info (click to toggle)
nut 2.8.1-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 18,284 kB
  • sloc: ansic: 108,785; sh: 9,370; cpp: 3,370; makefile: 2,842; python: 1,029; perl: 763; xml: 47
file content (48 lines) | stat: -rw-r--r-- 1,146 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
LIBNUTCLIENT_GENERAL(3)
=======================

NAME
----

libnutclient_general, nutclient_destroy, strarr_alloc, strarr_free -
General and utility functions in Network UPS Tools high-level client
access library

SYNOPSIS
--------

	#include <nutclient.h>

	typedef void* NUTCLIENT_t;

	void nutclient_destroy(NUTCLIENT_t client);

	typedef char** strarr;

	strarr strarr_alloc(unsigned short count);

	void strarr_free(strarr arr);

DESCRIPTION
-----------

The *nutclient_destroy()* function destroys a 'NUTCLIENT_t' or derived
(like 'NUTCLIENT_TCP_t') connection object, and frees allocated memory.

The *strarr* 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.

The *strarr_alloc()* function allocates a 'strarr' array with the specified
number of (non-initialized) string pointers.
Another additional pointer set to 0 is added at the end of the array.

The *strarr_free* function frees a 'strarr' array.
It also frees all pointed strings.

'dev' is the device name.

SEE ALSO
--------

linkman:libnutclient[3]