]> Shamusworld >> Repos - rmac/commitdiff
Fix for extraneous newlines in .print directive.
authorShamus Hammons <jlhamm@acm.org>
Sun, 23 Feb 2014 03:46:01 +0000 (21:46 -0600)
committerShamus Hammons <jlhamm@acm.org>
Sun, 23 Feb 2014 03:46:01 +0000 (21:46 -0600)
direct.c
listing.c
listing.h
riscasm.c
version.h

index 7673d29c18eb0089d848148b427b0ef5fd1992f0..3542669d201c056c1428074e3dd140b6421106ea 100644 (file)
--- a/direct.c
+++ b/direct.c
@@ -118,15 +118,15 @@ int d_org(void)
 //
 int d_print(void)
 {
-       char prntstr[LNSIZ];                                     // String for PRINT directive
-       char format[LNSIZ];                                      // Format for PRINT directive
-       int formatting = 0;                                      // Formatting on/off
-       int wordlong = 0;                                        // WORD = 0, LONG = 1
-       int outtype = 0;                                         // 0:hex, 1:decimal, 2:unsigned
-
-       VALUE eval;                                              // Expression value
-       WORD eattr;                                              // Expression attributes
-       SYM * esym;                                              // External symbol involved in expr.
+       char prntstr[LNSIZ];                                    // String for PRINT directive
+       char format[LNSIZ];                                             // Format for PRINT directive
+       int formatting = 0;                                             // Formatting on/off
+       int wordlong = 0;                                               // WORD = 0, LONG = 1
+       int outtype = 0;                                                // 0:hex, 1:decimal, 2:unsigned
+
+       VALUE eval;                                                             // Expression value
+       WORD eattr;                                                             // Expression attributes
+       SYM * esym;                                                             // External symbol involved in expr.
        TOKEN r_expr[EXPRSIZE];
 
        while (*tok != EOL)
@@ -201,7 +201,7 @@ int d_print(void)
        }
 
        printf("\n");
-       println("\n");
+//     println("\n");
 
        return 0;
 
index f930b79d84100d26b903ada41e80306feec92406..9dfddc595e79a1d49375ca02c1cb7c97af647418 100644 (file)
--- a/listing.c
+++ b/listing.c
@@ -40,10 +40,12 @@ static char timestr[20];                    // Current time hh:mm:ss [am|pm]
 static char buf[IMAGESIZ];                     // Buffer for numbers
 static long unused;                                    // For supressing 'write' warnings
 
-static char * month[16] = { "",    "Jan", "Feb", "Mar",
-                           "Apr", "May", "Jun", "Jul",
-                           "Aug", "Sep", "Oct", "Nov",
-                           "Dec", "",    "",    ""     };
+static char * month[16] = {
+       "",    "Jan", "Feb", "Mar",
+       "Apr", "May", "Jun", "Jul",
+       "Aug", "Sep", "Oct", "Nov",
+       "Dec", "",    "",    ""
+};
 
 //
 // Eject the Page (Print Empty Lines), Reset the Line Count and Bump the Page Number
@@ -134,7 +136,7 @@ void date_string(char * buf, VALUE date)
 void scopy(char *dest, char *src, int len)
 {
        if (len < 0)
-               len = 1000;                                           // Some large number
+               len = 1000;                     // Some large number [Shamus: wha...?]
 
        while (len-- && *src)
                *dest++ = *src++;
@@ -209,7 +211,8 @@ void println(const char * ln)
 {
        unsigned int length;
 
-       if (list_fname != NULL)                                   //  Create listing file, if necessary
+       //  Create listing file, if necessary
+       if (list_fname != NULL)
                list_setup();
 
        length = strlen(ln);
@@ -449,7 +452,8 @@ int d_subttl(void)
 
        tok += 2;
 
-       if (ejectok && (subflag || pageno > 1))                   // Always eject on pages 2+ 
+       // Always eject on pages 2+ 
+       if (ejectok && (subflag || pageno > 1))
                eject();
 
        subflag = 1;
index 3a1af65ce1472bfa4581531bd74df3ad5dbc405b..bef97bc26e50d996414ae36acc25bd0c2d9defb3 100644 (file)
--- a/listing.h
+++ b/listing.h
 #include <time.h>
 #include "rmac.h"
 
-#define BOT_MAR         1                                   // #blank lines on bottom of page
-#define IMAGESIZ        200                                 // Max size of a line of text
-#define TITLESIZ        200                                 // Max size of a title
-#define LN_COL          0                                   // Column for line numbers
-#define LOC_COL         7                                   // Location ptr
-#define DATA_COL        17                                  // Data start (for 20 chars, usually 16)
-#define DATA_END        (DATA_COL+20)                       // End+1th data column
-#define TAG_COL         38                                  // Tag character
-#define SRC_COL         40                                  // Source start
+#define BOT_MAR         1                              // #blank lines on bottom of page
+#define IMAGESIZ        200                            // Max size of a line of text
+#define TITLESIZ        200                            // Max size of a title
+#define LN_COL          0                              // Column for line numbers
+#define LOC_COL         7                              // Location ptr
+#define DATA_COL        17                             // Data start (for 20 chars, usually 16)
+#define DATA_END        (DATA_COL+20)  // End+1th data column
+#define TAG_COL         38                             // Tag character
+#define SRC_COL         40                             // Source start
 
 // Globals, externals etc
-extern char *list_fname;
+extern char * list_fname;
 extern int listing;
 extern int pagelen;
 extern int nlines;
index 4925adce0c8cc2b46ac0750af4ed422ac5df9702..2754600b2dabdcee7561eae01cb717e64c6cc4aa 100644 (file)
--- a/riscasm.c
+++ b/riscasm.c
@@ -33,7 +33,7 @@ char reg_err[] = "missing register R0...R31";
 // Jaguar Jump Condition Names
 char condname[MAXINTERNCC][5] = { 
        "NZ", "Z", "NC", "NCNZ", "NCZ", "C", "CNZ", "CZ", "NN", "NNNZ", "NNZ",
-       "N", "N_NZ", "N_Z ", "T", "A", "NE", "EQ", "CC", "HS", "HI", "CS", "LO",
+       "N", "N_NZ", "N_Z", "T", "A", "NE", "EQ", "CC", "HS", "HI", "CS", "LO",
        "PL", "MI", "F"
 };
 
@@ -338,7 +338,7 @@ int GenerateRISCCode(int state)
                                warn("MOVEI following JUMP, inserting NOP to fix your BROKEN CODE");
                        }
                        else
-                               warn("MOVEI following JUMP");
+                               warn("MOVEI immediately follows JUMP");
                }
 
                if ((challoc - ch_size) < 4)
index fc7fd37bb99b289110bd36b8f06813baea209c98..ab70e8b7fdc48908b82af932543a8dad5db75269 100644 (file)
--- a/version.h
+++ b/version.h
@@ -13,6 +13,6 @@
 
 #define MAJOR   1                      // Major version number
 #define MINOR   2                      // Minor version number
-#define PATCH                        // Patch release number
+#define PATCH   10                     // Patch release number
 
 #endif // __VERSION_H__