diff options
Diffstat (limited to 'link/monoplot.c')
-rw-r--r--[-rwxr-xr-x] | link/monoplot.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/link/monoplot.c b/link/monoplot.c index 2af1aac..adcc532 100755..100644 --- a/link/monoplot.c +++ b/link/monoplot.c @@ -26,13 +26,14 @@ #include <math.h> #include "copyright.h" #include "aconfig.h" -#include "numsup.h" #include "icc.h" #include "plot.h" #include "ui.h" #define PRES 100 +void error(char *fmt, ...), warning(char *fmt, ...); + /* ---------------------------------------- */ void usage(void) { @@ -202,3 +203,30 @@ main( return 0; } +/* ------------------------------------------------ */ +/* Basic printf type error() and warning() routines */ + +void +error(char *fmt, ...) +{ + va_list args; + + fprintf(stderr,"monoplot: Error - "); + va_start(args, fmt); + vfprintf(stderr, fmt, args); + va_end(args); + fprintf(stderr, "\n"); + exit (-1); +} + +void +warning(char *fmt, ...) +{ + va_list args; + + fprintf(stderr,"monoplot: Warning - "); + va_start(args, fmt); + vfprintf(stderr, fmt, args); + va_end(args); + fprintf(stderr, "\n"); +} |