From b7c8c651f6268c7f72ec8f4fa2a47202a52b07a2 Mon Sep 17 00:00:00 2001 From: uz Date: Thu, 8 Oct 2009 11:31:55 +0000 Subject: [PATCH] New function InvArg(). git-svn-id: svn://svn.cc65.org/cc65/trunk@4344 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/common/cmdline.c | 18 +++++++++++++----- src/common/cmdline.h | 11 +++++++---- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/common/cmdline.c b/src/common/cmdline.c index 81d01863a..8ed149247 100644 --- a/src/common/cmdline.c +++ b/src/common/cmdline.c @@ -6,10 +6,10 @@ /* */ /* */ /* */ -/* (C) 2000 Ullrich von Bassewitz */ -/* Wacholderweg 14 */ -/* D-70597 Stuttgart */ -/* EMail: uz@musoftware.de */ +/* (C) 2000-2009, Ullrich von Bassewitz */ +/* Roemerstrasse 52 */ +/* D-70794 Filderstadt */ +/* EMail: uz@cc65.org */ /* */ /* */ /* This software is provided 'as-is', without any expressed or implied */ @@ -102,7 +102,7 @@ static void AddArg (CmdLine* L, char* Arg) L->Vec[L->Count++] = Arg; } - + static void ExpandFile (CmdLine* L, const char* Name) /* Add the contents of a file to the command line. Each line is a separate @@ -236,6 +236,14 @@ void NeedArg (const char* Opt) +void InvArg (const char* Opt, const char* Arg) +/* Print an error about an invalid option argument and exit. */ +{ + AbEnd ("Invalid argument for %s: `%s'", Opt, Arg); +} + + + void InvDef (const char* Def) /* Print an error about an invalid definition and die */ { diff --git a/src/common/cmdline.h b/src/common/cmdline.h index 6791c4be3..f2af3ef18 100644 --- a/src/common/cmdline.h +++ b/src/common/cmdline.h @@ -6,10 +6,10 @@ /* */ /* */ /* */ -/* (C) 2000 Ullrich von Bassewitz */ -/* Wacholderweg 14 */ -/* D-70597 Stuttgart */ -/* EMail: uz@musoftware.de */ +/* (C) 2000-2009, Ullrich von Bassewitz */ +/* Roemerstrasse 52 */ +/* D-70794 Filderstadt */ +/* EMail: uz@cc65.org */ /* */ /* */ /* This software is provided 'as-is', without any expressed or implied */ @@ -83,6 +83,9 @@ void UnknownOption (const char* Opt) attribute ((noreturn)); void NeedArg (const char* Opt) attribute ((noreturn)); /* Print an error about a missing option argument and exit. */ +void InvArg (const char* Opt, const char* Arg) attribute ((noreturn)); +/* Print an error about an invalid option argument and exit. */ + void InvDef (const char* Def) attribute ((noreturn)); /* Print an error about an invalid definition and die */ -- 2.39.5