]> Shamusworld >> Repos - rmac/commitdiff
Updated printf commands that were complaining about long-words as necessary.
authorGraeme Hinchliffe <linkovitch@dodgy.net>
Sun, 1 Jan 2012 18:22:47 +0000 (18:22 +0000)
committerGraeme Hinchliffe <linkovitch@dodgy.net>
Sun, 1 Jan 2012 18:22:47 +0000 (18:22 +0000)
Updated date in copyright from 2011 to 2011-2012

debug.c
listing.c
mark.c
symbol.c
token.c

diff --git a/debug.c b/debug.c
index 75520486cc3b24c6bcc624aecd0ad11918f9de87..fc3029351fd8d4feca6ec4080ab601c1d6343035 100644 (file)
--- a/debug.c
+++ b/debug.c
@@ -1,7 +1,7 @@
 //
 // RMAC - Reboot's Macro Assembler for the Atari Jaguar Console System
 // DEBUG.C - Debugging Messages
 //
 // RMAC - Reboot's Macro Assembler for the Atari Jaguar Console System
 // DEBUG.C - Debugging Messages
-// Copyright (C) 199x Landon Dyer, 2011 Reboot and Friends
+// Copyright (C) 199x Landon Dyer, 2011-2012 Reboot and Friends
 // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
 // Source Utilised with the Kind Permission of Landon Dyer
 //
 // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
 // Source Utilised with the Kind Permission of Landon Dyer
 //
@@ -44,10 +44,10 @@ TOKEN * printexpr(TOKEN * tp)
                ++tp;
                break;
             case CONST:
                ++tp;
                break;
             case CONST:
-               printf("$%lx ", *tp++);
+               printf("$%ux ", *tp++);
                break;
             case ACONST:
                break;
             case ACONST:
-               printf("ACONST=($%lx,$%lx) ", *tp, tp[1]);
+               printf("ACONST=($%ux,$%ux) ", *tp, tp[1]);
                tp += 2;
                break;
             default:
                tp += 2;
                break;
             default:
