Back to index

tetex-bin  3.0
basics.c
Go to the documentation of this file.
00001 /* FILE:    basics.c
00002  * PURPOSE: basic functions
00003  * AUTHOR:  Piet Tutelaers
00004  * VERSION: 1.0 (September 1995)
00005  */
00006 
00007 #include <stdarg.h>
00008 #include <stdio.h>
00009 #include <stdlib.h>
00010 #include <sys/types.h>
00011 #include <sys/stat.h>   /* stat() */
00012 #ifdef WIN32
00013 #include <win32lib.h>
00014 #endif
00015 
00016 /* Give up ... */
00017 void fatal(char *fmt, ...)
00018 {  va_list args;
00019 
00020    va_start(args, fmt);
00021    vfprintf(stderr, fmt, args);
00022    va_end(args);
00023    exit(1);
00024 }
00025 
00026 /* Give a message ... */
00027 void msg(char *fmt, ...)
00028 {  va_list args;
00029 
00030    va_start(args, fmt);
00031    vfprintf(stderr, fmt, args);
00032    fflush(stderr);
00033    va_end(args);
00034 }