MCPcopy Create free account
hub / github.com/JACoders/OpenJK / PC_AddDefine

Function PC_AddDefine

codemp/botlib/l_precomp.cpp:1402–1420  ·  view source on GitHub ↗

end of the function PC_DefineFromString ============================================================================ Parameter: - Returns: - Changes Globals: - ============================================================================

Source from the content-addressed store, hash-verified

1400// Changes Globals: -
1401//============================================================================
1402int PC_AddDefine(source_t *source, char *string)
1403{
1404 define_t *define;
1405
1406 if ( addGlobalDefine )
1407 {
1408 return PC_AddGlobalDefine ( string );
1409 }
1410
1411 define = PC_DefineFromString(string);
1412 if (!define) return qfalse;
1413#if DEFINEHASHING
1414 PC_AddDefineToHash(define, source->definehash);
1415#else //DEFINEHASHING
1416 define->next = source->defines;
1417 source->defines = define;
1418#endif //DEFINEHASHING
1419 return qtrue;
1420} //end of the function PC_AddDefine
1421//============================================================================
1422// add a globals define that will be added to all opened sources
1423//

Callers

nothing calls this directly

Calls 3

PC_AddGlobalDefineFunction · 0.85
PC_DefineFromStringFunction · 0.85
PC_AddDefineToHashFunction · 0.85

Tested by

no test coverage detected