Add source code module name to stdout/stderr messages to improve readability.

pull/16/head
Darrell Anderson 13 years ago
parent 563d4ecebe
commit e15521d96b

@ -192,7 +192,7 @@ bool launchApp(TQString app)
void usage() void usage()
{ {
fprintf( stderr, "Usage: dcopfind [-l] [-a] application [object [function [arg1] [arg2] [arg3] ... ] ] ] \n" ); fprintf( stderr, "[dcopfind] Usage: dcopfind [-l] [-a] application [object [function [arg1] [arg2] [arg3] ... ] ] ] \n" );
exit(0); exit(0);
} }

@ -2528,7 +2528,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
static void yy_fatal_error (yyconst char* msg ) static void yy_fatal_error (yyconst char* msg )
{ {
(void) fprintf( stderr, "%s\n", msg ); (void) fprintf( stderr, "[dcopidl-scanner] %s\n", msg );
exit( YY_EXIT_FAILURE ); exit( YY_EXIT_FAILURE );
} }

@ -35,14 +35,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
void usage() void usage()
{ {
fprintf( stderr, "Usage: dcopidl2cpp [ --no-skel | --no-stub ] [--c++-suffix <suffix>] file\n" ); fprintf( stderr, "[dcopidl2cpp] Usage: dcopidl2cpp [ --no-skel | --no-stub ] [--c++-suffix <suffix>] file\n" );
} }
int main( int argc, char** argv ) int main( int argc, char** argv )
{ {
if ( *tqVersion() == '1' ) { if ( *tqVersion() == '1' ) {
fprintf( stderr, "dcopidl2cpp appears to be linked to Qt 1 instead of Qt >= 2 ! Aborting.\n" ); fprintf( stderr, "[dcopidl2cpp] dcopidl2cpp appears to be linked to Qt 1 instead of Qt >= 2 ! Aborting.\n" );
exit(1); exit(1);
} }
if ( argc < 2 ) { if ( argc < 2 ) {

@ -130,7 +130,7 @@ static TQCString readQCString(TQDataStream &ds)
int bytesLeft = device->size()-device->at(); int bytesLeft = device->size()-device->at();
if ((bytesLeft < 0 ) || (len > (uint) bytesLeft)) if ((bytesLeft < 0 ) || (len > (uint) bytesLeft))
{ {
tqWarning("Corrupt data!\n"); tqWarning("[dcopserver] Corrupt data!\n");
printf("bytesLeft: %d, len: %d\n", bytesLeft, len); printf("bytesLeft: %d, len: %d\n", bytesLeft, len);
return result; return result;
} }
@ -149,7 +149,7 @@ static TQByteArray readQByteArray(TQDataStream &ds)
int bytesLeft = device->size()-device->at(); int bytesLeft = device->size()-device->at();
if ((bytesLeft < 0 ) || (len > (uint) bytesLeft)) if ((bytesLeft < 0 ) || (len > (uint) bytesLeft))
{ {
tqWarning("Corrupt data!\n"); tqWarning("[dcopserver] Corrupt data!\n");
return result; return result;
} }
result.resize( (uint)len ); result.resize( (uint)len );
@ -241,7 +241,7 @@ void DCOPIceWriteChar(register IceConn iceConn, unsigned long nbytes, char *ptr)
{ {
DCOPConnection* conn = the_server->findConn( iceConn ); DCOPConnection* conn = the_server->findConn( iceConn );
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
tqWarning("DCOPServer: DCOPIceWriteChar() Writing %d bytes [%s]", nbytes, conn ? conn->appId.data() : "<unknown>"); tqWarning("[dcopserver] DCOPIceWriteChar() Writing %d bytes [%s]", nbytes, conn ? conn->appId.data() : "<unknown>");
#endif #endif
if (conn) if (conn)
@ -251,7 +251,7 @@ tqWarning("DCOPServer: DCOPIceWriteChar() Writing %d bytes [%s]", nbytes, conn ?
TQByteArray _data(nbytes); TQByteArray _data(nbytes);
memcpy(_data.data(), ptr, nbytes); memcpy(_data.data(), ptr, nbytes);
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
tqWarning("DCOPServer: _IceWrite() outputBlocked. Queuing %d bytes.", _data.size()); tqWarning("[dcopserver] _IceWrite() outputBlocked. Queuing %d bytes.", _data.size());
#endif #endif
conn->outputBuffer.append(_data); conn->outputBuffer.append(_data);
return; return;
@ -273,14 +273,14 @@ static void DCOPIceWrite(IceConn iceConn, const TQByteArray &_data)
{ {
DCOPConnection* conn = the_server->findConn( iceConn ); DCOPConnection* conn = the_server->findConn( iceConn );
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
tqWarning("DCOPServer: DCOPIceWrite() Writing %d bytes [%s]", _data.size(), conn ? conn->appId.data() : "<unknown>"); tqWarning("[dcopserver] DCOPIceWrite() Writing %d bytes [%s]", _data.size(), conn ? conn->appId.data() : "<unknown>");
#endif #endif
if (conn) if (conn)
{ {
if (conn->outputBlocked) if (conn->outputBlocked)
{ {
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
tqWarning("DCOPServer: DCOPIceWrite() outputBlocked. Queuing %d bytes.", _data.size()); tqWarning("[dcopserver] DCOPIceWrite() outputBlocked. Queuing %d bytes.", _data.size());
#endif #endif
conn->outputBuffer.append(_data); conn->outputBuffer.append(_data);
return; return;
@ -299,7 +299,7 @@ tqWarning("DCOPServer: DCOPIceWrite() outputBlocked. Queuing %d bytes.", _data.s
void DCOPConnection::waitForOutputReady(const TQByteArray &_data, int start) void DCOPConnection::waitForOutputReady(const TQByteArray &_data, int start)
{ {
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
tqWarning("DCOPServer: waitForOutputReady fd = %d datasize = %d start = %d", socket(), _data.size(), start); tqWarning("[dcopserver] waitForOutputReady fd = %d datasize = %d start = %d", socket(), _data.size(), start);
#endif #endif
outputBlocked = true; outputBlocked = true;
outputBuffer.append(_data); outputBuffer.append(_data);
@ -317,7 +317,7 @@ tqWarning("DCOPServer: waitForOutputReady fd = %d datasize = %d start = %d", soc
void DCOPServer::slotOutputReady(int socket) void DCOPServer::slotOutputReady(int socket)
{ {
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
tqWarning("DCOPServer: slotOutputReady fd = %d", socket); tqWarning("[dcopserver] slotOutputReady fd = %d", socket);
#endif #endif
// Find out connection. // Find out connection.
DCOPConnection *conn = fd_clients.find(socket); DCOPConnection *conn = fd_clients.find(socket);
@ -351,7 +351,7 @@ void DCOPConnection::slotOutputReady()
fcntl(fd, F_SETFL, fd_fl); fcntl(fd, F_SETFL, fd_fl);
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
tqWarning("DCOPServer: slotOutputReady() %d bytes written", nwritten); tqWarning("[dcopserver] slotOutputReady() %d bytes written", nwritten);
#endif #endif
if (nwritten < 0) if (nwritten < 0)
@ -370,7 +370,7 @@ tqWarning("DCOPServer: slotOutputReady() %d bytes written", nwritten);
if (outputBuffer.isEmpty()) if (outputBuffer.isEmpty())
{ {
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
tqWarning("DCOPServer: slotOutputRead() all data transmitted."); tqWarning("[dcopserver] slotOutputRead() all data transmitted.");
#endif #endif
outputBlocked = false; outputBlocked = false;
outputBufferNotifier->setEnabled(false); outputBufferNotifier->setEnabled(false);
@ -378,7 +378,7 @@ tqWarning("DCOPServer: slotOutputRead() all data transmitted.");
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
else else
{ {
tqWarning("DCOPServer: slotOutputRead() more data to send."); tqWarning("[dcopserver] slotOutputRead() more data to send.");
} }
#endif #endif
} }
@ -390,7 +390,7 @@ static void DCOPIceSendData(register IceConn _iceConn,
if (_iceConn->outbufptr > _iceConn->outbuf) if (_iceConn->outbufptr > _iceConn->outbuf)
{ {
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
tqWarning("DCOPServer: Flushing data, fd = %d", IceConnectionNumber(_iceConn)); tqWarning("[dcopserver] Flushing data, fd = %d", IceConnectionNumber(_iceConn));
#endif #endif
IceFlush( _iceConn ); IceFlush( _iceConn );
} }
@ -645,7 +645,7 @@ SetAuthentication (int count, IceListenObj *_listenObjs,
if (command.isEmpty()) if (command.isEmpty())
{ {
fprintf( stderr, "dcopserver: 'iceauth' not found in path, aborting.\n" ); fprintf( stderr, "[dcopserver] 'iceauth' not found in path, aborting.\n" );
exit(1); exit(1);
} }
@ -713,7 +713,7 @@ void DCOPServer::processMessage( IceConn iceConn, int opcode,
{ {
DCOPConnection* conn = clients.find( iceConn ); DCOPConnection* conn = clients.find( iceConn );
if ( !conn ) { if ( !conn ) {
tqWarning("DCOPServer::processMessage message from unknown connection. [opcode = %d]", opcode); tqWarning("[dcopserver] DCOPServer::processMessage message from unknown connection. [opcode = %d]", opcode);
return; return;
} }
switch( opcode ) { switch( opcode ) {
@ -733,13 +733,13 @@ void DCOPServer::processMessage( IceConn iceConn, int opcode,
int datalen = ba.size(); int datalen = ba.size();
if ( opcode == DCOPReplyDelayed ) { if ( opcode == DCOPReplyDelayed ) {
if ( !target ) if ( !target )
tqWarning("DCOPServer::DCOPReplyDelayed for unknown connection."); tqWarning("[dcopserver] DCOPServer::DCOPReplyDelayed for unknown connection.");
else if ( !conn ) else if ( !conn )
tqWarning("DCOPServer::DCOPReplyDelayed from unknown connection."); tqWarning("[dcopserver] DCOPServer::DCOPReplyDelayed from unknown connection.");
else if (!conn->waitingForDelayedReply.removeRef( target->iceConn )) else if (!conn->waitingForDelayedReply.removeRef( target->iceConn ))
tqWarning("DCOPServer::DCOPReplyDelayed from/to does not match. (#2)"); tqWarning("[dcopserver] DCOPServer::DCOPReplyDelayed from/to does not match. (#2)");
else if (!target->waitingOnReply.removeRef(iceConn)) else if (!target->waitingOnReply.removeRef(iceConn))
tqWarning("DCOPServer::DCOPReplyDelayed for client who wasn't waiting on one!"); tqWarning("[dcopserver] DCOPServer::DCOPReplyDelayed for client who wasn't waiting on one!");
} }
if ( target ) { if ( target ) {
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
@ -747,7 +747,7 @@ if (opcode == DCOPSend)
{ {
TQCString obj = readQCString(ds); TQCString obj = readQCString(ds);
TQCString fun = readQCString(ds); TQCString fun = readQCString(ds);
tqWarning("Sending %d bytes from %s to %s. DCOPSend %s", length, fromApp.data(), toApp.data(), fun.data()); tqWarning("[dcopserver] Sending %d bytes from %s to %s. DCOPSend %s", length, fromApp.data(), toApp.data(), fun.data());
} }
#endif #endif
IceGetHeader( target->iceConn, majorOpcode, opcode, IceGetHeader( target->iceConn, majorOpcode, opcode,
@ -765,7 +765,7 @@ if (opcode == DCOPSend)
TQCString replyType; TQCString replyType;
TQByteArray replyData; TQByteArray replyData;
if ( !receive( toApp, obj, fun, data, replyType, replyData, iceConn ) ) { if ( !receive( toApp, obj, fun, data, replyType, replyData, iceConn ) ) {
tqWarning("%s failure: object '%s' has no function '%s'", toApp.data(), obj.data(), fun.data() ); tqWarning("[dcopserver] %s failure: object '%s' has no function '%s'", toApp.data(), obj.data(), fun.data() );
} }
} else if ( toApp[toApp.length()-1] == '*') { } else if ( toApp[toApp.length()-1] == '*') {
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
@ -773,7 +773,7 @@ if (opcode == DCOPSend)
{ {
TQCString obj = readQCString(ds); TQCString obj = readQCString(ds);
TQCString fun = readQCString(ds); TQCString fun = readQCString(ds);
tqWarning("Sending %d bytes from %s to %s. DCOPSend %s", length, fromApp.data(), toApp.data(), fun.data()); tqWarning("[dcopserver] Sending %d bytes from %s to %s. DCOPSend %s", length, fromApp.data(), toApp.data(), fun.data());
} }
#endif #endif
// handle a multicast. // handle a multicast.
@ -815,7 +815,7 @@ if (opcode == DCOPCall)
{ {
TQCString obj = readQCString(ds); TQCString obj = readQCString(ds);
TQCString fun = readQCString(ds); TQCString fun = readQCString(ds);
tqWarning("Sending %d bytes from %s to %s. DCOPCall %s", length, fromApp.data(), toApp.data(), fun.data()); tqWarning("[dcopserver] Sending %d bytes from %s to %s. DCOPCall %s", length, fromApp.data(), toApp.data(), fun.data());
} }
#endif #endif
target->waitingForReply.append( iceConn ); target->waitingForReply.append( iceConn );
@ -839,7 +839,7 @@ if (opcode == DCOPCall)
TQByteArray data = readQByteArray(ds); TQByteArray data = readQByteArray(ds);
b = receive( toApp, obj, fun, data, replyType, replyData, iceConn ); b = receive( toApp, obj, fun, data, replyType, replyData, iceConn );
if ( !b ) if ( !b )
tqWarning("%s failure: object '%s' has no function '%s'", toApp.data(), obj.data(), fun.data() ); tqWarning("[dcopserver] %s failure: object '%s' has no function '%s'", toApp.data(), obj.data(), fun.data() );
} }
if (b) { if (b) {
@ -893,7 +893,7 @@ if (opcode == DCOPCall)
int datalen = ba.size(); int datalen = ba.size();
if ( !connreply ) if ( !connreply )
tqWarning("DCOPServer::DCOPReply for unknown connection."); tqWarning("[dcopserver] DCOPServer::DCOPReply for unknown connection.");
else { else {
conn->waitingForReply.removeRef( connreply->iceConn ); conn->waitingForReply.removeRef( connreply->iceConn );
if ( opcode == DCOPReplyWait ) if ( opcode == DCOPReplyWait )
@ -903,7 +903,7 @@ if (opcode == DCOPCall)
else else
{ // DCOPReply or DCOPReplyFailed { // DCOPReply or DCOPReplyFailed
if (!connreply->waitingOnReply.removeRef(iceConn)) if (!connreply->waitingOnReply.removeRef(iceConn))
tqWarning("DCOPServer::DCOPReply from %s to %s who wasn't waiting on one!", tqWarning("[dcopserver] DCOPReply from %s to %s who wasn't waiting on one!",
fromApp.data(), toApp.data()); fromApp.data(), toApp.data());
} }
IceGetHeader( connreply->iceConn, majorOpcode, opcode, IceGetHeader( connreply->iceConn, majorOpcode, opcode,
@ -917,7 +917,7 @@ if (opcode == DCOPCall)
} }
break; break;
default: default:
tqWarning("DCOPServer::processMessage unknown message"); tqWarning("[dcopserver] DCOPServer::processMessage unknown message");
} }
} }
@ -986,7 +986,7 @@ DCOPServer::DCOPServer(bool _suicide)
DCOPAuthCount, const_cast<char **>(DCOPAuthNames), DCOPAuthCount, const_cast<char **>(DCOPAuthNames),
DCOPClientAuthProcs, 0); DCOPClientAuthProcs, 0);
if (_kde_IceLastMajorOpcode < 1 ) if (_kde_IceLastMajorOpcode < 1 )
tqWarning("DCOPServer Error: incorrect major opcode!"); tqWarning("[dcopserver] DCOPServer Error: incorrect major opcode!");
the_server = this; the_server = this;
if (( majorOpcode = IceRegisterForProtocolReply (const_cast<char *>("DCOP"), if (( majorOpcode = IceRegisterForProtocolReply (const_cast<char *>("DCOP"),
@ -1004,7 +1004,7 @@ DCOPServer::DCOPServer(bool _suicide)
NULL /* IceIOErrorProc */ NULL /* IceIOErrorProc */
)) < 0) )) < 0)
{ {
tqWarning("Could not register DCOP protocol with ICE"); tqWarning("[dcopserver] Could not register DCOP protocol with ICE");
} }
char errormsg[256]; char errormsg[256];
@ -1012,7 +1012,7 @@ DCOPServer::DCOPServer(bool _suicide)
if (!IceListenForConnections (&numTransports, &listenObjs, if (!IceListenForConnections (&numTransports, &listenObjs,
256, errormsg)) 256, errormsg))
{ {
fprintf (stderr, "%s\n", errormsg); fprintf (stderr, "[dcopserver] %s\n", errormsg);
exit (1); exit (1);
} else { } else {
(void) umask(orig_umask); (void) umask(orig_umask);
@ -1020,7 +1020,7 @@ DCOPServer::DCOPServer(bool _suicide)
TQCString fName = DCOPClient::dcopServerFile(); TQCString fName = DCOPClient::dcopServerFile();
FILE *f; FILE *f;
if(!(f = ::fopen(fName.data(), "w+"))) { if(!(f = ::fopen(fName.data(), "w+"))) {
fprintf (stderr, "Can not create file %s: %s\n", fprintf (stderr, "[dcopserver] Can not create file %s: %s\n",
fName.data(), ::strerror(errno)); fName.data(), ::strerror(errno));
exit(1); exit(1);
} }
@ -1119,7 +1119,7 @@ DCOPConnection* DCOPServer::findApp( const TQCString& appId )
*/ */
void DCOPServer::slotCleanDeadConnections() void DCOPServer::slotCleanDeadConnections()
{ {
tqWarning("DCOP Cleaning up dead connections."); tqWarning("[dcopserver] DCOP Cleaning up dead connections.");
while(!deadConnections.isEmpty()) while(!deadConnections.isEmpty())
{ {
IceConn iceConn = deadConnections.take(0); IceConn iceConn = deadConnections.take(0);
@ -1158,9 +1158,9 @@ void DCOPServer::newClient( int /*socket*/ )
IceConn iceConn = IceAcceptConnection( static_cast<const DCOPListener*>(sender())->listenObj, &status); IceConn iceConn = IceAcceptConnection( static_cast<const DCOPListener*>(sender())->listenObj, &status);
if (!iceConn) { if (!iceConn) {
if (status == IceAcceptBadMalloc) if (status == IceAcceptBadMalloc)
tqWarning("Failed to alloc connection object!\n"); tqWarning("[dcopserver] Failed to alloc connection object!\n");
else // IceAcceptFailure else // IceAcceptFailure
tqWarning("Failed to accept ICE connection!\n"); tqWarning("[dcopserver] Failed to accept ICE connection!\n");
return; return;
} }
@ -1173,9 +1173,9 @@ void DCOPServer::newClient( int /*socket*/ )
if (cstatus != IceConnectAccepted) { if (cstatus != IceConnectAccepted) {
if (cstatus == IceConnectIOError) if (cstatus == IceConnectIOError)
tqWarning ("IO error opening ICE Connection!\n"); tqWarning ("[dcopserver] IO error opening ICE Connection!\n");
else else
tqWarning ("ICE Connection rejected!\n"); tqWarning ("[dcopserver] ICE Connection rejected!\n");
deadConnections.removeRef(iceConn); deadConnections.removeRef(iceConn);
(void) IceCloseConnection (iceConn); (void) IceCloseConnection (iceConn);
} }
@ -1206,7 +1206,7 @@ void DCOPServer::removeConnection( void* data )
IceConn iceConn = conn->waitingForReply.take(0); IceConn iceConn = conn->waitingForReply.take(0);
if (iceConn) { if (iceConn) {
DCOPConnection* target = clients.find( iceConn ); DCOPConnection* target = clients.find( iceConn );
tqWarning("DCOP aborting call from '%s' to '%s'", target ? target->appId.data() : "<unknown>" , conn->appId.data() ); tqWarning("[dcopserver] DCOP aborting call from '%s' to '%s'", target ? target->appId.data() : "<unknown>" , conn->appId.data() );
TQByteArray reply; TQByteArray reply;
DCOPMsg *pMsg; DCOPMsg *pMsg;
IceGetHeader( iceConn, majorOpcode, DCOPReplyFailed, IceGetHeader( iceConn, majorOpcode, DCOPReplyFailed,
@ -1217,9 +1217,9 @@ void DCOPServer::removeConnection( void* data )
DCOPIceSendData(iceConn, reply); DCOPIceSendData(iceConn, reply);
_DCOPIceSendEnd(); _DCOPIceSendEnd();
if (!target) if (!target)
tqWarning("DCOP Error: unknown target in waitingForReply"); tqWarning("[dcopserver] Unknown target in waitingForReply");
else if (!target->waitingOnReply.removeRef(conn->iceConn)) else if (!target->waitingOnReply.removeRef(conn->iceConn))
tqWarning("DCOP Error: client in waitingForReply wasn't waiting on reply"); tqWarning("[dcopserver] Client in waitingForReply wasn't waiting on reply");
} }
} }
@ -1228,7 +1228,7 @@ void DCOPServer::removeConnection( void* data )
IceConn iceConn = conn->waitingForDelayedReply.take(0); IceConn iceConn = conn->waitingForDelayedReply.take(0);
if (iceConn) { if (iceConn) {
DCOPConnection* target = clients.find( iceConn ); DCOPConnection* target = clients.find( iceConn );
tqWarning("DCOP aborting (delayed) call from '%s' to '%s'", target ? target->appId.data() : "<unknown>", conn->appId.data() ); tqWarning("[dcopserver] DCOP aborting (delayed) call from '%s' to '%s'", target ? target->appId.data() : "<unknown>", conn->appId.data() );
TQByteArray reply; TQByteArray reply;
DCOPMsg *pMsg; DCOPMsg *pMsg;
IceGetHeader( iceConn, majorOpcode, DCOPReplyFailed, IceGetHeader( iceConn, majorOpcode, DCOPReplyFailed,
@ -1239,9 +1239,9 @@ void DCOPServer::removeConnection( void* data )
DCOPIceSendData( iceConn, reply ); DCOPIceSendData( iceConn, reply );
_DCOPIceSendEnd(); _DCOPIceSendEnd();
if (!target) if (!target)
tqWarning("DCOP Error: unknown target in waitingForDelayedReply"); tqWarning("[dcopserver] Unknown target in waitingForDelayedReply");
else if (!target->waitingOnReply.removeRef(conn->iceConn)) else if (!target->waitingOnReply.removeRef(conn->iceConn))
tqWarning("DCOP Error: client in waitingForDelayedReply wasn't waiting on reply"); tqWarning("[dcopserver] Client in waitingForDelayedReply wasn't waiting on reply");
} }
} }
while (!conn->waitingOnReply.isEmpty()) while (!conn->waitingOnReply.isEmpty())
@ -1251,13 +1251,13 @@ void DCOPServer::removeConnection( void* data )
DCOPConnection* target = clients.find( iceConn ); DCOPConnection* target = clients.find( iceConn );
if (!target) if (!target)
{ {
tqWarning("DCOP Error: still waiting for answer from non-existing client."); tqWarning("[dcopserver] Still waiting for answer from non-existing client.");
continue; continue;
} }
tqWarning("DCOP aborting while waiting for answer from '%s'", target->appId.data()); tqWarning("[dcopserver] DCOP aborting while waiting for answer from '%s'", target->appId.data());
if (!target->waitingForReply.removeRef(conn->iceConn) && if (!target->waitingForReply.removeRef(conn->iceConn) &&
!target->waitingForDelayedReply.removeRef(conn->iceConn)) !target->waitingForDelayedReply.removeRef(conn->iceConn))
tqWarning("DCOP Error: called client has forgotten about caller"); tqWarning("[dcopserver] Called client has forgotten about caller");
} }
} }
@ -1290,7 +1290,7 @@ void DCOPServer::removeConnection( void* data )
void DCOPServer::slotTerminate() void DCOPServer::slotTerminate()
{ {
#ifndef NDEBUG #ifndef NDEBUG
fprintf( stderr, "DCOPServer : slotTerminate() -> sending terminateKDE signal.\n" ); fprintf( stderr, "[dcopserver] slotTerminate() -> sending terminateKDE signal.\n" );
#endif #endif
TQByteArray data; TQByteArray data;
dcopSignals->emitSignal(0L /* dcopserver */, "terminateKDE()", data, false); dcopSignals->emitSignal(0L /* dcopserver */, "terminateKDE()", data, false);
@ -1302,7 +1302,7 @@ void DCOPServer::slotTerminate()
void DCOPServer::slotSuicide() void DCOPServer::slotSuicide()
{ {
#ifndef NDEBUG #ifndef NDEBUG
fprintf( stderr, "DCOPServer : slotSuicide() -> exit.\n" ); fprintf( stderr, "[dcopserver] slotSuicide() -> exit.\n" );
#endif #endif
exit(0); exit(0);
} }
@ -1310,7 +1310,7 @@ void DCOPServer::slotSuicide()
void DCOPServer::slotShutdown() void DCOPServer::slotShutdown()
{ {
#ifndef NDEBUG #ifndef NDEBUG
fprintf( stderr, "DCOPServer : slotShutdown() -> waiting for clients to disconnect.\n" ); fprintf( stderr, "[dcopserver] slotShutdown() -> waiting for clients to disconnect.\n" );
#endif #endif
char c; char c;
#ifndef Q_OS_WIN #ifndef Q_OS_WIN
@ -1332,7 +1332,7 @@ void DCOPServer::slotShutdown()
void DCOPServer::slotExit() void DCOPServer::slotExit()
{ {
#ifndef NDEBUG #ifndef NDEBUG
fprintf( stderr, "DCOPServer : slotExit() -> exit.\n" ); fprintf( stderr, "[dcopserver] slotExit() -> exit.\n" );
#endif #endif
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
SetEvent(m_evTerminate); SetEvent(m_evTerminate);
@ -1629,10 +1629,10 @@ static bool isRunning(const TQCString &fName, bool printNetworkId = false)
f.close(); f.close();
if (ok && pid && (kill(pid, SIGHUP) == 0)) { if (ok && pid && (kill(pid, SIGHUP) == 0)) {
if (printNetworkId) if (printNetworkId)
tqWarning("%s", contents.left(pos).data()); tqWarning("[dcopserver] %s", contents.left(pos).data());
else else
tqWarning( "---------------------------------\n" tqWarning( "---------------------------------\n"
"It looks like dcopserver is already running. If you are sure\n" "[dcopserver] It looks like dcopserver is already running. If you are sure\n"
"that it is not already running, remove %s\n" "that it is not already running, remove %s\n"
"and start dcopserver again.\n" "and start dcopserver again.\n"
"---------------------------------\n", "---------------------------------\n",
@ -1719,8 +1719,8 @@ extern "C" DCOP_EXPORT int kdemain( int argc, char* argv[] )
if (retcode != 0) if (retcode != 0)
{ {
tqWarning("dcopserver: Could not raise limit on number of open files."); tqWarning("[dcopserver] Could not raise limit on number of open files.");
tqWarning("dcopserver: Current limit = %d", cur_limit); tqWarning("[dcopserver] Current limit = %d", cur_limit);
} }
} }
} }
@ -1743,7 +1743,7 @@ extern "C" DCOP_EXPORT int kdemain( int argc, char* argv[] )
if (client.attach()) if (client.attach())
return 0; return 0;
} }
tqWarning("DCOPServer self-test failed."); tqWarning("[dcopserver] DCOPServer self-test failed.");
system(findDcopserverShutdown()+" --kill"); system(findDcopserverShutdown()+" --kill");
return 1; return 1;
} }

@ -26,7 +26,7 @@ DWORD WINAPI DCOPServer::TerminatorThread(void * pParam)
DCOPServer * server = (DCOPServer*)pParam; DCOPServer * server = (DCOPServer*)pParam;
WaitForSingleObject(server->m_evTerminate,INFINITE); WaitForSingleObject(server->m_evTerminate,INFINITE);
fprintf( stderr, "DCOPServer : terminate event signaled\n" ); fprintf( stderr, "[dcopserver_win] Terminate event signaled\n" );
if(!server->shutdown) { if(!server->shutdown) {
ResetEvent(server->m_evTerminate); ResetEvent(server->m_evTerminate);
@ -36,9 +36,9 @@ DWORD WINAPI DCOPServer::TerminatorThread(void * pParam)
// Need some further event processing to get the timer signals // Need some further event processing to get the timer signals
while(WaitForSingleObject(server->m_evTerminate,100) != WAIT_OBJECT_0) while(WaitForSingleObject(server->m_evTerminate,100) != WAIT_OBJECT_0)
TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput|TQEventLoop::ExcludeSocketNotifiers); TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput|TQEventLoop::ExcludeSocketNotifiers);
fprintf( stderr, "DCOPServer : terminated event signaled the last time\n" ); fprintf( stderr, "[dcopserver_win] Terminated event signaled the last time\n" );
} }
fprintf( stderr, "DCOPServer : terminate thread teminated\n" ); fprintf( stderr, "[dcopserver_win] Terminate thread teminated\n" );
return 0; return 0;
} }

@ -918,7 +918,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
if (!KUniqueApplication::start()) if (!KUniqueApplication::start())
{ {
fprintf(stderr, "KDE Daemon (kded) already running.\n"); fprintf(stderr, "[kded] KDE Daemon (kded) already running.\n");
exit(0); exit(0);
} }

@ -481,7 +481,7 @@ int main(int argc, char *argv[])
{ {
TQString xvfbPath = KStandardDirs::findExe("Xvfb"); TQString xvfbPath = KStandardDirs::findExe("Xvfb");
if ( xvfbPath.isEmpty() ) { if ( xvfbPath.isEmpty() ) {
fprintf( stderr, "ERROR: We need Xvfb to be installed for reliable results\n" ); fprintf( stderr, "[test_regression] ERROR: We need Xvfb to be installed for reliable results\n" );
exit( 1 ); exit( 1 );
} }

@ -238,7 +238,7 @@ static void close_fds()
static void exitWithErrorMsg(const TQString &errorMsg) static void exitWithErrorMsg(const TQString &errorMsg)
{ {
fprintf( stderr, "%s\n", errorMsg.local8Bit().data() ); fprintf( stderr, "[kinit] %s\n", errorMsg.local8Bit().data() );
TQCString utf8ErrorMsg = errorMsg.utf8(); TQCString utf8ErrorMsg = errorMsg.utf8();
d.result = 3; // Error with msg d.result = 3; // Error with msg
write(d.fd[1], &d.result, 1); write(d.fd[1], &d.result, 1);
@ -256,18 +256,18 @@ static void setup_tty( const char* tty )
int fd = open( tty, O_WRONLY ); int fd = open( tty, O_WRONLY );
if( fd < 0 ) if( fd < 0 )
{ {
fprintf(stderr, "tdeinit: couldn't open() %s: %s\n", tty, strerror (errno) ); fprintf(stderr, "[kinit] couldn't open() %s: %s\n", tty, strerror (errno) );
return; return;
} }
if( dup2( fd, STDOUT_FILENO ) < 0 ) if( dup2( fd, STDOUT_FILENO ) < 0 )
{ {
fprintf(stderr, "tdeinit: couldn't dup2() %s: %s\n", tty, strerror (errno) ); fprintf(stderr, "[kinit] couldn't dup2() %s: %s\n", tty, strerror (errno) );
close( fd ); close( fd );
return; return;
} }
if( dup2( fd, STDERR_FILENO ) < 0 ) if( dup2( fd, STDERR_FILENO ) < 0 )
{ {
fprintf(stderr, "tdeinit: couldn't dup2() %s: %s\n", tty, strerror (errno) ); fprintf(stderr, "[kinit] couldn't dup2() %s: %s\n", tty, strerror (errno) );
close( fd ); close( fd );
return; return;
} }
@ -435,7 +435,7 @@ static pid_t launch(int argc, const char *_name, const char *args,
*/ */
if (0 > socketpair(AF_UNIX, SOCK_STREAM, 0, d.launcher)) if (0 > socketpair(AF_UNIX, SOCK_STREAM, 0, d.launcher))
{ {
perror("tdeinit: socketpair() failed!\n"); perror("[kinit] socketpair() failed!\n");
exit(255); exit(255);
} }
launcher = 1; launcher = 1;
@ -470,7 +470,7 @@ static pid_t launch(int argc, const char *_name, const char *args,
if (0 > pipe(d.fd)) if (0 > pipe(d.fd))
{ {
perror("tdeinit: pipe() failed!\n"); perror("[kinit] pipe() failed!\n");
d.result = 3; d.result = 3;
d.errorMsg = i18n("Unable to start new process.\n" d.errorMsg = i18n("Unable to start new process.\n"
"The system may have reached the maximum number of open files possible or the maximum number of open files that you are allowed to use has been reached.").utf8(); "The system may have reached the maximum number of open files possible or the maximum number of open files that you are allowed to use has been reached.").utf8();
@ -492,7 +492,7 @@ static pid_t launch(int argc, const char *_name, const char *args,
d.fork = fork(); d.fork = fork();
switch(d.fork) { switch(d.fork) {
case -1: case -1:
perror("tdeinit: fork() failed!\n"); perror("[kinit] fork() failed!\n");
d.result = 3; d.result = 3;
d.errorMsg = i18n("Unable to create new process.\n" d.errorMsg = i18n("Unable to create new process.\n"
"The system may have reached the maximum number of processes possible or the maximum number of processes that you are allowed to use has been reached.").utf8(); "The system may have reached the maximum number of processes possible or the maximum number of processes that you are allowed to use has been reached.").utf8();
@ -575,11 +575,11 @@ static pid_t launch(int argc, const char *_name, const char *args,
/* set the process name, so that killall works like intended */ /* set the process name, so that killall works like intended */
r = prctl(PR_SET_NAME, (unsigned long) name.data(), 0, 0, 0); r = prctl(PR_SET_NAME, (unsigned long) name.data(), 0, 0, 0);
if ( r == 0 ) if ( r == 0 )
tdeinit_setproctitle( "%s [tdeinit]%s", name.data(), procTitle.data() ? procTitle.data() : "" ); tdeinit_setproctitle( "%s [kinit]%s", name.data(), procTitle.data() ? procTitle.data() : "" );
else else
tdeinit_setproctitle( "tdeinit: %s%s", name.data(), procTitle.data() ? procTitle.data() : "" ); tdeinit_setproctitle( "[kinit] %s%s", name.data(), procTitle.data() ? procTitle.data() : "" );
#else #else
tdeinit_setproctitle( "tdeinit: %s%s", name.data(), procTitle.data() ? procTitle.data() : "" ); tdeinit_setproctitle( "[kinit] %s%s", name.data(), procTitle.data() ? procTitle.data() : "" );
#endif #endif
} }
@ -659,9 +659,9 @@ static pid_t launch(int argc, const char *_name, const char *args,
d.func = (int (*)(int, char *[])) d.sym; d.func = (int (*)(int, char *[])) d.sym;
if (d.debug_wait) if (d.debug_wait)
{ {
fprintf(stderr, "tdeinit: Suspending process\n" fprintf(stderr, "[kinit] Suspending process\n"
"tdeinit: 'gdb tdeinit %d' to debug\n" "[kinit] 'gdb tdeinit %d' to debug\n"
"tdeinit: 'kill -SIGCONT %d' to continue\n", "[kinit] 'kill -SIGCONT %d' to continue\n",
getpid(), getpid()); getpid(), getpid());
kill(getpid(), SIGSTOP); kill(getpid(), SIGSTOP);
} }
@ -690,7 +690,7 @@ static pid_t launch(int argc, const char *_name, const char *args,
if (d.result == 2) if (d.result == 2)
{ {
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr, "Could not load library! Trying exec....\n"); fprintf(stderr, "[kinit] %s is executable and not a library. Launching with exec.\n", _name );
#endif #endif
exec = true; exec = true;
continue; continue;
@ -728,11 +728,11 @@ static pid_t launch(int argc, const char *_name, const char *args,
} }
if (d.n == 0) if (d.n == 0)
{ {
perror("tdeinit: Pipe closed unexpectedly"); perror("[kinit] Pipe closed unexpectedly");
d.result = 1; // Error d.result = 1; // Error
break; break;
} }
perror("tdeinit: Error reading from pipe"); perror("[kinit] Error reading from pipe");
d.result = 1; // Error d.result = 1; // Error
break; break;
} }
@ -777,20 +777,20 @@ static void init_signals()
if (pipe(d.deadpipe) != 0) if (pipe(d.deadpipe) != 0)
{ {
perror("tdeinit: Aborting. Can't create pipe: "); perror("[kinit] Aborting. Can't create pipe: ");
exit(255); exit(255);
} }
options = fcntl(d.deadpipe[0], F_GETFL); options = fcntl(d.deadpipe[0], F_GETFL);
if (options == -1) if (options == -1)
{ {
perror("tdeinit: Aborting. Can't make pipe non-blocking: "); perror("[kinit] Aborting. Can't make pipe non-blocking: ");
exit(255); exit(255);
} }
if (fcntl(d.deadpipe[0], F_SETFL, options | O_NONBLOCK) == -1) if (fcntl(d.deadpipe[0], F_SETFL, options | O_NONBLOCK) == -1)
{ {
perror("tdeinit: Aborting. Can't make pipe non-blocking: "); perror("[kinit] Aborting. Can't make pipe non-blocking: ");
exit(255); exit(255);
} }
@ -831,7 +831,7 @@ static void init_tdeinit_socket()
int max_tries = 10; int max_tries = 10;
if (!home_dir || !home_dir[0]) if (!home_dir || !home_dir[0])
{ {
fprintf(stderr, "tdeinit: Aborting. $HOME not set!"); fprintf(stderr, "[kinit] Aborting. $HOME not set!");
exit(255); exit(255);
} }
chdir(home_dir); chdir(home_dir);
@ -843,12 +843,12 @@ static void init_tdeinit_socket()
{ {
if (errno == ENOENT) if (errno == ENOENT)
{ {
fprintf(stderr, "tdeinit: Aborting. $HOME directory (%s) does not exist.\n", path.data()); fprintf(stderr, "[kinit] Aborting. $HOME directory (%s) does not exist.\n", path.data());
exit(255); exit(255);
} }
else if (readOnly.isEmpty()) else if (readOnly.isEmpty())
{ {
fprintf(stderr, "tdeinit: Aborting. No write access to $HOME directory (%s).\n", path.data()); fprintf(stderr, "[kinit] Aborting. No write access to $HOME directory (%s).\n", path.data());
exit(255); exit(255);
} }
} }
@ -860,7 +860,7 @@ static void init_tdeinit_socket()
} }
if (access(path.data(), R_OK|W_OK) && (errno != ENOENT)) if (access(path.data(), R_OK|W_OK) && (errno != ENOENT))
{ {
fprintf(stderr, "tdeinit: Aborting. No write access to '%s'.\n", path.data()); fprintf(stderr, "[kinit] Aborting. No write access to '%s'.\n", path.data());
exit(255); exit(255);
} }
} }
@ -874,7 +874,7 @@ static void init_tdeinit_socket()
int s; int s;
struct sockaddr_un server; struct sockaddr_un server;
// fprintf(stderr, "tdeinit: Warning, socket_file already exists!\n"); // fprintf(stderr, "[kinit] Warning, socket_file already exists!\n");
/* /*
* create the socket stream * create the socket stream
*/ */
@ -890,7 +890,7 @@ static void init_tdeinit_socket()
if(connect(s, (struct sockaddr *)&server, socklen) == 0) if(connect(s, (struct sockaddr *)&server, socklen) == 0)
{ {
fprintf(stderr, "tdeinit: Shutting down running client.\n"); fprintf(stderr, "[kinit] Shutting down running client.\n");
klauncher_header request_header; klauncher_header request_header;
request_header.cmd = LAUNCHER_TERMINATE_TDEINIT; request_header.cmd = LAUNCHER_TERMINATE_TDEINIT;
request_header.arg_length = 0; request_header.arg_length = 0;
@ -908,21 +908,21 @@ static void init_tdeinit_socket()
d.wrapper = socket(PF_UNIX, SOCK_STREAM, 0); d.wrapper = socket(PF_UNIX, SOCK_STREAM, 0);
if (d.wrapper < 0) if (d.wrapper < 0)
{ {
perror("tdeinit: Aborting. socket() failed: "); perror("[kinit] Aborting. socket() failed: ");
exit(255); exit(255);
} }
options = fcntl(d.wrapper, F_GETFL); options = fcntl(d.wrapper, F_GETFL);
if (options == -1) if (options == -1)
{ {
perror("tdeinit: Aborting. Can't make socket non-blocking: "); perror("[kinit] Aborting. Can't make socket non-blocking: ");
close(d.wrapper); close(d.wrapper);
exit(255); exit(255);
} }
if (fcntl(d.wrapper, F_SETFL, options | O_NONBLOCK) == -1) if (fcntl(d.wrapper, F_SETFL, options | O_NONBLOCK) == -1)
{ {
perror("tdeinit: Aborting. Can't make socket non-blocking: "); perror("[kinit] Aborting. Can't make socket non-blocking: ");
close(d.wrapper); close(d.wrapper);
exit(255); exit(255);
} }
@ -936,7 +936,7 @@ static void init_tdeinit_socket()
if(bind(d.wrapper, (struct sockaddr *)&sa, socklen) != 0) if(bind(d.wrapper, (struct sockaddr *)&sa, socklen) != 0)
{ {
if (max_tries == 0) { if (max_tries == 0) {
perror("tdeinit: Aborting. bind() failed: "); perror("[kinit] Aborting. bind() failed: ");
fprintf(stderr, "Could not bind to socket '%s'\n", sock_file); fprintf(stderr, "Could not bind to socket '%s'\n", sock_file);
close(d.wrapper); close(d.wrapper);
exit(255); exit(255);
@ -949,7 +949,7 @@ static void init_tdeinit_socket()
/** set permissions **/ /** set permissions **/
if (chmod(sock_file, 0600) != 0) if (chmod(sock_file, 0600) != 0)
{ {
perror("tdeinit: Aborting. Can't set permissions on socket: "); perror("[kinit] Aborting. Can't set permissions on socket: ");
fprintf(stderr, "Wrong permissions of socket '%s'\n", sock_file); fprintf(stderr, "Wrong permissions of socket '%s'\n", sock_file);
unlink(sock_file); unlink(sock_file);
close(d.wrapper); close(d.wrapper);
@ -958,7 +958,7 @@ static void init_tdeinit_socket()
if(listen(d.wrapper, SOMAXCONN) < 0) if(listen(d.wrapper, SOMAXCONN) < 0)
{ {
perror("tdeinit: Aborting. listen() failed: "); perror("[kinit] Aborting. listen() failed: ");
unlink(sock_file); unlink(sock_file);
close(d.wrapper); close(d.wrapper);
exit(255); exit(255);
@ -968,14 +968,14 @@ static void init_tdeinit_socket()
d.wrapper_old = socket(PF_UNIX, SOCK_STREAM, 0); d.wrapper_old = socket(PF_UNIX, SOCK_STREAM, 0);
if (d.wrapper_old < 0) if (d.wrapper_old < 0)
{ {
// perror("tdeinit: Aborting. socket() failed: "); // perror("[kinit] Aborting. socket() failed: ");
return; return;
} }
options = fcntl(d.wrapper_old, F_GETFL); options = fcntl(d.wrapper_old, F_GETFL);
if (options == -1) if (options == -1)
{ {
// perror("tdeinit: Aborting. Can't make socket non-blocking: "); // perror("[kinit] Aborting. Can't make socket non-blocking: ");
close(d.wrapper_old); close(d.wrapper_old);
d.wrapper_old = 0; d.wrapper_old = 0;
return; return;
@ -983,7 +983,7 @@ static void init_tdeinit_socket()
if (fcntl(d.wrapper_old, F_SETFL, options | O_NONBLOCK) == -1) if (fcntl(d.wrapper_old, F_SETFL, options | O_NONBLOCK) == -1)
{ {
// perror("tdeinit: Aborting. Can't make socket non-blocking: "); // perror("[kinit] Aborting. Can't make socket non-blocking: ");
close(d.wrapper_old); close(d.wrapper_old);
d.wrapper_old = 0; d.wrapper_old = 0;
return; return;
@ -999,7 +999,7 @@ static void init_tdeinit_socket()
if(bind(d.wrapper_old, (struct sockaddr *)&sa_old, socklen) != 0) if(bind(d.wrapper_old, (struct sockaddr *)&sa_old, socklen) != 0)
{ {
if (max_tries == 0) { if (max_tries == 0) {
// perror("tdeinit: Aborting. bind() failed: "); // perror("[kinit] Aborting. bind() failed: ");
fprintf(stderr, "Could not bind to socket '%s'\n", sock_file_old); fprintf(stderr, "Could not bind to socket '%s'\n", sock_file_old);
close(d.wrapper_old); close(d.wrapper_old);
d.wrapper_old = 0; d.wrapper_old = 0;
@ -1022,7 +1022,7 @@ static void init_tdeinit_socket()
if(listen(d.wrapper_old, SOMAXCONN) < 0) if(listen(d.wrapper_old, SOMAXCONN) < 0)
{ {
// perror("tdeinit: Aborting. listen() failed: "); // perror("[kinit] Aborting. listen() failed: ");
unlink(sock_file_old); unlink(sock_file_old);
close(d.wrapper_old); close(d.wrapper_old);
d.wrapper_old = 0; d.wrapper_old = 0;
@ -1069,14 +1069,14 @@ static void launcher_died()
if (!d.launcher_ok) if (!d.launcher_ok)
{ {
/* This is bad. */ /* This is bad. */
fprintf(stderr, "tdeinit: Communication error with launcher. Exiting!\n"); fprintf(stderr, "[kinit] Communication error with launcher. Exiting!\n");
::exit(255); ::exit(255);
return; return;
} }
// KLauncher died... restart // KLauncher died... restart
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr, "tdeinit: KLauncher died unexpectedly.\n"); fprintf(stderr, "[kinit] KLauncher died unexpectedly.\n");
#endif #endif
// Make sure it's really dead. // Make sure it's really dead.
if (d.launcher_pid) if (d.launcher_pid)
@ -1092,7 +1092,7 @@ static void launcher_died()
pid_t pid = launch( 1, "klauncher", 0 ); pid_t pid = launch( 1, "klauncher", 0 );
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr, "tdeinit: Relaunching KLauncher, pid = %ld result = %d\n", (long) pid, d.result); fprintf(stderr, "[kinit] Relaunching KLauncher, pid = %ld result = %d\n", (long) pid, d.result);
#endif #endif
} }
@ -1156,7 +1156,7 @@ static void handle_launcher_request(int sock = -1)
const char *startup_id_str = "0"; const char *startup_id_str = "0";
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr, "tdeinit: Got %s '%s' from %s.\n", fprintf(stderr, "[kinit] Got %s '%s' from %s.\n",
(request_header.cmd == LAUNCHER_EXEC ? "EXEC" : (request_header.cmd == LAUNCHER_EXEC ? "EXEC" :
(request_header.cmd == LAUNCHER_EXT_EXEC ? "EXT_EXEC" : (request_header.cmd == LAUNCHER_EXT_EXEC ? "EXT_EXEC" :
(request_header.cmd == LAUNCHER_EXEC_NEW ? "EXEC_NEW" : (request_header.cmd == LAUNCHER_EXEC_NEW ? "EXEC_NEW" :
@ -1218,7 +1218,7 @@ static void handle_launcher_request(int sock = -1)
if ((arg_n - request_data) != request_header.arg_length) if ((arg_n - request_data) != request_header.arg_length)
{ {
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr, "tdeinit: EXEC request has invalid format.\n"); fprintf(stderr, "[kinit] EXEC request has invalid format.\n");
#endif #endif
free(request_data); free(request_data);
d.debug_wait = false; d.debug_wait = false;
@ -1273,16 +1273,16 @@ static void handle_launcher_request(int sock = -1)
#ifndef NDEBUG #ifndef NDEBUG
if (launcher) if (launcher)
fprintf(stderr, "tdeinit: Got SETENV '%s=%s' from klauncher.\n", env_name, env_value); fprintf(stderr, "[kinit] Got SETENV '%s=%s' from klauncher.\n", env_name, env_value);
else else
fprintf(stderr, "tdeinit: Got SETENV '%s=%s' from socket.\n", env_name, env_value); fprintf(stderr, "[kinit] Got SETENV '%s=%s' from socket.\n", env_name, env_value);
#endif #endif
if ( request_header.arg_length != if ( request_header.arg_length !=
(int) (strlen(env_name) + strlen(env_value) + 2)) (int) (strlen(env_name) + strlen(env_value) + 2))
{ {
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr, "tdeinit: SETENV request has invalid format.\n"); fprintf(stderr, "[kinit] SETENV request has invalid format.\n");
#endif #endif
free(request_data); free(request_data);
return; return;
@ -1292,7 +1292,7 @@ static void handle_launcher_request(int sock = -1)
else if (request_header.cmd == LAUNCHER_TERMINATE_KDE) else if (request_header.cmd == LAUNCHER_TERMINATE_KDE)
{ {
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr,"tdeinit: terminate KDE.\n"); fprintf(stderr,"[kinit] Terminating Trinity.\n");
#endif #endif
#ifdef Q_WS_X11 #ifdef Q_WS_X11
tdeinit_xio_errhandler( 0L ); tdeinit_xio_errhandler( 0L );
@ -1301,7 +1301,7 @@ static void handle_launcher_request(int sock = -1)
else if (request_header.cmd == LAUNCHER_TERMINATE_TDEINIT) else if (request_header.cmd == LAUNCHER_TERMINATE_TDEINIT)
{ {
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr,"tdeinit: Killing tdeinit/klauncher.\n"); fprintf(stderr,"[kinit] Killing tdeinit/klauncher.\n");
#endif #endif
if (d.launcher_pid) if (d.launcher_pid)
kill(d.launcher_pid, SIGTERM); kill(d.launcher_pid, SIGTERM);
@ -1311,7 +1311,7 @@ static void handle_launcher_request(int sock = -1)
else if (request_header.cmd == LAUNCHER_DEBUG_WAIT) else if (request_header.cmd == LAUNCHER_DEBUG_WAIT)
{ {
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr,"tdeinit: Debug wait activated.\n"); fprintf(stderr,"[kinit] Debug wait activated.\n");
#endif #endif
d.debug_wait = true; d.debug_wait = true;
} }
@ -1351,7 +1351,7 @@ static void handle_requests(pid_t waitForPid)
if (exit_pid > 0) if (exit_pid > 0)
{ {
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr, "tdeinit: PID %ld terminated.\n", (long) exit_pid); fprintf(stderr, "[kinit] PID %ld terminated.\n", (long) exit_pid);
#endif #endif
if (waitForPid && (exit_pid == waitForPid)) if (waitForPid && (exit_pid == waitForPid))
return; return;
@ -1513,7 +1513,7 @@ static void tdeinit_library_path()
TQCString display = getenv(DISPLAY); TQCString display = getenv(DISPLAY);
if (display.isEmpty()) if (display.isEmpty())
{ {
fprintf(stderr, "tdeinit: Aborting. $"DISPLAY" is not set.\n"); fprintf(stderr, "[kinit] Aborting. $"DISPLAY" is not set.\n");
exit(255); exit(255);
} }
int i; int i;
@ -1523,7 +1523,7 @@ static void tdeinit_library_path()
TQCString socketName = TQFile::encodeName(locateLocal("socket", TQString("tdeinit-%1").arg(TQString(display)), s_instance)); TQCString socketName = TQFile::encodeName(locateLocal("socket", TQString("tdeinit-%1").arg(TQString(display)), s_instance));
if (socketName.length() >= MAX_SOCK_FILE) if (socketName.length() >= MAX_SOCK_FILE)
{ {
fprintf(stderr, "tdeinit: Aborting. Socket name will be too long:\n"); fprintf(stderr, "[kinit] Aborting. Socket name will be too long:\n");
fprintf(stderr, " '%s'\n", socketName.data()); fprintf(stderr, " '%s'\n", socketName.data());
exit(255); exit(255);
} }
@ -1533,7 +1533,7 @@ static void tdeinit_library_path()
socketName = TQFile::encodeName(locateLocal("socket", TQString("tdeinit_%1").arg(TQString(display)), s_instance)); socketName = TQFile::encodeName(locateLocal("socket", TQString("tdeinit_%1").arg(TQString(display)), s_instance));
if (socketName.length() >= MAX_SOCK_FILE) if (socketName.length() >= MAX_SOCK_FILE)
{ {
fprintf(stderr, "tdeinit: Aborting. Socket name will be too long:\n"); fprintf(stderr, "[kinit] Aborting. Socket name will be too long:\n");
fprintf(stderr, " '%s'\n", socketName.data()); fprintf(stderr, " '%s'\n", socketName.data());
exit(255); exit(255);
} }
@ -1545,7 +1545,7 @@ int tdeinit_xio_errhandler( Display *disp )
// disp is 0L when KDE shuts down. We don't want those warnings then. // disp is 0L when KDE shuts down. We don't want those warnings then.
if ( disp ) if ( disp )
tqWarning( "tdeinit: Fatal IO error: client killed" ); tqWarning( "[kinit] Fatal IO error: client killed" );
if (sock_file[0]) if (sock_file[0])
{ {
@ -1567,7 +1567,7 @@ int tdeinit_xio_errhandler( Display *disp )
} }
if ( disp ) if ( disp )
tqWarning( "tdeinit: sending SIGHUP to children." ); tqWarning( "[kinit] sending SIGHUP to children." );
/* this should remove all children we started */ /* this should remove all children we started */
signal(SIGHUP, SIG_IGN); signal(SIGHUP, SIG_IGN);
@ -1576,14 +1576,14 @@ int tdeinit_xio_errhandler( Display *disp )
sleep(2); sleep(2);
if ( disp ) if ( disp )
tqWarning( "tdeinit: sending SIGTERM to children." ); tqWarning( "[kinit] sending SIGTERM to children." );
/* and if they don't listen to us, this should work */ /* and if they don't listen to us, this should work */
signal(SIGTERM, SIG_IGN); signal(SIGTERM, SIG_IGN);
kill(0, SIGTERM); kill(0, SIGTERM);
if ( disp ) if ( disp )
tqWarning( "tdeinit: Exit." ); tqWarning( "[kinit] Exit." );
exit( 0 ); exit( 0 );
return 0; return 0;
@ -1596,7 +1596,7 @@ int tdeinit_x_errhandler( Display *dpy, XErrorEvent *err )
char errstr[256]; char errstr[256];
// tdeinit almost doesn't use X, and therefore there shouldn't be any X error // tdeinit almost doesn't use X, and therefore there shouldn't be any X error
XGetErrorText( dpy, err->error_code, errstr, 256 ); XGetErrorText( dpy, err->error_code, errstr, 256 );
fprintf(stderr, "tdeinit: KDE detected X Error: %s %d\n" fprintf(stderr, "[kinit] TDE detected X Error: %s %d\n"
" Major opcode: %d\n" " Major opcode: %d\n"
" Minor opcode: %d\n" " Minor opcode: %d\n"
" Resource id: 0x%lx\n", " Resource id: 0x%lx\n",
@ -1629,15 +1629,15 @@ static int initXconnection()
BlackPixelOfScreen(DefaultScreenOfDisplay(X11display)), BlackPixelOfScreen(DefaultScreenOfDisplay(X11display)),
BlackPixelOfScreen(DefaultScreenOfDisplay(X11display)) ); BlackPixelOfScreen(DefaultScreenOfDisplay(X11display)) );
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr, "tdeinit: opened connection to %s\n", DisplayString(X11display)); fprintf(stderr, "[kinit] opened connection to %s\n", DisplayString(X11display));
#endif #endif
int fd = XConnectionNumber( X11display ); int fd = XConnectionNumber( X11display );
int on = 1; int on = 1;
(void) setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (char *) &on, (int) sizeof(on)); (void) setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (char *) &on, (int) sizeof(on));
return fd; return fd;
} else } else
fprintf(stderr, "tdeinit: Can't connect to the X Server.\n" \ fprintf(stderr, "[kinit] Can't connect to the X Server.\n" \
"tdeinit: Might not terminate at end of session.\n"); "[kinit] Might not terminate at end of session.\n");
return -1; return -1;
} }
@ -1794,12 +1794,12 @@ int main(int argc, char **argv, char **envp)
else else
pid = launch( 2, "dcopserver", "--nosid" ); pid = launch( 2, "dcopserver", "--nosid" );
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr, "tdeinit: Launched DCOPServer, pid = %ld result = %d\n", (long) pid, d.result); fprintf(stderr, "[kinit] Launched DCOPServer, pid = %ld result = %d\n", (long) pid, d.result);
#endif #endif
WaitPid(pid); WaitPid(pid);
if (!WIFEXITED(d.exit_status) || (WEXITSTATUS(d.exit_status) != 0)) if (!WIFEXITED(d.exit_status) || (WEXITSTATUS(d.exit_status) != 0))
{ {
fprintf(stderr, "tdeinit: DCOPServer could not be started, aborting.\n"); fprintf(stderr, "[kinit] DCOPServer could not be started, aborting.\n");
exit(1); exit(1);
} }
} }
@ -1818,7 +1818,7 @@ int main(int argc, char **argv, char **envp)
else else
pid = launch( 1, "klauncher", 0 ); pid = launch( 1, "klauncher", 0 );
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr, "tdeinit: Launched KLauncher, pid = %ld result = %d\n", (long) pid, d.result); fprintf(stderr, "[kinit] Launched KLauncher, pid = %ld result = %d\n", (long) pid, d.result);
#endif #endif
handle_requests(pid); // Wait for klauncher to be ready handle_requests(pid); // Wait for klauncher to be ready
} }
@ -1856,7 +1856,7 @@ int main(int argc, char **argv, char **envp)
else else
pid = launch( 1, "kded", 0 ); pid = launch( 1, "kded", 0 );
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr, "tdeinit: Launched KDED, pid = %ld result = %d\n", (long) pid, d.result); fprintf(stderr, "[kinit] Launched KDED, pid = %ld result = %d\n", (long) pid, d.result);
#endif #endif
handle_requests(pid); handle_requests(pid);
} }
@ -1867,7 +1867,7 @@ int main(int argc, char **argv, char **envp)
{ {
pid = launch( 1, safe_argv[i]+1, 0); pid = launch( 1, safe_argv[i]+1, 0);
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr, "tdeinit: Launched '%s', pid = %ld result = %d\n", safe_argv[i]+1, (long) pid, d.result); fprintf(stderr, "[kinit] Launched '%s', pid = %ld result = %d\n", safe_argv[i]+1, (long) pid, d.result);
#endif #endif
handle_requests(pid); handle_requests(pid);
} }
@ -1883,7 +1883,7 @@ int main(int argc, char **argv, char **envp)
{ {
pid = launch( 1, safe_argv[i], 0 ); pid = launch( 1, safe_argv[i], 0 );
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr, "tdeinit: Launched '%s', pid = %ld result = %d\n", safe_argv[i], (long) pid, d.result); fprintf(stderr, "[kinit] Launched '%s', pid = %ld result = %d\n", safe_argv[i], (long) pid, d.result);
#endif #endif
} }
} }

@ -1584,7 +1584,7 @@ static void yy_fatal_error( msg )
char msg[]; char msg[];
#endif #endif
{ {
(void) fprintf( stderr, "%s\n", msg ); (void) fprintf( stderr, "[lex] %s\n", msg );
exit( YY_EXIT_FAILURE ); exit( YY_EXIT_FAILURE );
} }

@ -438,7 +438,7 @@ ArrayPrototypeImp::ArrayPrototypeImp(ExecState */*exec*/,
Value ArrayPrototypeImp::get(ExecState *exec, const Identifier &propertyName) const Value ArrayPrototypeImp::get(ExecState *exec, const Identifier &propertyName) const
{ {
//fprintf( stderr, "ArrayPrototypeImp::get(%s)\n", propertyName.ascii() ); //fprintf( stderr, "[kjs-array_object] ArrayPrototypeImp::get(%s)\n", propertyName.ascii() );
return lookupGetFunction<ArrayProtoFuncImp, ArrayInstanceImp>( exec, propertyName, &arrayTable, this ); return lookupGetFunction<ArrayProtoFuncImp, ArrayInstanceImp>( exec, propertyName, &arrayTable, this );
} }

@ -163,7 +163,7 @@ bool Collector::collect()
if (InterpreterImp::s_hook) { if (InterpreterImp::s_hook) {
InterpreterImp *scr = InterpreterImp::s_hook; InterpreterImp *scr = InterpreterImp::s_hook;
do { do {
//fprintf( stderr, "Collector marking interpreter %p\n",(void*)scr); //fprintf( stderr, "[kjs-collector] Collector marking interpreter %p\n",(void*)scr);
scr->mark(); scr->mark();
scr = scr->next; scr = scr->next;
} while (scr != InterpreterImp::s_hook); } while (scr != InterpreterImp::s_hook);
@ -221,7 +221,7 @@ bool Collector::collect()
if (!(imp->_flags & ValueImp::VI_DESTRUCTED)) { if (!(imp->_flags & ValueImp::VI_DESTRUCTED)) {
if (!imp->refcount && imp->_flags == (ValueImp::VI_GCALLOWED | ValueImp::VI_CREATED)) { if (!imp->refcount && imp->_flags == (ValueImp::VI_GCALLOWED | ValueImp::VI_CREATED)) {
//fprintf( stderr, "Collector::deleting ValueImp %p (%s)\n", (void*)imp, typeid(*imp).name()); //fprintf( stderr, "[kjs-collector] Collector::deleting ValueImp %p (%s)\n", (void*)imp, typeid(*imp).name());
// emulate destructing part of 'operator delete()' // emulate destructing part of 'operator delete()'
imp->~ValueImp(); imp->~ValueImp();
curBlock->usedCells--; curBlock->usedCells--;

@ -503,16 +503,16 @@ FunctionBodyNode *Parser::parse(const UChar *code, unsigned int length, SourceCo
if (errMsg) if (errMsg)
*errMsg = "Parse error at line " + UString::from(eline); *errMsg = "Parse error at line " + UString::from(eline);
#ifdef KJS_VERBOSE #ifdef KJS_VERBOSE
fprintf( stderr, "%s\n", UString(code,length).ascii() ); fprintf( stderr, "[kjs-internal] %s\n", UString(code,length).ascii() );
#endif #endif
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr, "KJS: JavaScript parse error at line %d.\n", eline); fprintf( stderr, "[kjs-internal] KJS: JavaScript parse error at line %d.\n", eline);
#endif #endif
delete prog; delete prog;
return 0; return 0;
} }
#ifdef KJS_VERBOSE #ifdef KJS_VERBOSE
fprintf( stderr, "%s\n", prog->toCode().ascii() ); fprintf( stderr, "[kjs-internal] %s\n", prog->toCode().ascii() );
#endif #endif
return prog; return prog;
@ -524,7 +524,7 @@ InterpreterImp* InterpreterImp::s_hook = 0L;
void InterpreterImp::globalInit() void InterpreterImp::globalInit()
{ {
//fprintf( stderr, "InterpreterImp::globalInit()\n" ); //fprintf( stderr, "[kjs-internal] InterpreterImp::globalInit()\n" );
UndefinedImp::staticUndefined = new UndefinedImp(); UndefinedImp::staticUndefined = new UndefinedImp();
UndefinedImp::staticUndefined->ref(); UndefinedImp::staticUndefined->ref();
NullImp::staticNull = new NullImp(); NullImp::staticNull = new NullImp();
@ -539,7 +539,7 @@ void InterpreterImp::globalInit()
void InterpreterImp::globalClear() void InterpreterImp::globalClear()
{ {
//fprintf( stderr, "InterpreterImp::globalClear()\n" ); //fprintf( stderr, "[kjs-internal] InterpreterImp::globalClear()\n" );
UndefinedImp::staticUndefined->deref(); UndefinedImp::staticUndefined->deref();
UndefinedImp::staticUndefined->setGcAllowed(); UndefinedImp::staticUndefined->setGcAllowed();
UndefinedImp::staticUndefined = 0L; UndefinedImp::staticUndefined = 0L;
@ -783,7 +783,7 @@ void InterpreterImp::mark()
BooleanImp::staticTrue->mark(); BooleanImp::staticTrue->mark();
if (BooleanImp::staticFalse && !BooleanImp::staticFalse->marked()) if (BooleanImp::staticFalse && !BooleanImp::staticFalse->marked())
BooleanImp::staticFalse->mark(); BooleanImp::staticFalse->mark();
//fprintf( stderr, "InterpreterImp::mark this=%p global.imp()=%p\n", this, global.imp() ); //fprintf( stderr, "[kjs-internal] InterpreterImp::mark this=%p global.imp()=%p\n", this, global.imp() );
if (global.imp()) if (global.imp())
global.imp()->mark(); global.imp()->mark();
if (m_interpreter) if (m_interpreter)

@ -122,7 +122,7 @@ Value MathObjectImp::getValueProperty(ExecState *, int token) const
d = sqrt(2.0); d = sqrt(2.0);
break; break;
default: default:
fprintf( stderr, "Internal error in MathObjectImp: unhandled token %d\n", token ); fprintf( stderr, "[math_object] Internal error in MathObjectImp: unhandled token %d\n", token );
break; break;
} }

@ -154,10 +154,10 @@ void Node::finalCheck()
fprintf(stderr, "Node::finalCheck(): list 0\n"); fprintf(stderr, "Node::finalCheck(): list 0\n");
return; return;
} }
fprintf( stderr, "Node::finalCheck(): list count : %d\n", (int)s_nodes->size() ); fprintf( stderr, "[nodes] Node::finalCheck(): list count : %d\n", (int)s_nodes->size() );
std::list<Node *>::iterator it = s_nodes->begin(); std::list<Node *>::iterator it = s_nodes->begin();
for ( uint i = 0; it != s_nodes->end() ; ++it, ++i ) for ( uint i = 0; it != s_nodes->end() ; ++it, ++i )
fprintf( stderr, "[%d] Still having node %p (%s) (refcount %d)\n", i, (void*)*it, typeid( **it ).name(), (*it)->refcount ); fprintf( stderr, "[nodes] [%d] Still having node %p (%s) (refcount %d)\n", i, (void*)*it, typeid( **it ).name(), (*it)->refcount );
delete s_nodes; delete s_nodes;
s_nodes = 0L; s_nodes = 0L;
} }

@ -210,7 +210,7 @@ void ObjectImp::put(ExecState *exec, const Identifier &propertyName,
// and let it override the canPut() check. // and let it override the canPut() check.
if ((attr == None || attr == DontDelete) && !canPut(exec,propertyName)) { if ((attr == None || attr == DontDelete) && !canPut(exec,propertyName)) {
#ifdef KJS_VERBOSE #ifdef KJS_VERBOSE
fprintf( stderr, "WARNING: canPut %s said NO\n", propertyName.ascii() ); fprintf( stderr, "[kjs-object] WARNING: canPut %s said NO\n", propertyName.ascii() );
#endif #endif
return; return;
} }

@ -148,10 +148,10 @@ KCrash::defaultCrashHandler (int sig)
if (appName) if (appName)
{ {
#ifndef NDEBUG #ifndef NDEBUG
fprintf(stderr, "KCrash: crashing... crashRecursionCounter = %d\n", crashRecursionCounter); fprintf(stderr, "[kcrash] KCrash: crashing... crashRecursionCounter = %d\n", crashRecursionCounter);
fprintf(stderr, "KCrash: Application Name = %s path = %s pid = %d\n", appName ? appName : "<unknown>" , appPath ? appPath : "<unknown>", getpid()); fprintf(stderr, "[kcrash] KCrash: Application Name = %s path = %s pid = %d\n", appName ? appName : "<unknown>" , appPath ? appPath : "<unknown>", getpid());
#else #else
fprintf(stderr, "KCrash: Application '%s' crashing...\n", appName ? appName : "<unknown>"); fprintf(stderr, "[kcrash] KCrash: Application '%s' crashing...\n", appName ? appName : "<unknown>");
#endif #endif
const char * argv[24]; // don't forget to update this const char * argv[24]; // don't forget to update this
@ -231,13 +231,13 @@ KCrash::defaultCrashHandler (int sig)
} }
else { else {
fprintf(stderr, "Unknown appname\n"); fprintf(stderr, "[kcrash] Unknown appname\n");
} }
} }
if (crashRecursionCounter < 4) if (crashRecursionCounter < 4)
{ {
fprintf(stderr, "Unable to start Dr. Konqi\n"); fprintf(stderr, "[kcrash] Unable to start Dr. Konqi\n");
} }
#endif //Q_OS_UNIX #endif //Q_OS_UNIX
@ -277,7 +277,7 @@ void KCrash::startDrKonqi( const char* argv[], int argc )
int len = strlen( argv[ i ] ) + 1; // include terminating \0 int len = strlen( argv[ i ] ) + 1; // include terminating \0
if( pos + len > BUFSIZE ) if( pos + len > BUFSIZE )
{ {
fprintf( stderr, "BUFSIZE in KCrash not big enough!\n" ); fprintf( stderr, "[kcrash] BUFSIZE in KCrash not big enough!\n" );
startDirectly( argv, argc ); startDirectly( argv, argc );
return; return;
} }
@ -320,7 +320,7 @@ void KCrash::startDrKonqi( const char* argv[], int argc )
// If we can't reach tdeinit we can still at least try to fork() // If we can't reach tdeinit we can still at least try to fork()
void KCrash::startDirectly( const char* argv[], int ) void KCrash::startDirectly( const char* argv[], int )
{ {
fprintf( stderr, "KCrash cannot reach tdeinit, launching directly.\n" ); fprintf( stderr, "[kcrash] KCrash cannot reach tdeinit, launching directly.\n" );
pid_t pid = fork(); pid_t pid = fork();
if (pid <= 0) if (pid <= 0)
{ {
@ -451,12 +451,12 @@ static int openSocket()
{ {
if (!home_dir || !home_dir[0]) if (!home_dir || !home_dir[0])
{ {
fprintf(stderr, "Warning: $HOME not set!\n"); fprintf(stderr, "[kcrash] Warning: $HOME not set!\n");
return -1; return -1;
} }
if (strlen(home_dir) > (MAX_SOCK_FILE-100)) if (strlen(home_dir) > (MAX_SOCK_FILE-100))
{ {
fprintf(stderr, "Warning: Home directory path too long!\n"); fprintf(stderr, "[kcrash] Warning: Home directory path too long!\n");
return -1; return -1;
} }
kde_home++; kde_home++;
@ -473,7 +473,7 @@ static int openSocket()
strncat(sock_file, getenv("XAUTHLOCALHOSTNAME"), MAX_SOCK_FILE - strlen(sock_file) - 1); strncat(sock_file, getenv("XAUTHLOCALHOSTNAME"), MAX_SOCK_FILE - strlen(sock_file) - 1);
else if (gethostname(sock_file+strlen(sock_file), MAX_SOCK_FILE - strlen(sock_file) - 1) != 0) else if (gethostname(sock_file+strlen(sock_file), MAX_SOCK_FILE - strlen(sock_file) - 1) != 0)
{ {
perror("Warning: Could not determine hostname: "); perror("[kcrash] Warning: Could not determine hostname: ");
return -1; return -1;
} }
sock_file[sizeof(sock_file)-1] = '\0'; sock_file[sizeof(sock_file)-1] = '\0';
@ -482,13 +482,13 @@ static int openSocket()
display = getDisplay(); display = getDisplay();
if (display == NULL) if (display == NULL)
{ {
fprintf(stderr, "Error: Could not determine display.\n"); fprintf(stderr, "[kcrash] Error: Could not determine display.\n");
return -1; return -1;
} }
if (strlen(sock_file)+strlen(display)+strlen("/tdeinit_")+2 > MAX_SOCK_FILE) if (strlen(sock_file)+strlen(display)+strlen("/tdeinit_")+2 > MAX_SOCK_FILE)
{ {
fprintf(stderr, "Warning: Socket name will be too long.\n"); fprintf(stderr, "[kcrash] Warning: Socket name will be too long.\n");
free(display); free(display);
return -1; return -1;
} }
@ -498,7 +498,7 @@ static int openSocket()
if (strlen(sock_file) >= sizeof(server.sun_path)) if (strlen(sock_file) >= sizeof(server.sun_path))
{ {
fprintf(stderr, "Warning: Path of socketfile exceeds UNIX_PATH_MAX.\n"); fprintf(stderr, "[kcrash] Warning: Path of socketfile exceeds UNIX_PATH_MAX.\n");
return -1; return -1;
} }
@ -508,7 +508,7 @@ static int openSocket()
s = socket(PF_UNIX, SOCK_STREAM, 0); s = socket(PF_UNIX, SOCK_STREAM, 0);
if (s < 0) if (s < 0)
{ {
perror("Warning: socket() failed: "); perror("[kcrash] Warning: socket creation failed: ");
return -1; return -1;
} }
@ -517,7 +517,7 @@ static int openSocket()
socklen = sizeof(server); socklen = sizeof(server);
if(connect(s, (struct sockaddr *)&server, socklen) == -1) if(connect(s, (struct sockaddr *)&server, socklen) == -1)
{ {
perror("Warning: connect() failed: "); perror("[kcrash] Warning: socket connection failed: ");
close(s); close(s);
return -1; return -1;
} }

@ -629,7 +629,7 @@ NETRootInfo::NETRootInfo(Display *display, Window supportWindow, const char *wmN
p->desktop_layout_columns = p->desktop_layout_rows = 0; p->desktop_layout_columns = p->desktop_layout_rows = 0;
setDefaultProperties(); setDefaultProperties();
if( properties_size > PROPERTIES_SIZE ) { if( properties_size > PROPERTIES_SIZE ) {
fprintf( stderr, "NETRootInfo::NETRootInfo(): properties array too large\n"); fprintf( stderr, "[netwm] NETRootInfo::NETRootInfo(): properties array too large\n");
properties_size = PROPERTIES_SIZE; properties_size = PROPERTIES_SIZE;
} }
for( int i = 0; i < properties_size; ++i ) for( int i = 0; i < properties_size; ++i )
@ -730,7 +730,7 @@ NETRootInfo::NETRootInfo(Display *display, const unsigned long properties[], int
p->desktop_layout_columns = p->desktop_layout_rows = 0; p->desktop_layout_columns = p->desktop_layout_rows = 0;
setDefaultProperties(); setDefaultProperties();
if( properties_size > 2 ) { if( properties_size > 2 ) {
fprintf( stderr, "NETWinInfo::NETWinInfo(): properties array too large\n"); fprintf( stderr, "[netwm] NETWinInfo::NETWinInfo(): properties array too large\n");
properties_size = 2; properties_size = 2;
} }
for( int i = 0; i < properties_size; ++i ) for( int i = 0; i < properties_size; ++i )

@ -32,17 +32,17 @@ int main( int argc, char **argv )
aConfig.writeEntry( "akey1", "avalue1" ); aConfig.writeEntry( "akey1", "avalue1" );
aConfig.writeEntry( "akey2", "avalue2" ); aConfig.writeEntry( "akey2", "avalue2" );
fprintf( stderr, "entries written, sleeping for 10 seconds\n" ); fprintf( stderr, "[ksimpleconfigtest] entries written, sleeping for 10 seconds\n" );
aConfig.sync(); aConfig.sync();
sleep( 10 ); sleep( 10 );
aConfig.setGroup( "Test group" ); aConfig.setGroup( "Test group" );
aConfig.deleteEntry( "key2", false ); aConfig.deleteEntry( "key2", false );
fprintf( stderr, "Deleted on entry from Test group, sleeping\n" ); fprintf( stderr, "[ksimpleconfigtest] Deleted on entry from Test group, sleeping\n" );
aConfig.sync(); aConfig.sync();
sleep( 10 ); sleep( 10 );
aConfig.deleteGroup( "Another Test group", true ); aConfig.deleteGroup( "Another Test group", true );
fprintf( stderr, "Deleted Another Test group\n" ); fprintf( stderr, "[ksimpleconfigtest] Deleted Another Test group\n" );
} }

@ -1591,7 +1591,7 @@ static void yy_fatal_error( msg )
char msg[]; char msg[];
#endif #endif
{ {
(void) fprintf( stderr, "%s\n", msg ); (void) fprintf( stderr, "[fooscanner] %s\n", msg );
exit( YY_EXIT_FAILURE ); exit( YY_EXIT_FAILURE );
} }

@ -1790,7 +1790,7 @@ static void yy_fatal_error( msg )
char msg[]; char msg[];
#endif #endif
{ {
(void) fprintf( stderr, "%s\n", msg ); (void) fprintf( stderr, "[ppdscanner] %s\n", msg );
exit( YY_EXIT_FAILURE ); exit( YY_EXIT_FAILURE );
} }

Loading…
Cancel
Save