]> git.sur5r.net Git - cc65/blobdiff - src/ar65/list.c
goto.c warning fix for implicit truncation
[cc65] / src / ar65 / list.c
index a1132517f4c24281c8d7009e823c5ca1cc1d4333..367c950dc0d8e00e7aeba3e34086965294d14f4d 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************/
 /*                                                                           */
-/*                                 list.c                                   */
+/*                                  list.c                                   */
 /*                                                                           */
-/*                  Module listing for the ar65 archiver                    */
+/*                   Module listing for the ar65 archiver                    */
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
@@ -36,6 +36,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+/* common */
+#include "print.h"
+
 /* ar65 */
 #include "error.h"
 #include "library.h"
@@ -45,7 +48,7 @@
 
 
 /*****************************************************************************/
-/*                                          Code                                    */
+/*                                   Code                                    */
 /*****************************************************************************/
 
 
@@ -58,10 +61,10 @@ void ListObjFiles (int argc, char* argv [])
 
     /* Check the argument count */
     if (argc <= 0) {
-       Error ("No library name given");
+        Error ("No library name given");
     }
     if (argc > 2) {
-       Error ("Too many arguments");
+        Error ("Too many arguments");
     }
 
     /* Open the library, read the index */
@@ -73,8 +76,10 @@ void ListObjFiles (int argc, char* argv [])
         /* Get the entry */
         O = CollConstAt (&ObjPool, I);
 
+        /* Print the size if verbose */
+        Print (stdout, 1, "%5lu ", O->Size);
         /* Print the name */
-       printf ("%s\n", O->Name);
+        puts (O->Name);
 
     }
 
@@ -84,6 +89,3 @@ void ListObjFiles (int argc, char* argv [])
     /* Successful end */
     exit (EXIT_SUCCESS);
 }
-
-
-