summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dcop/KDE-ICE/Xtrans.c92
-rw-r--r--dcop/KDE-ICE/Xtranssock.c160
-rw-r--r--dcop/client/dcopfind.cpp2
-rw-r--r--dcop/dcopidl/scanner.cc2
-rw-r--r--dcop/dcopidl2cpp/main.cpp4
-rw-r--r--dcop/dcopserver.cpp106
-rw-r--r--dcop/dcopserver_win.cpp6
-rw-r--r--kded/kbuildsycoca.cpp18
-rw-r--r--kded/kded.cpp2
-rw-r--r--khtml/test_regression.cpp2
-rw-r--r--kinit/kinit.cpp130
-rw-r--r--kinit/klauncher_main.cpp12
-rw-r--r--kinit/lnusertemp.c40
-rw-r--r--kinit/wrapper.c38
-rw-r--r--kio/kio/lex.c2
-rw-r--r--kjs/array_object.cpp2
-rw-r--r--kjs/collector.cpp4
-rw-r--r--kjs/internal.cpp12
-rw-r--r--kjs/math_object.cpp2
-rw-r--r--kjs/nodes.cpp4
-rw-r--r--kjs/object.cpp2
-rw-r--r--tdecore/kcrash.cpp30
-rw-r--r--tdecore/netwm.cpp4
-rw-r--r--tdecore/tests/ksimpleconfigtest.cpp6
-rw-r--r--tdeprint/fooscanner.cpp2
-rw-r--r--tdeprint/ppdscanner.cpp2
26 files changed, 345 insertions, 341 deletions
diff --git a/dcop/KDE-ICE/Xtrans.c b/dcop/KDE-ICE/Xtrans.c
index 371752919..b954d4b3b 100644
--- a/dcop/KDE-ICE/Xtrans.c
+++ b/dcop/KDE-ICE/Xtrans.c
@@ -144,7 +144,7 @@ void
TRANS(FreeConnInfo) (XtransConnInfo ciptr)
{
- PRMSG (3,"FreeConnInfo(%x)\n", ciptr, 0, 0);
+ PRMSG (3,"[Xtrans] FreeConnInfo(%x)\n", ciptr, 0, 0);
if (ciptr->addr)
xfree (ciptr->addr);
@@ -168,7 +168,7 @@ TRANS(SelectTransport) (char *protocol)
char protobuf[PROTOBUFSIZE];
int i;
- PRMSG (3,"SelectTransport(%s)\n", protocol, 0, 0);
+ PRMSG (3,"[Xtrans] SelectTransport(%s)\n", protocol, 0, 0);
/*
* Force Protocol to be lowercase as a way of doing
@@ -217,7 +217,7 @@ TRANS(ParseAddress) (char *address, char **protocol, char **host, char **port)
char *_protocol, *_host, *_port;
char hostnamebuf[256];
- PRMSG (3,"ParseAddress(%s)\n", address, 0, 0);
+ PRMSG (3,"[Xtrans] ParseAddress(%s)\n", address, 0, 0);
/* Copy the string so it can be changed */
@@ -383,12 +383,12 @@ TRANS(Open) (int type, char *address)
XtransConnInfo ciptr = NULL;
Xtransport *thistrans;
- PRMSG (2,"Open(%d,%s)\n", type, address, 0);
+ PRMSG (2,"[Xtrans] Open(%d,%s)\n", type, address, 0);
#if defined(_WIN32) && (defined(TCPCONN) || defined(DNETCONN))
if (TRANS(WSAStartup)())
{
- PRMSG (1,"Open: WSAStartup failed\n", 0, 0, 0);
+ PRMSG (1,"[Xtrans] Open: WSAStartup failed\n", 0, 0, 0);
return NULL;
}
#endif
@@ -397,7 +397,7 @@ TRANS(Open) (int type, char *address)
if (TRANS(ParseAddress) (address, &protocol, &host, &port) == 0)
{
- PRMSG (1,"Open: Unable to Parse address %s\n", address, 0, 0);
+ PRMSG (1,"[Xtrans] Open: Unable to Parse address %s\n", address, 0, 0);
return NULL;
}
@@ -405,7 +405,7 @@ TRANS(Open) (int type, char *address)
if ((thistrans = TRANS(SelectTransport) (protocol)) == NULL)
{
- PRMSG (1,"Open: Unable to find transport for %s\n",
+ PRMSG (1,"[Xtrans] Open: Unable to find transport for %s\n",
protocol, 0, 0);
xfree (protocol);
@@ -439,14 +439,14 @@ TRANS(Open) (int type, char *address)
#endif /* TRANS_SERVER */
break;
default:
- PRMSG (1,"Open: Unknown Open type %d\n", type, 0, 0);
+ PRMSG (1,"[Xtrans] Open: Unknown Open type %d\n", type, 0, 0);
}
if (ciptr == NULL)
{
if (!(thistrans->flags & TRANS_DISABLED))
{
- PRMSG (1,"Open: transport open failed for %s/%s:%s\n",
+ PRMSG (1,"[Xtrans] Open: transport open failed for %s/%s:%s\n",
protocol, host, port);
}
xfree (protocol);
@@ -482,7 +482,7 @@ TRANS(Reopen) (int type, int trans_id, int fd, char *port)
char *save_port;
int i;
- PRMSG (2,"Reopen(%d,%d,%s)\n", trans_id, fd, port);
+ PRMSG (2,"[Xtrans] Reopen(%d,%d,%s)\n", trans_id, fd, port);
/* Determine the transport type */
@@ -495,7 +495,7 @@ TRANS(Reopen) (int type, int trans_id, int fd, char *port)
if (thistrans == NULL)
{
- PRMSG (1,"Reopen: Unable to find transport id %d\n",
+ PRMSG (1,"[Xtrans] Reopen: Unable to find transport id %d\n",
trans_id, 0, 0);
return NULL;
@@ -503,7 +503,7 @@ TRANS(Reopen) (int type, int trans_id, int fd, char *port)
if ((save_port = (char *) xalloc (strlen (port) + 1)) == NULL)
{
- PRMSG (1,"Reopen: Unable to malloc port string\n", 0, 0, 0);
+ PRMSG (1,"[Xtrans] Reopen: Unable to malloc port string\n", 0, 0, 0);
return NULL;
}
@@ -521,12 +521,12 @@ TRANS(Reopen) (int type, int trans_id, int fd, char *port)
ciptr = thistrans->ReopenCLTSServer(thistrans, fd, port);
break;
default:
- PRMSG (1,"Reopen: Bad Open type %d\n", type, 0, 0);
+ PRMSG (1,"[Xtrans] Reopen: Bad Open type %d\n", type, 0, 0);
}
if (ciptr == NULL)
{
- PRMSG (1,"Reopen: transport open failed\n", 0, 0, 0);
+ PRMSG (1,"[Xtrans] Reopen: transport open failed\n", 0, 0, 0);
return NULL;
}
@@ -552,7 +552,7 @@ XtransConnInfo
TRANS(OpenCOTSClient) (char *address)
{
- PRMSG (2,"OpenCOTSClient(%s)\n", address, 0, 0);
+ PRMSG (2,"[Xtrans] OpenCOTSClient(%s)\n", address, 0, 0);
return TRANS(Open) (XTRANS_OPEN_COTS_CLIENT, address);
}
@@ -565,7 +565,7 @@ XtransConnInfo
TRANS(OpenCOTSServer) (char *address)
{
- PRMSG (2,"OpenCOTSServer(%s)\n", address, 0, 0);
+ PRMSG (2,"[Xtrans] OpenCOTSServer(%s)\n", address, 0, 0);
return TRANS(Open) (XTRANS_OPEN_COTS_SERVER, address);
}
@@ -578,7 +578,7 @@ XtransConnInfo
TRANS(OpenCLTSClient) (char *address)
{
- PRMSG (2,"OpenCLTSClient(%s)\n", address, 0, 0);
+ PRMSG (2,"[Xtrans] OpenCLTSClient(%s)\n", address, 0, 0);
return TRANS(Open) (XTRANS_OPEN_CLTS_CLIENT, address);
}
@@ -591,7 +591,7 @@ XtransConnInfo
TRANS(OpenCLTSServer) (char *address)
{
- PRMSG (2,"OpenCLTSServer(%s)\n", address, 0, 0);
+ PRMSG (2,"[Xtrans] OpenCLTSServer(%s)\n", address, 0, 0);
return TRANS(Open) (XTRANS_OPEN_CLTS_SERVER, address);
}
@@ -604,7 +604,7 @@ XtransConnInfo
TRANS(ReopenCOTSServer) (int trans_id, int fd, char *port)
{
- PRMSG (2,"ReopenCOTSServer(%d, %d, %s)\n", trans_id, fd, port);
+ PRMSG (2,"[Xtrans] ReopenCOTSServer(%d, %d, %s)\n", trans_id, fd, port);
return TRANS(Reopen) (XTRANS_OPEN_COTS_SERVER, trans_id, fd, port);
}
@@ -612,7 +612,7 @@ XtransConnInfo
TRANS(ReopenCLTSServer) (int trans_id, int fd, char *port)
{
- PRMSG (2,"ReopenCLTSServer(%d, %d, %s)\n", trans_id, fd, port);
+ PRMSG (2,"[Xtrans] ReopenCLTSServer(%d, %d, %s)\n", trans_id, fd, port);
return TRANS(Reopen) (XTRANS_OPEN_CLTS_SERVER, trans_id, fd, port);
}
@@ -652,7 +652,7 @@ TRANS(SetOption) (XtransConnInfo ciptr, int option, int arg)
int fd = ciptr->fd;
int ret = 0;
- PRMSG (2,"SetOption(%d,%d,%d)\n", fd, option, arg);
+ PRMSG (2,"[Xtrans] SetOption(%d,%d,%d)\n", fd, option, arg);
/*
* For now, all transport type use the same stuff for setting options.
@@ -750,7 +750,7 @@ TRANS(NoListen) (char * protocol)
if ((trans = TRANS(SelectTransport)(protocol)) == NULL)
{
- PRMSG (1,"TRANS(TransNoListen): unable to find transport: %s\n",
+ PRMSG (1,"[Xtrans] TRANS(TransNoListen): unable to find transport: %s\n",
protocol, 0, 0);
return -1;
@@ -777,7 +777,7 @@ TRANS(Accept) (XtransConnInfo ciptr, int *status)
{
XtransConnInfo newciptr;
- PRMSG (2,"Accept(%d)\n", ciptr->fd, 0, 0);
+ PRMSG (2,"[Xtrans] Accept(%d)\n", ciptr->fd, 0, 0);
newciptr = ciptr->transptr->Accept (ciptr, status);
@@ -801,18 +801,18 @@ TRANS(Connect) (XtransConnInfo ciptr, char *address)
char *port;
int ret;
- PRMSG (2,"Connect(%d,%s)\n", ciptr->fd, address, 0);
+ PRMSG (2,"[Xtrans] Connect(%d,%s)\n", ciptr->fd, address, 0);
if (TRANS(ParseAddress) (address, &protocol, &host, &port) == 0)
{
- PRMSG (1,"Connect: Unable to Parse address %s\n",
+ PRMSG (1,"[Xtrans] Connect: Unable to Parse address %s\n",
address, 0, 0);
return -1;
}
if (!port || !*port)
{
- PRMSG (1,"Connect: Missing port specification in %s\n",
+ PRMSG (1,"[Xtrans] Connect: Missing port specification in %s\n",
address, 0, 0);
if (protocol) xfree (protocol);
if (host) xfree (host);
@@ -879,7 +879,7 @@ TRANS(Close) (XtransConnInfo ciptr)
{
int ret;
- PRMSG (2,"Close(%d)\n", ciptr->fd, 0, 0);
+ PRMSG (2,"[Xtrans] Close(%d)\n", ciptr->fd, 0, 0);
ret = ciptr->transptr->Close (ciptr);
@@ -894,7 +894,7 @@ TRANS(CloseForCloning) (XtransConnInfo ciptr)
{
int ret;
- PRMSG (2,"CloseForCloning(%d)\n", ciptr->fd, 0, 0);
+ PRMSG (2,"[Xtrans] CloseForCloning(%d)\n", ciptr->fd, 0, 0);
ret = ciptr->transptr->CloseForCloning (ciptr);
@@ -916,14 +916,14 @@ TRANS(GetMyAddr) (XtransConnInfo ciptr, int *familyp, int *addrlenp,
Xtransaddr **addrp)
{
- PRMSG (2,"GetMyAddr(%d)\n", ciptr->fd, 0, 0);
+ PRMSG (2,"[Xtrans] GetMyAddr(%d)\n", ciptr->fd, 0, 0);
*familyp = ciptr->family;
*addrlenp = ciptr->addrlen;
if ((*addrp = (Xtransaddr *) xalloc (ciptr->addrlen)) == NULL)
{
- PRMSG (1,"GetMyAddr: malloc failed\n", 0, 0, 0);
+ PRMSG (1,"[Xtrans] GetMyAddr: malloc failed\n", 0, 0, 0);
return -1;
}
memcpy(*addrp, ciptr->addr, ciptr->addrlen);
@@ -936,14 +936,14 @@ TRANS(GetPeerAddr) (XtransConnInfo ciptr, int *familyp, int *addrlenp,
Xtransaddr **addrp)
{
- PRMSG (2,"GetPeerAddr(%d)\n", ciptr->fd, 0, 0);
+ PRMSG (2,"[Xtrans] GetPeerAddr(%d)\n", ciptr->fd, 0, 0);
*familyp = ciptr->family;
*addrlenp = ciptr->peeraddrlen;
if ((*addrp = (Xtransaddr *) xalloc (ciptr->peeraddrlen)) == NULL)
{
- PRMSG (1,"GetPeerAddr: malloc failed\n", 0, 0, 0);
+ PRMSG (1,"[Xtrans] GetPeerAddr: malloc failed\n", 0, 0, 0);
return -1;
}
memcpy(*addrp, ciptr->peeraddr, ciptr->peeraddrlen);
@@ -1006,7 +1006,7 @@ TRANS(MakeAllCOTSServerListeners) (char *port, int *partial, int *count_ret,
XtransConnInfo ciptr, temp_ciptrs[NUMTRANS];
int status, i, j;
- PRMSG (2,"MakeAllCOTSServerListeners(%s,%x)\n",
+ PRMSG (2,"[Xtrans] MakeAllCOTSServerListeners(%s,%x)\n",
port ? port : "NULL", ciptrs_ret, 0);
*count_ret = 0;
@@ -1020,7 +1020,7 @@ TRANS(MakeAllCOTSServerListeners) (char *port, int *partial, int *count_ret,
snprintf(buffer, sizeof(buffer), "%s/:%s", trans->TransName, port ? port : "");
- PRMSG (5,"MakeAllCOTSServerListeners: opening %s\n",
+ PRMSG (5,"[Xtrans] MakeAllCOTSServerListeners: opening %s\n",
buffer, 0, 0);
if ((ciptr = TRANS(OpenCOTSServer(buffer))) == NULL)
@@ -1029,7 +1029,7 @@ TRANS(MakeAllCOTSServerListeners) (char *port, int *partial, int *count_ret,
continue;
PRMSG (1,
- "MakeAllCOTSServerListeners: failed to open listener for %s\n",
+ "[Xtrans] MakeAllCOTSServerListeners: failed to open listener for %s\n",
trans->TransName, 0, 0);
continue;
}
@@ -1045,7 +1045,7 @@ TRANS(MakeAllCOTSServerListeners) (char *port, int *partial, int *count_ret,
*/
PRMSG (1,
- "MakeAllCOTSServerListeners: server already running\n",
+ "[Xtrans] MakeAllCOTSServerListeners: server already running\n",
0, 0, 0);
for (j = 0; j < *count_ret; j++)
@@ -1059,7 +1059,7 @@ TRANS(MakeAllCOTSServerListeners) (char *port, int *partial, int *count_ret,
else
{
PRMSG (1,
- "MakeAllCOTSServerListeners: failed to create listener for %s\n",
+ "[Xtrans] MakeAllCOTSServerListeners: failed to create listener for %s\n",
trans->TransName, 0, 0);
continue;
@@ -1067,7 +1067,7 @@ TRANS(MakeAllCOTSServerListeners) (char *port, int *partial, int *count_ret,
}
PRMSG (5,
- "MakeAllCOTSServerListeners: opened listener for %s, %d\n",
+ "[Xtrans] MakeAllCOTSServerListeners: opened listener for %s, %d\n",
trans->TransName, ciptr->fd, 0);
temp_ciptrs[*count_ret] = ciptr;
@@ -1077,7 +1077,7 @@ TRANS(MakeAllCOTSServerListeners) (char *port, int *partial, int *count_ret,
*partial = (*count_ret < complete_network_count());
PRMSG (5,
- "MakeAllCLTSServerListeners: partial=%d, actual=%d, complete=%d \n",
+ "[Xtrans] MakeAllCLTSServerListeners: partial=%d, actual=%d, complete=%d \n",
*partial, *count_ret, complete_network_count());
if (*count_ret > 0)
@@ -1108,7 +1108,7 @@ TRANS(MakeAllCLTSServerListeners) (char *port, int *partial, int *count_ret,
XtransConnInfo ciptr, temp_ciptrs[NUMTRANS];
int status, i, j;
- PRMSG (2,"MakeAllCLTSServerListeners(%s,%x)\n",
+ PRMSG (2,"[Xtrans] MakeAllCLTSServerListeners(%s,%x)\n",
port ? port : "NULL", ciptrs_ret, 0);
*count_ret = 0;
@@ -1122,13 +1122,13 @@ TRANS(MakeAllCLTSServerListeners) (char *port, int *partial, int *count_ret,
snprintf(buffer, sizeof(buffer), "%s/:%s", trans->TransName, port ? port : "");
- PRMSG (5,"MakeAllCLTSServerListeners: opening %s\n",
+ PRMSG (5,"[Xtrans] MakeAllCLTSServerListeners: opening %s\n",
buffer, 0, 0);
if ((ciptr = TRANS(OpenCLTSServer (buffer))) == NULL)
{
PRMSG (1,
- "MakeAllCLTSServerListeners: failed to open listener for %s\n",
+ "[Xtrans] MakeAllCLTSServerListeners: failed to open listener for %s\n",
trans->TransName, 0, 0);
continue;
}
@@ -1144,7 +1144,7 @@ TRANS(MakeAllCLTSServerListeners) (char *port, int *partial, int *count_ret,
*/
PRMSG (1,
- "MakeAllCLTSServerListeners: server already running\n",
+ "[Xtrans] MakeAllCLTSServerListeners: server already running\n",
0, 0, 0);
for (j = 0; j < *count_ret; j++)
@@ -1158,7 +1158,7 @@ TRANS(MakeAllCLTSServerListeners) (char *port, int *partial, int *count_ret,
else
{
PRMSG (1,
- "MakeAllCLTSServerListeners: failed to create listener for %s\n",
+ "[Xtrans] MakeAllCLTSServerListeners: failed to create listener for %s\n",
trans->TransName, 0, 0);
continue;
@@ -1166,7 +1166,7 @@ TRANS(MakeAllCLTSServerListeners) (char *port, int *partial, int *count_ret,
}
PRMSG (5,
- "MakeAllCLTSServerListeners: opened listener for %s, %d\n",
+ "[Xtrans] MakeAllCLTSServerListeners: opened listener for %s, %d\n",
trans->TransName, ciptr->fd, 0);
temp_ciptrs[*count_ret] = ciptr;
(*count_ret)++;
@@ -1175,7 +1175,7 @@ TRANS(MakeAllCLTSServerListeners) (char *port, int *partial, int *count_ret,
*partial = (*count_ret < complete_network_count());
PRMSG (5,
- "MakeAllCLTSServerListeners: partial=%d, actual=%d, complete=%d \n",
+ "[Xtrans] MakeAllCLTSServerListeners: partial=%d, actual=%d, complete=%d \n",
*partial, *count_ret, complete_network_count());
if (*count_ret > 0)
diff --git a/dcop/KDE-ICE/Xtranssock.c b/dcop/KDE-ICE/Xtranssock.c
index 7b14ca9ab..bb6d122bc 100644
--- a/dcop/KDE-ICE/Xtranssock.c
+++ b/dcop/KDE-ICE/Xtranssock.c
@@ -279,7 +279,7 @@ TRANS(SocketSelectFamily) (char *family)
{
int i;
- PRMSG (3,(const char*)"SocketSelectFamily(%s)\n", family, 0, 0);
+ PRMSG (3,(const char*)"[Xtranssock] SocketSelectFamily(%s)\n", family, 0, 0);
for (i = 0; i < (int) NUMSOCKETFAMILIES;i++)
{
@@ -307,11 +307,11 @@ TRANS(SocketINETGetAddr) (XtransConnInfo ciptr)
int namelen = sizeof sockname;
#endif
- PRMSG (3,"SocketINETGetAddr(%x)\n", ciptr, 0, 0);
+ PRMSG (3,"[Xtranssock] SocketINETGetAddr(%x)\n", ciptr, 0, 0);
if (getsockname (ciptr->fd,(struct sockaddr *) &sockname, &namelen) < 0)
{
- PRMSG (1,"SocketINETGetAddr: getsockname() failed: %d\n",
+ PRMSG (1,"[Xtranssock] SocketINETGetAddr: getsockname() failed: %d\n",
EGET(),0, 0);
return -1;
}
@@ -323,7 +323,7 @@ TRANS(SocketINETGetAddr) (XtransConnInfo ciptr)
if ((ciptr->addr = (char *) xalloc (namelen)) == NULL)
{
PRMSG (1,
- "SocketINETGetAddr: Can't allocate space for the addr\n",
+ "[Xtranssock] SocketINETGetAddr: Can't allocate space for the addr\n",
0, 0, 0);
return -1;
}
@@ -352,11 +352,11 @@ TRANS(SocketINETGetPeerAddr) (XtransConnInfo ciptr)
int namelen = sizeof sockname;
#endif
- PRMSG (3,"SocketINETGetPeerAddr(%x)\n", ciptr, 0, 0);
+ PRMSG (3,"[Xtranssock] SocketINETGetPeerAddr(%x)\n", ciptr, 0, 0);
if (getpeername (ciptr->fd, (struct sockaddr *) &sockname, &namelen) < 0)
{
- PRMSG (1,"SocketINETGetPeerAddr: getpeername() failed: %d\n",
+ PRMSG (1,"[Xtranssock] SocketINETGetPeerAddr: getpeername() failed: %d\n",
EGET(), 0, 0);
return -1;
}
@@ -368,7 +368,7 @@ TRANS(SocketINETGetPeerAddr) (XtransConnInfo ciptr)
if ((ciptr->peeraddr = (char *) xalloc (namelen)) == NULL)
{
PRMSG (1,
- "SocketINETGetPeerAddr: Can't allocate space for the addr\n",
+ "[Xtranssock] SocketINETGetPeerAddr: Can't allocate space for the addr\n",
0, 0, 0);
return -1;
}
@@ -386,19 +386,19 @@ TRANS(SocketOpen) (int i, int type)
{
XtransConnInfo ciptr;
- PRMSG (3,"SocketOpen(%d,%d)\n", i, type, 0);
+ PRMSG (3,"[Xtranssock] SocketOpen(%d,%d)\n", i, type, 0);
if ((ciptr = (XtransConnInfo) xcalloc (
1, sizeof(struct _XtransConnInfo))) == NULL)
{
- PRMSG (1, "SocketOpen: malloc failed\n", 0, 0, 0);
+ PRMSG (1, "[Xtranssock] SocketOpen: malloc failed\n", 0, 0, 0);
return NULL;
}
if ((ciptr->fd = socket(Sockettrans2devtab[i].family, type,
Sockettrans2devtab[i].protocol)) < 0
) {
- PRMSG (1, "SocketOpen: socket() failed for %s\n",
+ PRMSG (1, "[Xtranssock] SocketOpen: socket() failed for %s\n",
Sockettrans2devtab[i].transname, 0, 0);
xfree ((char *) ciptr);
@@ -430,12 +430,12 @@ TRANS(SocketReopen) (int i, int type, int fd, char *port)
{
XtransConnInfo ciptr;
- PRMSG (3,"SocketReopen(%d,%d,%s)\n", type, fd, port);
+ PRMSG (3,"[Xtranssock] SocketReopen(%d,%d,%s)\n", type, fd, port);
if ((ciptr = (XtransConnInfo) xcalloc (
1, sizeof(struct _XtransConnInfo))) == NULL)
{
- PRMSG (1, "SocketReopen: malloc failed\n", 0, 0, 0);
+ PRMSG (1, "[Xtranssock] SocketReopen: malloc failed\n", 0, 0, 0);
return NULL;
}
@@ -461,7 +461,7 @@ TRANS(SocketOpenCOTSClient) (Xtransport *thistrans, char *protocol,
XtransConnInfo ciptr;
int i;
- PRMSG (2, "SocketOpenCOTSClient(%s,%s,%s)\n",
+ PRMSG (2, "[Xtranssock] SocketOpenCOTSClient(%s,%s,%s)\n",
protocol, host, port);
SocketInitOnce();
@@ -469,7 +469,7 @@ TRANS(SocketOpenCOTSClient) (Xtransport *thistrans, char *protocol,
if ((i = TRANS(SocketSelectFamily) (thistrans->TransName)) < 0)
{
PRMSG (1,
- "SocketOpenCOTSClient: Unable to determine socket type for %s\n",
+ "[Xtranssock] SocketOpenCOTSClient: Unable to determine socket type for %s\n",
thistrans->TransName, 0, 0);
return NULL;
}
@@ -477,7 +477,7 @@ TRANS(SocketOpenCOTSClient) (Xtransport *thistrans, char *protocol,
if ((ciptr = TRANS(SocketOpen) (
i, Sockettrans2devtab[i].devcotsname)) == NULL)
{
- PRMSG (1,"SocketOpenCOTSClient: Unable to open socket for %s\n",
+ PRMSG (1,"[Xtranssock] SocketOpenCOTSClient: Unable to open socket for %s\n",
thistrans->TransName, 0, 0);
return NULL;
}
@@ -502,14 +502,14 @@ TRANS(SocketOpenCOTSServer) (Xtransport *thistrans, char *protocol,
XtransConnInfo ciptr;
int i;
- PRMSG (2,"SocketOpenCOTSServer(%s,%s,%s)\n", protocol, host, port);
+ PRMSG (2,"[Xtranssock] SocketOpenCOTSServer(%s,%s,%s)\n", protocol, host, port);
SocketInitOnce();
if ((i = TRANS(SocketSelectFamily) (thistrans->TransName)) < 0)
{
PRMSG (1,
- "SocketOpenCOTSServer: Unable to determine socket type for %s\n",
+ "[Xtranssock] SocketOpenCOTSServer: Unable to determine socket type for %s\n",
thistrans->TransName, 0, 0);
return NULL;
}
@@ -517,7 +517,7 @@ TRANS(SocketOpenCOTSServer) (Xtransport *thistrans, char *protocol,
if ((ciptr = TRANS(SocketOpen) (
i, Sockettrans2devtab[i].devcotsname)) == NULL)
{
- PRMSG (1,"SocketOpenCOTSServer: Unable to open socket for %s\n",
+ PRMSG (1,"[Xtranssock] SocketOpenCOTSServer: Unable to open socket for %s\n",
thistrans->TransName, 0, 0);
return NULL;
}
@@ -560,14 +560,14 @@ TRANS(SocketOpenCLTSClient) (Xtransport *thistrans, char *protocol,
XtransConnInfo ciptr;
int i;
- PRMSG (2,"SocketOpenCLTSClient(%s,%s,%s)\n", protocol, host, port);
+ PRMSG (2,"[Xtranssock] SocketOpenCLTSClient(%s,%s,%s)\n", protocol, host, port);
SocketInitOnce();
if ((i = TRANS(SocketSelectFamily) (thistrans->TransName)) < 0)
{
PRMSG (1,
- "SocketOpenCLTSClient: Unable to determine socket type for %s\n",
+ "[Xtranssock] SocketOpenCLTSClient: Unable to determine socket type for %s\n",
thistrans->TransName, 0, 0);
return NULL;
}
@@ -575,7 +575,7 @@ TRANS(SocketOpenCLTSClient) (Xtransport *thistrans, char *protocol,
if ((ciptr = TRANS(SocketOpen) (
i, Sockettrans2devtab[i].devcotsname)) == NULL)
{
- PRMSG (1,"SocketOpenCLTSClient: Unable to open socket for %s\n",
+ PRMSG (1,"[Xtranssock] SocketOpenCLTSClient: Unable to open socket for %s\n",
thistrans->TransName, 0, 0);
return NULL;
}
@@ -600,14 +600,14 @@ TRANS(SocketOpenCLTSServer) (Xtransport *thistrans, char *protocol,
XtransConnInfo ciptr;
int i;
- PRMSG (2,"SocketOpenCLTSServer(%s,%s,%s)\n", protocol, host, port);
+ PRMSG (2,"[Xtranssock] SocketOpenCLTSServer(%s,%s,%s)\n", protocol, host, port);
SocketInitOnce();
if ((i = TRANS(SocketSelectFamily) (thistrans->TransName)) < 0)
{
PRMSG (1,
- "SocketOpenCLTSServer: Unable to determine socket type for %s\n",
+ "[Xtranssock] SocketOpenCLTSServer: Unable to determine socket type for %s\n",
thistrans->TransName, 0, 0);
return NULL;
}
@@ -615,7 +615,7 @@ TRANS(SocketOpenCLTSServer) (Xtransport *thistrans, char *protocol,
if ((ciptr = TRANS(SocketOpen) (
i, Sockettrans2devtab[i].devcotsname)) == NULL)
{
- PRMSG (1,"SocketOpenCLTSServer: Unable to open socket for %s\n",
+ PRMSG (1,"[Xtranssock] SocketOpenCLTSServer: Unable to open socket for %s\n",
thistrans->TransName, 0, 0);
return NULL;
}
@@ -640,14 +640,14 @@ TRANS(SocketReopenCOTSServer) (Xtransport *thistrans, int fd, char *port)
int i;
PRMSG (2,
- "SocketReopenCOTSServer(%d, %s)\n", fd, port, 0);
+ "[Xtranssock] SocketReopenCOTSServer(%d, %s)\n", fd, port, 0);
SocketInitOnce();
if ((i = TRANS(SocketSelectFamily) (thistrans->TransName)) < 0)
{
PRMSG (1,
- "SocketReopenCOTSServer: Unable to determine socket type for %s\n",
+ "[Xtranssock] SocketReopenCOTSServer: Unable to determine socket type for %s\n",
thistrans->TransName, 0, 0);
return NULL;
}
@@ -656,7 +656,7 @@ TRANS(SocketReopenCOTSServer) (Xtransport *thistrans, int fd, char *port)
i, Sockettrans2devtab[i].devcotsname, fd, port)) == NULL)
{
PRMSG (1,
- "SocketReopenCOTSServer: Unable to reopen socket for %s\n",
+ "[Xtranssock] SocketReopenCOTSServer: Unable to reopen socket for %s\n",
thistrans->TransName, 0, 0);
return NULL;
}
@@ -676,14 +676,14 @@ TRANS(SocketReopenCLTSServer) (Xtransport *thistrans, int fd, char *port)
int i;
PRMSG (2,
- "SocketReopenCLTSServer(%d, %s)\n", fd, port, 0);
+ "[Xtranssock] SocketReopenCLTSServer(%d, %s)\n", fd, port, 0);
SocketInitOnce();
if ((i = TRANS(SocketSelectFamily) (thistrans->TransName)) < 0)
{
PRMSG (1,
- "SocketReopenCLTSServer: Unable to determine socket type for %s\n",
+ "[Xtranssock] SocketReopenCLTSServer: Unable to determine socket type for %s\n",
thistrans->TransName, 0, 0);
return NULL;
}
@@ -692,7 +692,7 @@ TRANS(SocketReopenCLTSServer) (Xtransport *thistrans, int fd, char *port)
i, Sockettrans2devtab[i].devcotsname, fd, port)) == NULL)
{
PRMSG (1,
- "SocketReopenCLTSServer: Unable to reopen socket for %s\n",
+ "[Xtranssock] SocketReopenCLTSServer: Unable to reopen socket for %s\n",
thistrans->TransName, 0, 0);
return NULL;
}
@@ -711,7 +711,7 @@ static int
TRANS(SocketSetOption) (XtransConnInfo ciptr, int option, int arg)
{
- PRMSG (2,"SocketSetOption(%d,%d,%d)\n", ciptr->fd, option, arg);
+ PRMSG (2,"[Xtranssock] SocketSetOption(%d,%d,%d)\n", ciptr->fd, option, arg);
return -1;
}
@@ -750,7 +750,7 @@ TRANS(SocketCreateListener) (XtransConnInfo ciptr,
int fd = ciptr->fd;
int retry;
- PRMSG (3, "SocketCreateListener(%x,%d)\n", ciptr, fd, 0);
+ PRMSG (3, "[Xtranssock] SocketCreateListener(%x,%d)\n", ciptr, fd, 0);
if (Sockettrans2devtab[ciptr->index].family == AF_INET)
retry = 20;
@@ -763,7 +763,7 @@ TRANS(SocketCreateListener) (XtransConnInfo ciptr,
return TRANS_ADDR_IN_USE;
if (retry-- == 0) {
- PRMSG (1, "SocketCreateListener: failed to bind listener\n",
+ PRMSG (1, "[Xtranssock] SocketCreateListener: failed to bind listener\n",
0, 0, 0);
close (fd);
return TRANS_CREATE_LISTENER_FAILED;
@@ -791,7 +791,7 @@ TRANS(SocketCreateListener) (XtransConnInfo ciptr,
if (listen (fd, BACKLOG) < 0)
{
- PRMSG (1, "SocketCreateListener: listen() failed\n", 0, 0, 0);
+ PRMSG (1, "[Xtranssock] SocketCreateListener: listen() failed\n", 0, 0, 0);
close (fd);
return TRANS_CREATE_LISTENER_FAILED;
}
@@ -818,7 +818,7 @@ TRANS(SocketINETCreateListener) (XtransConnInfo ciptr, char *port)
char portbuf[PORTBUFSIZE];
#endif
- PRMSG (2, "SocketINETCreateListener(%s)\n", port, 0, 0);
+ PRMSG (2, "[Xtranssock] SocketINETCreateListener(%s)\n", port, 0, 0);
#ifdef X11_t
/*
@@ -848,7 +848,7 @@ TRANS(SocketINETCreateListener) (XtransConnInfo ciptr, char *port)
if ((servp = getservbyname (port,"tcp")) == NULL)
{
PRMSG (1,
- "SocketINETCreateListener: Unable to get service for %s\n",
+ "[Xtranssock] SocketINETCreateListener: Unable to get service for %s\n",
port, 0, 0);
return TRANS_CREATE_LISTENER_FAILED;
}
@@ -883,7 +883,7 @@ TRANS(SocketINETCreateListener) (XtransConnInfo ciptr, char *port)
(struct sockaddr *) &sockname, namelen)) < 0)
{
PRMSG (1,
- "SocketINETCreateListener: ...SocketCreateListener() failed\n",
+ "[Xtranssock] SocketINETCreateListener: ...SocketCreateListener() failed\n",
0, 0, 0);
return status;
}
@@ -891,7 +891,7 @@ TRANS(SocketINETCreateListener) (XtransConnInfo ciptr, char *port)
if (TRANS(SocketINETGetAddr) (ciptr) < 0)
{
PRMSG (1,
- "SocketINETCreateListener: ...SocketINETGetAddr() failed\n",
+ "[Xtranssock] SocketINETCreateListener: ...SocketINETGetAddr() failed\n",
0, 0, 0);
return TRANS_CREATE_LISTENER_FAILED;
}
@@ -914,7 +914,7 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port)
int status;
unsigned int mode;
- PRMSG (2, "SocketUNIXCreateListener(%s)\n",
+ PRMSG (2, "[Xtranssock] SocketUNIXCreateListener(%s)\n",
port ? port : "NULL", 0, 0);
/* Make sure the directory is created */
@@ -928,7 +928,7 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port)
mode = 0777;
#endif
if (trans_mkdir((char*)UNIX_DIR, mode) == -1) {
- PRMSG (1, "SocketUNIXCreateListener: mkdir(%s) failed, errno = %d\n",
+ PRMSG (1, "[Xtranssock] SocketUNIXCreateListener: mkdir(%s) failed, errno = %d\n",
UNIX_DIR, errno, 0);
(void) umask (oldUmask);
return TRANS_CREATE_LISTENER_FAILED;
@@ -939,7 +939,7 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port)
if (port && *port) {
if (set_sun_path(port, UNIX_PATH, sockname.sun_path) != 0) {
- PRMSG (1, "SocketUNIXCreateListener: path too long\n", 0, 0, 0);
+ PRMSG (1, "[Xtranssock] SocketUNIXCreateListener: path too long\n", 0, 0, 0);
return TRANS_CREATE_LISTENER_FAILED;
}
} else {
@@ -958,7 +958,7 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port)
(struct sockaddr *) &sockname, namelen)) < 0)
{
PRMSG (1,
- "SocketUNIXCreateListener: ...SocketCreateListener() failed\n",
+ "[Xtranssock] SocketUNIXCreateListener: ...SocketCreateListener() failed\n",
0, 0, 0);
return status;
}
@@ -975,7 +975,7 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port)
if ((ciptr->addr = (char *) xalloc (namelen)) == NULL)
{
PRMSG (1,
- "SocketUNIXCreateListener: Can't allocate space for the addr\n",
+ "[Xtranssock] SocketUNIXCreateListener: Can't allocate space for the addr\n",
0, 0, 0);
return TRANS_CREATE_LISTENER_FAILED;
}
@@ -1001,7 +1001,7 @@ TRANS(SocketUNIXResetListener) (XtransConnInfo ciptr)
int status = TRANS_RESET_NOOP;
unsigned int mode;
- PRMSG (3, "SocketUNIXResetListener(%x,%d)\n", ciptr, ciptr->fd, 0);
+ PRMSG (3, "[Xtranssock] SocketUNIXResetListener(%x,%d)\n", ciptr, ciptr->fd, 0);
if (stat (unsock->sun_path, &statb) == -1 ||
((statb.st_mode & S_IFMT) !=
@@ -1020,7 +1020,7 @@ TRANS(SocketUNIXResetListener) (XtransConnInfo ciptr)
mode = 0777;
#endif
if (trans_mkdir((char*)UNIX_DIR, mode) == -1) {
- PRMSG (1, "SocketUNIXResetListener: mkdir(%s) failed, errno = %d\n",
+ PRMSG (1, "[Xtranssock] SocketUNIXResetListener: mkdir(%s) failed, errno = %d\n",
UNIX_DIR, errno, 0);
(void) umask (oldUmask);
return TRANS_RESET_FAILURE;
@@ -1077,12 +1077,12 @@ TRANS(SocketINETAccept) (XtransConnInfo ciptr, int *status)
int namelen = sizeof(sockname);
#endif
- PRMSG (2, "SocketINETAccept(%p,%d)\n", ciptr, ciptr->fd, 0);
+ PRMSG (2, "[Xtranssock] SocketINETAccept(%p,%d)\n", ciptr, ciptr->fd, 0);
if ((newciptr = (XtransConnInfo) xcalloc (
1, sizeof(struct _XtransConnInfo))) == NULL)
{
- PRMSG (1, "SocketINETAccept: malloc failed\n", 0, 0, 0);
+ PRMSG (1, "[Xtranssock] SocketINETAccept: malloc failed\n", 0, 0, 0);
*status = TRANS_ACCEPT_BAD_MALLOC;
return NULL;
}
@@ -1090,7 +1090,7 @@ TRANS(SocketINETAccept) (XtransConnInfo ciptr, int *status)
if ((newciptr->fd = accept (ciptr->fd,
(struct sockaddr *) &sockname, &namelen)) < 0)
{
- PRMSG (1, "SocketINETAccept: accept() failed\n", 0, 0, 0);
+ PRMSG (1, "[Xtranssock] SocketINETAccept: accept() failed\n", 0, 0, 0);
xfree (newciptr);
*status = TRANS_ACCEPT_FAILED;
return NULL;
@@ -1116,7 +1116,7 @@ TRANS(SocketINETAccept) (XtransConnInfo ciptr, int *status)
if (TRANS(SocketINETGetAddr) (newciptr) < 0)
{
PRMSG (1,
- "SocketINETAccept: ...SocketINETGetAddr() failed:\n",
+ "[Xtranssock] SocketINETAccept: ...SocketINETGetAddr() failed:\n",
0, 0, 0);
close (newciptr->fd);
xfree (newciptr);
@@ -1127,7 +1127,7 @@ TRANS(SocketINETAccept) (XtransConnInfo ciptr, int *status)
if (TRANS(SocketINETGetPeerAddr) (newciptr) < 0)
{
PRMSG (1,
- "SocketINETAccept: ...SocketINETGetPeerAddr() failed:\n",
+ "[Xtranssock] SocketINETAccept: ...SocketINETGetPeerAddr() failed:\n",
0, 0, 0);
close (newciptr->fd);
if (newciptr->addr) xfree (newciptr->addr);
@@ -1157,12 +1157,12 @@ TRANS(SocketUNIXAccept) (XtransConnInfo ciptr, int *status)
int namelen = sizeof sockname;
#endif
- PRMSG (2, "SocketUNIXAccept(%p,%d)\n", ciptr, ciptr->fd, 0);
+ PRMSG (2, "[Xtranssock] SocketUNIXAccept(%p,%d)\n", ciptr, ciptr->fd, 0);
if ((newciptr = (XtransConnInfo) xcalloc (
1, sizeof(struct _XtransConnInfo))) == NULL)
{
- PRMSG (1, "SocketUNIXAccept: malloc() failed\n", 0, 0, 0);
+ PRMSG (1, "[Xtranssock] SocketUNIXAccept: malloc() failed\n", 0, 0, 0);
*status = TRANS_ACCEPT_BAD_MALLOC;
return NULL;
}
@@ -1170,7 +1170,7 @@ TRANS(SocketUNIXAccept) (XtransConnInfo ciptr, int *status)
if ((newciptr->fd = accept (ciptr->fd,
(struct sockaddr *) &sockname, &namelen)) < 0)
{
- PRMSG (1, "SocketUNIXAccept: accept() failed\n", 0, 0, 0);
+ PRMSG (1, "[Xtranssock] SocketUNIXAccept: accept() failed\n", 0, 0, 0);
xfree (newciptr);
*status = TRANS_ACCEPT_FAILED;
return NULL;
@@ -1184,7 +1184,7 @@ TRANS(SocketUNIXAccept) (XtransConnInfo ciptr, int *status)
if ((newciptr->addr = (char *) xalloc (ciptr->addrlen)) == NULL)
{
PRMSG (1,
- "SocketUNIXAccept: Can't allocate space for the addr\n",
+ "[Xtranssock] SocketUNIXAccept: Can't allocate space for the addr\n",
0, 0, 0);
close (newciptr->fd);
xfree (newciptr);
@@ -1199,7 +1199,7 @@ TRANS(SocketUNIXAccept) (XtransConnInfo ciptr, int *status)
if ((newciptr->peeraddr = (char *) xalloc (ciptr->addrlen)) == NULL)
{
PRMSG (1,
- "SocketUNIXAccept: Can't allocate space for the addr\n",
+ "[Xtranssock] SocketUNIXAccept: Can't allocate space for the addr\n",
0, 0, 0);
close (newciptr->fd);
if (newciptr->addr) xfree (newciptr->addr);
@@ -1247,7 +1247,7 @@ TRANS(SocketINETConnect) (XtransConnInfo ciptr, char *host, char *port)
unsigned long tmpaddr;
char hostnamebuf[256]; /* tmp space */
- PRMSG (2,"SocketINETConnect(%d,%s,%s)\n", ciptr->fd, host, port);
+ PRMSG (2,"[Xtranssock] SocketINETConnect(%d,%s,%s)\n", ciptr->fd, host, port);
if (!host)
{
@@ -1295,7 +1295,7 @@ TRANS(SocketINETConnect) (XtransConnInfo ciptr, char *host, char *port)
tmpaddr = -1;
}
- PRMSG (4,"SocketINETConnect: inet_addr(%s) = %x\n",
+ PRMSG (4,"[Xtranssock] SocketINETConnect: inet_addr(%s) = %x\n",
host, tmpaddr, 0);
if (tmpaddr == -1)
@@ -1306,14 +1306,14 @@ TRANS(SocketINETConnect) (XtransConnInfo ciptr, char *host, char *port)
if ((hostp = gethostbyname(host,hparams)) == NULL)
#endif
{
- PRMSG (1,"SocketINETConnect: Can't get address for %s\n",
+ PRMSG (1,"[Xtranssock] SocketINETConnect: Can't get address for %s\n",
host, 0, 0);
ESET(EINVAL);
return TRANS_CONNECT_FAILED;
}
if (hostp->h_addrtype != AF_INET) /* is IP host? */
{
- PRMSG (1,"SocketINETConnect: not INET host%s\n",
+ PRMSG (1,"[Xtranssock] SocketINETConnect: not INET host%s\n",
host, 0, 0);
ESET(EPROTOTYPE);
return TRANS_CONNECT_FAILED;
@@ -1352,7 +1352,7 @@ else
{
if ((servp = getservbyname (port,"tcp")) == NULL)
{
- PRMSG (1,"SocketINETConnect: can't get service for %s\n",
+ PRMSG (1,"[Xtranssock] SocketINETConnect: can't get service for %s\n",
port, 0, 0);
return TRANS_CONNECT_FAILED;
}
@@ -1366,7 +1366,7 @@ else
sockname.sin_port = htons (((unsigned short) tmpport));
}
- PRMSG (4,"SocketINETConnect: sockname.sin_port = %d\n",
+ PRMSG (4,"[Xtranssock] SocketINETConnect: sockname.sin_port = %d\n",
ntohs(sockname.sin_port), 0, 0);
/*
@@ -1398,7 +1398,7 @@ else
return TRANS_IN_PROGRESS;
else
{
- PRMSG (2,"SocketINETConnect: Can't connect: errno = %d\n",
+ PRMSG (2,"[Xtranssock] SocketINETConnect: Can't connect: errno = %d\n",
olderrno,0, 0);
return TRANS_CONNECT_FAILED;
@@ -1413,7 +1413,7 @@ else
if (TRANS(SocketINETGetAddr) (ciptr) < 0)
{
PRMSG (1,
- "SocketINETConnect: ...SocketINETGetAddr() failed:\n",
+ "[Xtranssock] SocketINETConnect: ...SocketINETGetAddr() failed:\n",
0, 0, 0);
return TRANS_CONNECT_FAILED;
}
@@ -1421,7 +1421,7 @@ else
if (TRANS(SocketINETGetPeerAddr) (ciptr) < 0)
{
PRMSG (1,
- "SocketINETConnect: ...SocketINETGetPeerAddr() failed:\n",
+ "[Xtranssock] SocketINETConnect: ...SocketINETGetPeerAddr() failed:\n",
0, 0, 0);
return TRANS_CONNECT_FAILED;
}
@@ -1540,7 +1540,7 @@ TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port)
#endif
- PRMSG (2,"SocketUNIXConnect(%d,%s,%s)\n", ciptr->fd, host, port);
+ PRMSG (2,"[Xtranssock] SocketUNIXConnect(%d,%s,%s)\n", ciptr->fd, host, port);
/*
* Make sure 'host' is really local. If not, we return failure.
@@ -1553,7 +1553,7 @@ TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port)
if (strcmp (host, "unix") != 0 && !UnixHostReallyLocal (host))
{
PRMSG (1,
- "SocketUNIXConnect: Cannot connect to non-local host %s\n",
+ "[Xtranssock] SocketUNIXConnect: Cannot connect to non-local host %s\n",
host, 0, 0);
return TRANS_CONNECT_FAILED;
}
@@ -1565,7 +1565,7 @@ TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port)
if (!port || !*port)
{
- PRMSG (1,"SocketUNIXConnect: Missing port specification\n",
+ PRMSG (1,"[Xtranssock] SocketUNIXConnect: Missing port specification\n",
0, 0, 0);
return TRANS_CONNECT_FAILED;
}
@@ -1577,7 +1577,7 @@ TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port)
sockname.sun_family = AF_UNIX;
if (set_sun_path(port, UNIX_PATH, sockname.sun_path) != 0) {
- PRMSG (1, "SocketUNIXConnect: path too long\n", 0, 0, 0);
+ PRMSG (1, "[Xtranssock] SocketUNIXConnect: path too long\n", 0, 0, 0);
return TRANS_CONNECT_FAILED;
}
@@ -1592,7 +1592,7 @@ TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port)
*/
old_sockname.sun_family = AF_UNIX;
if (set_sun_path(port, OLD_UNIX_PATH, old_sockname.sun_path) != 0) {
- PRMSG (1, "SocketUNIXConnect: path too long\n", 0, 0, 0);
+ PRMSG (1, "[Xtranssock] SocketUNIXConnect: path too long\n", 0, 0, 0);
return TRANS_CONNECT_FAILED;
}
old_namelen = strlen (old_sockname.sun_path) +
@@ -1642,7 +1642,7 @@ TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port)
return TRANS_IN_PROGRESS;
else
{
- PRMSG (2,"SocketUNIXConnect: Can't connect: errno = %d\n",
+ PRMSG (2,"[Xtranssock] SocketUNIXConnect: Can't connect: errno = %d\n",
EGET(),0, 0);
return TRANS_CONNECT_FAILED;
@@ -1659,7 +1659,7 @@ TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port)
(ciptr->peeraddr = (char *) xalloc(namelen)) == NULL)
{
PRMSG (1,
- "SocketUNIXCreateListener: Can't allocate space for the addr\n",
+ "[Xtranssock] SocketUNIXCreateListener: Can't allocate space for the addr\n",
0, 0, 0);
return TRANS_CONNECT_FAILED;
}
@@ -1682,7 +1682,7 @@ static int
TRANS(SocketBytesReadable) (XtransConnInfo ciptr, BytesReadable_t *pend)
{
- PRMSG (2,"SocketBytesReadable(%x,%d,%x)\n",
+ PRMSG (2,"[Xtranssock] SocketBytesReadable(%x,%d,%x)\n",
ciptr, ciptr->fd, pend);
#if defined(QNX4)
*pend = 0L; /* FIONREAD only returns a short. Zero out upper bits */
@@ -1707,7 +1707,7 @@ static int
TRANS(SocketRead) (XtransConnInfo ciptr, char *buf, int size)
{
- PRMSG (2,"SocketRead(%d,%x,%d)\n", ciptr->fd, buf, size);
+ PRMSG (2,"[Xtranssock] SocketRead(%d,%x,%d)\n", ciptr->fd, buf, size);
#if defined(_WIN32) || defined(__EMX__)
return recv ((SOCKET)ciptr->fd, buf, size, 0);
@@ -1721,7 +1721,7 @@ static int
TRANS(SocketWrite) (XtransConnInfo ciptr, char *buf, int size)
{
- PRMSG (2,"SocketWrite(%d,%x,%d)\n", ciptr->fd, buf, size);
+ PRMSG (2,"[Xtranssock] SocketWrite(%d,%x,%d)\n", ciptr->fd, buf, size);
#if defined(_WIN32) || defined(__EMX__)
return send ((SOCKET)ciptr->fd, buf, size, 0);
@@ -1735,7 +1735,7 @@ static int
TRANS(SocketReadv) (XtransConnInfo ciptr, struct iovec *buf, int size)
{
- PRMSG (2,"SocketReadv(%d,%x,%d)\n", ciptr->fd, buf, size);
+ PRMSG (2,"[Xtranssock] SocketReadv(%d,%x,%d)\n", ciptr->fd, buf, size);
return READV (ciptr, buf, size);
}
@@ -1745,7 +1745,7 @@ static int
TRANS(SocketWritev) (XtransConnInfo ciptr, struct iovec *buf, int size)
{
- PRMSG (2,"SocketWritev(%d,%x,%d)\n", ciptr->fd, buf, size);
+ PRMSG (2,"[Xtranssock] SocketWritev(%d,%x,%d)\n", ciptr->fd, buf, size);
return WRITEV (ciptr, buf, size);
}
@@ -1755,7 +1755,7 @@ static int
TRANS(SocketDisconnect) (XtransConnInfo ciptr)
{
- PRMSG (2,"SocketDisconnect(%x,%d)\n", ciptr, ciptr->fd, 0);
+ PRMSG (2,"[Xtranssock] SocketDisconnect(%x,%d)\n", ciptr, ciptr->fd, 0);
return shutdown (ciptr->fd, 2); /* disallow further sends and receives */
}
@@ -1766,7 +1766,7 @@ static int
TRANS(SocketINETClose) (XtransConnInfo ciptr)
{
- PRMSG (2,"SocketINETClose(%x,%d)\n", ciptr, ciptr->fd, 0);
+ PRMSG (2,"[Xtranssock] SocketINETClose(%x,%d)\n", ciptr, ciptr->fd, 0);
return close (ciptr->fd);
}
@@ -1788,7 +1788,7 @@ TRANS(SocketUNIXClose) (XtransConnInfo ciptr)
char path[200]; /* > sizeof sun_path +1 */
int ret;
- PRMSG (2,"SocketUNIXClose(%x,%d)\n", ciptr, ciptr->fd, 0);
+ PRMSG (2,"[Xtranssock] SocketUNIXClose(%x,%d)\n", ciptr, ciptr->fd, 0);
ret = close(ciptr->fd);
@@ -1815,7 +1815,7 @@ TRANS(SocketUNIXCloseForCloning) (XtransConnInfo ciptr)
int ret;
- PRMSG (2,"SocketUNIXCloseForCloning(%x,%d)\n",
+ PRMSG (2,"[Xtranssock] SocketUNIXCloseForCloning(%x,%d)\n",
ciptr, ciptr->fd, 0);
ret = close(ciptr->fd);
diff --git a/dcop/client/dcopfind.cpp b/dcop/client/dcopfind.cpp
index d12cecddf..a4bcb67bb 100644
--- a/dcop/client/dcopfind.cpp
+++ b/dcop/client/dcopfind.cpp
@@ -192,7 +192,7 @@ bool launchApp(TQString app)
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);
}
diff --git a/dcop/dcopidl/scanner.cc b/dcop/dcopidl/scanner.cc
index afc411cca..da3481c04 100644
--- a/dcop/dcopidl/scanner.cc
+++ b/dcop/dcopidl/scanner.cc
@@ -2528,7 +2528,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
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 );
}
diff --git a/dcop/dcopidl2cpp/main.cpp b/dcop/dcopidl2cpp/main.cpp
index f95983a2e..840669ba4 100644
--- a/dcop/dcopidl2cpp/main.cpp
+++ b/dcop/dcopidl2cpp/main.cpp
@@ -35,14 +35,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
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 )
{
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);
}
if ( argc < 2 ) {
diff --git a/dcop/dcopserver.cpp b/dcop/dcopserver.cpp
index 695909ea7..80d1d6989 100644
--- a/dcop/dcopserver.cpp
+++ b/dcop/dcopserver.cpp
@@ -130,7 +130,7 @@ static TQCString readQCString(TQDataStream &ds)
int bytesLeft = device->size()-device->at();
if ((bytesLeft < 0 ) || (len > (uint) bytesLeft))
{
- tqWarning("Corrupt data!\n");
+ tqWarning("[dcopserver] Corrupt data!\n");
printf("bytesLeft: %d, len: %d\n", bytesLeft, len);
return result;
}
@@ -149,7 +149,7 @@ static TQByteArray readQByteArray(TQDataStream &ds)
int bytesLeft = device->size()-device->at();
if ((bytesLeft < 0 ) || (len > (uint) bytesLeft))
{
- tqWarning("Corrupt data!\n");
+ tqWarning("[dcopserver] Corrupt data!\n");
return result;
}
result.resize( (uint)len );
@@ -241,7 +241,7 @@ void DCOPIceWriteChar(register IceConn iceConn, unsigned long nbytes, char *ptr)
{
DCOPConnection* conn = the_server->findConn( iceConn );
#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
if (conn)
@@ -251,7 +251,7 @@ tqWarning("DCOPServer: DCOPIceWriteChar() Writing %d bytes [%s]", nbytes, conn ?
TQByteArray _data(nbytes);
memcpy(_data.data(), ptr, nbytes);
#ifdef DCOP_DEBUG
-tqWarning("DCOPServer: _IceWrite() outputBlocked. Queuing %d bytes.", _data.size());
+tqWarning("[dcopserver] _IceWrite() outputBlocked. Queuing %d bytes.", _data.size());
#endif
conn->outputBuffer.append(_data);
return;
@@ -273,14 +273,14 @@ static void DCOPIceWrite(IceConn iceConn, const TQByteArray &_data)
{
DCOPConnection* conn = the_server->findConn( iceConn );
#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
if (conn)
{
if (conn->outputBlocked)
{
#ifdef DCOP_DEBUG
-tqWarning("DCOPServer: DCOPIceWrite() outputBlocked. Queuing %d bytes.", _data.size());
+tqWarning("[dcopserver] DCOPIceWrite() outputBlocked. Queuing %d bytes.", _data.size());
#endif
conn->outputBuffer.append(_data);
return;
@@ -299,7 +299,7 @@ tqWarning("DCOPServer: DCOPIceWrite() outputBlocked. Queuing %d bytes.", _data.s
void DCOPConnection::waitForOutputReady(const TQByteArray &_data, int start)
{
#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
outputBlocked = true;
outputBuffer.append(_data);
@@ -317,7 +317,7 @@ tqWarning("DCOPServer: waitForOutputReady fd = %d datasize = %d start = %d", soc
void DCOPServer::slotOutputReady(int socket)
{
#ifdef DCOP_DEBUG
-tqWarning("DCOPServer: slotOutputReady fd = %d", socket);
+tqWarning("[dcopserver] slotOutputReady fd = %d", socket);
#endif
// Find out connection.
DCOPConnection *conn = fd_clients.find(socket);
@@ -351,7 +351,7 @@ void DCOPConnection::slotOutputReady()
fcntl(fd, F_SETFL, fd_fl);
#ifdef DCOP_DEBUG
-tqWarning("DCOPServer: slotOutputReady() %d bytes written", nwritten);
+tqWarning("[dcopserver] slotOutputReady() %d bytes written", nwritten);
#endif
if (nwritten < 0)
@@ -370,7 +370,7 @@ tqWarning("DCOPServer: slotOutputReady() %d bytes written", nwritten);
if (outputBuffer.isEmpty())
{
#ifdef DCOP_DEBUG
-tqWarning("DCOPServer: slotOutputRead() all data transmitted.");
+tqWarning("[dcopserver] slotOutputRead() all data transmitted.");
#endif
outputBlocked = false;
outputBufferNotifier->setEnabled(false);
@@ -378,7 +378,7 @@ tqWarning("DCOPServer: slotOutputRead() all data transmitted.");
#ifdef DCOP_DEBUG
else
{
-tqWarning("DCOPServer: slotOutputRead() more data to send.");
+tqWarning("[dcopserver] slotOutputRead() more data to send.");
}
#endif
}
@@ -390,7 +390,7 @@ static void DCOPIceSendData(register IceConn _iceConn,
if (_iceConn->outbufptr > _iceConn->outbuf)
{
#ifdef DCOP_DEBUG
-tqWarning("DCOPServer: Flushing data, fd = %d", IceConnectionNumber(_iceConn));
+tqWarning("[dcopserver] Flushing data, fd = %d", IceConnectionNumber(_iceConn));
#endif
IceFlush( _iceConn );
}
@@ -645,7 +645,7 @@ SetAuthentication (int count, IceListenObj *_listenObjs,
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);
}
@@ -713,7 +713,7 @@ void DCOPServer::processMessage( IceConn iceConn, int opcode,
{
DCOPConnection* conn = clients.find( iceConn );
if ( !conn ) {
- tqWarning("DCOPServer::processMessage message from unknown connection. [opcode = %d]", opcode);
+ tqWarning("[dcopserver] DCOPServer::processMessage message from unknown connection. [opcode = %d]", opcode);
return;
}
switch( opcode ) {
@@ -733,13 +733,13 @@ void DCOPServer::processMessage( IceConn iceConn, int opcode,
int datalen = ba.size();
if ( opcode == DCOPReplyDelayed ) {
if ( !target )
- tqWarning("DCOPServer::DCOPReplyDelayed for unknown connection.");
+ tqWarning("[dcopserver] DCOPServer::DCOPReplyDelayed for unknown connection.");
else if ( !conn )
- tqWarning("DCOPServer::DCOPReplyDelayed from unknown connection.");
+ tqWarning("[dcopserver] DCOPServer::DCOPReplyDelayed from unknown connection.");
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))
- 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 ) {
#ifdef DCOP_DEBUG
@@ -747,7 +747,7 @@ if (opcode == DCOPSend)
{
TQCString obj = 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
IceGetHeader( target->iceConn, majorOpcode, opcode,
@@ -765,7 +765,7 @@ if (opcode == DCOPSend)
TQCString replyType;
TQByteArray replyData;
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] == '*') {
#ifdef DCOP_DEBUG
@@ -773,7 +773,7 @@ if (opcode == DCOPSend)
{
TQCString obj = 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
// handle a multicast.
@@ -815,7 +815,7 @@ if (opcode == DCOPCall)
{
TQCString obj = 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
target->waitingForReply.append( iceConn );
@@ -839,7 +839,7 @@ if (opcode == DCOPCall)
TQByteArray data = readQByteArray(ds);
b = receive( toApp, obj, fun, data, replyType, replyData, iceConn );
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) {
@@ -893,7 +893,7 @@ if (opcode == DCOPCall)
int datalen = ba.size();
if ( !connreply )
- tqWarning("DCOPServer::DCOPReply for unknown connection.");
+ tqWarning("[dcopserver] DCOPServer::DCOPReply for unknown connection.");
else {
conn->waitingForReply.removeRef( connreply->iceConn );
if ( opcode == DCOPReplyWait )
@@ -903,7 +903,7 @@ if (opcode == DCOPCall)
else
{ // DCOPReply or DCOPReplyFailed
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());
}
IceGetHeader( connreply->iceConn, majorOpcode, opcode,
@@ -917,7 +917,7 @@ if (opcode == DCOPCall)
}
break;
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),
DCOPClientAuthProcs, 0);
if (_kde_IceLastMajorOpcode < 1 )
- tqWarning("DCOPServer Error: incorrect major opcode!");
+ tqWarning("[dcopserver] DCOPServer Error: incorrect major opcode!");
the_server = this;
if (( majorOpcode = IceRegisterForProtocolReply (const_cast<char *>("DCOP"),
@@ -1004,7 +1004,7 @@ DCOPServer::DCOPServer(bool _suicide)
NULL /* IceIOErrorProc */
)) < 0)
{
- tqWarning("Could not register DCOP protocol with ICE");
+ tqWarning("[dcopserver] Could not register DCOP protocol with ICE");
}
char errormsg[256];
@@ -1012,7 +1012,7 @@ DCOPServer::DCOPServer(bool _suicide)
if (!IceListenForConnections (&numTransports, &listenObjs,
256, errormsg))
{
- fprintf (stderr, "%s\n", errormsg);
+ fprintf (stderr, "[dcopserver] %s\n", errormsg);
exit (1);
} else {
(void) umask(orig_umask);
@@ -1020,7 +1020,7 @@ DCOPServer::DCOPServer(bool _suicide)
TQCString fName = DCOPClient::dcopServerFile();
FILE *f;
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));
exit(1);
}
@@ -1119,7 +1119,7 @@ DCOPConnection* DCOPServer::findApp( const TQCString& appId )
*/
void DCOPServer::slotCleanDeadConnections()
{
-tqWarning("DCOP Cleaning up dead connections.");
+tqWarning("[dcopserver] DCOP Cleaning up dead connections.");
while(!deadConnections.isEmpty())
{
IceConn iceConn = deadConnections.take(0);
@@ -1158,9 +1158,9 @@ void DCOPServer::newClient( int /*socket*/ )
IceConn iceConn = IceAcceptConnection( static_cast<const DCOPListener*>(sender())->listenObj, &status);
if (!iceConn) {
if (status == IceAcceptBadMalloc)
- tqWarning("Failed to alloc connection object!\n");
+ tqWarning("[dcopserver] Failed to alloc connection object!\n");
else // IceAcceptFailure
- tqWarning("Failed to accept ICE connection!\n");
+ tqWarning("[dcopserver] Failed to accept ICE connection!\n");
return;
}
@@ -1173,9 +1173,9 @@ void DCOPServer::newClient( int /*socket*/ )
if (cstatus != IceConnectAccepted) {
if (cstatus == IceConnectIOError)
- tqWarning ("IO error opening ICE Connection!\n");
+ tqWarning ("[dcopserver] IO error opening ICE Connection!\n");
else
- tqWarning ("ICE Connection rejected!\n");
+ tqWarning ("[dcopserver] ICE Connection rejected!\n");
deadConnections.removeRef(iceConn);
(void) IceCloseConnection (iceConn);
}
@@ -1206,7 +1206,7 @@ void DCOPServer::removeConnection( void* data )
IceConn iceConn = conn->waitingForReply.take(0);
if (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;
DCOPMsg *pMsg;
IceGetHeader( iceConn, majorOpcode, DCOPReplyFailed,
@@ -1217,9 +1217,9 @@ void DCOPServer::removeConnection( void* data )
DCOPIceSendData(iceConn, reply);
_DCOPIceSendEnd();
if (!target)
- tqWarning("DCOP Error: unknown target in waitingForReply");
+ tqWarning("[dcopserver] Unknown target in waitingForReply");
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);
if (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;
DCOPMsg *pMsg;
IceGetHeader( iceConn, majorOpcode, DCOPReplyFailed,
@@ -1239,9 +1239,9 @@ void DCOPServer::removeConnection( void* data )
DCOPIceSendData( iceConn, reply );
_DCOPIceSendEnd();
if (!target)
- tqWarning("DCOP Error: unknown target in waitingForDelayedReply");
+ tqWarning("[dcopserver] Unknown target in waitingForDelayedReply");
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())
@@ -1251,13 +1251,13 @@ void DCOPServer::removeConnection( void* data )
DCOPConnection* target = clients.find( iceConn );
if (!target)
{
- tqWarning("DCOP Error: still waiting for answer from non-existing client.");
+ tqWarning("[dcopserver] Still waiting for answer from non-existing client.");
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) &&
!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()
{
#ifndef NDEBUG
- fprintf( stderr, "DCOPServer : slotTerminate() -> sending terminateKDE signal.\n" );
+ fprintf( stderr, "[dcopserver] slotTerminate() -> sending terminateKDE signal.\n" );
#endif
TQByteArray data;
dcopSignals->emitSignal(0L /* dcopserver */, "terminateKDE()", data, false);
@@ -1302,7 +1302,7 @@ void DCOPServer::slotTerminate()
void DCOPServer::slotSuicide()
{
#ifndef NDEBUG
- fprintf( stderr, "DCOPServer : slotSuicide() -> exit.\n" );
+ fprintf( stderr, "[dcopserver] slotSuicide() -> exit.\n" );
#endif
exit(0);
}
@@ -1310,7 +1310,7 @@ void DCOPServer::slotSuicide()
void DCOPServer::slotShutdown()
{
#ifndef NDEBUG
- fprintf( stderr, "DCOPServer : slotShutdown() -> waiting for clients to disconnect.\n" );
+ fprintf( stderr, "[dcopserver] slotShutdown() -> waiting for clients to disconnect.\n" );
#endif
char c;
#ifndef Q_OS_WIN
@@ -1332,7 +1332,7 @@ void DCOPServer::slotShutdown()
void DCOPServer::slotExit()
{
#ifndef NDEBUG
- fprintf( stderr, "DCOPServer : slotExit() -> exit.\n" );
+ fprintf( stderr, "[dcopserver] slotExit() -> exit.\n" );
#endif
#ifdef Q_OS_WIN
SetEvent(m_evTerminate);
@@ -1629,10 +1629,10 @@ static bool isRunning(const TQCString &fName, bool printNetworkId = false)
f.close();
if (ok && pid && (kill(pid, SIGHUP) == 0)) {
if (printNetworkId)
- tqWarning("%s", contents.left(pos).data());
+ tqWarning("[dcopserver] %s", contents.left(pos).data());
else
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"
"and start dcopserver again.\n"
"---------------------------------\n",
@@ -1719,8 +1719,8 @@ extern "C" DCOP_EXPORT int kdemain( int argc, char* argv[] )
if (retcode != 0)
{
- tqWarning("dcopserver: Could not raise limit on number of open files.");
- tqWarning("dcopserver: Current limit = %d", cur_limit);
+ tqWarning("[dcopserver] Could not raise limit on number of open files.");
+ tqWarning("[dcopserver] Current limit = %d", cur_limit);
}
}
}
@@ -1743,7 +1743,7 @@ extern "C" DCOP_EXPORT int kdemain( int argc, char* argv[] )
if (client.attach())
return 0;
}
- tqWarning("DCOPServer self-test failed.");
+ tqWarning("[dcopserver] DCOPServer self-test failed.");
system(findDcopserverShutdown()+" --kill");
return 1;
}
diff --git a/dcop/dcopserver_win.cpp b/dcop/dcopserver_win.cpp
index 4e6bc5e9f..833418876 100644
--- a/dcop/dcopserver_win.cpp
+++ b/dcop/dcopserver_win.cpp
@@ -26,7 +26,7 @@ DWORD WINAPI DCOPServer::TerminatorThread(void * pParam)
DCOPServer * server = (DCOPServer*)pParam;
WaitForSingleObject(server->m_evTerminate,INFINITE);
- fprintf( stderr, "DCOPServer : terminate event signaled\n" );
+ fprintf( stderr, "[dcopserver_win] Terminate event signaled\n" );
if(!server->shutdown) {
ResetEvent(server->m_evTerminate);
@@ -36,9 +36,9 @@ DWORD WINAPI DCOPServer::TerminatorThread(void * pParam)
// Need some further event processing to get the timer signals
while(WaitForSingleObject(server->m_evTerminate,100) != WAIT_OBJECT_0)
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;
}
diff --git a/kded/kbuildsycoca.cpp b/kded/kbuildsycoca.cpp
index 29085f2d3..1b84b196c 100644
--- a/kded/kbuildsycoca.cpp
+++ b/kded/kbuildsycoca.cpp
@@ -476,7 +476,7 @@ bool KBuildSycoca::recreate()
}
if (database->status() != 0)
{
- fprintf(stderr, "kbuildsycoca: ERROR creating database '%s'! %s\n", path.local8Bit().data(),strerror(database->status()));
+ fprintf(stderr, "[kbuildsycoca] ERROR creating database '%s'! %s\n", path.local8Bit().data(),strerror(database->status()));
#ifdef KBUILDSYCOCA_GUI // KBUILDSYCOCA_GUI is used on win32 to build
// GUI version of kbuildsycoca, so-called "kbuildsycocaw".
if (!silent)
@@ -505,11 +505,11 @@ bool KBuildSycoca::recreate()
m_str = 0L;
if (!database->close())
{
- fprintf(stderr, "kbuildsycoca: ERROR writing database '%s'!\n", database->name().local8Bit().data());
- fprintf(stderr, "kbuildsycoca: Disk full?\n");
+ fprintf(stderr, "[kbuildsycoca] ERROR writing database '%s'!\n", database->name().local8Bit().data());
+ fprintf(stderr, "[kbuildsycoca] Disk full?\n");
#ifdef KBUILDSYCOCA_GUI
if (!silent)
- KMessageBox::error(0, i18n("Error writing database '%1'.\nCheck that the permissions are correct on the directory and the disk is not full.\n").arg(path.local8Bit().data()), i18n("KBuildSycoca"));
+ KMessageBox::error(0, i18n("[kbuildsycoca] Error writing database '%1'.\nCheck that the permissions are correct on the directory and the disk is not full.\n").arg(path.local8Bit().data()), i18n("KBuildSycoca"));
#endif
return false;
}
@@ -777,14 +777,14 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
TQCString registeredName = dcopClient->registerAs(appName, false);
if (registeredName.isEmpty())
{
- fprintf(stderr, "Warning: %s is unable to register with DCOP.\n", appName);
+ fprintf(stderr, "[kbuildsycoca] Warning: %s is unable to register with DCOP.\n", appName);
break;
}
else if (registeredName == appName)
{
break; // Go
}
- fprintf(stderr, "Waiting for already running %s to finish.\n", appName);
+ fprintf(stderr, "[kbuildsycoca] Waiting for already running %s to finish.\n", appName);
dcopClient->setNotifications( true );
while (dcopClient->isApplicationRegistered(appName))
@@ -796,7 +796,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
}
dcopClient->setNotifications( false );
}
- fprintf(stderr, "%s running...\n", appName);
+ fprintf(stderr, "[kbuildsycoca] %s running...\n", appName);
bool checkfiles = bGlobalDatabase || args->isSet("checkfiles");
@@ -870,7 +870,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
g_ctimeDict = 0;
if (incremental)
{
- tqWarning("Reusing existing ksycoca");
+ tqWarning("[kbuildsycoca] Reusing existing ksycoca.");
KSycoca *oldSycoca = KSycoca::self();
KSycocaFactoryList *factories = new KSycocaFactoryList;
g_allEntries = new KSycocaEntryListList;
@@ -950,7 +950,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
#ifdef KBUILDSYCOCA_GUI
if (!silent) {
progress.close();
- KMessageBox::information(0, i18n("Configuration information reloaded successfully."), capt);
+ KMessageBox::information(0, i18n("[kbuildsycoca] Configuration information reloaded successfully."), capt);
}
#endif
return 0;
diff --git a/kded/kded.cpp b/kded/kded.cpp
index 1a0f86445..5fa0bd867 100644
--- a/kded/kded.cpp
+++ b/kded/kded.cpp
@@ -918,7 +918,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
if (!KUniqueApplication::start())
{
- fprintf(stderr, "KDE Daemon (kded) already running.\n");
+ fprintf(stderr, "[kded] KDE Daemon (kded) already running.\n");
exit(0);
}
diff --git a/khtml/test_regression.cpp b/khtml/test_regression.cpp
index 7472eb301..5a60bbd19 100644
--- a/khtml/test_regression.cpp
+++ b/khtml/test_regression.cpp
@@ -481,7 +481,7 @@ int main(int argc, char *argv[])
{
TQString xvfbPath = KStandardDirs::findExe("Xvfb");
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 );
}
diff --git a/kinit/kinit.cpp b/kinit/kinit.cpp
index 95c1510cb..3c03f78e8 100644
--- a/kinit/kinit.cpp
+++ b/kinit/kinit.cpp
@@ -238,7 +238,7 @@ static void close_fds()
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();
d.result = 3; // Error with msg
write(d.fd[1], &d.result, 1);
@@ -256,18 +256,18 @@ static void setup_tty( const char* tty )
int fd = open( tty, O_WRONLY );
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;
}
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 );
return;
}
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 );
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))
{
- perror("tdeinit: socketpair() failed!\n");
+ perror("[kinit] socketpair() failed!\n");
exit(255);
}
launcher = 1;
@@ -470,7 +470,7 @@ static pid_t launch(int argc, const char *_name, const char *args,
if (0 > pipe(d.fd))
{
- perror("tdeinit: pipe() failed!\n");
+ perror("[kinit] pipe() failed!\n");
d.result = 3;
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();
@@ -492,7 +492,7 @@ static pid_t launch(int argc, const char *_name, const char *args,
d.fork = fork();
switch(d.fork) {
case -1:
- perror("tdeinit: fork() failed!\n");
+ perror("[kinit] fork() failed!\n");
d.result = 3;
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();
@@ -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 */
r = prctl(PR_SET_NAME, (unsigned long) name.data(), 0, 0, 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
- tdeinit_setproctitle( "tdeinit: %s%s", name.data(), procTitle.data() ? procTitle.data() : "" );
+ tdeinit_setproctitle( "[kinit] %s%s", name.data(), procTitle.data() ? procTitle.data() : "" );
#else
- tdeinit_setproctitle( "tdeinit: %s%s", name.data(), procTitle.data() ? procTitle.data() : "" );
+ tdeinit_setproctitle( "[kinit] %s%s", name.data(), procTitle.data() ? procTitle.data() : "" );
#endif
}
@@ -659,9 +659,9 @@ static pid_t launch(int argc, const char *_name, const char *args,
d.func = (int (*)(int, char *[])) d.sym;
if (d.debug_wait)
{
- fprintf(stderr, "tdeinit: Suspending process\n"
- "tdeinit: 'gdb tdeinit %d' to debug\n"
- "tdeinit: 'kill -SIGCONT %d' to continue\n",
+ fprintf(stderr, "[kinit] Suspending process\n"
+ "[kinit] 'gdb tdeinit %d' to debug\n"
+ "[kinit] 'kill -SIGCONT %d' to continue\n",
getpid(), getpid());
kill(getpid(), SIGSTOP);
}
@@ -690,7 +690,7 @@ static pid_t launch(int argc, const char *_name, const char *args,
if (d.result == 2)
{
#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
exec = true;
continue;
@@ -728,11 +728,11 @@ static pid_t launch(int argc, const char *_name, const char *args,
}
if (d.n == 0)
{
- perror("tdeinit: Pipe closed unexpectedly");
+ perror("[kinit] Pipe closed unexpectedly");
d.result = 1; // Error
break;
}
- perror("tdeinit: Error reading from pipe");
+ perror("[kinit] Error reading from pipe");
d.result = 1; // Error
break;
}
@@ -777,20 +777,20 @@ static void init_signals()
if (pipe(d.deadpipe) != 0)
{
- perror("tdeinit: Aborting. Can't create pipe: ");
+ perror("[kinit] Aborting. Can't create pipe: ");
exit(255);
}
options = fcntl(d.deadpipe[0], F_GETFL);
if (options == -1)
{
- perror("tdeinit: Aborting. Can't make pipe non-blocking: ");
+ perror("[kinit] Aborting. Can't make pipe non-blocking: ");
exit(255);
}
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);
}
@@ -831,7 +831,7 @@ static void init_tdeinit_socket()
int max_tries = 10;
if (!home_dir || !home_dir[0])
{
- fprintf(stderr, "tdeinit: Aborting. $HOME not set!");
+ fprintf(stderr, "[kinit] Aborting. $HOME not set!");
exit(255);
}
chdir(home_dir);
@@ -843,12 +843,12 @@ static void init_tdeinit_socket()
{
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);
}
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);
}
}
@@ -860,7 +860,7 @@ static void init_tdeinit_socket()
}
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);
}
}
@@ -874,7 +874,7 @@ static void init_tdeinit_socket()
int s;
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
*/
@@ -890,7 +890,7 @@ static void init_tdeinit_socket()
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;
request_header.cmd = LAUNCHER_TERMINATE_TDEINIT;
request_header.arg_length = 0;
@@ -908,21 +908,21 @@ static void init_tdeinit_socket()
d.wrapper = socket(PF_UNIX, SOCK_STREAM, 0);
if (d.wrapper < 0)
{
- perror("tdeinit: Aborting. socket() failed: ");
+ perror("[kinit] Aborting. socket() failed: ");
exit(255);
}
options = fcntl(d.wrapper, F_GETFL);
if (options == -1)
{
- perror("tdeinit: Aborting. Can't make socket non-blocking: ");
+ perror("[kinit] Aborting. Can't make socket non-blocking: ");
close(d.wrapper);
exit(255);
}
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);
exit(255);
}
@@ -936,7 +936,7 @@ static void init_tdeinit_socket()
if(bind(d.wrapper, (struct sockaddr *)&sa, socklen) != 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);
close(d.wrapper);
exit(255);
@@ -949,7 +949,7 @@ static void init_tdeinit_socket()
/** set permissions **/
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);
unlink(sock_file);
close(d.wrapper);
@@ -958,7 +958,7 @@ static void init_tdeinit_socket()
if(listen(d.wrapper, SOMAXCONN) < 0)
{
- perror("tdeinit: Aborting. listen() failed: ");
+ perror("[kinit] Aborting. listen() failed: ");
unlink(sock_file);
close(d.wrapper);
exit(255);
@@ -968,14 +968,14 @@ static void init_tdeinit_socket()
d.wrapper_old = socket(PF_UNIX, SOCK_STREAM, 0);
if (d.wrapper_old < 0)
{
- // perror("tdeinit: Aborting. socket() failed: ");
+ // perror("[kinit] Aborting. socket() failed: ");
return;
}
options = fcntl(d.wrapper_old, F_GETFL);
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);
d.wrapper_old = 0;
return;
@@ -983,7 +983,7 @@ static void init_tdeinit_socket()
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);
d.wrapper_old = 0;
return;
@@ -999,7 +999,7 @@ static void init_tdeinit_socket()
if(bind(d.wrapper_old, (struct sockaddr *)&sa_old, socklen) != 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);
close(d.wrapper_old);
d.wrapper_old = 0;
@@ -1022,7 +1022,7 @@ static void init_tdeinit_socket()
if(listen(d.wrapper_old, SOMAXCONN) < 0)
{
- // perror("tdeinit: Aborting. listen() failed: ");
+ // perror("[kinit] Aborting. listen() failed: ");
unlink(sock_file_old);
close(d.wrapper_old);
d.wrapper_old = 0;
@@ -1069,14 +1069,14 @@ static void launcher_died()
if (!d.launcher_ok)
{
/* This is bad. */
- fprintf(stderr, "tdeinit: Communication error with launcher. Exiting!\n");
+ fprintf(stderr, "[kinit] Communication error with launcher. Exiting!\n");
::exit(255);
return;
}
// KLauncher died... restart
#ifndef NDEBUG
- fprintf(stderr, "tdeinit: KLauncher died unexpectedly.\n");
+ fprintf(stderr, "[kinit] KLauncher died unexpectedly.\n");
#endif
// Make sure it's really dead.
if (d.launcher_pid)
@@ -1092,7 +1092,7 @@ static void launcher_died()
pid_t pid = launch( 1, "klauncher", 0 );
#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
}
@@ -1156,7 +1156,7 @@ static void handle_launcher_request(int sock = -1)
const char *startup_id_str = "0";
#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_EXT_EXEC ? "EXT_EXEC" :
(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)
{
#ifndef NDEBUG
- fprintf(stderr, "tdeinit: EXEC request has invalid format.\n");
+ fprintf(stderr, "[kinit] EXEC request has invalid format.\n");
#endif
free(request_data);
d.debug_wait = false;
@@ -1273,16 +1273,16 @@ static void handle_launcher_request(int sock = -1)
#ifndef NDEBUG
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
- 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
if ( request_header.arg_length !=
(int) (strlen(env_name) + strlen(env_value) + 2))
{
#ifndef NDEBUG
- fprintf(stderr, "tdeinit: SETENV request has invalid format.\n");
+ fprintf(stderr, "[kinit] SETENV request has invalid format.\n");
#endif
free(request_data);
return;
@@ -1292,7 +1292,7 @@ static void handle_launcher_request(int sock = -1)
else if (request_header.cmd == LAUNCHER_TERMINATE_KDE)
{
#ifndef NDEBUG
- fprintf(stderr,"tdeinit: terminate KDE.\n");
+ fprintf(stderr,"[kinit] Terminating Trinity.\n");
#endif
#ifdef Q_WS_X11
tdeinit_xio_errhandler( 0L );
@@ -1301,7 +1301,7 @@ static void handle_launcher_request(int sock = -1)
else if (request_header.cmd == LAUNCHER_TERMINATE_TDEINIT)
{
#ifndef NDEBUG
- fprintf(stderr,"tdeinit: Killing tdeinit/klauncher.\n");
+ fprintf(stderr,"[kinit] Killing tdeinit/klauncher.\n");
#endif
if (d.launcher_pid)
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)
{
#ifndef NDEBUG
- fprintf(stderr,"tdeinit: Debug wait activated.\n");
+ fprintf(stderr,"[kinit] Debug wait activated.\n");
#endif
d.debug_wait = true;
}
@@ -1351,7 +1351,7 @@ static void handle_requests(pid_t waitForPid)
if (exit_pid > 0)
{
#ifndef NDEBUG
- fprintf(stderr, "tdeinit: PID %ld terminated.\n", (long) exit_pid);
+ fprintf(stderr, "[kinit] PID %ld terminated.\n", (long) exit_pid);
#endif
if (waitForPid && (exit_pid == waitForPid))
return;
@@ -1513,7 +1513,7 @@ static void tdeinit_library_path()
TQCString display = getenv(DISPLAY);
if (display.isEmpty())
{
- fprintf(stderr, "tdeinit: Aborting. $"DISPLAY" is not set.\n");
+ fprintf(stderr, "[kinit] Aborting. $"DISPLAY" is not set.\n");
exit(255);
}
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));
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());
exit(255);
}
@@ -1533,7 +1533,7 @@ static void tdeinit_library_path()
socketName = TQFile::encodeName(locateLocal("socket", TQString("tdeinit_%1").arg(TQString(display)), s_instance));
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());
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.
if ( disp )
- tqWarning( "tdeinit: Fatal IO error: client killed" );
+ tqWarning( "[kinit] Fatal IO error: client killed" );
if (sock_file[0])
{
@@ -1567,7 +1567,7 @@ int tdeinit_xio_errhandler( Display *disp )
}
if ( disp )
- tqWarning( "tdeinit: sending SIGHUP to children." );
+ tqWarning( "[kinit] sending SIGHUP to children." );
/* this should remove all children we started */
signal(SIGHUP, SIG_IGN);
@@ -1576,14 +1576,14 @@ int tdeinit_xio_errhandler( Display *disp )
sleep(2);
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 */
signal(SIGTERM, SIG_IGN);
kill(0, SIGTERM);
if ( disp )
- tqWarning( "tdeinit: Exit." );
+ tqWarning( "[kinit] Exit." );
exit( 0 );
return 0;
@@ -1596,7 +1596,7 @@ int tdeinit_x_errhandler( Display *dpy, XErrorEvent *err )
char errstr[256];
// tdeinit almost doesn't use X, and therefore there shouldn't be any X error
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"
" Minor opcode: %d\n"
" Resource id: 0x%lx\n",
@@ -1629,15 +1629,15 @@ static int initXconnection()
BlackPixelOfScreen(DefaultScreenOfDisplay(X11display)),
BlackPixelOfScreen(DefaultScreenOfDisplay(X11display)) );
#ifndef NDEBUG
- fprintf(stderr, "tdeinit: opened connection to %s\n", DisplayString(X11display));
+ fprintf(stderr, "[kinit] opened connection to %s\n", DisplayString(X11display));
#endif
int fd = XConnectionNumber( X11display );
int on = 1;
(void) setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (char *) &on, (int) sizeof(on));
return fd;
} else
- fprintf(stderr, "tdeinit: Can't connect to the X Server.\n" \
- "tdeinit: Might not terminate at end of session.\n");
+ fprintf(stderr, "[kinit] Can't connect to the X Server.\n" \
+ "[kinit] Might not terminate at end of session.\n");
return -1;
}
@@ -1794,12 +1794,12 @@ int main(int argc, char **argv, char **envp)
else
pid = launch( 2, "dcopserver", "--nosid" );
#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
WaitPid(pid);
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);
}
}
@@ -1818,7 +1818,7 @@ int main(int argc, char **argv, char **envp)
else
pid = launch( 1, "klauncher", 0 );
#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
handle_requests(pid); // Wait for klauncher to be ready
}
@@ -1856,7 +1856,7 @@ int main(int argc, char **argv, char **envp)
else
pid = launch( 1, "kded", 0 );
#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
handle_requests(pid);
}
@@ -1867,7 +1867,7 @@ int main(int argc, char **argv, char **envp)
{
pid = launch( 1, safe_argv[i]+1, 0);
#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
handle_requests(pid);
}
@@ -1883,7 +1883,7 @@ int main(int argc, char **argv, char **envp)
{
pid = launch( 1, safe_argv[i], 0 );
#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
}
}
diff --git a/kinit/klauncher_main.cpp b/kinit/klauncher_main.cpp
index 920234283..0842bc2c2 100644
--- a/kinit/klauncher_main.cpp
+++ b/kinit/klauncher_main.cpp
@@ -40,7 +40,7 @@ static void sig_handler(int sig_num)
// No recursion
signal( SIGHUP, SIG_IGN);
signal( SIGTERM, SIG_IGN);
-fprintf(stderr, "klauncher: Exiting on signal %d\n", sig_num);
+ fprintf(stderr, "[klauncher] Exiting on signal %d\n", sig_num);
KLauncher::destruct(255);
}
@@ -55,8 +55,8 @@ extern "C" KDE_EXPORT int kdemain( int argc, char**argv )
// Started via tdeinit.
if (fcntl(LAUNCHER_FD, F_GETFD) == -1)
{
- fprintf(stderr, "%s", i18n("klauncher: This program is not supposed to be started manually.\n"
- "klauncher: It is started automatically by tdeinit.\n").local8Bit().data());
+ fprintf(stderr, "%s", i18n("[klauncher] This program is not supposed to be started manually.\n"
+ "[klauncher] It is started automatically by tdeinit.\n").local8Bit().data());
return 1;
}
@@ -82,7 +82,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char**argv )
TQCString dcopName = KApplication::dcopClient()->registerAs(name, false);
if (dcopName.isEmpty())
{
- kdWarning() << "DCOP communication problem!" << endl;
+ kdWarning() << "[klauncher] DCOP communication problem!" << endl;
return 1;
}
if (dcopName == cname)
@@ -90,12 +90,12 @@ extern "C" KDE_EXPORT int kdemain( int argc, char**argv )
if (--maxTry == 0)
{
- kdWarning() << "Another instance of klauncher is already running!" << endl;
+ kdWarning() << "[klauncher] Another instance of klauncher is already running!" << endl;
return 1;
}
// Wait a bit...
- kdWarning() << "Waiting for already running klauncher to exit." << endl;
+ kdWarning() << "[klauncher] Waiting for already running klauncher to exit." << endl;
sleep(1);
// Try again...
diff --git a/kinit/lnusertemp.c b/kinit/lnusertemp.c
index b53af5dbe..ba79e62a7 100644
--- a/kinit/lnusertemp.c
+++ b/kinit/lnusertemp.c
@@ -51,20 +51,20 @@ int check_tmp_dir(const char *tmp_dir)
result = mkdir(tmp_dir, 0700);
if (result == -1)
{
- fprintf(stderr, "Error: Can not create directory \"%s\".\n", tmp_dir);
+ fprintf(stderr, "[lnusertemp] Error: Can not create directory \"%s\".\n", tmp_dir);
return 1;
}
result = stat(tmp_dir, &stat_buf);
}
if ((result == -1) || (!S_ISDIR(stat_buf.st_mode)))
{
- fprintf(stderr, "Error: \"%s\" is not a directory.\n", tmp_dir);
+ fprintf(stderr, "[lnusertemp] Error: \"%s\" is not a directory.\n", tmp_dir);
return 1;
}
if (stat_buf.st_uid != getuid())
{
- fprintf(stderr, "Error: \"%s\" is owned by uid %d instead of uid %d.\n", tmp_dir, stat_buf.st_uid, getuid());
+ fprintf(stderr, "[lnusertemp] Error: \"%s\" is owned by uid %d instead of uid %d.\n", tmp_dir, stat_buf.st_uid, getuid());
return 1;
}
return 0;
@@ -81,10 +81,10 @@ int create_link(const char *file, const char *tmp_dir)
result = symlink(tmp_dir, file);
if (result == -1)
{
- fprintf(stderr, "Error: Can not create link from \"%s\" to \"%s\"\n", file, tmp_dir);
+ fprintf(stderr, "[lnusertemp] Error: Can not create link from \"%s\" to \"%s\"\n", file, tmp_dir);
return 1;
}
- /*printf("Created link from \"%s\" to \"%s\"\n", file, tmp_dir);*/
+ /*printf("[lnusertemp] Created link from \"%s\" to \"%s\"\n", file, tmp_dir);*/
return 0;
}
@@ -109,7 +109,7 @@ int build_link(const char *tmp_prefix, const char *kde_prefix, int kdehostname)
pw_ent = getpwuid(uid);
if (!pw_ent)
{
- fprintf(stderr, "Error: Can not find password entry for uid %d.\n", getuid());
+ fprintf(stderr, "[lnusertemp] Error: Can not find password entry for uid %d.\n", getuid());
return 1;
}
@@ -130,12 +130,12 @@ int build_link(const char *tmp_prefix, const char *kde_prefix, int kdehostname)
}
if (!home_dir || !home_dir[0])
{
- fprintf(stderr, "Aborting. $HOME not set!\n");
+ fprintf(stderr, "[lnusertemp] Aborting. $HOME not set!\n");
return 1;
}
if (strlen(home_dir) > (PATH_MAX-100))
{
- fprintf(stderr, "Aborting. Home directory path too long!\n");
+ fprintf(stderr, "[lnusertemp] Aborting. Home directory path too long!\n");
return 1;
}
kde_home++;
@@ -155,7 +155,7 @@ int build_link(const char *tmp_prefix, const char *kde_prefix, int kdehostname)
}
if (result == -1)
{
- perror("mkdir failed: ");
+ perror("[lnusertemp] mkdir failed: ");
return 1;
}
@@ -172,7 +172,7 @@ int build_link(const char *tmp_prefix, const char *kde_prefix, int kdehostname)
{
if (gethostname(kde_tmp_dir+strlen(kde_tmp_dir), PATH_MAX - strlen(kde_tmp_dir) - 1) != 0)
{
- perror("Could not determine hostname: ");
+ perror("[lnusertemp] Could not determine hostname: ");
return 1;
}
}
@@ -182,12 +182,12 @@ int build_link(const char *tmp_prefix, const char *kde_prefix, int kdehostname)
if ((result == 0) && (S_ISDIR(stat_buf.st_mode)))
{
/* $TDEHOME/tmp is a normal directory. Do nothing. */
- /*printf("Directory \"%s\" already exists.\n", kde_tmp_dir);*/
+ /*printf("[lnusertemp] Directory \"%s\" already exists.\n", kde_tmp_dir);*/
return 0;
}
if ((result == -1) && (errno == ENOENT))
{
- /*printf("Creating link %s.\n", kde_tmp_dir);*/
+ /*printf("[lnusertemp] Creating link %s.\n", kde_tmp_dir);*/
result = create_link(kde_tmp_dir, user_tmp_dir);
if (result == 0) return 0; /* Success */
unlink(kde_tmp_dir);
@@ -197,23 +197,23 @@ int build_link(const char *tmp_prefix, const char *kde_prefix, int kdehostname)
}
if ((result == -1) || (!S_ISLNK(stat_buf.st_mode)))
{
- fprintf(stderr, "Error: \"%s\" is not a link or a directory.\n", kde_tmp_dir);
+ fprintf(stderr, "[lnusertemp] Error: \"%s\" is not a link or a directory.\n", kde_tmp_dir);
return 1;
}
/* kde_tmp_dir is a link. Check whether it points to a valid directory. */
result = readlink(kde_tmp_dir, tmp_buf, PATH_MAX);
if (result == -1)
{
- fprintf(stderr, "Error: \"%s\" could not be read.\n", kde_tmp_dir);
+ fprintf(stderr, "[lnusertemp] Error: \"%s\" could not be read.\n", kde_tmp_dir);
return 1;
}
tmp_buf[result] = '\0';
- /*printf("Link points to \"%s\"\n", tmp_buf);*/
+ /*printf("[lnusertemp] Link \"%s\" points to \"%s\"\n", kde_tmp_dir, tmp_buf);*/
if (strncmp(tmp_buf, user_tmp_dir, strlen(user_tmp_dir)) != 0)
{
- fprintf(stderr, "Error: \"%s\" points to \"%s\" instead of \"%s\".\n", kde_tmp_dir, tmp_buf, user_tmp_dir);
+ fprintf(stderr, "[lnusertemp] Error: \"%s\" points to \"%s\" instead of \"%s\".\n", kde_tmp_dir, tmp_buf, user_tmp_dir);
unlink(kde_tmp_dir);
- /*printf("Creating link %s.\n", kde_tmp_dir);*/
+ /*printf("[lnusertemp] Creating link %s.\n", kde_tmp_dir);*/
result = create_link(kde_tmp_dir, user_tmp_dir);
if (result == 0) return 0; /* Success */
unlink(kde_tmp_dir);
@@ -241,13 +241,17 @@ int main(int argc, char **argv)
(strcmp(argv[1], "socket")!=0) &&
(strcmp(argv[1], "cache")!=0)))
{
- fprintf(stderr, "Usage: lnusertemp tmp|socket|cache\n");
+ fprintf(stderr, "[lnusertemp] Usage: lnusertemp tmp|socket|cache\n");
return 1;
}
tmp = getenv("TDETMP");
if (!tmp || !tmp[0])
tmp = getenv("TMPDIR");
+ if (!tmp || !tmp[0])
+ tmp = getenv("TEMP");
+ if (!tmp || !tmp[0])
+ tmp = getenv("TMP");
if (!tmp || !tmp[0])
tmp = "/tmp";
diff --git a/kinit/wrapper.c b/kinit/wrapper.c
index 9ddc88eb6..36a75d46b 100644
--- a/kinit/wrapper.c
+++ b/kinit/wrapper.c
@@ -146,12 +146,12 @@ static int openSocket()
{
if (!home_dir || !home_dir[0])
{
- fprintf(stderr, "[trinity kinit] Warning: $HOME not set!\n");
+ fprintf(stderr, "[kinit wrapper] Warning: $HOME not set!\n");
return -1;
}
if (strlen(home_dir) > (MAX_SOCK_FILE-100))
{
- fprintf(stderr, "[trinity kinit] Warning: Home directory path too long!\n");
+ fprintf(stderr, "[kinit wrapper] Warning: Home directory path too long!\n");
return -1;
}
kde_home++;
@@ -168,7 +168,7 @@ static int openSocket()
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)
{
- perror("[trinity kinit] Warning: Could not determine hostname: ");
+ perror("[kinit wrapper] Warning: Could not determine hostname: ");
return -1;
}
sock_file[sizeof(sock_file)-1] = '\0';
@@ -177,13 +177,13 @@ static int openSocket()
display = getDisplay();
if (display == NULL)
{
- fprintf(stderr, "[trinity kinit] Error: Could not determine display.\n");
+ fprintf(stderr, "[kinit wrapper] Error: Could not determine display.\n");
return -1;
}
if (strlen(sock_file)+strlen(display)+strlen("/tdeinit_")+2 > MAX_SOCK_FILE)
{
- fprintf(stderr, "[trinity kinit] Warning: Socket name will be too long.\n");
+ fprintf(stderr, "[kinit wrapper] Warning: Socket name will be too long.\n");
free (display);
return -1;
}
@@ -193,7 +193,7 @@ static int openSocket()
if (strlen(sock_file) >= sizeof(server.sun_path))
{
- fprintf(stderr, "[trinity kinit] Warning: Path of socketfile exceeds UNIX_PATH_MAX.\n");
+ fprintf(stderr, "[kinit wrapper] Warning: Path of socket file exceeds UNIX_PATH_MAX.\n");
return -1;
}
@@ -203,7 +203,7 @@ static int openSocket()
s = socket(PF_UNIX, SOCK_STREAM, 0);
if (s < 0)
{
- perror("[trinity kinit] Warning: socket() failed: ");
+ perror("[kinit wrapper] Warning: socket creation failed: ");
return -1;
}
@@ -212,7 +212,7 @@ static int openSocket()
socklen = sizeof(server);
if(connect(s, (struct sockaddr *)&server, socklen) == -1)
{
- perror("[trinity kinit] Warning: connect() failed: ");
+ perror("[kinit wrapper] Warning: socket connection failed: ");
close(s);
return -1;
}
@@ -340,14 +340,14 @@ int main(int argc, char **argv)
{
if( argc > 1)
{
- fprintf(stderr, "[trinity kinit] Usage: %s\n\n", start);
- fprintf(stderr, "[trinity kinit] Shuts down tdeinit master process and terminates all processes spawned from it.\n");
+ fprintf(stderr, "[kinit wrapper] Usage: %s\n\n", start);
+ fprintf(stderr, "[kinit wrapper] Shuts down tdeinit master process and terminates all processes spawned from it.\n");
exit( 255 );
}
sock = openSocket();
if( sock < 0 )
{
- fprintf( stderr, "[trinity kinit] Error: Can't contact tdeinit!\n" );
+ fprintf( stderr, "[kinit wrapper] Error: Can't contact tdeinit!\n" );
exit( 255 );
}
header.cmd = LAUNCHER_TERMINATE_KDE;
@@ -363,7 +363,7 @@ int main(int argc, char **argv)
argc--;
if (argc < 1)
{
- fprintf(stderr, "[trinity kinit] Usage: %s <application> [<args>]\n", start);
+ fprintf(stderr, "[kinit wrapper] Usage: %s <application> [<args>]\n", start);
exit(255); /* usage should be documented somewhere ... */
}
start = argv[0];
@@ -373,7 +373,7 @@ int main(int argc, char **argv)
if( sock < 0 ) /* couldn't contact tdeinit, start argv[ 0 ] directly */
{
execvp( argv[ 0 ], argv );
- fprintf( stderr, "[trinity kinit] Error: Can't run %s !\n", argv[ 0 ] );
+ fprintf( stderr, "[kinit wrapper] Error: Can't run %s !\n", argv[ 0 ] );
exit( 255 );
}
@@ -449,7 +449,7 @@ int main(int argc, char **argv)
buffer = (char *) malloc(size);
if (buffer == NULL)
{
- fprintf(stderr, "[trinity kinit] Error: malloc() failed.");
+ fprintf(stderr, "[kinit wrapper] Error: malloc() failed.");
exit(255);
}
p = buffer;
@@ -506,7 +506,7 @@ int main(int argc, char **argv)
if( p - buffer != size ) /* should fail only if you change this source and do */
/* a stupid mistake, it should be assert() actually */
{
- fprintf(stderr, "[trinity kinit] Oops. Invalid format.\n");
+ fprintf(stderr, "[kinit wrapper] Oops. Invalid format.\n");
exit(255);
}
@@ -515,7 +515,7 @@ int main(int argc, char **argv)
if (read_socket(sock, (char *) &header, sizeof(header))==-1)
{
- fprintf(stderr, "[trinity kinit] Communication error.\n");
+ fprintf(stderr, "[kinit wrapper] Communication error.\n");
exit(255);
}
@@ -525,7 +525,7 @@ int main(int argc, char **argv)
buffer = (char *) malloc(header.arg_length);
if (buffer == NULL)
{
- fprintf(stderr, "[trinity kinit] Error: malloc() failed\n");
+ fprintf(stderr, "[kinit wrapper] Error: malloc() failed\n");
exit(255);
}
read_socket(sock, buffer, header.arg_length);
@@ -535,12 +535,12 @@ int main(int argc, char **argv)
}
else if (header.cmd == LAUNCHER_ERROR)
{
- fprintf(stderr, "[trinity kinit] Could not launch '%s'.\n", start);
+ fprintf(stderr, "[kinit wrapper] Could not launch '%s'.\n", start);
exit(255);
}
else
{
- fprintf(stderr, "[trinity kinit] Unexpected response (response = %ld).\n", header.cmd);
+ fprintf(stderr, "[kinit wrapper] Unexpected response (response = %ld).\n", header.cmd);
exit(255);
}
exit(0);
diff --git a/kio/kio/lex.c b/kio/kio/lex.c
index 4b8cb21f7..99848a2f3 100644
--- a/kio/kio/lex.c
+++ b/kio/kio/lex.c
@@ -1584,7 +1584,7 @@ static void yy_fatal_error( msg )
char msg[];
#endif
{
- (void) fprintf( stderr, "%s\n", msg );
+ (void) fprintf( stderr, "[lex] %s\n", msg );
exit( YY_EXIT_FAILURE );
}
diff --git a/kjs/array_object.cpp b/kjs/array_object.cpp
index a23e08dae..de49e4164 100644
--- a/kjs/array_object.cpp
+++ b/kjs/array_object.cpp
@@ -438,7 +438,7 @@ ArrayPrototypeImp::ArrayPrototypeImp(ExecState */*exec*/,
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 );
}
diff --git a/kjs/collector.cpp b/kjs/collector.cpp
index b8d233850..2ddd635a6 100644
--- a/kjs/collector.cpp
+++ b/kjs/collector.cpp
@@ -163,7 +163,7 @@ bool Collector::collect()
if (InterpreterImp::s_hook) {
InterpreterImp *scr = InterpreterImp::s_hook;
do {
- //fprintf( stderr, "Collector marking interpreter %p\n",(void*)scr);
+ //fprintf( stderr, "[kjs-collector] Collector marking interpreter %p\n",(void*)scr);
scr->mark();
scr = scr->next;
} while (scr != InterpreterImp::s_hook);
@@ -221,7 +221,7 @@ bool Collector::collect()
if (!(imp->_flags & ValueImp::VI_DESTRUCTED)) {
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()'
imp->~ValueImp();
curBlock->usedCells--;
diff --git a/kjs/internal.cpp b/kjs/internal.cpp
index 25f7b6e31..3ab0b9de2 100644
--- a/kjs/internal.cpp
+++ b/kjs/internal.cpp
@@ -503,16 +503,16 @@ FunctionBodyNode *Parser::parse(const UChar *code, unsigned int length, SourceCo
if (errMsg)
*errMsg = "Parse error at line " + UString::from(eline);
#ifdef KJS_VERBOSE
- fprintf( stderr, "%s\n", UString(code,length).ascii() );
+ fprintf( stderr, "[kjs-internal] %s\n", UString(code,length).ascii() );
#endif
#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
delete prog;
return 0;
}
#ifdef KJS_VERBOSE
- fprintf( stderr, "%s\n", prog->toCode().ascii() );
+ fprintf( stderr, "[kjs-internal] %s\n", prog->toCode().ascii() );
#endif
return prog;
@@ -524,7 +524,7 @@ InterpreterImp* InterpreterImp::s_hook = 0L;
void InterpreterImp::globalInit()
{
- //fprintf( stderr, "InterpreterImp::globalInit()\n" );
+ //fprintf( stderr, "[kjs-internal] InterpreterImp::globalInit()\n" );
UndefinedImp::staticUndefined = new UndefinedImp();
UndefinedImp::staticUndefined->ref();
NullImp::staticNull = new NullImp();
@@ -539,7 +539,7 @@ void InterpreterImp::globalInit()
void InterpreterImp::globalClear()
{
- //fprintf( stderr, "InterpreterImp::globalClear()\n" );
+ //fprintf( stderr, "[kjs-internal] InterpreterImp::globalClear()\n" );
UndefinedImp::staticUndefined->deref();
UndefinedImp::staticUndefined->setGcAllowed();
UndefinedImp::staticUndefined = 0L;
@@ -783,7 +783,7 @@ void InterpreterImp::mark()
BooleanImp::staticTrue->mark();
if (BooleanImp::staticFalse && !BooleanImp::staticFalse->marked())
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())
global.imp()->mark();
if (m_interpreter)
diff --git a/kjs/math_object.cpp b/kjs/math_object.cpp
index 6ad8289b0..be4943319 100644
--- a/kjs/math_object.cpp
+++ b/kjs/math_object.cpp
@@ -122,7 +122,7 @@ Value MathObjectImp::getValueProperty(ExecState *, int token) const
d = sqrt(2.0);
break;
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;
}
diff --git a/kjs/nodes.cpp b/kjs/nodes.cpp
index c6ee18bf1..6bb6cfaae 100644
--- a/kjs/nodes.cpp
+++ b/kjs/nodes.cpp
@@ -154,10 +154,10 @@ void Node::finalCheck()
fprintf(stderr, "Node::finalCheck(): list 0\n");
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();
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;
s_nodes = 0L;
}
diff --git a/kjs/object.cpp b/kjs/object.cpp
index fba1e0257..9afdb6c35 100644
--- a/kjs/object.cpp
+++ b/kjs/object.cpp
@@ -210,7 +210,7 @@ void ObjectImp::put(ExecState *exec, const Identifier &propertyName,
// and let it override the canPut() check.
if ((attr == None || attr == DontDelete) && !canPut(exec,propertyName)) {
#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
return;
}
diff --git a/tdecore/kcrash.cpp b/tdecore/kcrash.cpp
index 0b3d615ff..4596a73ca 100644
--- a/tdecore/kcrash.cpp
+++ b/tdecore/kcrash.cpp
@@ -148,10 +148,10 @@ KCrash::defaultCrashHandler (int sig)
if (appName)
{
#ifndef NDEBUG
- fprintf(stderr, "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: crashing... crashRecursionCounter = %d\n", crashRecursionCounter);
+ fprintf(stderr, "[kcrash] KCrash: Application Name = %s path = %s pid = %d\n", appName ? appName : "<unknown>" , appPath ? appPath : "<unknown>", getpid());
#else
- fprintf(stderr, "KCrash: Application '%s' crashing...\n", appName ? appName : "<unknown>");
+ fprintf(stderr, "[kcrash] KCrash: Application '%s' crashing...\n", appName ? appName : "<unknown>");
#endif
const char * argv[24]; // don't forget to update this
@@ -231,13 +231,13 @@ KCrash::defaultCrashHandler (int sig)
}
else {
- fprintf(stderr, "Unknown appname\n");
+ fprintf(stderr, "[kcrash] Unknown appname\n");
}
}
if (crashRecursionCounter < 4)
{
- fprintf(stderr, "Unable to start Dr. Konqi\n");
+ fprintf(stderr, "[kcrash] Unable to start Dr. Konqi\n");
}
#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
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 );
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()
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();
if (pid <= 0)
{
@@ -451,12 +451,12 @@ static int openSocket()
{
if (!home_dir || !home_dir[0])
{
- fprintf(stderr, "Warning: $HOME not set!\n");
+ fprintf(stderr, "[kcrash] Warning: $HOME not set!\n");
return -1;
}
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;
}
kde_home++;
@@ -473,7 +473,7 @@ static int openSocket()
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)
{
- perror("Warning: Could not determine hostname: ");
+ perror("[kcrash] Warning: Could not determine hostname: ");
return -1;
}
sock_file[sizeof(sock_file)-1] = '\0';
@@ -482,13 +482,13 @@ static int openSocket()
display = getDisplay();
if (display == NULL)
{
- fprintf(stderr, "Error: Could not determine display.\n");
+ fprintf(stderr, "[kcrash] Error: Could not determine display.\n");
return -1;
}
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);
return -1;
}
@@ -498,7 +498,7 @@ static int openSocket()
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;
}
@@ -508,7 +508,7 @@ static int openSocket()
s = socket(PF_UNIX, SOCK_STREAM, 0);
if (s < 0)
{
- perror("Warning: socket() failed: ");
+ perror("[kcrash] Warning: socket creation failed: ");
return -1;
}
@@ -517,7 +517,7 @@ static int openSocket()
socklen = sizeof(server);
if(connect(s, (struct sockaddr *)&server, socklen) == -1)
{
- perror("Warning: connect() failed: ");
+ perror("[kcrash] Warning: socket connection failed: ");
close(s);
return -1;
}
diff --git a/tdecore/netwm.cpp b/tdecore/netwm.cpp
index 455b6db65..bc352c8bc 100644
--- a/tdecore/netwm.cpp
+++ b/tdecore/netwm.cpp
@@ -629,7 +629,7 @@ NETRootInfo::NETRootInfo(Display *display, Window supportWindow, const char *wmN
p->desktop_layout_columns = p->desktop_layout_rows = 0;
setDefaultProperties();
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;
}
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;
setDefaultProperties();
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;
}
for( int i = 0; i < properties_size; ++i )
diff --git a/tdecore/tests/ksimpleconfigtest.cpp b/tdecore/tests/ksimpleconfigtest.cpp
index 6aa93c06d..699be34cf 100644
--- a/tdecore/tests/ksimpleconfigtest.cpp
+++ b/tdecore/tests/ksimpleconfigtest.cpp
@@ -32,17 +32,17 @@ int main( int argc, char **argv )
aConfig.writeEntry( "akey1", "avalue1" );
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();
sleep( 10 );
aConfig.setGroup( "Test group" );
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();
sleep( 10 );
aConfig.deleteGroup( "Another Test group", true );
- fprintf( stderr, "Deleted Another Test group\n" );
+ fprintf( stderr, "[ksimpleconfigtest] Deleted Another Test group\n" );
}
diff --git a/tdeprint/fooscanner.cpp b/tdeprint/fooscanner.cpp
index 0cf15d2d1..f4d554a09 100644
--- a/tdeprint/fooscanner.cpp
+++ b/tdeprint/fooscanner.cpp
@@ -1591,7 +1591,7 @@ static void yy_fatal_error( msg )
char msg[];
#endif
{
- (void) fprintf( stderr, "%s\n", msg );
+ (void) fprintf( stderr, "[fooscanner] %s\n", msg );
exit( YY_EXIT_FAILURE );
}
diff --git a/tdeprint/ppdscanner.cpp b/tdeprint/ppdscanner.cpp
index 12ade574d..3ae2235cd 100644
--- a/tdeprint/ppdscanner.cpp
+++ b/tdeprint/ppdscanner.cpp
@@ -1790,7 +1790,7 @@ static void yy_fatal_error( msg )
char msg[];
#endif
{
- (void) fprintf( stderr, "%s\n", msg );
+ (void) fprintf( stderr, "[ppdscanner] %s\n", msg );
exit( YY_EXIT_FAILURE );
}