diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-10-10 00:31:14 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-10-10 00:31:14 +0000 |
commit | de71c6d3a277244a660cd602a418818aa9659861 (patch) | |
tree | 6d9b29d891d4f8c886226b4419e296d0b447bbe6 /converter/other/fiasco/binerror.c | |
parent | d113bea623ccd7b95f2672fbd1fcb88b550196a8 (diff) | |
download | netpbm-mirror-de71c6d3a277244a660cd602a418818aa9659861.tar.gz netpbm-mirror-de71c6d3a277244a660cd602a418818aa9659861.tar.xz netpbm-mirror-de71c6d3a277244a660cd602a418818aa9659861.zip |
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4742 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 7a1ac656..00000000 --- a/converter/other/fiasco/binerror.c +++ /dev/null @@ -1,136 +0,0 @@ -/* - * 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); -} |