mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
fix some error messages: err() instead of errx(strerror())
This commit is contained in:
@@ -615,8 +615,7 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
fclose(f);
|
fclose(f);
|
||||||
} else {
|
} else {
|
||||||
errx(EX_NOINPUT, "Could not open file '%s' : %s", filename,
|
err(EX_NOINPUT, "Could not open file '%s'", filename);
|
||||||
strerror(errno));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
|
|||||||
@@ -85,8 +85,8 @@ main(int argc, char *argv[])
|
|||||||
("Extracted module '%s'\n",
|
("Extracted module '%s'\n",
|
||||||
argv[argn]);
|
argv[argn]);
|
||||||
} else
|
} else
|
||||||
errx(EX_NOINPUT,
|
err(EX_NOINPUT,
|
||||||
"Unable to write module '%s' : %s", argv[argn], strerror(errno));
|
"Unable to write module '%s'", argv[argn]);
|
||||||
} else
|
} else
|
||||||
errx(EX_NOINPUT, "Module not found");
|
errx(EX_NOINPUT, "Module not found");
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,7 @@ SetMapfileName(char *name)
|
|||||||
mf = fopen(name, "w");
|
mf = fopen(name, "w");
|
||||||
|
|
||||||
if (mf == NULL)
|
if (mf == NULL)
|
||||||
errx(EX_CANTCREAT, "Cannot open mapfile '%s' : %s", name,
|
err(EX_CANTCREAT, "Cannot open mapfile '%s'", name);
|
||||||
strerror(errno));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -32,8 +31,7 @@ SetSymfileName(char *name)
|
|||||||
sf = fopen(name, "w");
|
sf = fopen(name, "w");
|
||||||
|
|
||||||
if (sf == NULL)
|
if (sf == NULL)
|
||||||
errx(EX_CANTCREAT, "Cannot open symfile '%s' : %s", name,
|
errx(EX_CANTCREAT, "Cannot open symfile '%s'", name);
|
||||||
strerror(errno));
|
|
||||||
|
|
||||||
fprintf(sf, ";File generated by xLink v" LINK_VERSION "\n\n");
|
fprintf(sf, ";File generated by xLink v" LINK_VERSION "\n\n");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -446,8 +446,8 @@ obj_Readfile(char *tzObjectfile)
|
|||||||
|
|
||||||
pObjfile = fopen(tzObjectfile, "rb");
|
pObjfile = fopen(tzObjectfile, "rb");
|
||||||
if (pObjfile == NULL)
|
if (pObjfile == NULL)
|
||||||
errx(EX_NOINPUT, "Unable to open object '%s' : %s",
|
err(EX_NOINPUT, "Unable to open object '%s'",
|
||||||
tzObjectfile, strerror(errno));
|
tzObjectfile);
|
||||||
obj_ReadOpenFile(pObjfile, tzObjectfile);
|
obj_ReadOpenFile(pObjfile, tzObjectfile);
|
||||||
fclose(pObjfile);
|
fclose(pObjfile);
|
||||||
|
|
||||||
@@ -496,8 +496,7 @@ lib_Readfile(char *tzLibfile)
|
|||||||
|
|
||||||
pObjfile = fopen(tzLibfile, "rb");
|
pObjfile = fopen(tzLibfile, "rb");
|
||||||
if (pObjfile == NULL)
|
if (pObjfile == NULL)
|
||||||
errx(EX_NOINPUT, "Unable to open object '%s' : %s",
|
err(EX_NOINPUT, "Unable to open object '%s'", tzLibfile);
|
||||||
tzLibfile, strerror(errno));
|
|
||||||
if (!pObjfile) {
|
if (!pObjfile) {
|
||||||
errx(5, "Unable to open '%s'", tzLibfile);
|
errx(5, "Unable to open '%s'", tzLibfile);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user