Added factored-out 'warning_pre' function.
This commit is contained in:
parent
a7f68bcb40
commit
519a9d0a81
@ -96,6 +96,13 @@ error (char *fmt, ...)
|
|||||||
error_die ();
|
error_die ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Warning pre
|
||||||
|
void
|
||||||
|
warning_pre (void)
|
||||||
|
{
|
||||||
|
printfstderr ("warning: ");
|
||||||
|
}
|
||||||
|
|
||||||
//! Print warning
|
//! Print warning
|
||||||
/**
|
/**
|
||||||
* Input is comparable to printf, only end of line is not required.
|
* Input is comparable to printf, only end of line is not required.
|
||||||
@ -106,7 +113,7 @@ warning (char *fmt, ...)
|
|||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
va_start (args, fmt);
|
va_start (args, fmt);
|
||||||
printfstderr ("warning: ");
|
warning_pre ();
|
||||||
vprintfstderr (fmt, args);
|
vprintfstderr (fmt, args);
|
||||||
printfstderr ("\n");
|
printfstderr ("\n");
|
||||||
va_end (args);
|
va_end (args);
|
||||||
|
@ -33,6 +33,7 @@ void error_die (void);
|
|||||||
void error_pre (void);
|
void error_pre (void);
|
||||||
void error_post (char *fmt, ...);
|
void error_post (char *fmt, ...);
|
||||||
void error (char *fmt, ...);
|
void error (char *fmt, ...);
|
||||||
|
void warning_pre (void);
|
||||||
void warning (char *fmt, ...);
|
void warning (char *fmt, ...);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user