Lines Matching refs:buf

73 _cvt_printer_to_entry(ns_printer_t *printer, char *buf, int buflen)  in _cvt_printer_to_entry()  argument
78 (void) memset(buf, 0, buflen); in _cvt_printer_to_entry()
83 if (snprintf(buf, buflen, "%s", printer->name) >= buflen) { in _cvt_printer_to_entry()
84 (void) memset(buf, 0, buflen); in _cvt_printer_to_entry()
93 (void) strlcat(buf, "|", buflen); in _cvt_printer_to_entry()
94 (void) strncat_escaped(buf, *alias++, buflen, in _cvt_printer_to_entry()
99 if (strlcat(buf, ":", buflen) >= buflen) { in _cvt_printer_to_entry()
100 (void) memset(buf, 0, buflen); in _cvt_printer_to_entry()
105 len = strlen(buf); in _cvt_printer_to_entry()
112 (void) strlcat(buf, "\\\n\t:", buflen); in _cvt_printer_to_entry()
113 (void) strncat_escaped(buf, kvp->key, buflen, ESCAPE_CHARS); in _cvt_printer_to_entry()
114 (void) strlcat(buf, "=", buflen); in _cvt_printer_to_entry()
115 (void) strncat_escaped(buf, kvp->value, buflen, ESCAPE_CHARS); in _cvt_printer_to_entry()
116 if (strlcat(buf, ":", buflen) >= buflen) { in _cvt_printer_to_entry()
122 (void) memset(buf, 0, buflen); in _cvt_printer_to_entry()
127 if (strlen(buf) == len) { /* there were no attributes */ in _cvt_printer_to_entry()
128 (void) memset(buf, 0, buflen); in _cvt_printer_to_entry()
129 buf = NULL; in _cvt_printer_to_entry()
132 return (buf); in _cvt_printer_to_entry()
139 char *name = NULL, *key = NULL, **aliases = NULL, *cp, buf[BUFSIZ]; in _cvt_nss_entry_to_printer() local
146 (void) memset(buf, 0, sizeof (buf)); in _cvt_nss_entry_to_printer()
152 name = strdup(buf); in _cvt_nss_entry_to_printer()
156 (void *)strdup(buf)); in _cvt_nss_entry_to_printer()
161 (void) ns_set_value_from_string(key, buf, in _cvt_nss_entry_to_printer()
164 (void) memset(buf, 0, sizeof (buf)); in _cvt_nss_entry_to_printer()
170 key = strdup(buf); in _cvt_nss_entry_to_printer()
171 (void) memset(buf, 0, sizeof (buf)); in _cvt_nss_entry_to_printer()
174 buf[buf_pos++] = *cp; in _cvt_nss_entry_to_printer()
180 name = strdup(buf); in _cvt_nss_entry_to_printer()
184 (void *)strdup(buf)); in _cvt_nss_entry_to_printer()
185 (void) memset(buf, 0, sizeof (buf)); in _cvt_nss_entry_to_printer()
189 buf[buf_pos++] = *cp; in _cvt_nss_entry_to_printer()
193 buf[buf_pos++] = *(++cp); in _cvt_nss_entry_to_printer()
196 buf[buf_pos++] = *cp; in _cvt_nss_entry_to_printer()
202 (void) ns_set_value_from_string(key, buf, printer); in _cvt_nss_entry_to_printer()