projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c78f4a3
)
Add log_error() support for unsigned long long (%lld).
author
Fabian Keil
<fk@fabiankeil.de>
Sat, 7 Mar 2009 12:56:12 +0000
(12:56 +0000)
committer
Fabian Keil
<fk@fabiankeil.de>
Sat, 7 Mar 2009 12:56:12 +0000
(12:56 +0000)
errlog.c
patch
|
blob
|
history
diff --git
a/errlog.c
b/errlog.c
index
ae943f6
..
0d9f358
100644
(file)
--- a/
errlog.c
+++ b/
errlog.c
@@
-1,4
+1,4
@@
-const char errlog_rcs[] = "$Id: errlog.c,v 1.8
7 2009/03/01 18:28:24
fabiankeil Exp $";
+const char errlog_rcs[] = "$Id: errlog.c,v 1.8
8 2009/03/07 11:34:36
fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/errlog.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/errlog.c,v $
@@
-33,6
+33,9
@@
const char errlog_rcs[] = "$Id: errlog.c,v 1.87 2009/03/01 18:28:24 fabiankeil E
*
* Revisions :
* $Log: errlog.c,v $
*
* Revisions :
* $Log: errlog.c,v $
+ * Revision 1.88 2009/03/07 11:34:36 fabiankeil
+ * Omit timestamp and thread id in the mingw32 message box.
+ *
* Revision 1.87 2009/03/01 18:28:24 fabiankeil
* Help clang understand that we aren't dereferencing
* NULL pointers here.
* Revision 1.87 2009/03/01 18:28:24 fabiankeil
* Help clang understand that we aren't dereferencing
* NULL pointers here.
@@
-1129,7
+1132,7
@@
void log_error(int loglevel, const char *fmt, ...)
snprintf(tempbuf, sizeof(tempbuf), "%u", uval);
break;
case 'l':
snprintf(tempbuf, sizeof(tempbuf), "%u", uval);
break;
case 'l':
- /* this is a modifier that must be followed by u or d */
+ /* this is a modifier that must be followed by u
, lu,
or d */
ch = *src++;
if (ch == 'd')
{
ch = *src++;
if (ch == 'd')
{
@@
-1141,6
+1144,12
@@
void log_error(int loglevel, const char *fmt, ...)
ulval = va_arg( ap, unsigned long );
snprintf(tempbuf, sizeof(tempbuf), "%lu", ulval);
}
ulval = va_arg( ap, unsigned long );
snprintf(tempbuf, sizeof(tempbuf), "%lu", ulval);
}
+ else if ((ch == 'l') && (*src == 'u'))
+ {
+ unsigned long long lluval = va_arg(ap, unsigned long long);
+ snprintf(tempbuf, sizeof(tempbuf), "%llu", lluval);
+ ch = *src++;
+ }
else
{
snprintf(tempbuf, sizeof(tempbuf), "Bad format string: \"%s\"", fmt);
else
{
snprintf(tempbuf, sizeof(tempbuf), "Bad format string: \"%s\"", fmt);