[beast: 7/24] SFI: use Rapicorn's printerr()
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 7/24] SFI: use Rapicorn's printerr()
- Date: Thu, 24 Sep 2015 20:10:11 +0000 (UTC)
commit 272f7d86e580c6efa2f54c3f7445d0b834fcf2df
Author: Tim Janik <timj gnu org>
Date: Tue Sep 22 22:18:19 2015 +0200
SFI: use Rapicorn's printerr()
sfi/sficomport.cc | 6 +++---
sfi/sficomwire.cc | 14 +++++++-------
sfi/sfidl-corecxx.cc | 4 ++--
sfi/sfidl-parser.cc | 2 +-
sfi/sfimemory.cc | 2 +-
sfi/sfiserial.cc | 2 +-
sfi/sfitests.hh | 12 ++++++------
sfi/tests/ring.cc | 8 ++++----
8 files changed, 25 insertions(+), 25 deletions(-)
---
diff --git a/sfi/sficomport.cc b/sfi/sficomport.cc
index b7daa00..520f8e8 100644
--- a/sfi/sficomport.cc
+++ b/sfi/sficomport.cc
@@ -453,13 +453,13 @@ com_port_read_pending (SfiComPort *port)
port->rbuffer.header[2] != ((SFI_COM_PORT_MAGIC >> 8) & 0xff) ||
port->rbuffer.header[3] != (SFI_COM_PORT_MAGIC & 0xff))
{
- g_printerr ("ComPort:%s: received data with invalid magic", port->ident);
+ printerr ("ComPort:%s: received data with invalid magic", port->ident);
return FALSE;
}
/* check length */
if (port->rbuffer.dlen < 1 || port->rbuffer.dlen > 10 * 1024 * 1024)
{
- g_printerr ("ComPort:%s: received data with excessive length", port->ident);
+ printerr ("ComPort:%s: received data with excessive length", port->ident);
return FALSE;
}
}
@@ -497,7 +497,7 @@ com_port_scanner_msg (GScanner *scanner,
gboolean error)
{
SfiComPort *port = (SfiComPort*) scanner->user_data;
- g_printerr ("ComPort:%s: while processing data: %s", port->ident, message);
+ printerr ("ComPort:%s: while processing data: %s", port->ident, message);
}
static void
diff --git a/sfi/sficomwire.cc b/sfi/sficomwire.cc
index 414141b..4bae125 100644
--- a/sfi/sficomwire.cc
+++ b/sfi/sficomwire.cc
@@ -235,13 +235,13 @@ wire_receive (SfiComWire *wire)
p = get_uint32 (p, &type);
if (magic != BSE_MAGIC_BSEm)
{
- g_printerr ("%s: message with invalid magic: 0x%08x\n", wire->ident, magic);
+ printerr ("%s: message with invalid magic: 0x%08x\n", wire->ident, magic);
wire->remote_input_broke = TRUE;
wire->ibp = wire->ibuffer;
}
else if (mlength <= mheader_length || mlength >= max_mlength)
{
- g_printerr ("%s: message (type=%u) with invalid length: %u < %u < %u\n",
+ printerr ("%s: message (type=%u) with invalid length: %u < %u < %u\n",
wire->ident, type, mheader_length, mlength, max_mlength);
wire->remote_input_broke = TRUE;
wire->ibp = wire->ibuffer;
@@ -271,7 +271,7 @@ wire_receive (SfiComWire *wire)
wire->iresults = g_list_prepend (wire->iresults, msg);
else
{
- g_printerr ("%s: ignoring spurious result (request=%u): %s\n", wire->ident,
msg->request, msg->message);
+ printerr ("%s: ignoring spurious result (request=%u): %s\n", wire->ident, msg->request,
msg->message);
free_msg (msg);
}
}
@@ -283,7 +283,7 @@ wire_receive (SfiComWire *wire)
case SFI_COM_MSG_RESERVED2:
case SFI_COM_MSG_RESERVED3:
case SFI_COM_MSG_RESERVED4:
- g_printerr ("%s: ignoring message with unknown type: %u\n",
+ printerr ("%s: ignoring message with unknown type: %u\n",
wire->ident, type);
p += 4; /* request */
p += strl;
@@ -292,7 +292,7 @@ wire_receive (SfiComWire *wire)
wire->ibp = wire->ibuffer + n;
break;
default:
- g_printerr ("%s: message with invalid type: %u\n",
+ printerr ("%s: message with invalid type: %u\n",
wire->ident, type);
wire->remote_input_broke = TRUE;
wire->ibp = wire->ibuffer;
@@ -466,7 +466,7 @@ sfi_com_wire_receive_request (SfiComWire *wire,
if (msg->request == 0)
{
/* 0-requests are low-level messages, currently unhandled */
- g_printerr ("%s: ignoring message with request_id=0\n", wire->ident);
+ printerr ("%s: ignoring message with request_id=0\n", wire->ident);
free_msg (msg);
return sfi_com_wire_receive_request (wire, request_p);
}
@@ -531,7 +531,7 @@ wire_default_dispatch (gpointer data,
const gchar *request_msg,
SfiComWire *wire)
{
- g_printerr ("%s: unhandled request (id=%u): %s\n", wire->ident, request, request_msg);
+ printerr ("%s: unhandled request (id=%u): %s\n", wire->ident, request, request_msg);
sfi_com_wire_discard_request (wire, request);
return TRUE;
}
diff --git a/sfi/sfidl-corecxx.cc b/sfi/sfidl-corecxx.cc
index 3669b7e..944123b 100644
--- a/sfi/sfidl-corecxx.cc
+++ b/sfi/sfidl-corecxx.cc
@@ -1355,11 +1355,11 @@ public:
String cmd = String() + "gdk-pixbuf-csource " + "--name=local_pixstream " + ii->file;
g_spawn_command_line_sync (cmd.c_str(), &out, &err, &estatus, &error);
if (err && *err)
- g_printerr ("gdk-pixbuf-csource: %s", err);
+ printerr ("gdk-pixbuf-csource: %s", err);
if (error || estatus)
{
if (error)
- g_printerr ("failed to convert image file \"%s\" with gdk-pixbuf-csource%c %s",
+ printerr ("failed to convert image file \"%s\" with gdk-pixbuf-csource%c %s",
ii->file.c_str(), error ? ':' : ' ', error->message);
exit (estatus & 255 ? estatus : 1);
}
diff --git a/sfi/sfidl-parser.cc b/sfi/sfidl-parser.cc
index 359f648..6ce87b6 100644
--- a/sfi/sfidl-parser.cc
+++ b/sfi/sfidl-parser.cc
@@ -507,7 +507,7 @@ void Parser::preprocessContents (const String& input_filename)
break;
case '<': state = filenameIn2;
break;
- default: g_printerr ("bad char after include statement");
+ default: printerr ("bad char after include statement");
assert_unreached (); // error handling!
}
}
diff --git a/sfi/sfimemory.cc b/sfi/sfimemory.cc
index 1d3a5de..4d1da77 100644
--- a/sfi/sfimemory.cc
+++ b/sfi/sfimemory.cc
@@ -110,7 +110,7 @@ sfi_free_memblock (gsize block_size,
cmem -= DBG8_SIZE;
debug_size = (gsize*) cmem;
if (block_size != *debug_size)
- g_printerr ("%s: in memory block at (%p): block_size=%zd != *debug_size=%zd\n", G_STRLOC, mem,
block_size, *debug_size);
+ printerr ("%s: in memory block at (%p): block_size=%zd != *debug_size=%zd\n", G_STRLOC, mem, block_size,
*debug_size);
low_free (block_size + DBG8_SIZE, cmem);
}
void
diff --git a/sfi/sfiserial.cc b/sfi/sfiserial.cc
index 156fc93..a83f4b9 100644
--- a/sfi/sfiserial.cc
+++ b/sfi/sfiserial.cc
@@ -984,6 +984,6 @@ sfi_value_store_stderr (const GValue *value)
{
GString *gstring = g_string_new ("");
sfi_value_store_typed (value, gstring);
- g_printerr ("((GValue*)%p)=%s\n", value, gstring->str);
+ printerr ("((GValue*)%p)=%s\n", value, gstring->str);
g_string_free (gstring, TRUE);
}
diff --git a/sfi/sfitests.hh b/sfi/sfitests.hh
index 8fc8cd9..dc31907 100644
--- a/sfi/sfitests.hh
+++ b/sfi/sfitests.hh
@@ -46,7 +46,7 @@ sfi_init_test (int *argcp, char **argv)
if (calibration_timer) \
g_timer_start (calibration_timer); \
GTimer *timer = g_timer_new(); \
- guint dups = 1; \
+ uint dups = 1; \
/* birnet_thread_yield(); * on some OSes, this can stabelize the loop benches */ \
do \
{ \
@@ -74,12 +74,12 @@ sfi_init_test (int *argcp, char **argv)
g_timer_stop (calibration_timer); \
double calibration_time_ms = g_timer_elapsed (calibration_timer, NULL) * 1000; \
g_timer_destroy (calibration_timer); \
- g_printerr ("TEST_CALIBRATION: this system can do %d dups in %.6f milliseconds\n",\
- (guint) (dups * factor), ms * factor); \
- g_printerr ("TEST_CALIBRATION: calibration took %.6f milliseconds\n", \
- calibration_time_ms); \
+ printerr ("TEST_CALIBRATION: this system can do %d dups in %.6f milliseconds\n", \
+ guint (dups * factor), ms * factor); \
+ printerr ("TEST_CALIBRATION: calibration took %.6f milliseconds\n", \
+ calibration_time_ms); \
} \
- dups = MAX ((uint) (dups * factor), 1); \
+ dups = MAX (uint (dups * factor), 1); \
dups; \
})
diff --git a/sfi/tests/ring.cc b/sfi/tests/ring.cc
index c8df20b..c3f9523 100644
--- a/sfi/tests/ring.cc
+++ b/sfi/tests/ring.cc
@@ -18,15 +18,15 @@ print_rings_side_by_side (SfiRing *ring1,
SfiRing *ring2)
{
SfiRing *r1 = ring1, *r2 = ring2;
- g_printerr ("\nRing=%p Ring=%p\n", r1, r2);
+ printerr ("\nRing=%p Ring=%p\n", r1, r2);
while (r1 || r2)
{
if (r1 && r2)
- g_printerr (" %10p %10p\n", r1->data, r2->data);
+ printerr (" %10p %10p\n", r1->data, r2->data);
else if (r1)
- g_printerr (" %10p\n", r1->data);
+ printerr (" %10p\n", r1->data);
else
- g_printerr (" %10p\n", r2->data);
+ printerr (" %10p\n", r2->data);
if (r1)
r1 = sfi_ring_walk (r1, ring1);
if (r2)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]