Lines Matching refs:buf
422 static void linenoise_completion(const char *buf, linenoiseCompletions *lc) { in linenoise_completion() argument
429 if (!buf) { in linenoise_completion()
437 p_start = (const unsigned char *) buf; in linenoise_completion()
438 p_end = (const unsigned char *) (buf + strlen(buf)); in linenoise_completion()
477 duk_push_string(ctx, (const char *) buf); in linenoise_completion()
494 char *buf = NULL; in handle_fh() local
501 buf = (char *) malloc(1024); in handle_fh()
502 if (!buf) { in handle_fh()
520 buf_new = (char *) realloc(buf, newsz); in handle_fh()
524 buf = buf_new; in handle_fh()
531 (void *) buf, (long) bufsz, (long) bufoff, (long) avail); in handle_fh()
534 got = fread((void *) (buf + bufoff), (size_t) 1, avail, f); in handle_fh()
562 if (memcmp((void *) buf, (void *) (buf + i * j), i) != 0) { in handle_fh()
583 duk_push_pointer(ctx, (void *) buf); in handle_fh()
595 free(buf); in handle_fh()
596 buf = NULL; in handle_fh()
608 if (buf) { in handle_fh()
609 free(buf); in handle_fh()
610 buf = NULL; in handle_fh()
834 char *buf; in fileio_read_file() local
861 buf = (char *) duk_push_fixed_buffer(ctx, (duk_size_t) len); in fileio_read_file()
864 got = fread((void *) (buf + off), 1, len - off, f); in fileio_read_file()
889 const char *buf; in fileio_write_file() local
902 buf = (char *) duk_to_buffer(ctx, 1, &len); in fileio_write_file()
905 got = fwrite((const void *) (buf + off), 1, len - off, f); in fileio_write_file()