nostub.h 1005 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef NOSTUB
  2. #define NOSTUB
  3. #ifdef DOORS
  4. #error "nostub.h" must not be included in "Doors" mode!
  5. #undef NOSTUB
  6. #else
  7. #include <default.h>
  8. #if defined(USE_FLINE_ROM_CALLS) || defined(EXE_OUT)
  9. //#undef _rom_call_addr_concat
  10. //#define _rom_call_addr_concat(intindex,romindex) (&romindex)
  11. //#undef _rom_call_addr
  12. //#define _rom_call_addr(index) (__jmp_tbl[0x##index])
  13. #undef _rom_call
  14. #define _rom_call(t,a,i) (*((t(*__ATTR_TIOS__)a)(&_ROM_CALL_##i)))
  15. #undef OPTIMIZE_ROM_CALLS
  16. #endif
  17. #ifdef OPTIMIZE_ROM_CALLS
  18. //#error OPTIMIZE_ROM_CALLS isn't supported yet
  19. #endif
  20. /* Various conditional compilations are defined below, to make an extra */
  21. /* support code as small as possible. If no RETURN_VALUE and SAVE_SCREEN */
  22. /* options are defined, the code overload is only two extra bytes! */
  23. #if defined(SAVE_SCREEN) || defined(RETURN_VALUE) || !defined(NO_EXIT_SUPPORT) || defined(ENABLE_ERROR_RETURN)
  24. #define _NEED_COMPLEX_MAIN
  25. #endif
  26. #define _main() __main()
  27. #define _nostub _main
  28. #endif
  29. #endif