Lines Matching defs:string
29 * Binary label to label string translations.
35 #include <string.h>
55 static char *sstring; /* return string for sb*tos */
56 static size_t ssize; /* current size of return string */
59 return_string(char **string, int str_len, char *val)
64 if (*string == NULL) {
65 if ((*string = malloc(val_len)) == NULL)
68 **string = '\0';
72 cpyptr = *string;
89 alloc_string(char **string, size_t size, char val)
91 if (*string == NULL) {
92 if ((*string = malloc(ALLOC_CHUNK)) == NULL)
95 if ((*string = realloc(*string, size + ALLOC_CHUNK)) == NULL) {
96 **string = val;
100 **string = val;
107 * bsltos - Convert Binary Sensitivity Label to Sensitivity Label string.
110 * string = NULL ((char *) 0), if memory to be allocated,
127 * Exit string = Sensitivity Label string, or empty string if
131 * 0, If unable to allocate string,
132 * or allocated string to short
133 * (and **string = '\0').
134 * length (including null) of Sensitivity Label string,
145 bsltos(const bslabel_t *label, char **string, size_t str_len,
174 rval = return_string(string, str_len, slret.slabel);
191 return (return_string(string, str_len, ADMIN_LOW));
193 return (return_string(string, str_len, ADMIN_HIGH));
204 * bcleartos - Convert Binary Clearance to Clearance string.
207 * string = NULL ((char *) 0), if memory to be allocated,
222 * Exit string = Clearance string, or empty string if not
226 * 0, If unable to allocate string,
227 * or allocated string to short
228 * (and **string = '\0').
229 * length (including null) of Clearance string,
240 bcleartos(const bclear_t *clearance, char **string, size_t str_len,
268 rval = return_string(string, str_len, clrret.cslabel);
285 return (return_string(string, str_len, ADMIN_LOW));
287 return (return_string(string, str_len, ADMIN_HIGH));
299 * len = Maximum length of translated string, excluding NULL.
300 * 0, full string.
301 * sstring = address of string to translate into.
304 * Exit sstring = Newly translated string.
308 * memory for string.
309 * Address of string containing converted value.
324 /* Allocate string memory. */
326 /* can't get initial memory for string */
363 /* Adjust string size to desired length */
395 * len = Maximum length of translated string, excluding NULL.
396 * 0, full string.
397 * sstring = address of string to translate into.
400 * Exit sstring = Newly translated string.
404 * memory for string.
405 * Address of string containing converted value.
420 /* Allocate string memory. */
422 /* can't get initial memory for string */
459 /* Adjust string size to desired length */