Mercurial > hg > dmlib
diff tools/packed.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 | ffdae9cd81de |
children | e8de4fbc03b6 |
line wrap: on
line diff
--- a/tools/packed.c Fri Feb 27 02:21:57 2015 +0200 +++ b/tools/packed.c Fri Feb 27 03:58:25 2015 +0200 @@ -110,7 +110,7 @@ unsigned int i; if (!dmGetIntVal(optArg, &i)) { - dmError("Invalid flags value '%s'.\n", optArg); + dmErrorMsg("Invalid flags value '%s'.\n", optArg); return FALSE; } optDefResFlags = i; @@ -125,14 +125,14 @@ } else { - dmError("Maximum number of exclusion patterns (%d) exceeded!\n", + dmErrorMsg("Maximum number of exclusion patterns (%d) exceeded!\n", SET_MAX_FILES); return FALSE; } break; default: - dmError("Unknown argument '%s'.\n", currArg); + dmErrorMsg("Unknown argument '%s'.\n", currArg); return FALSE; } @@ -149,7 +149,7 @@ } else { - dmError("Maximum number of input files (%d) exceeded!\n", + dmErrorMsg("Maximum number of input files (%d) exceeded!\n", SET_MAX_FILES); return FALSE; } @@ -600,7 +600,7 @@ if (optCommand == CMD_NONE) { argShowHelp(); - dmError("Nothing to do.\n"); + dmErrorMsg("Nothing to do.\n"); exit(0); return 0; } @@ -654,7 +654,7 @@ } else { - dmError("Could not open packfile, error #%d: %s\n", res, + dmErrorMsg("Could not open packfile, error #%d: %s\n", res, dmErrorStr(res)); } break; @@ -699,7 +699,7 @@ dmMsg(1, "c=%d\n", dmPackClose(pack)); } else - dmError("Could not open packfile, error #%d: %s\n", res, + dmErrorMsg("Could not open packfile, error #%d: %s\n", res, dmErrorStr(res)); break; @@ -713,7 +713,7 @@ if (resFile == NULL) { int err = dmGetErrno(); - dmError("Could not create resource output file '%s' #%d: %s\n", + dmErrorMsg("Could not create resource output file '%s' #%d: %s\n", DMRES_RES_FILE, err, dmErrorStr(err)); } @@ -753,7 +753,7 @@ fclose(resFile); } else - dmError("Could not open packfile, error #%d: %s\n", res, + dmErrorMsg("Could not open packfile, error #%d: %s\n", res, dmErrorStr(res)); break;