end of the function PC_FreeDefine ============================================================================ Parameter: - Returns: - Changes Globals: - ============================================================================
| 684 | // Changes Globals: - |
| 685 | //============================================================================ |
| 686 | void PC_AddBuiltinDefines(source_t *source) |
| 687 | { |
| 688 | int i; |
| 689 | define_t *define; |
| 690 | struct builtin |
| 691 | { |
| 692 | char *string; |
| 693 | int mBuiltin; |
| 694 | } builtin[] = { // bk001204 - brackets |
| 695 | { "__LINE__", BUILTIN_LINE }, |
| 696 | { "__FILE__", BUILTIN_FILE }, |
| 697 | { "__DATE__", BUILTIN_DATE }, |
| 698 | { "__TIME__", BUILTIN_TIME }, |
| 699 | // { "__STDC__", BUILTIN_STDC }, |
| 700 | { NULL, 0 } |
| 701 | }; |
| 702 | |
| 703 | for (i = 0; builtin[i].string; i++) |
| 704 | { |
| 705 | define = (define_t *) GetMemory(sizeof(define_t)); |
| 706 | Com_Memset(define, 0, sizeof(define_t)); |
| 707 | define->name = (char *) GetMemory(strlen(builtin[i].string) + 1); |
| 708 | strcpy(define->name, builtin[i].string); |
| 709 | define->flags |= DEFINE_FIXED; |
| 710 | define->builtin = builtin[i].mBuiltin; |
| 711 | //add the define to the source |
| 712 | #if DEFINEHASHING |
| 713 | PC_AddDefineToHash(define, source->definehash); |
| 714 | #else |
| 715 | define->next = source->defines; |
| 716 | source->defines = define; |
| 717 | #endif //DEFINEHASHING |
| 718 | } //end for |
| 719 | } //end of the function PC_AddBuiltinDefines |
| 720 | //============================================================================ |
| 721 | // |
| 722 | // Parameter: - |
nothing calls this directly
no test coverage detected