mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2025-01-05 23:55:06 +01: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 );
|
||||
qboolean Info_RemoveKey( char *s, const char *key );
|
||||
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_IsValid( const char *s );
|
||||
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 );
|
||||
}
|
||||
|
||||
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…
Reference in New Issue
Block a user