Mercurial > hg > dmlib
diff tools/data2inc.c @ 958:985225a93aeb
Add error code parameter to dmError() and dmErrorVA().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 27 Feb 2015 03:58:25 +0200 |
parents | 49fc8d8a0b9c |
children | 69c0d8ad2672 |
line wrap: on
line diff
--- a/tools/data2inc.c Fri Feb 27 02:21:57 2015 +0200 +++ b/tools/data2inc.c Fri Feb 27 03:58:25 2015 +0200 @@ -119,7 +119,7 @@ break; default: - dmError("Unknown option '%s'.\n", currArg); + dmErrorMsg("Unknown option '%s'.\n", currArg); return FALSE; } @@ -135,7 +135,7 @@ if (!optOutFilename) optOutFilename = currArg; else - dmError("Source and destination filenames already specified, extraneous argument '%s'.\n", currArg); + dmErrorMsg("Source and destination filenames already specified, extraneous argument '%s'.\n", currArg); return TRUE; } @@ -285,7 +285,7 @@ if (optOutFilename == NULL) { - dmError("Output format not specified and no output filename given (try --help)\n"); + dmErrorMsg("Output format not specified and no output filename given (try --help)\n"); exit(1); } @@ -329,7 +329,7 @@ case FMT_AUTO: default: - dmError("Internal error, FMT_AUTO at output function init.\n"); + dmErrorMsg("Internal error, FMT_AUTO at output function init.\n"); exit(2); } @@ -340,7 +340,7 @@ if ((sfile = fopen(optInFilename, "rb")) == NULL) { tmpRes = errno; - dmError("Error opening input file '%s'. (%s)\n", + dmErrorMsg("Error opening input file '%s'. (%s)\n", optInFilename, strerror(tmpRes)); exit(3); } @@ -351,7 +351,7 @@ if ((dfile = fopen(optOutFilename, "wa")) == NULL) { tmpRes = errno; - dmError("Error creating output file '%s'. (%s)\n", + dmErrorMsg("Error creating output file '%s'. (%s)\n", optOutFilename, strerror(tmpRes)); exit(4); }