file.h 1001 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * file.h - File handling
  3. *
  4. * Written 2009-2011 by Werner Almesberger
  5. * Copyright 2009-2011 by Werner Almesberger
  6. * Copyright 2016, Erich Heinzle (gEDA additions)
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. */
  13. #ifndef FILE_H
  14. #define FILE_H
  15. #include <stdio.h>
  16. /*
  17. * Returns -1 on error.
  18. */
  19. int file_exists(const char *name);
  20. char *set_extension(const char *name, const char *ext);
  21. void save_with_backup(const char *name, int (*fn)(FILE *file, const char *one),
  22. const char *one);
  23. int save_to(const char *name, int (*fn)(FILE *file, const char *one),
  24. const char *one);
  25. void save_fpd(void);
  26. void write_kicad(void);
  27. void write_geda(void);
  28. void write_ps(const char *one);
  29. void write_ps_fullpage(const char *one);
  30. void write_gnuplot(const char *one);
  31. #endif /* !FILE_H */