mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Remove progname variable
The error message shouldn't specify the name of the binary, that's supposed to be known by the caller. Update test reference outputs. Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
@@ -20,8 +20,6 @@ int cldefines_index;
|
|||||||
int cldefines_size;
|
int cldefines_size;
|
||||||
char **cldefines;
|
char **cldefines;
|
||||||
|
|
||||||
char *progname;
|
|
||||||
|
|
||||||
clock_t nStartClock, nEndClock;
|
clock_t nStartClock, nEndClock;
|
||||||
SLONG nLineNo;
|
SLONG nLineNo;
|
||||||
ULONG nTotalLines, nPass, nPC, nIFDepth, nErrors;
|
ULONG nTotalLines, nPass, nPC, nIFDepth, nErrors;
|
||||||
@@ -301,8 +299,6 @@ main(int argc, char *argv[])
|
|||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
progname = "rgbasm";
|
|
||||||
|
|
||||||
/* yydebug=1; */
|
/* yydebug=1; */
|
||||||
|
|
||||||
DefaultOptions.gbgfx[0] = '0';
|
DefaultOptions.gbgfx[0] = '0';
|
||||||
|
|||||||
10
src/extern/err.c
vendored
10
src/extern/err.c
vendored
@@ -26,11 +26,9 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "extern/err.h"
|
#include "extern/err.h"
|
||||||
|
|
||||||
extern char *progname;
|
|
||||||
|
|
||||||
void rgbds_vwarn(const char *fmt, va_list ap)
|
void rgbds_vwarn(const char *fmt, va_list ap)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "%s: warning", progname);
|
fprintf (stderr, "warning");
|
||||||
if (fmt) {
|
if (fmt) {
|
||||||
fputs (": ", stderr);
|
fputs (": ", stderr);
|
||||||
vfprintf(stderr, fmt, ap);
|
vfprintf(stderr, fmt, ap);
|
||||||
@@ -41,7 +39,7 @@ void rgbds_vwarn(const char *fmt, va_list ap)
|
|||||||
|
|
||||||
void rgbds_vwarnx(const char *fmt, va_list ap)
|
void rgbds_vwarnx(const char *fmt, va_list ap)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "%s: warning", progname);
|
fprintf (stderr, "warning");
|
||||||
if (fmt) {
|
if (fmt) {
|
||||||
fputs (": ", stderr);
|
fputs (": ", stderr);
|
||||||
vfprintf(stderr, fmt, ap);
|
vfprintf(stderr, fmt, ap);
|
||||||
@@ -51,7 +49,7 @@ void rgbds_vwarnx(const char *fmt, va_list ap)
|
|||||||
|
|
||||||
noreturn void rgbds_verr(int status, const char *fmt, va_list ap)
|
noreturn void rgbds_verr(int status, const char *fmt, va_list ap)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "%s: error", progname);
|
fprintf (stderr, "error");
|
||||||
if (fmt) {
|
if (fmt) {
|
||||||
fputs (": ", stderr);
|
fputs (": ", stderr);
|
||||||
vfprintf(stderr, fmt, ap);
|
vfprintf(stderr, fmt, ap);
|
||||||
@@ -62,7 +60,7 @@ noreturn void rgbds_verr(int status, const char *fmt, va_list ap)
|
|||||||
|
|
||||||
noreturn void rgbds_verrx(int status, const char *fmt, va_list ap)
|
noreturn void rgbds_verrx(int status, const char *fmt, va_list ap)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "%s: error", progname);
|
fprintf (stderr, "error");
|
||||||
if (fmt) {
|
if (fmt) {
|
||||||
fputs (": ", stderr);
|
fputs (": ", stderr);
|
||||||
vfprintf(stderr, fmt, ap);
|
vfprintf(stderr, fmt, ap);
|
||||||
|
|||||||
@@ -23,8 +23,6 @@
|
|||||||
|
|
||||||
#include "extern/err.h"
|
#include "extern/err.h"
|
||||||
|
|
||||||
char *progname;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
@@ -71,8 +69,6 @@ main(int argc, char *argv[])
|
|||||||
int version; /* mask ROM version number */
|
int version; /* mask ROM version number */
|
||||||
int padvalue; /* to pad the rom with if it changes size */
|
int padvalue; /* to pad the rom with if it changes size */
|
||||||
|
|
||||||
progname = "rgbfix";
|
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "Cci:jk:l:m:n:p:sr:t:v")) != -1) {
|
while ((ch = getopt(argc, argv, "Cci:jk:l:m:n:p:sr:t:v")) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 'C':
|
case 'C':
|
||||||
|
|||||||
@@ -19,8 +19,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "gfx/main.h"
|
#include "gfx/main.h"
|
||||||
|
|
||||||
char *progname;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
@@ -41,8 +39,6 @@ main(int argc, char *argv[])
|
|||||||
char *ext;
|
char *ext;
|
||||||
const char *errmsg = "Warning: The PNG's %s setting is not the same as the setting defined on the command line.";
|
const char *errmsg = "Warning: The PNG's %s setting is not the same as the setting defined on the command line.";
|
||||||
|
|
||||||
progname = "rgbgfx";
|
|
||||||
|
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,8 +24,6 @@ SLONG options = 0;
|
|||||||
SLONG fillchar = 0;
|
SLONG fillchar = 0;
|
||||||
char *smartlinkstartsymbol;
|
char *smartlinkstartsymbol;
|
||||||
|
|
||||||
char *progname;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Print the usagescreen
|
* Print the usagescreen
|
||||||
*
|
*
|
||||||
@@ -54,8 +52,6 @@ main(int argc, char *argv[])
|
|||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
progname = "rgblink";
|
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "l:m:n:o:O:p:s:tw")) != -1) {
|
while ((ch = getopt(argc, argv, "l:m:n:o:O:p:s:tw")) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 'l':
|
case 'l':
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
ERROR: undefined-dot.asm(3):
|
ERROR: undefined-dot.asm(3):
|
||||||
'.' not defined
|
'.' not defined
|
||||||
rgbasm: error: Assembly aborted in pass 2 (1 errors)!
|
error: Assembly aborted in pass 2 (1 errors)!
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
rgblink: error: Unable to place 'r0b' (ROM0 section) anywhere
|
error: Unable to place 'r0b' (ROM0 section) anywhere
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
rgblink: error: ROMX sections can't be used with option -t.
|
error: ROMX sections can't be used with option -t.
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
rgblink: error: VRAM bank 1 can't be used with option -w.
|
error: VRAM bank 1 can't be used with option -w.
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
rgblink: error: Unable to place 'v1' (VRAM section) in any bank
|
error: Unable to place 'v1' (VRAM section) in any bank
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
rgblink: error: Unable to place 'w0b' (WRAM0 section) anywhere
|
error: Unable to place 'w0b' (WRAM0 section) anywhere
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
rgblink: error: WRAMX sections can't be used with option -w.
|
error: WRAMX sections can't be used with option -w.
|
||||||
|
|||||||
Reference in New Issue
Block a user