MCPcopy Create free account
hub / github.com/ImageEngine/cortex / category

Function category

contrib/scripts/fixIncludes.py:145–178  ·  view source on GitHub ↗
( includeFile, filename )

Source from the content-addressed store, hash-verified

143 sys.stderr.write( "WARNING : {0} line {1} : {2}\n".format( filename, lineNumber + 1, message ) )
144
145def category( includeFile, filename ) :
146
147 if os.path.splitext( filename )[1] == ".cpp" :
148 name, ext = os.path.splitext( os.path.basename( includeFile ) )
149 if ext == ".h" and name == os.path.splitext( os.path.basename( filename ) )[0] :
150 return "self"
151
152 if includeFile == "boost/python.hpp" :
153 return "boostpython"
154
155 if "/" in includeFile :
156 start = includeFile.partition( "/" )[0]
157 if start == "sys" :
158 return "stdc"
159 elif start in includeOrder :
160 return start
161 else :
162 return "unknown"
163
164 if includeFile == "ft2build.h" :
165 return "freetypeBuild"
166 elif includeFile.startswith( "FT_" ) and includeFile.endswith( "_H" ) :
167 return "freetype"
168
169 if not includeFile.islower() :
170 return "local"
171
172 if includeFile == "ai.h" or includeFile.startswith( "ai_" ) :
173 return "arnold"
174
175 if includeFile.endswith( ".h" ) :
176 return "stdc"
177 else :
178 return "stdc++"
179
180def formattedInclude( includeFile, category ) :
181

Callers 1

fixFileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected