Simplify and rename mmap_full_file().
[adu.git] / error.h
diff --git a/error.h b/error.h
index 5a5aefb987dad5f4946844e3153f2c8f12d0f282..010af4559bcb9b0a4e3ca5f329dd35629be762a7 100644 (file)
--- a/error.h
+++ b/error.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2008 Andre Noll <maan@tuebingen.mpg.de>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -33,7 +33,7 @@
        _ERROR(EMPTY, "file empty") \
        _ERROR(MMAP, "mmap error") \
        _ERROR(OSL, "osl error") \
-       _ERROR(SIGNAL_SIG_ERR, "signal() returned SIG_ERR") \
+       _ERROR(SIGACTION, "could not install signal handler") \
        _ERROR(OUTPUT, "error writing output") \
        _ERROR(MALFORMED_FORMAT, "malformed format string") \
        _ERROR(BAD_ALIGN_SPEC, "bad alignment specifier") \
@@ -75,25 +75,7 @@ extern int osl_errno;
 /** Contains the description of all adu error codes. */
 extern char *adu_errlist[];
 
-
-/**
- * adu's version of strerror(3).
- *
- * \param num The error number.
- *
- * \return The error text of \a num.
- */
-_static_inline_ const char *adu_strerror(int num)
-{
-       assert(num > 0);
-       if (num == E_OSL) {
-               assert(osl_errno > 0);
-               return osl_strerror((osl_errno));
-       }
-       if (IS_SYSTEM_ERROR(num))
-               return strerror((num) & ((1 << SYSTEM_ERROR_BIT) - 1));
-       return adu_errlist[num];
-}
+extern const char *adu_strerror(int num);
 
 /**
  * Wrapper for osl library calls.