unix.c 818 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * unix.c
  3. * Copyright (C) 1998-2000 A.J. van Os; Released under GPL
  4. *
  5. * Description:
  6. * Unix approximations of RISC-OS functions
  7. */
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10. #include <stdarg.h>
  11. #include "antiword.h"
  12. /*
  13. * werr - write an error message and exit if needed
  14. */
  15. void
  16. werr(int iFatal, const char *szFormat, ...)
  17. {
  18. va_list tArg;
  19. va_start(tArg, szFormat);
  20. (void)vfprintf(stderr, szFormat, tArg);
  21. va_end(tArg);
  22. fprintf(stderr, "\n");
  23. switch (iFatal) {
  24. case 0: /* The message is just a warning, so no exit */
  25. return;
  26. case 1: /* Fatal error with a standard exit */
  27. exit(EXIT_FAILURE);
  28. default: /* Fatal error with a non-standard exit */
  29. exit(iFatal);
  30. }
  31. } /* end of werr */
  32. void
  33. Hourglass_On(void)
  34. {
  35. } /* end of Hourglass_On */
  36. void
  37. Hourglass_Off(void)
  38. {
  39. } /* end of Hourglass_Off */