1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-01 03:30:20 +00:00

In error or warning messages, output the name of the library if this is

relevant. It's otherwise difficult to know what happens when ar65 is called
from within a makefile or similar.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5695 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2012-06-07 19:59:51 +00:00
parent 4e0cbcf33f
commit 5cf9f585a6
6 changed files with 31 additions and 23 deletions

View File

@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 1998-2011, Ullrich von Bassewitz */
/* (C) 1998-2012, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
@ -41,6 +41,7 @@
/* ar65 */
#include "error.h"
#include "library.h"
#include "objdata.h"
#include "exports.h"
@ -112,9 +113,9 @@ void ExpInsert (const char* Name, const ObjData* Module)
while (1) {
if (strcmp (L->Name, Name) == 0) {
/* Duplicate entry */
Warning ("External symbol `%s' in module `%s' is duplicated in "
"module `%s'",
Name, L->Name, Module->Name);
Warning ("External symbol `%s' in module `%s', library `%s' "
"is duplicated in module `%s'",
Name, L->Name, LibName, Module->Name);
}
if (L->Next == 0) {
break;

View File

@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 1998-2011, Ullrich von Bassewitz */
/* (C) 1998-2012, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
@ -61,10 +61,12 @@
/* Name of the library file */
const char* LibName = 0;
/* File descriptor for the library file */
FILE* NewLib = 0;
static FILE* Lib = 0;
static const char* LibName = 0;
/* The library header */
static LibHeader Header = {

View File

@ -6,10 +6,10 @@
/* */
/* */
/* */
/* (C) 1998 Ullrich von Bassewitz */
/* Wacholderweg 14 */
/* D-70597 Stuttgart */
/* EMail: uz@musoftware.de */
/* (C) 1998-2012, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
@ -48,6 +48,9 @@
/* Name of the library file */
extern const char* LibName;
/* File descriptor for the new library file */
extern FILE* NewLib;

View File

@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 1998-2011, Ullrich von Bassewitz */
/* (C) 1998-2012, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
@ -121,7 +121,7 @@ int main (int argc, char* argv [])
case 'V':
fprintf (stderr,
"ar65 V%s - (C) Copyright 1998-2011 Ullrich von Bassewitz\n",
"ar65 V%s - (C) Copyright 1998-2012 Ullrich von Bassewitz\n",
GetVersionAsString ());
break;

View File

@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 1998-2011, Ullrich von Bassewitz */
/* (C) 1998-2012, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
@ -41,6 +41,7 @@
/* ar65 */
#include "error.h"
#include "library.h"
#include "objdata.h"
@ -164,7 +165,7 @@ void DelObjData (const char* Module)
}
/* Not found! */
Warning ("Module `%s' not found in library", Module);
Warning ("Module `%s' not found in library `%s'", Module, LibName);
}

View File

@ -267,7 +267,8 @@ void ObjAdd (const char* Name)
* and the external one.
*/
if (difftime ((time_t)O->MTime, StatBuf.st_mtime) > 0.0) {
Warning ("Replacing module `%s' by older version", O->Name);
Warning ("Replacing module `%s' by older version in library `%s'",
O->Name, LibName);
}
/* Free data */
@ -312,7 +313,7 @@ void ObjExtract (const char* Name)
/* Bail out if the module does not exist */
if (O == 0) {
Error ("Module `%s' not found in library", Module);
Error ("Module `%s' not found in library `%s'", Module, LibName);
}
/* Open the output file */