Francois Gouget : winedump: Track unknown lnk flags and dump them.

Alexandre Julliard julliard at winehq.org
Mon Feb 4 08:42:49 CST 2008


Module: wine
Branch: master
Commit: 74d8536414c0cf11014ca7ba1ae1578ae54811fe
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=74d8536414c0cf11014ca7ba1ae1578ae54811fe

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Sat Jan 26 03:11:02 2008 +0100

winedump: Track unknown lnk flags and dump them.

---

 tools/winedump/lnk.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/tools/winedump/lnk.c b/tools/winedump/lnk.c
index 2754602..1da0176 100644
--- a/tools/winedump/lnk.c
+++ b/tools/winedump/lnk.c
@@ -352,6 +352,7 @@ enum FileSig get_kind_lnk(void)
 void lnk_dump(void)
 {
     const LINK_HEADER*        hdr;
+    DWORD dwFlags;
 
     offset = 0;
     hdr = fetch_block();
@@ -371,7 +372,15 @@ void lnk_dump(void)
 
     /* dump out all the flags */
     printf("Flags:   %04x ( ", hdr->dwFlags);
-#define FLAG(x) if(hdr->dwFlags & SLDF_##x) printf("%s ",#x)
+    dwFlags=hdr->dwFlags;
+#define FLAG(x) do \
+                { \
+                    if (dwFlags & SLDF_##x) \
+                    { \
+                        printf("%s ", #x); \
+                        dwFlags&=~SLDF_##x; \
+                    } \
+                } while (0)
     FLAG(HAS_ID_LIST);
     FLAG(HAS_LINK_INFO);
     FLAG(HAS_NAME);
@@ -395,6 +404,8 @@ void lnk_dump(void)
     FLAG(DISABLE_KNOWNFOLDER_RELATIVE_TRACKING);
     FLAG(RESERVED);
 #undef FLAG
+    if (dwFlags)
+        printf("+%04x", dwFlags);
     printf(")\n");
 
     printf("Length:  %04x\n", hdr->dwFileLength);




More information about the wine-cvs mailing list