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

Function Cvar_Print

code/qcommon/cvar.cpp:554–568  ·  view source on GitHub ↗

============ Cvar_Print Prints the value, default, and latched string of the given variable ============ */

Source from the content-addressed store, hash-verified

552============
553*/
554void Cvar_Print( cvar_t *v ) {
555 Com_Printf( S_COLOR_GREY "Cvar " S_COLOR_WHITE "%s = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE, v->name, v->string );
556
557 if ( !(v->flags & CVAR_ROM) ) {
558 if ( !Q_stricmp( v->string, v->resetString ) )
559 Com_Printf( ", " S_COLOR_WHITE "the default" );
560 else
561 Com_Printf( ", " S_COLOR_WHITE "default = " S_COLOR_GREY"\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE, v->resetString );
562 }
563
564 Com_Printf( "\n" );
565
566 if ( v->latchedString )
567 Com_Printf( " latched = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"\n", v->latchedString );
568}
569
570/*
571============

Callers 2

Cvar_CommandFunction · 0.70
Cvar_Print_fFunction · 0.70

Calls 2

Q_stricmpFunction · 0.85
Com_PrintfFunction · 0.70

Tested by

no test coverage detected