Lines Matching defs:buf
180 char *buf;
188 buf = malloc(size);
190 while (fgets(buf, size, fd) != NULL) {
193 strlcpy(output, buf, size);
207 buf = malloc(256);
209 while (fgets(buf, 256, fd) != NULL);
212 free(buf);
379 char buf[BUFSIZ];
391 while (fgets(buf, BUFSIZ, fd) != NULL) {
392 size_t bufsize = strlen(buf);
397 if (buf[0] != '\t') {
408 if (bufsize && (buf[bufsize - 1] == '\n')) {
409 buf[bufsize - 1] = 0;
413 if (bufsize && (buf[bufsize - 1] == ':'))
414 buf[bufsize - 1] = 0;
416 strlcpy(ck_sessions[session_num].session_id, buf,
421 if (bufsize && (buf[bufsize - 1] == '\n'))
422 buf[bufsize - 1] = 0;
424 if (strncmp(buf, "\topen = ", sizeof ("\topen = ") - 1) == 0) {
425 if (strncmp(&buf[sizeof ("\topen = ") - 1], "'TRUE'",
429 else if (strncmp(&buf[sizeof ("\topen = ") - 1], "'FALSE'",
433 } else if (strncmp(buf, "\tx11-display = ",
437 if (strncmp(&buf[sizeof ("\tx11-display = ") - 1], "''",
442 if (sscanf(buf, "\tx11-display = ':%d'",
447 } else if (strncmp(buf, "\tsession-type = ",
451 if (strncmp(&buf[sizeof ("\tsession-type = ") - 1], "''",
456 if (sscanf(buf, "\tsession-type = '%16[^']",
462 } else if (strncmp(buf, "\tdisplay-type = ",
466 if (strncmp(&buf[sizeof ("\tdisplay-type = ") - 1], "''",
471 if (sscanf(buf, "\tdisplay-type = '%16[^']",