mirror of
https://github.com/nmap/nmap.git
synced 2026-02-13 00:46:32 +00:00
Add logtest function.
This commit is contained in:
10
ncat/util.c
10
ncat/util.c
@@ -212,6 +212,16 @@ void logdebug(const char *fmt, ...)
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void logtest(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
fprintf(stderr, "NCAT TEST: ");
|
||||
va_start(ap, fmt);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
/* Exit status 2 indicates a program error other than a network error. */
|
||||
void die(char *err)
|
||||
{
|
||||
|
||||
@@ -156,6 +156,8 @@ void loguser_noprefix(const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
void logdebug(const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
void logtest(const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
/* handle errors */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user