@@ -69,7 +69,7 @@ int chdump(CHUNK * ch, int format)
 {
    while (ch != NULL)
    {
 {
    while (ch != NULL)
    {
-      printf("chloc=$%08lx, chsize=$%lx\n", ch->chloc, ch->ch_size);
+      printf("chloc=$%08ux, chsize=$%ux\n", ch->chloc, ch->ch_size);
       mdump(ch->chptr, ch->ch_size, format, ch->chloc);
       ch = ch->chnext;
    }
       mdump(ch->chptr, ch->ch_size, format, ch->chloc);
       ch = ch->chnext;
    }
@@ -101,7 +101,7 @@ int fudump(CHUNK * ch)
          file = *p.wp++;
          line = *p.wp++;
 
          file = *p.wp++;
          line = *p.wp++;
 
-         printf("$%04x $%08lx %d.%d: ", (int)attr, loc, (int)file, (int)line);
+         printf("$%04x $%08ux %d.%d: ", (int)attr, loc, (int)file, (int)line);
 
          if (attr & FU_EXPR)
                 {
 
          if (attr & FU_EXPR)
                 {
@@ -139,11 +139,11 @@ int mudump(void)
 
    for(mch=firstmch; mch!=NULL; mch=mch->mcnext)
    {
 
    for(mch=firstmch; mch!=NULL; mch=mch->mcnext)
    {
-      printf("mch=$%08lx mcptr=$%08lx mcalloc=$%lx mcused=$%x\n",
-             (unsigned long int)mch,
-             (unsigned long int)(mch->mcptr.lw),
+      printf("mch=$%08ux mcptr=$%08ux mcalloc=$%ux mcused=$%x\n",
+             (uint32_t)mch,
+             (mch->mcptr.lw),
              mch->mcalloc,
              mch->mcalloc,
-             (unsigned int)(mch->mcused));
+             (mch->mcused));
 
       p = mch->mcptr;
          
 
       p = mch->mcptr;
          
@@ -163,7 +163,7 @@ int mudump(void)
          if (w & MSYMBOL)
             symbol = *p.sy++;
 
          if (w & MSYMBOL)
             symbol = *p.sy++;
 
-         printf("m=$%04x to=%d loc=$%lx from=%d siz=%s",
+         printf("m=$%04x to=%d loc=$%ux from=%d siz=%s",
                  w, w & 0x00ff, loc, from, (w & MLONG) ? "long" : "word");
 
          if (symbol != NULL)
                  w, w & 0x00ff, loc, from, (w & MLONG) ? "long" : "word");
 
          if (symbol != NULL)
@@ -201,7 +201,7 @@ int mdump(char *start, LONG count, int flg, LONG base) {
          }
          j = i;
          if(base != -1)
          }
          j = i;
          if(base != -1)
-            printf("%08lx  ", base);
+            printf("%08ux  ", base);
       }
 
       switch(flg & 3) {
       }
 
       switch(flg & 3) {
@@ -256,14 +256,14 @@ int dumptok(TOKEN * tk)
 
       if (*tk >= 128)
          {
 
       if (*tk >= 128)
          {
-         printf("REG=%ld", *tk++ - 128);
+         printf("REG=%ud", *tk++ - 128);
          continue;
       }
 
       switch ((int)*tk++)
          {
          case CONST:                                        // CONST <value>
          continue;
       }
 
       switch ((int)*tk++)
          {
          case CONST:                                        // CONST <value>
-            printf("CONST=%ld", *tk++);
+            printf("CONST=%ud", *tk++);
             break;
          case STRING:                                       // STRING <address>
             printf("STRING='%s'", (char *)*tk++);
             break;
          case STRING:                                       // STRING <address>
             printf("STRING='%s'", (char *)*tk++);
@@ -318,7 +318,7 @@ int dump_everything(void) {
 
    for(i = 1; i < NSECTS; ++i)
       if(sect[i].scattr & SUSED) {
 
    for(i = 1; i < NSECTS; ++i)
       if(sect[i].scattr & SUSED) {
-         printf("Section %d sloc=$%lx\n", i, sect[i].sloc);
+         printf("Section %d sloc=$%ux\n", i, sect[i].sloc);
          printf("Code:\n");
          chdump(sect[i].sfcode, 1);
 
          printf("Code:\n");
          chdump(sect[i].sfcode, 1);
 
@@ -330,7 +330,7 @@ int dump_everything(void) {
 
    printf("\nMarks:\n");
    mudump();                                                // Dump marks
 
    printf("\nMarks:\n");
    mudump();                                                // Dump marks
-   printf("Total memory allocated=$%lx\n", amemtot);
+   printf("Total memory allocated=$%ux\n", amemtot);
 
    return(0);
 }
 
    return(0);
 }
index b3f40ddb44f13a35de646107aaa8814226def4a6..265f47cc32ab501070bd1b3f8641c6da535ed04e 100644 (file)
--- a/listing.c
+++ b/listing.c
@@ -1,7 +1,7 @@
 //
 // RMAC - Reboot's Macro Assembler for the Atari Jaguar Console System
 // LISTING.C - Listing Output
 //
 // RMAC - Reboot's Macro Assembler for the Atari Jaguar Console System
 // LISTING.C - Listing Output
-// Copyright (C) 199x Landon Dyer, 2011 Reboot and Friends
+// Copyright (C) 199x Landon Dyer, 2011-2012 Reboot and Friends
 // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
 // Source Utilised with the Kind Permission of Landon Dyer
 // -------------------------------------------------------------------------------------------------
 // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
 // Source Utilised with the Kind Permission of Landon Dyer
 // -------------------------------------------------------------------------------------------------
@@ -256,10 +256,10 @@ void listeol(void) {
    LONG count;
    int fixcount;
 
    LONG count;
    int fixcount;
 
-   DEBUG printf("~list: lsloc=$%lx sloc=$%lx\n", lsloc, sloc);
+   DEBUG printf("~list: lsloc=$%ux sloc=$%ux\n", lsloc, sloc);
 
    if(lsloc != sloc) {
 
    if(lsloc != sloc) {
-      sprintf(buf, "%08lx", lsloc);
+      sprintf(buf, "%08ux", lsloc);
       scopy(lnimage+LOC_COL, buf, 8);
    }
 
       scopy(lnimage+LOC_COL, buf, 8);
    }
 
@@ -296,7 +296,7 @@ void listeol(void) {
             uc_ln(lnimage);
             ship_ln(lnimage);
             lnfill(lnimage, SRC_COL, SPACE);                // Fill with spaces
             uc_ln(lnimage);
             ship_ln(lnimage);
             lnfill(lnimage, SRC_COL, SPACE);                // Fill with spaces
-            sprintf(buf, "%08lx", lsloc);
+            sprintf(buf, "%08ux", lsloc);
             scopy(lnimage+LOC_COL, buf, 8);
          }
 
             scopy(lnimage+LOC_COL, buf, 8);
          }
 
@@ -360,7 +360,7 @@ void lstout(char tag) {
 //
 
 int listvalue(VALUE v) {
 //
 
 int listvalue(VALUE v) {
-   sprintf(buf, "=%08lx", v);
+   sprintf(buf, "=%08ux", v);
    scopy(lnimage+DATA_COL-1, buf, 9);
    return(0);
 }
    scopy(lnimage+DATA_COL-1, buf, 9);
    return(0);
 }
diff --git a/mark.c b/mark.c
index 407cded04918d14046bf4aef6c773846b54d3958..96468bc51d387bb5445cd929a3824b597b614a3d 100644 (file)
--- a/mark.c
+++ b/mark.c
@@ -1,7 +1,7 @@
 //
 // RMAC - Reboot's Macro Assembler for the Atari Jaguar Console System
 // MARK.C - A record of things that are defined relative to any of the sections
 //
 // RMAC - Reboot's Macro Assembler for the Atari Jaguar Console System
 // MARK.C - A record of things that are defined relative to any of the sections
-// Copyright (C) 199x Landon Dyer, 2011 Reboot and Friends
+// Copyright (C) 199x Landon Dyer, 2011-2012 Reboot and Friends
 // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
 // Source Utilised with the Kind Permission of Landon Dyer
 //
 // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
 // Source Utilised with the Kind Permission of Landon Dyer
 //
@@ -202,7 +202,7 @@ LONG bsdmarkimg(char *mp, LONG siz, LONG tsize, int reqseg) {
                      diff |= ((LONG)(*dp++ & 0xff)) << 16;
                      diff |= ((LONG)(*dp++ & 0xff)) << 8;
                      diff |= (LONG)(*dp & 0xff);
                      diff |= ((LONG)(*dp++ & 0xff)) << 16;
                      diff |= ((LONG)(*dp++ & 0xff)) << 8;
                      diff |= (LONG)(*dp & 0xff);
-                     DEBUG printf("diff=%lx ==> ", diff);
+                     DEBUG printf("diff=%ux ==> ", diff);
                      if(rflag & 0x01)
                         diff = ((diff >> 16) & 0x0000FFFF) | ((diff << 16) & 0xFFFF0000);
                      diff += sect[TEXT].sloc;
                      if(rflag & 0x01)
                         diff = ((diff >> 16) & 0x0000FFFF) | ((diff << 16) & 0xFFFF0000);
                      diff += sect[TEXT].sloc;
@@ -215,7 +215,7 @@ LONG bsdmarkimg(char *mp, LONG siz, LONG tsize, int reqseg) {
                      *dp++ = (char)(diff >> 16);
                      *dp++ = (char)(diff >> 8);
                      *dp = (char)diff;
                      *dp++ = (char)(diff >> 16);
                      *dp++ = (char)(diff >> 8);
                      *dp = (char)diff;
-                     DEBUG printf("%lx\n", diff);
+                     DEBUG printf("%ux\n", diff);
                   }
                }
             }
                   }
                }
             }
index b82582ad4f699853402ff6bd474520690c414c05..747c5a7e7099d655437e00c17f3bc2466e422fb1 100644 (file)
--- a/symbol.c
+++ b/symbol.c
@@ -1,7 +1,7 @@
 //
 // RMAC - Reboot's Macro Assembler for the Atari Jaguar Console System
 // SYMBOL.C - Symbol Handling
 //
 // RMAC - Reboot's Macro Assembler for the Atari Jaguar Console System
 // SYMBOL.C - Symbol Handling
-// Copyright (C) 199x Landon Dyer, 2011 Reboot and Friends
+// Copyright (C) 199x Landon Dyer, 2011-2012 Reboot and Friends
 // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
 // Source Utilised with the Kind Permission of Landon Dyer
 //
 // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
 // Source Utilised with the Kind Permission of Landon Dyer
 //
@@ -364,7 +364,7 @@ int symtable(void) {
             c1 = tdb_text[w & TDB];
             if(c == 'x') strcpy(ln2, "external");
             else {
             c1 = tdb_text[w & TDB];
             if(c == 'x') strcpy(ln2, "external");
             else {
-               sprintf(ln2, "%08lx", q->svalue);
+               sprintf(ln2, "%08ux", q->svalue);
                uc_string(ln2);
             }
 
                uc_string(ln2);
             }
 
diff --git a/token.c b/token.c
index 225a25778a5f8ee335738fb0ff2dbaa9cb9dcdb0..6b0a3e6238aea777095bd3dac8fa768054770dbe 100644 (file)
--- a/token.c
+++ b/token.c
@@ -1,7 +1,7 @@
 //
 // RMAC - Reboot's Macro Assembler for the Atari Jaguar Console System
 // TOKEN.C - Token Handling
 //
 // RMAC - Reboot's Macro Assembler for the Atari Jaguar Console System
 // TOKEN.C - Token Handling
-// Copyright (C) 199x Landon Dyer, 2011 Reboot and Friends
+// Copyright (C) 199x Landon Dyer, 2011-2012 Reboot and Friends
 // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
 // Source Utilised with the Kind Permission of Landon Dyer
 //
 // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
 // Source Utilised with the Kind Permission of Landon Dyer
 //
@@ -263,7 +263,7 @@ int mexpand(char * src, char * dest, int destsiz)
                }
                goto copy_d;
             case '~':                                       // ==> unique label string Mnnnn... 
                }
                goto copy_d;
             case '~':                                       // ==> unique label string Mnnnn... 
-               sprintf(numbuf, "M%ld", curuniq);
+               sprintf(numbuf, "M%ud", curuniq);
                
                copystr:
 
                
                copystr:
 
@@ -365,7 +365,7 @@ int mexpand(char * src, char * dest, int destsiz)
                            continue;
                            break;
                         case CONST:
                            continue;
                            break;
                         case CONST:
-                           sprintf(numbuf, "$%lx", (LONG)*tk++);
+                           sprintf(numbuf, "$%ux", (LONG)*tk++);
                            d = numbuf;
                            break;
                         case DEQUALS:
                            d = numbuf;
                            break;
                         case DEQUALS: