1SSAStringCpy(3SNMP)         SNMP Library Functions         SSAStringCpy(3SNMP)
2
3
4

NAME

6       SSAStringCpy,  SSAStringInit, SSAStringToChar, SSAStringZero - Sun Sol‐
7       stice Enterprise Agent string helper functions
8

SYNOPSIS

10       cc [ flag ... ] file ... -lssasnmp [ library .. ]
11       #include <impl.h>
12
13       void *SSAStringZero(String *string);
14
15
16       int SSAStringInit(String *string, uchar_t *chars, int len,
17            char *error_label);
18
19
20       int SSAStringCpy(String *string1, String *string2, char *error_label);
21
22
23       char *SSAStringToChar(String string);
24
25

DESCRIPTION

27       The SSAStringCpy() function makes a deep copy of  string2  to  string1.
28       This  function  assumes  that  string1  has been processed by the SSAS‐
29       tringZero() function. Memory is allocated inside the  string1  and  the
30       contents of string2, not just the pointer, is copied to the string1. If
31       an error is encountered, an error message is stored in the  error_label
32       buffer.
33
34
35       The  SSAStringInit()  function  copies the char array from chars to the
36       string instance with the specified length len.  This  function  assumes
37       that  the  string  instance  has  been processed by the SSAStringZero()
38       function or no memory is allocated inside the string  instance.  If  an
39       error  is  encountered,  an  error message is stored in the error_label
40       buffer.
41
42
43       The SSAStringToChar() function returns a temporary  char  array  buffer
44       for printing purposes.
45
46
47       The  SSAStringZero()  function  frees  the  memory inside of the String
48       instance, but not the string object itself.
49

RETURN VALUES

51       The SSAStringInit() and SSAStringCpy() functions return 0 if successful
52       and −1 if error.
53

ATTRIBUTES

55       See attributes(5) for descriptions of the following attributes:
56
57
58
59
60       ┌─────────────────────────────┬─────────────────────────────┐
61       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
62       ├─────────────────────────────┼─────────────────────────────┤
63       │Interface Stability          │Obsolete                     │
64       ├─────────────────────────────┼─────────────────────────────┤
65       │MT-Level                     │Unsafe                       │
66       └─────────────────────────────┴─────────────────────────────┘
67

SEE ALSO

69       attributes(5)
70
71
72
73SunOS 5.11                        30 Apr 2006              SSAStringCpy(3SNMP)
Impressum