gmime r1248 - trunk/tests
- From: fejj svn gnome org
- To: svn-commits-list gnome org
- Subject: gmime r1248 - trunk/tests
- Date: Sat, 24 May 2008 02:13:38 +0000 (UTC)
Author: fejj
Date: Sat May 24 02:13:37 2008
New Revision: 1248
URL: http://svn.gnome.org/viewvc/gmime?rev=1248&view=rev
Log:
use %lld for offset format
Modified:
trunk/tests/test-cat.c
trunk/tests/test-mbox.c
trunk/tests/test-streams.c
Modified: trunk/tests/test-cat.c
==============================================================================
--- trunk/tests/test-cat.c (original)
+++ trunk/tests/test-cat.c Sat May 24 02:13:37 2008
@@ -115,7 +115,7 @@
size_t nread, size;
ssize_t n;
- v(fprintf (stdout, "Matching original stream (" OFF_T " -> " OFF_T ") with %s (" OFF_T ", " OFF_T ")... ",
+ v(fprintf (stdout, "Matching original stream (%lld -> %lld) with %s (%lld, %lld)... ",
orig->position, orig->bound_end, filename, dup->position, dup->bound_end));
if (orig->bound_end != -1) {
@@ -196,7 +196,7 @@
cat = g_mime_stream_cat_new ();
while (part != NULL) {
- d(fprintf (stderr, "adding %s start=" OFF_T ", end=" OFF_T "...\n",
+ d(fprintf (stderr, "adding %s start=%lld, end=%lld...\n",
part->filename, part->pstart, part->pend));
if ((fd = open (part->filename, O_CREAT | O_TRUNC | O_WRONLY, 0666)) == -1) {
@@ -268,7 +268,7 @@
cat = g_mime_stream_cat_new ();
while (part != NULL) {
- d(fprintf (stderr, "adding %s start=" OFF_T ", end=" OFF_T "...\n",
+ d(fprintf (stderr, "adding %s start=%lld, end=%lld...\n",
part->filename, part->pstart, part->pend));
if ((fd = open (part->filename, O_RDONLY)) == -1) {
@@ -315,7 +315,7 @@
cat = g_mime_stream_cat_new ();
while (part != NULL) {
- d(fprintf (stderr, "adding %s start=" OFF_T ", end=" OFF_T "...\n",
+ d(fprintf (stderr, "adding %s start=%lld, end=%lld...\n",
part->filename, part->pstart, part->pend));
if ((fd = open (part->filename, O_RDONLY)) == -1) {
@@ -335,13 +335,13 @@
offset = (gint64) (size * (rand () / (RAND_MAX + 1.0)));
if (g_mime_stream_seek (whole, offset, GMIME_STREAM_SEEK_SET) == -1) {
- ex = exception_new ("could not seek to " OFF_T " in original stream: %s",
+ ex = exception_new ("could not seek to %lld in original stream: %s",
offset, strerror (errno));
throw (ex);
}
if (g_mime_stream_seek (cat, offset, GMIME_STREAM_SEEK_SET) == -1) {
- ex = exception_new ("could not seek to " OFF_T ": %s",
+ ex = exception_new ("could not seek to %lld: %s",
offset, strerror (errno));
throw (ex);
}
@@ -376,7 +376,7 @@
cat = g_mime_stream_cat_new ();
while (part != NULL) {
- d(fprintf (stderr, "adding %s start=" OFF_T ", end=" OFF_T "...\n",
+ d(fprintf (stderr, "adding %s start=%lld, end=%lld...\n",
part->filename, part->pstart, part->pend));
if ((fd = open (part->filename, O_RDONLY)) == -1) {
Modified: trunk/tests/test-mbox.c
==============================================================================
--- trunk/tests/test-mbox.c (original)
+++ trunk/tests/test-mbox.c Sat May 24 02:13:37 2008
@@ -89,7 +89,7 @@
{
GMimeStream *stream = user_data;
- g_mime_stream_printf (stream, OFF_T ": %s: %s\n", offset, header, value);
+ g_mime_stream_printf (stream, "%lld: %s: %s\n", offset, header, value);
}
static void
@@ -108,7 +108,7 @@
end = g_mime_parser_tell (parser);
- g_mime_stream_printf (summary, "message offsets: " OFF_T ", " OFF_T "\n", start, end);
+ g_mime_stream_printf (summary, "message offsets: %lld, %lld\n", start, end);
from = g_mime_parser_get_from (parser);
g_mime_stream_printf (summary, "%s\n", from);
@@ -163,7 +163,7 @@
do {
if ((n = g_mime_stream_read (ostream, dbuf + nread, size - nread)) <= 0) {
- fprintf (stderr, "ostream's read() returned " SSIZE_T ", EOF\n", n);
+ fprintf (stderr, "ostream's read(%p, dbuf + " SIZE_T ", " SIZE_T ") returned " SSIZE_T ", EOF\n", ostream, nread, size - nread, n);
break;
}
d(fprintf (stderr, "read " SSIZE_T " bytes from ostream\n", n));
@@ -189,7 +189,7 @@
}
if (bufptr < bufend) {
- sprintf (errstr, "Error: content does not match at offset " OFF_T "\n",
+ sprintf (errstr, "Error: content does not match at offset %lld\n",
offset + (bufptr - buf));
/*fprintf (stderr, "-->'%.*s'<--\nvs\n-->'%.*s'<--\n",
bufend - bufptr, bufptr, bufend - bufptr, dbufptr);*/
Modified: trunk/tests/test-streams.c
==============================================================================
--- trunk/tests/test-streams.c (original)
+++ trunk/tests/test-streams.c Sat May 24 02:13:37 2008
@@ -53,7 +53,7 @@
size_t nread, size;
ssize_t n;
- v(fprintf (stdout, "Matching original stream (" OFF_T " -> " OFF_T ") with %s (" OFF_T ", " OFF_T ")... ",
+ v(fprintf (stdout, "Matching original stream (%lld -> %lld) with %s (%lld, %lld)... ",
streams[0]->position, streams[0]->bound_end, filename,
streams[1]->position, streams[1]->bound_end));
@@ -570,7 +570,7 @@
end = start + len;
}
- sprintf (p, OFF_T "," OFF_T, start, end);
+ sprintf (p, "%lld,%lld", start, end);
if ((fd = open (output, O_CREAT | O_EXCL | O_TRUNC | O_WRONLY, 0666)) == -1)
goto retry;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]