about summary refs log tree commit diff
path: root/converter/other
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2018-09-28 15:58:47 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2018-09-28 15:58:47 +0000
commit3a0db7d2a83b98b20aab5e2f93e985433d3e66a6 (patch)
tree083cb545b5d4b9bc6c52183b12bab00c86d7e9b7 /converter/other
parent665a59be36080a0a31afc6f59d81e36ccd1b0512 (diff)
downloadnetpbm-mirror-3a0db7d2a83b98b20aab5e2f93e985433d3e66a6.tar.gz
netpbm-mirror-3a0db7d2a83b98b20aab5e2f93e985433d3e66a6.tar.xz
netpbm-mirror-3a0db7d2a83b98b20aab5e2f93e985433d3e66a6.zip
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3344 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other')
-rw-r--r--converter/other/fiasco/lib/error.c189
1 files changed, 90 insertions, 99 deletions
diff --git a/converter/other/fiasco/lib/error.c b/converter/other/fiasco/lib/error.c
index 17935503..394f896f 100644
--- a/converter/other/fiasco/lib/error.c
+++ b/converter/other/fiasco/lib/error.c
@@ -9,17 +9,6 @@
  *
  *  This file is part of FIASCO (Fractal Image And Sequence COdec)
  *  Copyright (C) 1994-2000 Ullrich Hafner
-
-    "int dummy = " change to int dummy; dummy =" for Netpbm to avoid
-    unused variable warning.
-
- */
-
-/*
- *  $Date: 2000/06/14 20:49:37 $
- *  $Author: hafner $
- *  $Revision: 5.1 $
- *  $State: Exp $
  */
 
 #define _ERROR_C
@@ -118,10 +107,10 @@ set_error(const char * const format, ...) {
 
 
 void
-error(const char *format, ...) {
+error(const char * const format, ...) {
 /*----------------------------------------------------------------------------
   Set error text to given string.
-  -----------------------------------------------------------------------------*/
+-----------------------------------------------------------------------------*/
     va_list      args;
     unsigned     len;
     const char * str;
@@ -175,119 +164,121 @@ error(const char *format, ...) {
 
 
 const char *
-fiasco_get_error_message (void)
-/*
- *  Return value:
- *	Last error message of FIASCO library.
- */
-{
-   return error_message ? error_message : "";
+fiasco_get_error_message(void) {
+/*----------------------------------------------------------------------------
+  Last error message of FIASCO library.
+-----------------------------------------------------------------------------*/
+    return error_message ? error_message : "";
 }
 
+
+
 const char *
-get_system_error (void)
-{
-   return strerror (errno);
+get_system_error(void) {
+    return strerror(errno);
 }
 
+
+
 void
-file_error (const char *filename)
-/*
- *  Print file error message and exit.
- *
- *  No return value.
- */
-{
-   error ("File `%s': I/O Error - %s.", filename, get_system_error ());
+file_error(const char * const filename) {
+/*----------------------------------------------------------------------------
+   Print file error message and exit.
+-----------------------------------------------------------------------------*/
+    error("File `%s': I/O Error - %s.", filename, get_system_error ());
 }
 
+
+
 void
-warning (const char *format, ...)
-/*
- *  Issue a warning and continue execution.
- *
- *  No return value.
- */
-{
-   va_list	args;
-
-   VA_START (args, format);
-
-   if (verboselevel == FIASCO_NO_VERBOSITY) {
-       /* User doesn't want warnings */
-   } else {
-       fprintf (stderr, "Warning: ");
-       vfprintf (stderr, format, args);
-       fputc ('\n', stderr);
-   }
-   va_end (args);
+warning(const char * const format, ...) {
+/*----------------------------------------------------------------------------
+  Issue a warning.
+-----------------------------------------------------------------------------*/
+    va_list	args;
+
+    VA_START (args, format);
+
+    if (verboselevel == FIASCO_NO_VERBOSITY) {
+        /* User doesn't want warnings */
+    } else {
+        fprintf (stderr, "Warning: ");
+        vfprintf (stderr, format, args);
+        fputc ('\n', stderr);
+    }
+    va_end (args);
 }
 
+
+
 void
-message (const char *format, ...)
-/*
- *  Print a message to stderr.
- */
-{
-   va_list args;
-
-   VA_START (args, format);
-
-   if (verboselevel == FIASCO_NO_VERBOSITY) {
-       /* User doesn't want messages */
-   } else {
-       vfprintf (stderr, format, args);
-       fputc ('\n', stderr);
-   }
-   va_end (args);
+message(const char * const format, ...) {
+/*----------------------------------------------------------------------------
+   Print a message to Standard Error
+-----------------------------------------------------------------------------*/
+    va_list args;
+
+    VA_START (args, format);
+
+    if (verboselevel == FIASCO_NO_VERBOSITY) {
+        /* User doesn't want messages */
+    } else {
+        vfprintf (stderr, format, args);
+        fputc ('\n', stderr);
+    }
+    va_end (args);
 }
 
+
+
 void
-debug_message (const char *format, ...)
-/*
- *  Print a message to stderr.
- */
-{
-   va_list args;
+debug_message(const char * const format, ...) {
+/*----------------------------------------------------------------------------
+   Print a message to Standard Error if debug messages are enabled.
+-----------------------------------------------------------------------------*/
+    va_list args;
 
-   VA_START (args, format);
+    VA_START (args, format);
 
-   if (verboselevel >= FIASCO_ULTIMATE_VERBOSITY) {
-       fprintf (stderr, "*** ");
-       vfprintf (stderr, format, args);
-       fputc ('\n', stderr);
-   }
-   va_end (args);
+    if (verboselevel >= FIASCO_ULTIMATE_VERBOSITY) {
+        fprintf (stderr, "*** ");
+        vfprintf (stderr, format, args);
+        fputc ('\n', stderr);
+    }
+    va_end (args);
 }
 
+
+
 void
-info (const char *format, ...)
-/*
- *  Print a message to stderr. Do not append a newline.
- */
-{
-   va_list args;
-
-   VA_START (args, format);
-
-   if (verboselevel == FIASCO_NO_VERBOSITY) {
-       /* User doesn't want informational messages */
-   } else {
-       vfprintf (stderr, format, args);
-       fflush (stderr);
-   }
-   va_end (args);
+info(const char * const format, ...) {
+/*----------------------------------------------------------------------------
+   Print a message to stderr. Do not append a newline.
+-----------------------------------------------------------------------------*/
+    va_list args;
+
+    VA_START (args, format);
+
+    if (verboselevel == FIASCO_NO_VERBOSITY) {
+        /* User doesn't want informational messages */
+    } else {
+        vfprintf (stderr, format, args);
+        fflush (stderr);
+    }
+    va_end (args);
 }
 
+
+
 void
-fiasco_set_verbosity (fiasco_verbosity_e level)
-{
+fiasco_set_verbosity(fiasco_verbosity_e const level) {
    verboselevel = level;
 }
 
+
+
 fiasco_verbosity_e
-fiasco_get_verbosity (void)
-{
+fiasco_get_verbosity(void) {
    return verboselevel;
 }