dump.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * dump.h - Dump objects in the native FPD format
  3. *
  4. * Written 2009-2011 by Werner Almesberger
  5. * Copyright 2009-2011 by Werner Almesberger
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. */
  12. #ifndef DUMP_H
  13. #define DUMP_H
  14. #include <stdio.h>
  15. #include "obj.h"
  16. #define MACHINE_GENERATED "/* MACHINE-GENERATED ! */\n"
  17. /*
  18. * vec obj
  19. * --------------------------------------------------------------
  20. * NULL NULL end of list
  21. * non-NULL NULL vector
  22. * NULL non-NULL object, no previous vector
  23. * non-NULL non-NULL object, with previous vector
  24. */
  25. struct order {
  26. struct vec *vec;
  27. struct obj *obj;
  28. };
  29. const char *print_label(struct vec *vec);
  30. char *print_vec(const struct vec *vec);
  31. char *print_obj(const struct obj *obj, const struct vec *prev);
  32. char *print_meas(const struct obj *obj);
  33. struct order *order_frame(const struct frame *frame);
  34. int dump(FILE *file, const char *one);
  35. #endif /* !DUMP_H */