home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c005 / 5.ddi / C / UTABORT.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-08-05  |  818 b   |  41 lines

  1. /**
  2. *
  3. * Name        utabort -- Abort the program and return to DOS with a
  4. *               message.
  5. *
  6. * Synopsis    utabort(pmessage);
  7. *
  8. *        char *pmessage      Pointer to message string
  9. *
  10. * Description    UTABORT exits the program immediately after writing
  11. *        a message to standard output.
  12. *
  13. *        See also PCEXIT.
  14. *
  15. * Returns    (No return to calling program -- return type is void.)
  16. *        (Error code returned to DOS is 0.)
  17. *
  18. * Version    3.0 (C)Copyright Blaise Computing Inc.    1983, 1984, 1986
  19. *
  20. **/
  21.  
  22. #include <stdio.h>
  23.  
  24. #include <butility.h>
  25.  
  26. #if MSC300
  27. #include <process.h>
  28. #else
  29. #include <stdlib.h>
  30. #endif
  31.  
  32. void utabort(pmessage)
  33. char *pmessage;
  34. {
  35.     utsound(450,9);
  36.     puts("**** Program Terminated ****");
  37.     puts(pmessage);
  38.     utsound(450,9);
  39.     exit(0);                  /* Error codes not recognized   */
  40. }
  41.