1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-12 17:30:50 +00:00

Changed data type used to store line numbers from unsigned long to unsigned.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5222 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2011-08-19 10:44:45 +00:00
parent 5f0e6dd7e9
commit 68db31c53b
7 changed files with 23 additions and 23 deletions

View File

@ -110,7 +110,7 @@ void CheckAssertions (void)
const LineInfo* LI;
const char* Module;
unsigned long Line;
unsigned Line;
/* Get the assertion */
Assertion* A = CollAtUnchecked (&Assertions, I);
@ -129,7 +129,7 @@ void CheckAssertions (void)
/* If the expression is not constant, we're not able to handle it */
if (!IsConstExpr (A->Expr)) {
Warning ("Cannot evaluate assertion in module `%s', line %lu",
Warning ("Cannot evaluate assertion in module `%s', line %u",
Module, Line);
} else if (GetExprVal (A->Expr) == 0) {
@ -140,17 +140,17 @@ void CheckAssertions (void)
case ASSERT_ACT_WARN:
case ASSERT_ACT_LDWARN:
Warning ("%s(%lu): %s", Module, Line, Message);
Warning ("%s(%u): %s", Module, Line, Message);
break;
case ASSERT_ACT_ERROR:
case ASSERT_ACT_LDERROR:
Error ("%s(%lu): %s", Module, Line, Message);
Error ("%s(%u): %s", Module, Line, Message);
break;
default:
Internal ("Invalid assertion action (%u) in module `%s', "
"line %lu (file corrupt?)",
"line %u (file corrupt?)",
A->Action, Module, Line);
break;
}

View File

@ -166,7 +166,7 @@ Import* ReadImport (FILE* F, ObjData* Obj)
*/
if (ObjHasFiles (I->Obj)) {
const LineInfo* LI = GetImportPos (I);
Error ("Invalid import size in for `%s', imported from %s(%lu): 0x%02X",
Error ("Invalid import size in for `%s', imported from %s(%u): 0x%02X",
GetString (I->Name),
GetSourceName (LI),
GetSourceLine (LI),
@ -202,7 +202,7 @@ Import* GenImport (unsigned Name, unsigned char AddrSize)
*/
if (ObjHasFiles (I->Obj)) {
const LineInfo* LI = GetImportPos (I);
Error ("Invalid import size in for `%s', imported from %s(%lu): 0x%02X",
Error ("Invalid import size in for `%s', imported from %s(%u): 0x%02X",
GetString (I->Name),
GetSourceName (LI),
GetSourceLine (LI),
@ -674,23 +674,23 @@ static void CheckSymType (const Export* E)
*/
if (E->Obj) {
/* The export comes from an object file */
SB_Printf (&ExportLoc, "%s, %s(%lu)",
SB_Printf (&ExportLoc, "%s, %s(%u)",
GetString (E->Obj->Name),
GetSourceName (ExportLI),
GetSourceLine (ExportLI));
} else {
SB_Printf (&ExportLoc, "%s(%lu)",
SB_Printf (&ExportLoc, "%s(%u)",
GetSourceName (ExportLI),
GetSourceLine (ExportLI));
}
if (I->Obj) {
/* The import comes from an object file */
SB_Printf (&ImportLoc, "%s, %s(%lu)",
SB_Printf (&ImportLoc, "%s, %s(%u)",
GetString (I->Obj->Name),
GetSourceName (ImportLI),
GetSourceLine (ImportLI));
} else {
SB_Printf (&ImportLoc, "%s(%lu)",
SB_Printf (&ImportLoc, "%s(%u)",
GetSourceName (ImportLI),
GetSourceLine (ImportLI));
}
@ -753,7 +753,7 @@ static void PrintUnresolved (ExpCheckFunc F, void* Data)
for (J = 0; J < CollCount (&Imp->RefLines); ++J) {
const LineInfo* LI = CollConstAt (&Imp->RefLines, J);
fprintf (stderr,
" %s(%lu)\n",
" %s(%u)\n",
GetSourceName (LI),
GetSourceLine (LI));
}
@ -908,7 +908,7 @@ void PrintImportMap (FILE* F)
/* Print the import */
const LineInfo* LI = GetImportPos (Imp);
fprintf (F,
" %-25s %s(%lu)\n",
" %-25s %s(%u)\n",
GetObjFileName (Imp->Obj),
GetSourceName (LI),
GetSourceLine (LI));
@ -965,7 +965,7 @@ void CircularRefError (const Export* E)
/* Print an error about a circular reference using to define the given export */
{
const LineInfo* LI = GetExportPos (E);
Error ("Circular reference for symbol `%s', %s(%lu)",
Error ("Circular reference for symbol `%s', %s(%u)",
GetString (E->Name),
GetSourceName (LI),
GetSourceLine (LI));

View File

@ -98,9 +98,9 @@ INLINE const char* GetFragmentSourceName (const Fragment* F)
#endif
#if defined(HAVE_INLINE)
INLINE unsigned long GetFragmentSourceLine (const Fragment* F)
INLINE unsigned GetFragmentSourceLine (const Fragment* F)
/* Return the source file line for this fragment */
{
{
return GetSourceLineFromList (&F->LineInfos);
}
#else

View File

@ -229,7 +229,7 @@ void PrintDbgLineInfo (FILE* F)
/* Print the start of the line */
fprintf (F,
"line\tid=%u,file=%u,line=%lu",
"line\tid=%u,file=%u,line=%u",
LI->Id, LI->File->Id, GetSourceLine (LI));
/* Print type if not LI_TYPE_ASM and count if not zero */

View File

@ -128,7 +128,7 @@ INLINE const char* GetSourceName (const LineInfo* LI)
#endif
#if defined(HAVE_INLINE)
INLINE unsigned long GetSourceLine (const LineInfo* LI)
INLINE unsigned GetSourceLine (const LineInfo* LI)
/* Return the source file line from the given line info */
{
return LI->Pos.Line;
@ -160,7 +160,7 @@ INLINE const char* GetSourceNameFromList (const Collection* LineInfos)
#endif
#if defined(HAVE_INLINE)
INLINE unsigned long GetSourceLineFromList (const Collection* LineInfos)
INLINE unsigned GetSourceLineFromList (const Collection* LineInfos)
/* Return the source file line from a list of line infos */
{
/* The relevant entry is in slot zero */

View File

@ -17,7 +17,7 @@ LD65_CFG = \"/usr/lib/cc65/cfg/\"
#
CC = gcc
CFLAGS = -g -O2 -Wall -W -std=c89
CFLAGS = -g -Wall -W -std=c89
override CFLAGS += -I$(COMMON)
override CFLAGS += -DLD65_LIB=$(LD65_LIB) -DLD65_OBJ=$(LD65_OBJ) -DLD65_CFG=$(LD65_CFG)
EBIND = emxbind

View File

@ -492,19 +492,19 @@ void SegWrite (const char* TgtName, FILE* Tgt, Segment* S, SegWriteFunc F, void*
break;
case SEG_EXPR_RANGE_ERROR:
Error ("Range error in module `%s', line %lu",
Error ("Range error in module `%s', line %u",
GetFragmentSourceName (Frag),
GetFragmentSourceLine (Frag));
break;
case SEG_EXPR_TOO_COMPLEX:
Error ("Expression too complex in module `%s', line %lu",
Error ("Expression too complex in module `%s', line %u",
GetFragmentSourceName (Frag),
GetFragmentSourceLine (Frag));
break;
case SEG_EXPR_INVALID:
Error ("Invalid expression in module `%s', line %lu",
Error ("Invalid expression in module `%s', line %u",
GetFragmentSourceName (Frag),
GetFragmentSourceLine (Frag));
break;