diff options
author | Andreas Wettstein <wettstein509@solnet.ch> | 2011-12-02 20:10:06 +0000 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2011-12-06 12:15:03 +0000 |
commit | 1447071942dbbbfc37b08417c74c8a1d302c1626 (patch) | |
tree | 71fb0a2c7bd8555cd7dbcf600c7fd45433c9e1bb /compat.c | |
parent | 5fd14db5b2cc0c2c43f7a1ddefd6f9991eb1dcc2 (diff) |
include resets group compatibility modifiers #43091
This change makes sure that include does not overwrite previous
compatibility modifier settings when the included files does not
explicitly specify them.
Signed-off-by: Andreas Wettstein <wettstein509@solnet.ch>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'compat.c')
-rw-r--r-- | compat.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -50,6 +50,7 @@ typedef struct _GroupCompatInfo { unsigned char fileID; unsigned char merge; + Bool defined; unsigned char real_mods; unsigned short vmods; } GroupCompatInfo; @@ -280,8 +281,8 @@ AddGroupCompat(CompatInfo * info, unsigned group, GroupCompatInfo * newGC) ACTION1("Using %s definition\n", (merge == MergeAugment ? "old" : "new")); } - if (merge != MergeAugment) - *gc = *newGC; + if(newGC->defined && (merge != MergeAugment || !gc->defined)) + *gc = *newGC; return True; } @@ -715,6 +716,7 @@ HandleGroupCompatDef(GroupCompatDef * def, } tmp.real_mods = val.uval & 0xff; tmp.vmods = (val.uval >> 8) & 0xffff; + tmp.defined = True; return AddGroupCompat(info, def->group - 1, &tmp); } |