Mercurial > hg > th-libs
changeset 99:5819454a28a4
Add th_errno_to_error().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 25 May 2014 01:01:31 +0300 |
parents | 1760e7f53359 |
children | 5197c4ccbfba |
files | th_util.c th_util.h |
diffstat | 2 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/th_util.c Sun May 25 01:01:13 2014 +0300 +++ b/th_util.c Sun May 25 01:01:31 2014 +0300 @@ -132,6 +132,12 @@ } +int th_errno_to_error(int error) +{ + return TH_SYSTEM_ERRORS + error; +} + + const char *th_error_str(int error) { if (error >= TH_SYSTEM_ERRORS)
--- a/th_util.h Sun May 25 01:01:13 2014 +0300 +++ b/th_util.h Sun May 25 01:01:31 2014 +0300 @@ -121,6 +121,7 @@ void th_print_banner(FILE *outFile, const char *binName, const char *usage); int th_get_errno(); +int th_errno_to_error(int error); const char *th_error_str(int error); void THERR(const char *, ...);