export.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* export.h: Routines for file exports
  2. Copyright (C) 2003 Kevin Kofler
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 2, or (at your option)
  6. any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software Foundation,
  13. Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  14. #ifndef EXPORT_H
  15. #define EXPORT_H
  16. #include "../generic.h"
  17. #include "exp_def.h"
  18. #include "../intrface.h"
  19. #include "../data.h"
  20. // Export the internal data structures to external files, creating as many
  21. // files as needed.
  22. BOOLEAN ExportProgram (const PROGRAM *Program, OUTPUT_FILE_FUNCTION GetOutputFile, OUTPUT_FILE_FINALIZE_FUNCTION FinalizeOutputFile);
  23. // Non-embedded file output functions as defined in intrface.h.
  24. #ifndef TARGET_EMBEDDED
  25. #define MAX_NAME_LEN 8
  26. extern const char *DestFile;
  27. extern SIZE DestFileSize;
  28. extern char ProgramFolder[MAX_NAME_LEN+1], ProgramName[MAX_NAME_LEN+1];
  29. #ifdef DATA_VAR_SUPPORT
  30. extern char DataFolder[MAX_NAME_LEN+1], DataName[MAX_NAME_LEN+1];
  31. #endif /* DATA_VAR_SUPPORT */
  32. #ifdef PUCRUNCH_SUPPORT
  33. extern BOOLEAN Pack;
  34. #endif /* PUCRUNCH_SUPPORT */
  35. extern BOOLEAN OutputBin;
  36. extern BOOLEAN OutputBinMainOnly;
  37. BOOLEAN GetOutputFile (INT_EXP_FILE *File, SIZE FileSize, unsigned int DestCalc, unsigned int FileRole, unsigned int FileFormat, unsigned int FileType, const char *Extension, BOOLEAN Executable, I4 *EffectiveSize);
  38. void FinalizeOutputFile (INT_EXP_FILE *File);
  39. #endif /* !TARGET_EMBEDDED */
  40. #endif