dsdefs.h 991 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* dsdefs.h
  2. *
  3. * This is a "dummy" version of stdio.h etc. for systems which lack one.
  4. * Rename it is stdio.h if needed.
  5. *
  6. * Functions printf() and sprintf() are defined here, but neither
  7. * of them do anything useful.
  8. *
  9. * Version 1.2 Dag Bruck
  10. * 1.3 Dag Bruck Updated for DYMOLA_DSPACE.
  11. *
  12. * Copyright (C) 1997-2004 Dynasim AB.
  13. * All rights reserved.
  14. *
  15. */
  16. #ifndef DSDEFS_H
  17. #define DSDEFS_H
  18. #if !defined(RTLAB) && !defined(LABCAR) && !defined(DYM2DS) && !defined(FMU_SOURCE_SINGLE_UNIT)
  19. #if defined(NO_FILE) || ( defined(DYMOLA_DSPACE) && !defined(__STDIO_H) )
  20. #define FILE int
  21. #define fpos_t unsigned int
  22. #if defined(DYMOLA_DSPACE)
  23. #define __STDIO_H
  24. #endif
  25. #endif
  26. #if defined(DYMOLA_DSPACE)
  27. static int printf(const char* format, ...)
  28. { return 0; }
  29. static int sprintf(char* s, const char* format, ...)
  30. { s[0] = '\0'; return 0; }
  31. #endif
  32. #endif
  33. #if !defined(assert) && !defined(DYM2DS) && !defined(FMU_SOURCE_SINGLE_UNIT)
  34. #define assert(test) (void)0
  35. #endif
  36. #endif