Lines Matching refs:buf
141 maybe_join (krb5_data *last, krb5_data *buf, unsigned int bufsiz)
143 if (buf->length == 0)
145 if (buf->data[0] == '/') {
146 if (last->length + buf->length > bufsiz) {
147 Tprintf (("too big: last=%d cur=%d max=%d\n", last->length, buf->length, bufsiz));
150 memmove (buf->data+last->length, buf->data, buf->length);
151 memcpy (buf->data, last->data, last->length);
152 buf->length += last->length;
153 } else if (buf->data[buf->length-1] == '.') {
157 if (last->length+buf->length > bufsiz) {
161 memcpy (buf->data + buf->length, last->data, last->length);
162 buf->length += last->length;
177 char buf[MAXLEN], last[MAXLEN];
186 - this_component points to buf[]
188 - this_component has length of buf when calling out
193 memset (buf, 0, sizeof (buf));
195 this_component.data = buf;
209 bufp = buf;
213 if (bufp == buf+sizeof(buf))
219 if (bufp != buf) {
220 this_component.length = bufp - buf;
221 r = maybe_join (&last_component, &this_component, sizeof(buf));
239 memcpy (last, buf, sizeof (buf));
241 memset (buf, 0, sizeof (buf));
242 bufp = buf;
253 } else if (*p == ' ' && bufp == buf) {
261 if (bufp == buf+sizeof(buf))
269 if (bufp == buf) {
274 this_component.length = bufp - buf;
275 r = maybe_join (&last_component, &this_component, sizeof(buf));