/* */
/* */
/* */
-/* (C) 2002-2010, Ullrich von Bassewitz */
+/* (C) 2002-2011, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* Remove the trailing newline */
unsigned Len = strlen (S);
if (Len > 0 && S[Len-1] == '\n') {
- S[Len-1 ] = '\0';
+ S[Len-1 ] = '\0';
}
/* Return the time string */
+static void SkipLineInfoList (FILE* F)
+/* Skip a line info list from the given file */
+{
+ /* Count preceeds the list */
+ unsigned long Count = ReadVar (F);
+
+ /* Skip indices */
+ while (Count--) {
+ (void) ReadVar (F);
+ }
+}
+
+
+
static void SkipExpr (FILE* F)
/* Skip an expression from the given file */
{
case EXPR_SECTION:
/* Read the segment number */
(void) Read8 (F);
- break;
+ break;
default:
Error ("Invalid expression op: %02X", Op);
}
/* Symbol usage */
- switch (Flags & SYM_MASK_LABEL) {
+ switch (Flags & SYM_MASK_LABEL) {
case SYM_EQUATE: strcat (TypeDesc, ",SYM_EQUATE"); break;
case SYM_LABEL: strcat (TypeDesc, ",SYM_LABEL"); break;
}
/* Read the data for one file */
const char* Name = GetString (&StrPool, ReadVar (F));
unsigned long MTime = Read32 (F);
- unsigned long Size = Read32 (F);
+ unsigned long Size = ReadVar (F);
unsigned Len = strlen (Name);
/* Print the header */
Collection StrPool = AUTO_COLLECTION_INITIALIZER;
unsigned Count;
unsigned I;
- FilePos Pos;
/* Seek to the header position and read the header */
FileSetPos (F, Offset);
unsigned char AddrSize = Read8 (F);
const char* Name = GetString (&StrPool, ReadVar (F));
unsigned Len = strlen (Name);
- ReadFilePos (F, &Pos);
+
+ /* Skip the line infos */
+ SkipLineInfoList (F);
/* Print the header */
printf (" Index:%27u\n", I);
Collection StrPool = AUTO_COLLECTION_INITIALIZER;
unsigned Count;
unsigned I;
- FilePos Pos;
/* Seek to the header position and read the header */
FileSetPos (F, Offset);
Value = Read32 (F);
HaveValue = 1;
}
- ReadFilePos (F, &Pos);
+
+ /* Skip the line infos */
+ SkipLineInfoList (F);
/* Print the header */
printf (" Index:%27u\n", I);
Collection StrPool = AUTO_COLLECTION_INITIALIZER;
unsigned Count;
unsigned I;
- FilePos Pos;
/* Seek to the header position and read the header */
FileSetPos (F, Offset);
Value = Read32 (F);
HaveValue = 1;
}
- ReadFilePos (F, &Pos);
+
+ /* Skip the line infos */
+ SkipLineInfoList (F);
/* Print the header */
printf (" Index:%27u\n", I);
/* Read and print all line infos */
for (I = 0; I < Count; ++I) {
- FilePos Pos;
-
/* Read one line info */
+ FilePos Pos;
ReadFilePos (F, &Pos);
/* Print the header */
/* */
/* */
/* */
-/* (C) 2000-2009, Ullrich von Bassewitz */
+/* (C) 2000-2011, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* Print the assembler version */
{
fprintf (stderr,
- "%s V%s - (C) Copyright 2000-2009, Ullrich von Bassewitz\n",
+ "%s V%s - (C) Copyright 2000-2011, Ullrich von Bassewitz\n",
ProgName, GetVersionAsString ());
}