mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-29 16:24:16 +00:00
engine: common: add printf-like version of Info_SetValueForKey function.
This commit is contained in:
parent
91be4f6521
commit
3299999f3d
@ -818,6 +818,7 @@ const char *Info_ValueForKey( const char *s, const char *key );
|
|||||||
void Info_RemovePrefixedKeys( char *start, char prefix );
|
void Info_RemovePrefixedKeys( char *start, char prefix );
|
||||||
qboolean Info_RemoveKey( char *s, const char *key );
|
qboolean Info_RemoveKey( char *s, const char *key );
|
||||||
qboolean Info_SetValueForKey( char *s, const char *key, const char *value, int maxsize );
|
qboolean Info_SetValueForKey( char *s, const char *key, const char *value, int maxsize );
|
||||||
|
qboolean Info_SetValueForKeyf( char *s, const char *key, int maxsize, const char *format, ... ) _format( 4 );
|
||||||
qboolean Info_SetValueForStarKey( char *s, const char *key, const char *value, int maxsize );
|
qboolean Info_SetValueForStarKey( char *s, const char *key, const char *value, int maxsize );
|
||||||
qboolean Info_IsValid( const char *s );
|
qboolean Info_IsValid( const char *s );
|
||||||
void Info_WriteVars( file_t *f );
|
void Info_WriteVars( file_t *f );
|
||||||
|
@ -496,3 +496,16 @@ qboolean Info_SetValueForKey( char *s, const char *key, const char *value, int m
|
|||||||
|
|
||||||
return Info_SetValueForStarKey( s, key, value, maxsize );
|
return Info_SetValueForStarKey( s, key, value, maxsize );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qboolean Info_SetValueForKeyf( char *s, const char *key, int maxsize, const char *format, ... )
|
||||||
|
{
|
||||||
|
char value[MAX_VA_STRING];
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
va_start( args, format );
|
||||||
|
Q_vsnprintf( value, sizeof( value ), format, args );
|
||||||
|
va_end( args );
|
||||||
|
|
||||||
|
return Info_SetValueForKey( s, key, value, maxsize );
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user