cmSymTbl.h/c: Added cmSymTblRegisterFmt()
This commit is contained in:
parent
3e3b1e2aa9
commit
66cf71e419
16
cmSymTbl.c
16
cmSymTbl.c
@ -261,6 +261,22 @@ unsigned cmSymTblRegisterSymbol( cmSymTblH_t h, const char* label )
|
||||
unsigned cmSymTblRegisterStaticSymbol( cmSymTblH_t h, const char* label )
|
||||
{ return cmSymTblRegister( h, label, true ); }
|
||||
|
||||
unsigned cmSymTblRegisterVFmt( cmSymTblH_t h, const cmChar_t* fmt, va_list vl )
|
||||
{
|
||||
unsigned n = vsnprintf(NULL,0,fmt,vl);
|
||||
cmChar_t b[n+1];
|
||||
vsnprintf(b,n,fmt,vl);
|
||||
return cmSymTblRegister(h,fmt,vl);
|
||||
|
||||
}
|
||||
|
||||
unsigned cmSymTblRegisterFmt( cmSymTblH_t h, const cmChar_t* fmt, ... )
|
||||
{
|
||||
va_list vl;
|
||||
va_start(vl,fmt);
|
||||
cmSymTblRegisterVFmt(h,fmt,vl);
|
||||
va_end(vl);
|
||||
}
|
||||
|
||||
|
||||
bool cmSymTblRemove( cmSymTblH_t h, unsigned symId )
|
||||
|
@ -37,6 +37,9 @@ extern "C" {
|
||||
unsigned cmSymTblRegisterSymbol( cmSymTblH_t h, const char* label );
|
||||
unsigned cmSymTblRegisterStaticSymbol( cmSymTblH_t h, const char* label );
|
||||
|
||||
unsigned cmSymTblRegisterVFmt( cmSymTblH_t h, const cmChar_t* fmt, va_list vl );
|
||||
unsigned cmSymTblRegisterFmt( cmSymTblH_t h, const cmChar_t* fmt, ... );
|
||||
|
||||
bool cmSymTblRemove( cmSymTblH_t h, unsigned symId );
|
||||
|
||||
// Given a symbol id return the associated label.
|
||||
|
Loading…
Reference in New Issue
Block a user