[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r422 - in GNUnet/src: applications/fs/ecrs applications/fs/
From: |
durner |
Subject: |
[GNUnet-SVN] r422 - in GNUnet/src: applications/fs/ecrs applications/fs/module applications/fs/tools server util |
Date: |
Wed, 9 Mar 2005 14:22:14 -0800 (PST) |
Author: durner
Date: 2005-03-09 14:22:12 -0800 (Wed, 09 Mar 2005)
New Revision: 422
Modified:
GNUnet/src/applications/fs/ecrs/download.c
GNUnet/src/applications/fs/module/ondemand.c
GNUnet/src/applications/fs/tools/gnunet-insert.c
GNUnet/src/server/connection.c
GNUnet/src/server/gnunet-transport-check.c
GNUnet/src/util/logging.c
GNUnet/src/util/timertest.c
Log:
Support printf() format string specifier "%ll" under Windows
Modified: GNUnet/src/applications/fs/ecrs/download.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/download.c 2005-03-09 21:51:39 UTC (rev
421)
+++ GNUnet/src/applications/fs/ecrs/download.c 2005-03-09 22:22:12 UTC (rev
422)
@@ -584,7 +584,7 @@
> node->ctx->total)
ret = (unsigned int) (node->ctx->total - node->offset);
#if 0
- printf("Node at offset %llu and level %d has size %u\n",
+ PRINTF("Node at offset %llu and level %d has size %u\n",
node->offset,
node->level,
ret);
@@ -602,7 +602,7 @@
if (ret * rsize < epos - spos)
ret++; /* need to round up! */
#if 0
- printf("Node at offset %llu and level %d has size %u\n",
+ PRINTF("Node at offset %llu and level %d has size %u\n",
node->offset,
node->level,
ret * sizeof(CHK));
Modified: GNUnet/src/applications/fs/module/ondemand.c
===================================================================
--- GNUnet/src/applications/fs/module/ondemand.c 2005-03-09 21:51:39 UTC
(rev 421)
+++ GNUnet/src/applications/fs/module/ondemand.c 2005-03-09 22:22:12 UTC
(rev 422)
@@ -328,7 +328,7 @@
n,
"%s/%s", afsDir, TRACKFILE);
fp = FOPEN(scratch, "a");
- fprintf(fp,
+ FPRINTF(fp,
"%u %llu\n",
ntohs(ce->fileNameIndex),
(unsigned long long)TIME(NULL));
Modified: GNUnet/src/applications/fs/tools/gnunet-insert.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-insert.c 2005-03-09 21:51:39 UTC
(rev 421)
+++ GNUnet/src/applications/fs/tools/gnunet-insert.c 2005-03-09 22:22:12 UTC
(rev 422)
@@ -128,12 +128,8 @@
case upload_progress:
if (*verboselevel == YES) {
delta = event->data.UploadProgress.eta - cronTime(NULL);
- printf(
-#ifdef MINGW
- _("%12I64u of %12I64u bytes inserted (estimating %I64u seconds to
completion) "),
-#else
+ PRINTF(
_("%16llu of %16llu bytes inserted (estimating %llu seconds to
completion) "),
-#endif
event->data.UploadProgress.main_completed,
event->data.UploadProgress.main_total,
delta / cronSECONDS);
@@ -143,12 +139,8 @@
case upload_complete:
if (*verboselevel == YES) {
delta = event->data.UploadComplete.eta -
event->data.UploadComplete.start_time;
- printf(
-#ifdef MINGW
- _("\nUpload of '%s' complete, %I64u bytes took %I64u seconds (%8.3f
kbps).\n"),
-#else
+ PRINTF(
_("\nUpload of '%s' complete, %llu bytes took %llu seconds (%8.3f
kbps).\n"),
-#endif
event->data.UploadComplete.filename,
event->data.UploadComplete.total,
delta / cronSECONDS,
Modified: GNUnet/src/server/connection.c
===================================================================
--- GNUnet/src/server/connection.c 2005-03-09 21:51:39 UTC (rev 421)
+++ GNUnet/src/server/connection.c 2005-03-09 22:22:12 UTC (rev 422)
@@ -946,14 +946,14 @@
be->session.mtu - sizeof(P2P_Message),
knapsackSolution);
#if DEBUG_COLLECT_PRIO == YES
- fprintf(prioFile, "%llu 0 %d\n", cronTime(NULL), priority);
+ FPRINTF(prioFile, "%llu 0 %d\n", cronTime(NULL), priority);
#endif
} else {
priority = solveKnapsack(be,
be->session.mtu - sizeof(P2P_Message),
knapsackSolution);
#if DEBUG_COLLECT_PRIO == YES
- fprintf(prioFile, "%llu 1 %d\n", cronTime(NULL), priority);
+ FPRINTF(prioFile, "%llu 1 %d\n", cronTime(NULL), priority);
#endif
}
} else { /* never approximate < 50% CPU load */
@@ -961,7 +961,7 @@
be->session.mtu - sizeof(P2P_Message),
knapsackSolution);
#if DEBUG_COLLECT_PRIO == YES
- fprintf(prioFile, "%llu 2 %d\n", cronTime(NULL), priority);
+ FPRINTF(prioFile, "%llu 2 %d\n", cronTime(NULL), priority);
#endif
}
j = 0;
Modified: GNUnet/src/server/gnunet-transport-check.c
===================================================================
--- GNUnet/src/server/gnunet-transport-check.c 2005-03-09 21:51:39 UTC (rev
421)
+++ GNUnet/src/server/gnunet-transport-check.c 2005-03-09 22:22:12 UTC (rev
422)
@@ -158,7 +158,7 @@
sem);
resumeCron();
if (ok != YES) {
- fprintf(stderr,
+ FPRINTF(stderr,
_("'%s': Did not receive message within %llu ms.\n"),
tapi->transName,
timeout);
@@ -293,7 +293,7 @@
"VERBOSE",
"YES")) {
if (ok != YES)
- fprintf(stderr,
+ FPRINTF(stderr,
_("No reply received within %llums.\n"),
timeout);
}
Modified: GNUnet/src/util/logging.c
===================================================================
--- GNUnet/src/util/logging.c 2005-03-09 21:51:39 UTC (rev 421)
+++ GNUnet/src/util/logging.c 2005-03-09 22:22:12 UTC (rev 422)
@@ -362,13 +362,13 @@
const int linenumber) {
if (logfile != NULL) {
printTime();
- fprintf(logfile,
+ FPRINTF(logfile,
_("Failure at %s:%d.\n"),
filename,
linenumber);
fflush(logfile);
} else
- fprintf(stderr,
+ FPRINTF(stderr,
_("Failure at at %s:%d.\n"),
filename,
linenumber);
@@ -423,13 +423,13 @@
printTime();
if (format[0] == ' ')
- fprintf(logfile, "%s:", gettext(loglevels[minLogLevel]));
+ FPRINTF(logfile, "%s:", gettext(loglevels[minLogLevel]));
else
- fprintf(logfile, "%s: ", gettext(loglevels[minLogLevel]));
- len = vfprintf(logfile, format, args);
+ FPRINTF(logfile, "%s: ", gettext(loglevels[minLogLevel]));
+ len = VFPRINTF(logfile, format, args);
fflush(logfile);
} else
- len = vfprintf(stderr, format, args);
+ len = VFPRINTF(stderr, format, args);
va_end(args);
if (bInited)
MUTEX_UNLOCK(&logMutex);
@@ -438,7 +438,7 @@
char * txt;
txt = MALLOC(len + 1);
- GNUNET_ASSERT(len == vsnprintf(txt, len, format, args));
+ GNUNET_ASSERT(len == VSNPRINTF(txt, len, format, args));
customLog(txt);
FREE(txt);
}
@@ -458,7 +458,7 @@
if (logfile != NULL) {
va_start(args, format);
printTime();
- vfprintf(logfile, format, args);
+ VFPRINTF(logfile, format, args);
fflush(logfile);
va_end(args);
}
@@ -467,7 +467,7 @@
#ifdef MINGW
AllocConsole();
#endif
- vfprintf(stderr, format, args);
+ VFPRINTF(stderr, format, args);
va_end(args);
}
BREAK();
@@ -483,7 +483,7 @@
va_list args;
va_start(args, format);
- ret = vsnprintf(buf,
+ ret = VSNPRINTF(buf,
size,
format,
args);
Modified: GNUnet/src/util/timertest.c
===================================================================
--- GNUnet/src/util/timertest.c 2005-03-09 21:51:39 UTC (rev 421)
+++ GNUnet/src/util/timertest.c 2005-03-09 22:22:12 UTC (rev 422)
@@ -60,7 +60,7 @@
else
cumDelta += ((last+cronMILLIS*i) - now);
}
- fprintf(stdout,
+ FPRINTF(stdout,
"Sleep precision: %llu ms. ",
cumDelta / cronMILLIS / (MAXV/INCR));
if (cumDelta <= 10 * cronMILLIS * MAXV / INCR)
@@ -97,13 +97,13 @@
now = now - (last + i);
cumDelta += now;
#if VERBOSE
- fprintf(stderr,
+ FPRINTF(stderr,
"Sleep interrupted by signal within %llu ms of deadline (intended
delay: %d ms).\n",
now,
i);
#endif
}
- fprintf(stdout,
+ FPRINTF(stdout,
"Sleep interrupt precision is %llums. ",
cumDelta / (MAXV2/INCR2) );
if (cumDelta <= 10 * cronMILLIS * MAXV2 / INCR2)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r422 - in GNUnet/src: applications/fs/ecrs applications/fs/module applications/fs/tools server util,
durner <=