scan.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /** @file
  2. * @brief Scan an input file, recording label-definitions, etc.
  3. *
  4. * All special actions are introduced by a line starting
  5. * @verbatim
  6. .<macro>
  7. @endverbatim
  8. * where @a macro is "L=" unless redefined in the command-line.
  9. * Actions are
  10. * <DL>
  11. * <DT>.L= <em>type level label</em></DT>
  12. * <DD>
  13. * define @a label by incrementing the @a levelth
  14. * index of label-type @a type, e.g.
  15. * @verbatim
  16. .L= table 1 profits_1983
  17. @endverbatim
  18. * </DD>
  19. * <DT>.L= delimiter @a char</DT>
  20. * <DD>
  21. * redefines the delimiter for the subsequent text.
  22. * </DD>
  23. * <DT>.L= format <em>type string</em></DT>
  24. * <DD>
  25. * defines a format for displaying the given label @a type;
  26. * the latest definition in the input will be used for
  27. * ALL occurrences, including preceding ones.
  28. * e.g.
  29. * @verbatim
  30. .L= format appendix %A-%1
  31. @endverbatim
  32. * </DD>
  33. * <DT>.L= next <em>type value value ...</em></DT>
  34. * <DD>
  35. * set the value of the next label generated for @a type;
  36. * the @a values give successive levels, with omitted
  37. * trailing values defaulting to 0.
  38. * </DD>
  39. * </DL>
  40. */
  41. #ifndef _SCAN_H_
  42. #define _SCAN_H_
  43. /**
  44. * @brief First pass to parse the input file and output a temporary file
  45. * with directives.
  46. * @param fname the name of the input file to process
  47. * @param f a file handle opened to read fname
  48. */
  49. void scan(char *fname, FILE *f);
  50. #endif