kopia lustrzana https://github.com/F5OEO/tstools
Add what is probably a missing function to printing.c
--HG-- extra : convert_revision : svn%3Aeff31bef-be4a-0410-a8fe-e47997df2690/trunk%40127issue20
rodzic
fa1719dfb7
commit
5d1c15c69b
28
printing.c
28
printing.c
|
@ -158,6 +158,34 @@ extern void fprint_err(const char *format, ...)
|
|||
va_end(va_arg);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Prints the given formatted text, as a normal or error message.
|
||||
* If `normal`, then as a normal message, else as an error
|
||||
*/
|
||||
extern void fprint_msg_or_err(int normal, const char *format, ...)
|
||||
{
|
||||
va_list va_arg;
|
||||
va_start(va_arg, format);
|
||||
if (normal)
|
||||
{
|
||||
#if DEBUG
|
||||
printf("?m:%p %s",fns.fprint_message_fn,format);
|
||||
report_fns("?m");
|
||||
#endif
|
||||
fns.fprint_message_fn(format, va_arg);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if DEBUG
|
||||
printf("?e:%p %s",fns.fprint_error_fn,format);
|
||||
report_fns("?e");
|
||||
#endif
|
||||
fns.fprint_error_fn(format, va_arg);
|
||||
}
|
||||
va_end(va_arg);
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Choosing what the printing functions do
|
||||
// ============================================================
|
||||
|
|
Ładowanie…
Reference in New Issue