dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] pnet/ildd ildd.c,1.3,1.4


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] pnet/ildd ildd.c,1.3,1.4
Date: Wed, 26 Nov 2003 03:44:48 +0000

Update of /cvsroot/dotgnu-pnet/pnet/ildd
In directory subversions:/tmp/cvs-serv8833/ildd

Modified Files:
        ildd.c 
Log Message:


Print the assembly version for each file that is scanned.


Index: ildd.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ildd/ildd.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ildd.c      24 Nov 2003 11:36:34 -0000      1.3
--- ildd.c      26 Nov 2003 03:44:46 -0000      1.4
***************
*** 188,191 ****
--- 188,192 ----
        ILFileDecl *file;
        ILManifestRes *res;
+       static ILUInt16 const zeroVersion[4] = {0, 0, 0, 0};
  
        /* Attempt to load the image into memory */
***************
*** 197,200 ****
--- 198,212 ----
        }
  
+       /* Get the assembly version */
+       assem = ILAssembly_FromToken(image, IL_META_TOKEN_ASSEMBLY | 1);
+       if(assem)
+       {
+               version = ILAssemblyGetVersion(assem);
+       }
+       else
+       {
+               version = zeroVersion;
+       }
+ 
        /* Print the file header if we have multiple files */
        if(multiple)
***************
*** 202,212 ****
                if(!strcmp(filename, "-"))
                {
!                       fputs("stdin:\n", stdout);
                }
                else
                {
                        fputs(filename, stdout);
-                       fputs(":\n", stdout);
                }
        }
  
--- 214,226 ----
                if(!strcmp(filename, "-"))
                {
!                       fputs("stdin", stdout);
                }
                else
                {
                        fputs(filename, stdout);
                }
+               printf(" [%d:%d:%d:%d]:\n",
+                          (int)(version[0]), (int)(version[1]),
+                          (int)(version[2]), (int)(version[3]));
        }
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]