home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / c / objam01.lha / objam / runtime / misc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-10  |  998 b   |  45 lines

  1. /*
  2. ** ObjectiveAmiga: Misc functions
  3. ** See GNU:lib/libobjam/ReadMe for details
  4. */
  5.  
  6.  
  7. #include <exec/lists.h>
  8.  
  9.  
  10. /* standard function emulations */
  11.  
  12. void   __objc_sprintf (const char *buf, const char *format,...);
  13. void   __objc_printf (const char *format,...);
  14. int    __objc_strcmp (const char *a, const char *b);
  15. char * __objc_strcpy (char *to, const char *from);
  16.  
  17. void   __objc_NewList (struct List *list);
  18.  
  19. void   __objc_abort (void);
  20.  
  21.  
  22. /* standard functions */
  23.  
  24. #define sprintf __objc_sprintf
  25. #define printf __objc_printf
  26. #define strcmp(a,b) __objc_strcmp(a,b)
  27. #define strcpy(a,b) __objc_strcpy(a,b)
  28. #define NewList(a) __objc_NewList(a)
  29. #define abort() __objc_abort()
  30.  
  31.  
  32. /* assertion */
  33.  
  34. #undef assert
  35. #undef __assert
  36.  
  37. #ifdef NDEBUG
  38. #define assert(ignore) ((void) 0)
  39. #else
  40. #define assert(expression)  \
  41.   ((void) ((expression) ? 0 : __assert (expression, __FILE__, __LINE__)))
  42. #define __assert(expression, file, lineno)  \
  43.   (printf ("%s:%u: failed assertion\n", file, lineno), abort(), 0)
  44. #endif
  45.