MCPcopy Create free account
hub / github.com/ZDoom/Raze / performInclude

Function performInclude

source/core/defparser.cpp:63–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61const char* G_DefaultDefFile(void);
62
63static void performInclude(FScanner* sc, const char* fn, FScriptPosition* pos)
64{
65 int lump = fileSystem.FindFile(fn);
66 if (lump == -1)
67 {
68 if (!pos) Printf("Warning: Unable to open %s\n", fn);
69 else pos->Message(MSG_ERROR, "Unable to open %s", fn);
70 }
71 else
72 {
73 FScanner included;
74 included.OpenLumpNum(lump);
75 if (sc) included.symbols = std::move(sc->symbols);
76 defsparser(included);
77 if (sc) sc->symbols = std::move(included.symbols);
78 }
79}
80
81void parseInclude(FScanner& sc, FScriptPosition& pos)
82{

Callers 2

parseIncludeFunction · 0.85
parseIncludeDefaultFunction · 0.85

Calls 5

PrintfFunction · 0.85
moveFunction · 0.85
defsparserFunction · 0.85
FindFileMethod · 0.80
MessageMethod · 0.80

Tested by

no test coverage detected