]> Shamusworld >> Repos - rmac/blobdiff - rmac.c
Fixed subtle bug in section marking code.
[rmac] / rmac.c
diff --git a/rmac.c b/rmac.c
index 7239af2b622bb5d872b8e597ca4a0e544f662eed..8dde4c6d9a34925a534de81a25cd2c7fb8b8b8b4 100644 (file)
--- a/rmac.c
+++ b/rmac.c
@@ -37,7 +37,6 @@ int rgpu, rdsp;                                               // Assembling Jaguar GPU or DSP code
 int list_fd;                                           // File to write listing to
 int regbank;                                           // RISC register bank
 int segpadsize;                                                // Segment padding size
-int in_main;                                           // In main memory flag for GPUMAIN
 int endian;                                                    // Host processor endianess
 char * objfname;                                       // Object filename pointer
 char * firstfname;                                     // First source filename
@@ -301,6 +300,7 @@ int rmac_qsort(char * base, int n, int size, int (*compar)())
 }
 
 
+#if 0
 //
 // Allocate memory; Panic and Quit if we Run Out
 //
@@ -338,6 +338,7 @@ char * amem(LONG amount)
 
        return p;
 }
+#endif
 
 
 //
@@ -560,7 +561,6 @@ int process(int argc, char ** argv)
        orgwarning = 0;                                 // No ORG warning issued
        a_amount = 0;
        segpadsize = 2;                                 // Initialise segment padding size
-       in_main = 0;
 
        // Initialise modules
        InitSymbolTable();                              // Symbol table
@@ -853,27 +853,19 @@ int get_endianess(void)
 //
 int main(int argc, char ** argv)
 {
-       int status;
-       int i;
-
        perm_verb_flag = 0;                             // Clobber "permanent" verbose flag
        cmdlnexec = argv[0];                    // Obtain executable name
 
        endian = get_endianess();               // Get processor endianess
 
-       for(i=0; i<MAXFWDJUMPS; i++)
-               fwdjump[i] = 0;
-
-       // Full command line passed
+       // If commands were passed in, process them
        if (argc > 1)
        {
-               status = process(argc - 1, argv + 1);              
-       }
-       else
-       {
-               display_version();
-               display_help();
+               return process(argc - 1, argv + 1);              
        }
 
-       return status;
+       display_version();
+       display_help();
+
+       return 0;
 }