input-file.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* input_file.h header for input-file.c
  2. Copyright (C) 1987 Free Software Foundation, Inc.
  3. This file is part of GAS, the GNU Assembler.
  4. GAS is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 1, or (at your option)
  7. any later version.
  8. GAS is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GAS; see the file COPYING. If not, write to
  14. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
  15. /*"input_file.c":Operating-system dependant functions to read source files.*/
  16. /*
  17. * No matter what the operating system, this module must provide the
  18. * following services to its callers.
  19. *
  20. * input_file_begin() Call once before anything else.
  21. *
  22. * input_file_end() Call once after everything else.
  23. *
  24. * input_file_buffer_size() Call anytime. Returns largest possible
  25. * delivery from
  26. * input_file_give_next_buffer().
  27. *
  28. * input_file_open(name) Call once for each input file.
  29. *
  30. * input_file_give_next_buffer(where) Call once to get each new buffer.
  31. * Return 0: no more chars left in file,
  32. * the file has already been closed.
  33. * Otherwise: return a pointer to just
  34. * after the last character we read
  35. * into the buffer.
  36. * If we can only read 0 characters, then
  37. * end-of-file is faked.
  38. *
  39. * All errors are reported (using as_perror) so caller doesn't have to think
  40. * about I/O errors. No I/O errors are fatal: an end-of-file may be faked.
  41. */
  42. void input_file_begin();
  43. void input_file_end();
  44. int input_file_buffer_size();
  45. int input_file_is_open();
  46. void input_file_open();
  47. char * input_file_give_next_buffer();
  48. /* end: input_file.h */