From a79db8d446e152b715f435550c2a6e10a36ee532 Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Thu, 31 Mar 2016 08:42:10 +0200 Subject: Specifically handle Slimber/Limber in FixIncludes.py Additionally improve handling of the corresponding header. Test-Information: This version of FixIncludes has been used in the recent include fixing of all source files in the repository. Change-Id: I70c8ef0a51d8e1a3b458fbd6f886c7d5b5259949 diff --git a/BuildTools/FixIncludes.py b/BuildTools/FixIncludes.py index 0780a5b..d409a2c 100755 --- a/BuildTools/FixIncludes.py +++ b/BuildTools/FixIncludes.py @@ -19,7 +19,7 @@ c_stdlib_headers = Set(["assert.h", "limits.h", "signal.h", "stdlib.h", "ctyp cpp_stdlib_headers = Set(["algorithm", "fstream", "list", "regex", "typeindex", "array", "functional", "locale", "set", "typeinfo", "atomic", "future", "map", "sstream", "type_traits", "bitset", "initializer_list", "memory", "stack", "unordered_map", "chrono", "iomanip", "mutex", "stdexcept", "unordered_set", "codecvt", "ios", "new", "streambuf", "utility", "complex", "iosfwd", "numeric", "string", "valarray", "condition_variable", "iostream", "ostream", "strstream", "vector", "deque", "istream", "queue", "system_error", "exception", "iterator", "random", "thread", "forward_list", "limits", "ratio", "tuple", "cassert", "ciso646", "csetjmp", "cstdio", "ctime", "cctype", "climits", "csignal", "cstdlib", "cwchar", "cerrno", "clocale", "cstdarg", "cstring", "cwctype", "cfloat", "cmath", "cstddef"]) class HeaderType: - PRAGMA_ONCE, CORRESPONDING_HEADER, C_STDLIB, CPP_STDLIB, BOOST, QT, OTHER, SWIFTEN, SWIFT_CONTROLLERS, SLUIFT, SWIFTOOLS, SWIFT = range(12) + PRAGMA_ONCE, CORRESPONDING_HEADER, C_STDLIB, CPP_STDLIB, BOOST, QT, OTHER, SWIFTEN, LIMBER, SLIMBER, SWIFT_CONTROLLERS, SLUIFT, SWIFTOOLS, SWIFT = range(14) def findHeaderBlock(lines): start = False @@ -46,7 +46,7 @@ def lineToFileName(line): return False def fileNameToHeaderType(name): - if name.endswith(filename_name + ".h"): + if name.endswith("/" + filename_name + ".h"): return HeaderType.CORRESPONDING_HEADER if name in c_stdlib_headers: @@ -64,6 +64,12 @@ def fileNameToHeaderType(name): if name.startswith("Swiften"): return HeaderType.SWIFTEN + if name.startswith("Limber"): + return HeaderType.LIMBER + + if name.startswith("Slimber"): + return HeaderType.SLIMBER + if name.startswith("Swift/Controllers"): return HeaderType.SWIFT_CONTROLLERS -- cgit v0.10.2-6-g49f6