Lines Matching refs:ebuf
129 static long readline PARAMS ((struct ebuffer *ebuf));
132 struct ebuffer *ebuf));
303 struct ebuffer ebuf; in eval_makefile() local
310 ebuf.floc.filenm = strcache_add (filename); in eval_makefile()
311 ebuf.floc.lineno = 1; in eval_makefile()
338 ebuf.fp = fopen (filename, "r"); in eval_makefile()
345 if (ebuf.fp == 0 && (flags & RM_INCLUDED) && *filename != '/') in eval_makefile()
351 ebuf.fp = fopen (included, "r"); in eval_makefile()
352 if (ebuf.fp) in eval_makefile()
383 if (ebuf.fp == 0) in eval_makefile()
393 do_variable_definition (&ebuf.floc, "MAKEFILE_LIST", filename, o_file, in eval_makefile()
398 ebuf.size = 200; in eval_makefile()
399 ebuf.buffer = ebuf.bufnext = ebuf.bufstart = xmalloc (ebuf.size); in eval_makefile()
402 reading_file = &ebuf.floc; in eval_makefile()
404 r = eval (&ebuf, !(flags & RM_NO_DEFAULT_GOAL)); in eval_makefile()
408 fclose (ebuf.fp); in eval_makefile()
410 free (ebuf.bufstart); in eval_makefile()
418 struct ebuffer ebuf; in eval_buffer() local
426 ebuf.size = strlen (buffer); in eval_buffer()
427 ebuf.buffer = ebuf.bufnext = ebuf.bufstart = buffer; in eval_buffer()
428 ebuf.fp = NULL; in eval_buffer()
430 ebuf.floc = *reading_file; in eval_buffer()
433 reading_file = &ebuf.floc; in eval_buffer()
437 r = eval (&ebuf, 1); in eval_buffer()
454 eval (struct ebuffer *ebuf, int set_default) in eval() argument
491 fstart = &ebuf->floc; in eval()
492 fi.filenm = ebuf->floc.filenm; in eval()
515 ebuf->floc.lineno += nlines; in eval()
516 nlines = readline (ebuf); in eval()
523 line = ebuf->buffer; in eval()
549 cmds_started = ebuf->floc.lineno; in eval()
654 do_define (p2, p - p2, o_file, ebuf); in eval()
682 do_define (p2, p - p2, o_override, ebuf); in eval()
1320 enum variable_origin origin, struct ebuffer *ebuf) in do_define() argument
1336 defstart = ebuf->floc; in do_define()
1343 nlines = readline (ebuf); in do_define()
1344 ebuf->floc.lineno += nlines; in do_define()
1350 line = ebuf->buffer; in do_define()
1376 error (&ebuf->floc, in do_define()
2497 readstring (struct ebuffer *ebuf) in readstring() argument
2502 if (ebuf->bufnext >= ebuf->bufstart + ebuf->size) in readstring()
2508 eol = ebuf->buffer = ebuf->bufnext; in readstring()
2520 ebuf->bufnext = ebuf->bufstart + ebuf->size + 1; in readstring()
2534 ebuf->bufnext = eol+1; in readstring()
2540 readline (struct ebuffer *ebuf) in readline() argument
2550 if (!ebuf->fp) in readline()
2551 return readstring (ebuf); in readline()
2556 p = start = ebuf->bufstart; in readline()
2557 end = p + ebuf->size; in readline()
2560 while (fgets (p, end - p, ebuf->fp) != 0) in readline()
2574 error (&ebuf->floc, in readline()
2625 ebuf->size *= 2; in readline()
2626 start = ebuf->buffer = ebuf->bufstart = (char *) xrealloc (start, in readline()
2627 ebuf->size); in readline()
2629 end = start + ebuf->size; in readline()
2634 if (ferror (ebuf->fp)) in readline()
2635 pfatal_with_name (ebuf->floc.filenm); in readline()
2642 return nlines ? nlines : p == ebuf->bufstart ? -1 : 1; in readline()