1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[error] const char * for fmt

This commit is contained in:
Witold Filipczyk 2021-03-01 21:25:09 +01:00
parent 89a5f106ef
commit a48cd50a8b
2 changed files with 15 additions and 15 deletions

View File

@ -38,7 +38,7 @@
char full_static_version[1024] = "ELinks " VERSION_STRING;
static void
er(int bell, int shall_sleep, char *fmt, va_list params)
er(int bell, int shall_sleep, const char *fmt, va_list params)
{
if (bell)
#ifdef CONFIG_OS_WIN32
@ -56,7 +56,7 @@ int errline;
const char *errfile;
void
elinks_debug(char *fmt, ...)
elinks_debug(const char *fmt, ...)
{
char errbuf[4096];
va_list params;
@ -72,7 +72,7 @@ elinks_debug(char *fmt, ...)
}
void
elinks_wdebug(char *fmt, ...)
elinks_wdebug(const char *fmt, ...)
{
char errbuf[4096];
va_list params;
@ -88,7 +88,7 @@ elinks_wdebug(char *fmt, ...)
}
void
elinks_error(char *fmt, ...)
elinks_error(const char *fmt, ...)
{
char errbuf[4096];
va_list params;
@ -104,7 +104,7 @@ elinks_error(char *fmt, ...)
}
void
elinks_internal(char *fmt, ...)
elinks_internal(const char *fmt, ...)
{
char errbuf[4096];
va_list params;
@ -125,7 +125,7 @@ elinks_internal(char *fmt, ...)
void
usrerror(char *fmt, ...)
usrerror(const char *fmt, ...)
{
va_list params;
@ -143,7 +143,7 @@ usrerror(char *fmt, ...)
int assert_failed = 0;
void
elinks_assertm(int x, char *fmt, ...)
elinks_assertm(int x, const char *fmt, ...)
{
char *buf = NULL;
va_list params;
@ -201,7 +201,7 @@ done_log(void)
void
elinks_log(char *msg, char *file, int line,
char *fmt, ...)
const char *fmt, ...)
{
static char *log_files = NULL;
static char *log_msg = NULL;

View File

@ -23,7 +23,7 @@ extern const char *errfile;
* lying there commented out, as it may get handy). */
#undef DBG
#define DBG errfile = __FILE__, errline = __LINE__, elinks_debug
void elinks_debug(char *fmt, ...);
void elinks_debug(const char *fmt, ...);
/** @c WDBG(format_string) is used for printing of debugging information, akin
* to DBG(). However, it sleep(1)s, therefore being useful when it is going
@ -32,7 +32,7 @@ void elinks_debug(char *fmt, ...);
* handy). */
#undef WDBG
#define WDBG errfile = __FILE__, errline = __LINE__, elinks_wdebug
void elinks_wdebug(char *fmt, ...);
void elinks_wdebug(const char *fmt, ...);
/** @c ERROR(format_string) is used to report non-fatal unexpected errors during
* the ELinks run. It tries to (not that agressively) draw user's attention to
@ -42,20 +42,20 @@ void elinks_wdebug(char *fmt, ...);
* this kind of stuff, and there's nothing naughty about using that. */
#undef ERROR
#define ERROR errfile = __FILE__, errline = __LINE__, elinks_error
void elinks_error(char *fmt, ...);
void elinks_error(const char *fmt, ...);
/** @c INTERNAL(format_string) is used to report fatal errors during the ELinks
* run. It tries to draw user's attention to the error and dumps core if ELinks
* is running in the CONFIG_DEBUG mode. */
#undef INTERNAL
#define INTERNAL errfile = __FILE__, errline = __LINE__, elinks_internal
void elinks_internal(char *fmt, ...);
void elinks_internal(const char *fmt, ...);
/** @c usrerror(format_string) is used to report user errors during a peaceful
* ELinks run. It does not belong to the family above - it doesn't print code
* location, beep nor sleep, it just wraps around fprintf(stderr, "...\n");. */
void usrerror(char *fmt, ...);
void usrerror(const char *fmt, ...);
#ifdef HAVE_VARIADIC_MACROS
@ -75,7 +75,7 @@ void usrerror(char *fmt, ...);
*/
void
elinks_log(char *msg, char *file, int line,
char *fmt, ...);
const char *fmt, ...);
#undef LOG_ERR
#define LOG_ERR(args...) \
@ -147,7 +147,7 @@ do { if (!assert_failed && (assert_failed = !(x))) { \
#ifdef CONFIG_FASTMEM
static inline
#endif
void elinks_assertm(int x, char *fmt, ...)
void elinks_assertm(int x, const char *fmt, ...)
#ifdef CONFIG_FASTMEM
{
/* We don't do anything in CONFIG_FASTMEM mode. Let's hope that the compiler