Mercurial > hg > dmlib
diff tools/fontconv.c @ 730:3d813c81f33c
More work on resources API.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 21 Apr 2013 19:29:00 +0300 |
parents | 064c942d342e |
children | daebbf28953d |
line wrap: on
line diff
--- a/tools/fontconv.c Sun Apr 21 18:34:13 2013 +0300 +++ b/tools/fontconv.c Sun Apr 21 19:29:00 2013 +0300 @@ -6,7 +6,6 @@ * Please read file 'COPYING' for information on license and distribution. */ #include <stdio.h> -#include <errno.h> #include "dmlib.h" #include "dmargs.h" #include "dmfile.h" @@ -303,10 +302,10 @@ #endif // Open the source file - if ((inFile = dmf_create_stdio(optInFilename, "rb")) == NULL) + if ((res = dmf_create_stdio(optInFilename, "rb", &inFile)) != DMERR_OK) { dmError("Error opening input file '%s', %d: %s\n", - optInFilename, errno, strerror(errno)); + optInFilename, res, dmErrorStr(res)); return 1; } @@ -369,10 +368,10 @@ dmMsg(1, "Outputting a DMFONT format bitmap font.\n"); - if ((outFile = dmf_create_stdio(optOutFilename, "wb")) == NULL) + if ((res = dmf_create_stdio(optOutFilename, "wb", &outFile)) != DMERR_OK) { dmError("Error creating file '%s', %d: %s\n", - optInFilename, errno, strerror(errno)); + optInFilename, res, dmErrorStr(res)); goto error_exit; }