home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 August - Disc 3 / chip_20018103_hu.iso / amiga / chiputil / gg / loadelfwos.lha / LoadElfWOS.lzx / src / error.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-12-01  |  789 b   |  52 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <stdarg.h>
  4. #include "error.h"
  5.  
  6. void fatal_error(char *error, ...)
  7. {
  8.    va_list argptr;
  9.  
  10.    va_start (argptr,error);
  11.    printf("Error: ");
  12.    vprintf (error,argptr);
  13.    va_end (argptr);
  14.    printf("\n");
  15.    exit (1);
  16. }
  17.  
  18. void error_printf(char *error, ...)
  19. {
  20.    va_list argptr;
  21.  
  22.    va_start (argptr,error);
  23.    printf("Error: ");
  24.    vprintf (error,argptr);
  25.    va_end (argptr);
  26.    printf("\n");
  27. }
  28.  
  29. FILE *infostream=0L;
  30. void closeinfo(void);
  31.  
  32. void info_printf(char *error, ...)
  33. {
  34. /*    va_list argptr;
  35.  
  36.     if(!infostream)
  37.     {
  38.         infostream=fopen("CON:////LoadElfWOS Output","w");
  39.         atexit(closeinfo);
  40.     }
  41.  
  42.     va_start (argptr,error);
  43.     vfprintf (infostream,error,argptr);
  44.     va_end (argptr);*/
  45. }
  46.  
  47. void closeinfo(void)
  48. {
  49.     if(infostream)
  50.         fclose(infostream);
  51. }
  52.