From 53dd895efda4c45fa170976912a3489fe2a4da68 Mon Sep 17 00:00:00 2001 From: Raja R Harinath Date: Tue, 30 Mar 2010 08:59:36 +0000 Subject: [PATCH] Clean up some whitespace in the output * 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 | 4 ++++ mono/dis/main.c | 8 ++++---- mono/dis/util.c | 17 ++++++----------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/mono/dis/ChangeLog b/mono/dis/ChangeLog index 5194a8e6666..5702fcacdd0 100644 --- a/mono/dis/ChangeLog +++ b/mono/dis/ChangeLog @@ -1,5 +1,9 @@ 2010-03-30 Raja R Harinath + 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. diff --git a/mono/dis/main.c b/mono/dis/main.c index a5c23595fd0..4578e3fe8ba 100644 --- a/mono/dis/main.c +++ b/mono/dis/main.c @@ -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 } }; diff --git a/mono/dis/util.c b/mono/dis/util.c index 8f91209e297..737f6fda774 100644 --- a/mono/dis/util.c +++ b/mono/dis/util.c @@ -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; } -- 2.25.1