diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-12-28 19:53:34 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-12-28 19:53:34 +0000 |
commit | 5d16663331afd0bc2edaeb2e49042dc219ce9c2f (patch) | |
tree | 476fbb2ab4311d4bb6d65b250825e254a7a2c1ef /converter/other/fiasco/binerror.c | |
parent | 42f0bf8e7f1ff88000a3584c265e6f1631662ec4 (diff) | |
download | netpbm-mirror-5d16663331afd0bc2edaeb2e49042dc219ce9c2f.tar.gz netpbm-mirror-5d16663331afd0bc2edaeb2e49042dc219ce9c2f.tar.xz netpbm-mirror-5d16663331afd0bc2edaeb2e49042dc219ce9c2f.zip |
promote Development to Advanced
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4827 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/fiasco/binerror.c')
-rw-r--r-- | converter/other/fiasco/binerror.c | 136 |
1 files changed, 0 insertions, 136 deletions
diff --git a/converter/other/fiasco/binerror.c b/converter/other/fiasco/binerror.c deleted file mode 100644 index dd40dc9b..00000000 --- a/converter/other/fiasco/binerror.c +++ /dev/null @@ -1,136 +0,0 @@ -/* - * error.c: Error handling - * - * Written by: Stefan Frank - * Ullrich Hafner - * - * Credits: Modelled after variable argument routines from Jef - * Poskanzer's pbmplus package. - * - * This file is part of FIASCO (Fractal Image And Sequence COdec) - * Copyright (C) 1994-2000 Ullrich Hafner - */ - -/* - * $Date: 2000/03/20 21:29:59 $ - * $Author: hafner $ - * $Revision: 4.3 $ - * $State: Exp $ - */ - -#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ -#define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ -#define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ -#define _ERROR_C - -#include "config.h" - -#include <stdlib.h> -#include <stdio.h> - -#if STDC_HEADERS -# include <stdarg.h> -# define VA_START(args, lastarg) va_start(args, lastarg) -#else /* not STDC_HEADERS */ -# include <varargs.h> -# define VA_START(args, lastarg) va_start(args) -#endif /* not STDC_HEADERS */ -#include <string.h> - -#if HAVE_SETJMP_H -# include <setjmp.h> -#endif /* HAVE_SETJMP_H */ - -#include "fiasco.h" -#include "binerror.h" - -/***************************************************************************** - - global variables - -*****************************************************************************/ - -int error_line = 0; -const char *error_file = NULL; - -/***************************************************************************** - - local variables - -*****************************************************************************/ - -static const char *executable = "(name not initialized)"; - -/***************************************************************************** - - public code - -*****************************************************************************/ - -void -init_error_handling (const char *name) -/* - * Initialize filename of executable. - * - * No return value. - */ -{ - if (name) - executable = strdup (name); -} - -void -_error (const char *format, ...) -/* - * Print error message and exit. - * - * No return value. - */ -{ - va_list args; - - VA_START (args, format); - - fprintf (stderr, "%s: %s: line %d:\nError: ", - executable, error_file, error_line); - vfprintf (stderr, format, args); - fputc ('\n', stderr); - va_end(args); - - exit (1); -} - -void -_file_error (const char *filename) -/* - * Print file error message and exit. - * - * No return value. - */ -{ - fprintf (stderr, "%s: %s: line %d:\nError: ", - executable, error_file, error_line); - perror (filename); - - exit (2); -} - -void -_warning (const char *format, ...) -/* - * Issue a warning and continue execution. - * - * No return value. - */ -{ - va_list args; - - VA_START (args, format); - - fprintf (stderr, "%s: %s: line %d:\nWarning: ", - executable, error_file, error_line); - vfprintf (stderr, format, args); - fputc ('\n', stderr); - - va_end (args); -} |