1 |
/* GNU m4 -- A simple macro processor |
/* GNU m4 -- A simple macro processor |
2 |
Copyright (C) 1989, 90, 91, 92, 93, 94, 98 Free Software Foundation, Inc. |
Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1998, 2002 |
3 |
|
Free Software Foundation, Inc. |
4 |
|
|
5 |
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
6 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
575 |
return; |
return; |
576 |
|
|
577 |
/* Insert output by big chunks. */ |
/* Insert output by big chunks. */ |
578 |
|
errno = 0; |
579 |
while (length = read (fileno (file), buffer, COPY_BUFFER_SIZE), |
while (length = fread (buffer, 1, COPY_BUFFER_SIZE, file), |
580 |
length != 0) |
length != 0) |
581 |
if (length == (size_t) -1) |
output_text (buffer, length); |
582 |
|
|
583 |
|
if (errno) |
584 |
M4ERROR ((EXIT_FAILURE, errno, _("reading inserted file"))); |
M4ERROR ((EXIT_FAILURE, errno, _("reading inserted file"))); |
|
else |
|
|
output_text (buffer, length); |
|
585 |
} |
} |
586 |
|
|
587 |
/* Insert diversion number DIVNUM into the current output file. The |
/* Insert diversion number DIVNUM into the current output file. The |