https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7b2bb7ecc8622c68ce02d7ec7fa3d3d19514d8d7

commit 7b2bb7ecc8622c68ce02d7ec7fa3d3d19514d8d7
Author:     Timo Kreuzer <timo.kreu...@reactos.org>
AuthorDate: Mon Jun 3 10:26:02 2024 +0300
Commit:     Timo Kreuzer <timo.kreu...@reactos.org>
CommitDate: Sat Nov 2 02:36:45 2024 +0200

    [SPEC2DEF] Implement support for negated architecture
    
    This is used by wine spec files.
---
 sdk/tools/spec2def/spec2def.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/sdk/tools/spec2def/spec2def.c b/sdk/tools/spec2def/spec2def.c
index 36612eb4bfc..cd80dffafcc 100644
--- a/sdk/tools/spec2def/spec2def.c
+++ b/sdk/tools/spec2def/spec2def.c
@@ -1072,9 +1072,24 @@ ParseFile(char* pcStart, FILE *fileDest, unsigned 
*cExports)
                 /* Look if we are included */
                 do
                 {
+                    int negated = 0, match = 0;
+
                     pc++;
+
+                    /* Check for negated case */
+                    if (*pc == '!')
+                    {
+                        negated = 1;
+                        pc++;
+                    }
+
                     if (CompareToken(pc, pszArchString) ||
                         CompareToken(pc, pszArchString2))
+                    {
+                        match = 1;
+                    }
+
+                    if (match != negated)
                     {
                         included = 1;
                     }

Reply via email to