home *** CD-ROM | disk | FTP | other *** search
/ Super Net 1 / SUPERNET_1.iso / PC / OTROS / EXTRAS / UUCODE / UUPC / TEST / UPC12ES1.ZIP / LIB / bugout.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-11  |  2.6 KB  |  78 lines

  1. /*--------------------------------------------------------------------*/
  2. /*    b u g o u t . c                                                 */
  3. /*                                                                    */
  4. /*    Support routines for UUPC/extended                              */
  5. /*--------------------------------------------------------------------*/
  6.  
  7. /*--------------------------------------------------------------------*/
  8. /*       Changes Copyright (c) 1989-1993 by Kendra Electronic         */
  9. /*       Wonderworks.                                                 */
  10. /*                                                                    */
  11. /*       All rights reserved except those explicitly granted by       */
  12. /*       the UUPC/extended license agreement.                         */
  13. /*--------------------------------------------------------------------*/
  14.  
  15. /*--------------------------------------------------------------------*/
  16. /*                          RCS Information                           */
  17. /*--------------------------------------------------------------------*/
  18.  
  19. /*
  20.  *    $Id: bugout.c 1.4 1993/10/12 00:49:39 ahd Exp $
  21.  *
  22.  *    Revision history:
  23.  *    $Log: bugout.c $
  24.  *     Revision 1.4  1993/10/12  00:49:39  ahd
  25.  *     Normalize comments
  26.  *
  27.  */
  28.  
  29. #include <stdio.h>
  30. #include <stdlib.h>
  31. #include <string.h>
  32. #include <time.h>
  33.  
  34. #ifdef _Windows
  35. #include <windows.h>
  36. #endif
  37.  
  38. /*--------------------------------------------------------------------*/
  39. /*                    UUPC/extended include files                     */
  40. /*--------------------------------------------------------------------*/
  41.  
  42. #include "lib.h"
  43. #include "catcher.h"
  44. #include "timestmp.h"
  45.  
  46. #ifdef _Windows
  47. #include "winutil.h"
  48. #endif
  49.  
  50. /*--------------------------------------------------------------------*/
  51. /*    b u g o u t                                                     */
  52. /*                                                                    */
  53. /*    Perform a panic() exit from UUPC/extended                       */
  54. /*--------------------------------------------------------------------*/
  55.  
  56. void bugout( const size_t lineno, const char *fname )
  57. {
  58.  
  59. #ifdef _Windows
  60.    char buf[BUFSIZ];
  61. #endif
  62.  
  63.   printmsg(0,"%s aborting at line %d in file %s",
  64.               compilen, lineno, fname );
  65.  
  66. #ifdef _Windows
  67.    sprintf(buf,"%s aborting at line %d in file %s",
  68.               compilen, lineno, fname );
  69.  
  70.    MessageBox( hOurWindow, buf, compilen, MB_ICONEXCLAMATION );
  71.  
  72. #else
  73.    fputc('\a',stderr);
  74. #endif
  75.  
  76.    exit(panic_rc);
  77. } /*bugout */
  78.