Clean up some whitespace in the output
authorRaja R Harinath <harinath@hurrynot.org>
Tue, 30 Mar 2010 08:59:36 +0000 (08:59 -0000)
committerRaja R Harinath <harinath@hurrynot.org>
Tue, 30 Mar 2010 08:59:36 +0000 (08:59 -0000)
* main.c (pinvoke_flags_map): Add a few trailing spaces.
* util.c (flags): Simplify.

verified whitespace changes are non-significant with 'diff -b'

svn path=/trunk/mono/; revision=154433

mono/dis/ChangeLog
mono/dis/main.c
mono/dis/util.c

index 5194a8e66669254df00fc6535b932bbf35dbed61..5702fcacdd08bbe1687d711e62de140c4dc38a36 100644 (file)
@@ -1,5 +1,9 @@
 2010-03-30  Raja R Harinath  <harinath@hurrynot.org>
 
+       Clean up some whitespace in the output
+       * main.c (pinvoke_flags_map): Add a few trailing spaces.
+       * util.c (flags): Simplify.
+
        Make util.c:flags() stricter
        * get.c (field_flags_map): Add empty entries for
        HAS_FIELD_MARSHAL, HAS_DEFAULT and HAS_FIELD_RVA.
index a5c23595fd0f6e8f9d7cd33680078d2ca64eeec8..4578e3fe8bac7d4b1b27a26ef5214ecf541f1b3b 100644 (file)
@@ -567,10 +567,10 @@ method_flags (guint32 f)
 static dis_map_t pinvoke_flags_map [] = {
        { PINVOKE_ATTRIBUTE_NO_MANGLE ,            "nomangle " },
        { PINVOKE_ATTRIBUTE_SUPPORTS_LAST_ERROR,   "lasterr " },
-       { PINVOKE_ATTRIBUTE_BEST_FIT_ENABLED,      "bestfit:on" },
-       { PINVOKE_ATTRIBUTE_BEST_FIT_DISABLED,      "bestfit:off" },
-       { PINVOKE_ATTRIBUTE_THROW_ON_UNMAPPABLE_ENABLED, "charmaperror:on" },
-       { PINVOKE_ATTRIBUTE_THROW_ON_UNMAPPABLE_DISABLED, "charmaperror:off" },
+       { PINVOKE_ATTRIBUTE_BEST_FIT_ENABLED,      "bestfit:on " },
+       { PINVOKE_ATTRIBUTE_BEST_FIT_DISABLED,      "bestfit:off " },
+       { PINVOKE_ATTRIBUTE_THROW_ON_UNMAPPABLE_ENABLED, "charmaperror:on " },
+       { PINVOKE_ATTRIBUTE_THROW_ON_UNMAPPABLE_DISABLED, "charmaperror:off " },
        { 0, NULL }
 };
 
index 8f91209e2971f15223c09eb5431be5ed2d37c4fe..737f6fda774fbd6b8d437fb8026f42691dca73a8 100644 (file)
@@ -45,19 +45,14 @@ flags (guint32 code, dis_map_t *table)
        
        buffer [0] = 0;
        
-       for (i = 0; code && table [i].str != NULL; i++) {
-               if (!(table [i].code & code))
-                       continue;
-               code &= ~table [i].code;
-               if (!*table [i].str)
-                       continue;
-               if (buffer [0])
-                       strcat (buffer, " ");
-               strcat (buffer, table [i].str);
-       }
+       for (i = 0; code && table [i].str != NULL; i++)
+               if (table [i].code & code) {
+                       code &= ~table [i].code;
+                       strcat (buffer, table [i].str);
+               }
 
        if (code)
-               sprintf (buffer + strlen (buffer), " unknown-flag-%2x", code);
+               sprintf (buffer + strlen (buffer), "unknown-flag-%2x ", code);
 
        return buffer;
 }