This is fatals.c in view mode; [Download] [Up]
/* * Created by Melissa O'Neill, 1998. Based on errors.c, to replace missing * file in NeXT GNUSource distribution. */ #include <stdlib.h> #include <string.h> #include <stdio.h> #include <stdarg.h> #include <errno.h> #include <mach/mach.h> #include <mach/mach_error.h> #include "fatals.h" /* * Print the error message and exit. */ void fatal( const char *format, ...) { va_list ap; va_start(ap, format); fprintf(stderr, "%s: ", progname); vfprintf(stderr, format, ap); fprintf(stderr, "\n"); va_end(ap); exit(1); } /* * Print the error message along with the system error message and exit. */ void system_fatal( const char *format, ...) { va_list ap; va_start(ap, format); fprintf(stderr, "%s: ", progname); vfprintf(stderr, format, ap); fprintf(stderr, " (%s)\n", strerror(errno)); va_end(ap); exit(1); }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.