Commit 60bce146 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Clipboard.c: use __func__ everywhere

parent 6ea7558d
...@@ -395,7 +395,7 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow) ...@@ -395,7 +395,7 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow)
int i; int i;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentClearClipboard: Called with client [%p] window [%p].\n", fprintf(stderr, "%s: Called with client [%p] window [%p].\n", __func__,
(void *) pClient, (void *) pWindow); (void *) pClient, (void *) pWindow);
#endif #endif
...@@ -411,7 +411,7 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow) ...@@ -411,7 +411,7 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow)
(pWindow != NULL && lastSelectionOwner[i].windowPtr == pWindow)) (pWindow != NULL && lastSelectionOwner[i].windowPtr == pWindow))
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentClearClipboard: Resetting state with client [%p] window [%p].\n", fprintf(stderr, "%s: Resetting state with client [%p] window [%p].\n", __func__,
(void *) pClient, (void *) pWindow); (void *) pClient, (void *) pWindow);
#endif #endif
...@@ -493,7 +493,7 @@ void nxagentRequestSelection(XEvent *X) ...@@ -493,7 +493,7 @@ void nxagentRequestSelection(XEvent *X)
XSelectionEvent eventSelection = {0}; XSelectionEvent eventSelection = {0};
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentRequestSelection: Got called.\n"); fprintf(stderr, "%s: Got called.\n", __func__);
#endif #endif
nxagentPrintClipboardStat("before nxagentRequestSelection"); nxagentPrintClipboardStat("before nxagentRequestSelection");
...@@ -614,7 +614,7 @@ FIXME: Do we need this? ...@@ -614,7 +614,7 @@ FIXME: Do we need this?
serverWindow, lastClientTime); serverWindow, lastClientTime);
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentRequestSelection: Sent XConvertSelection.\n"); fprintf(stderr, "%s: Sent XConvertSelection.\n", __func__);
#endif #endif
} }
else else
...@@ -668,7 +668,7 @@ FIXME: Do we need this? ...@@ -668,7 +668,7 @@ FIXME: Do we need this?
NullGrab); NullGrab);
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentRequestSelection: Executed TryClientEvents with clientCutProperty.\n"); fprintf(stderr, "%s: Executed TryClientEvents with clientCutProperty.\n", __func__);
#endif #endif
} }
else else
...@@ -719,7 +719,7 @@ void nxagentSendSelectionNotify(Atom property) ...@@ -719,7 +719,7 @@ void nxagentSendSelectionNotify(Atom property)
xEvent x; xEvent x;
#ifdef DEBUG #ifdef DEBUG
fprintf (stderr, "nxagentSendSelectionNotify: Sending event to client [%d].\n", fprintf (stderr, "%s: Sending event to client [%d].\n", __func__,
lastClientClientPtr -> index); lastClientClientPtr -> index);
#endif #endif
...@@ -746,7 +746,7 @@ void nxagentTransferSelection(int resource) ...@@ -746,7 +746,7 @@ void nxagentTransferSelection(int resource)
if (lastClientClientPtr -> index != resource) if (lastClientClientPtr -> index != resource)
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf (stderr, "nxagentTransferSelection: WARNING! Inconsistent resource [%d] with current client [%d].\n", fprintf (stderr, "%s: WARNING! Inconsistent resource [%d] with current client [%d].\n", __func__,
resource, lastClientClientPtr -> index); resource, lastClientClientPtr -> index);
#endif #endif
...@@ -774,7 +774,7 @@ void nxagentTransferSelection(int resource) ...@@ -774,7 +774,7 @@ void nxagentTransferSelection(int resource)
if (nxagentLastClipboardClient == -1) if (nxagentLastClipboardClient == -1)
{ {
#ifdef WARNING #ifdef WARNING
fprintf(stderr, "nxagentTransferSelection: WARNING! Asynchronous GetProperty queue full.\n"); fprintf(stderr, "%s: WARNING! Asynchronous GetProperty queue full.\n", __func__);
#endif #endif
result = -1; result = -1;
...@@ -794,7 +794,7 @@ void nxagentTransferSelection(int resource) ...@@ -794,7 +794,7 @@ void nxagentTransferSelection(int resource)
if (result == -1) if (result == -1)
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf (stderr, "nxagentTransferSelection: Aborting selection notify procedure for client [%d].\n", fprintf (stderr, "%s: Aborting selection notify procedure for client [%d].\n", __func__,
lastClientClientPtr -> index); lastClientClientPtr -> index);
#endif #endif
...@@ -819,7 +819,7 @@ void nxagentTransferSelection(int resource) ...@@ -819,7 +819,7 @@ void nxagentTransferSelection(int resource)
*/ */
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentTransferSelection: Getting property content from remote server.\n"); fprintf(stderr, "%s: Getting property content from remote server.\n", __func__);
#endif #endif
nxagentLastClipboardClient = NXGetCollectPropertyResource(nxagentDisplay); nxagentLastClipboardClient = NXGetCollectPropertyResource(nxagentDisplay);
...@@ -827,7 +827,7 @@ void nxagentTransferSelection(int resource) ...@@ -827,7 +827,7 @@ void nxagentTransferSelection(int resource)
if (nxagentLastClipboardClient == -1) if (nxagentLastClipboardClient == -1)
{ {
#ifdef WARNING #ifdef WARNING
fprintf(stderr, "nxagentTransferSelection: WARNING! Asynchronous GetProperty queue full.\n"); fprintf(stderr, "%s: WARNING! Asynchronous GetProperty queue full.\n", __func__);
#endif #endif
result = -1; result = -1;
...@@ -847,7 +847,7 @@ void nxagentTransferSelection(int resource) ...@@ -847,7 +847,7 @@ void nxagentTransferSelection(int resource)
if (result == -1) if (result == -1)
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf (stderr, "nxagentTransferSelection: Aborting selection notify procedure for client [%d].\n", fprintf (stderr, "%s: Aborting selection notify procedure for client [%d].\n", __func__,
lastClientClientPtr -> index); lastClientClientPtr -> index);
#endif #endif
...@@ -866,7 +866,7 @@ void nxagentTransferSelection(int resource) ...@@ -866,7 +866,7 @@ void nxagentTransferSelection(int resource)
default: default:
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf (stderr, "nxagentTransferSelection: WARNING! Inconsistent state [%s] for client [%d].\n", fprintf (stderr, "%s: WARNING! Inconsistent state [%s] for client [%d].\n", __func__,
GetClientSelectionStageString(lastClientStage), lastClientClientPtr -> index); GetClientSelectionStageString(lastClientStage), lastClientClientPtr -> index);
#endif #endif
...@@ -903,7 +903,7 @@ void nxagentCollectPropertyEvent(int resource) ...@@ -903,7 +903,7 @@ void nxagentCollectPropertyEvent(int resource)
if (result == 0) if (result == 0)
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf (stderr, "nxagentCollectPropertyEvent: Failed to get reply data for client [%d].\n", fprintf (stderr, "%s: Failed to get reply data for client [%d].\n", __func__,
lastClientClientPtr -> index); lastClientClientPtr -> index);
#endif #endif
...@@ -919,8 +919,7 @@ void nxagentCollectPropertyEvent(int resource) ...@@ -919,8 +919,7 @@ void nxagentCollectPropertyEvent(int resource)
if (resultFormat != 8 && resultFormat != 16 && resultFormat != 32) if (resultFormat != 8 && resultFormat != 16 && resultFormat != 32)
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf (stderr, "nxagentCollectPropertyEvent: WARNING! Invalid property " fprintf (stderr, "%s: WARNING! Invalid property value.\n", __func__);
"value.\n");
#endif #endif
if (lastClientClientPtr != NULL) if (lastClientClientPtr != NULL)
...@@ -941,14 +940,14 @@ void nxagentCollectPropertyEvent(int resource) ...@@ -941,14 +940,14 @@ void nxagentCollectPropertyEvent(int resource)
{ {
PrintClientSelectionStage(); PrintClientSelectionStage();
#ifdef DEBUG #ifdef DEBUG
fprintf (stderr, "nxagentCollectPropertyEvent: Got size notify event for client [%d].\n", fprintf (stderr, "%s: Got size notify event for client [%d].\n", __func__,
lastClientClientPtr -> index); lastClientClientPtr -> index);
#endif #endif
if (ulReturnBytesLeft == 0) if (ulReturnBytesLeft == 0)
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf (stderr, "nxagentCollectPropertyEvent: Aborting selection notify procedure for client [%d].\n", fprintf (stderr, "%s: Aborting selection notify procedure for client [%d].\n", __func__,
lastClientClientPtr -> index); lastClientClientPtr -> index);
#endif #endif
...@@ -962,7 +961,7 @@ void nxagentCollectPropertyEvent(int resource) ...@@ -962,7 +961,7 @@ void nxagentCollectPropertyEvent(int resource)
} }
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentCollectPropertyEvent: Got property size from remote server.\n"); fprintf(stderr, "%s: Got property size from remote server.\n", __func__);
#endif #endif
/* /*
...@@ -980,14 +979,14 @@ void nxagentCollectPropertyEvent(int resource) ...@@ -980,14 +979,14 @@ void nxagentCollectPropertyEvent(int resource)
{ {
PrintClientSelectionStage(); PrintClientSelectionStage();
#ifdef DEBUG #ifdef DEBUG
fprintf (stderr, "nxagentCollectPropertyEvent: Got data notify event for client [%d].\n", fprintf (stderr, "%s: Got data notify event for client [%d].\n", __func__,
lastClientClientPtr -> index); lastClientClientPtr -> index);
#endif #endif
if (ulReturnBytesLeft != 0) if (ulReturnBytesLeft != 0)
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf (stderr, "nxagentCollectPropertyEvent: Aborting selection notify procedure for client [%d].\n", fprintf (stderr, "%s: Aborting selection notify procedure for client [%d].\n", __func__,
lastClientClientPtr -> index); lastClientClientPtr -> index);
#endif #endif
...@@ -1001,7 +1000,7 @@ void nxagentCollectPropertyEvent(int resource) ...@@ -1001,7 +1000,7 @@ void nxagentCollectPropertyEvent(int resource)
} }
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentCollectPropertyEvent: Got property content from remote server.\n"); fprintf(stderr, "%s: Got property content from remote server.\n", __func__);
#endif #endif
ChangeWindowProperty(lastClientWindowPtr, ChangeWindowProperty(lastClientWindowPtr,
...@@ -1011,7 +1010,7 @@ void nxagentCollectPropertyEvent(int resource) ...@@ -1011,7 +1010,7 @@ void nxagentCollectPropertyEvent(int resource)
ulReturnItems, pszReturnData, 1); ulReturnItems, pszReturnData, 1);
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentCollectPropertyEvent: Selection property [%s] changed to [%s]\n", fprintf(stderr, "%s: Selection property [%s] changed to [%s]\n", __func__,
validateString(NameForAtom(lastClientProperty)), pszReturnData); validateString(NameForAtom(lastClientProperty)), pszReturnData);
#endif #endif
...@@ -1029,7 +1028,7 @@ void nxagentCollectPropertyEvent(int resource) ...@@ -1029,7 +1028,7 @@ void nxagentCollectPropertyEvent(int resource)
default: default:
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf (stderr, "nxagentCollectPropertyEvent: WARNING! Inconsistent state [%s] for client [%d].\n", fprintf (stderr, "%s: WARNING! Inconsistent state [%s] for client [%d].\n", __func__,
GetClientSelectionStageString(lastClientStage), lastClientClientPtr -> index); GetClientSelectionStageString(lastClientStage), lastClientClientPtr -> index);
#endif #endif
...@@ -1045,7 +1044,7 @@ void nxagentNotifySelection(XEvent *X) ...@@ -1045,7 +1044,7 @@ void nxagentNotifySelection(XEvent *X)
XSelectionEvent eventSelection; XSelectionEvent eventSelection;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentNotifySelection: Got called.\n"); fprintf(stderr, "%s: Got called.\n", __func__);
#endif #endif
if (agentClipboardStatus != 1) if (agentClipboardStatus != 1)
...@@ -1054,7 +1053,7 @@ void nxagentNotifySelection(XEvent *X) ...@@ -1054,7 +1053,7 @@ void nxagentNotifySelection(XEvent *X)
} }
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentNotifySelection: SelectionNotify event.\n"); fprintf(stderr, "%s: SelectionNotify event.\n", __func__);
#endif #endif
PrintClientSelectionStage(); PrintClientSelectionStage();
...@@ -1064,7 +1063,7 @@ void nxagentNotifySelection(XEvent *X) ...@@ -1064,7 +1063,7 @@ void nxagentNotifySelection(XEvent *X)
if ((lastClientStage == SelectionStageNone) && (X->xselection.property == serverCutProperty)) if ((lastClientStage == SelectionStageNone) && (X->xselection.property == serverCutProperty))
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentNotifySelection: Starting selection transferral for client [%d].\n", fprintf(stderr, "%s: Starting selection transferral for client [%d].\n", __func__,
lastClientClientPtr -> index); lastClientClientPtr -> index);
#endif #endif
...@@ -1087,7 +1086,7 @@ void nxagentNotifySelection(XEvent *X) ...@@ -1087,7 +1086,7 @@ void nxagentNotifySelection(XEvent *X)
else else
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentNotifySelection: WARNING! Resetting selection transferral for client [%d].\n", fprintf(stderr, "%s: WARNING! Resetting selection transferral for client [%d].\n", __func__,
lastClientClientPtr -> index); lastClientClientPtr -> index);
#endif #endif
...@@ -1227,8 +1226,8 @@ void nxagentResetSelectionOwner(void) ...@@ -1227,8 +1226,8 @@ void nxagentResetSelectionOwner(void)
if (lastServerRequestor != None) if (lastServerRequestor != None)
{ {
#ifdef TEST #ifdef TEST
fprintf (stderr, "nxagentResetSelectionOwner: WARNING! Requestor window [0x%x] already found.\n", fprintf(stderr, "%s: WARNING! Requestor window [0x%x] already found.\n", __func__,
lastServerRequestor); lastServerRequestor);
#endif #endif
return; return;
...@@ -1242,7 +1241,7 @@ void nxagentResetSelectionOwner(void) ...@@ -1242,7 +1241,7 @@ void nxagentResetSelectionOwner(void)
{ {
XSetSelectionOwner(nxagentDisplay, lastSelectionOwner[i].selection, serverWindow, CurrentTime); XSetSelectionOwner(nxagentDisplay, lastSelectionOwner[i].selection, serverWindow, CurrentTime);
fprintf (stderr, "nxagentResetSelectionOwner: Reset clipboard state.\n"); fprintf(stderr, "%s: Reset clipboard state.\n", __func__);
lastSelectionOwner[i].client = NULL; lastSelectionOwner[i].client = NULL;
lastSelectionOwner[i].window = None; lastSelectionOwner[i].window = None;
...@@ -1262,7 +1261,7 @@ void nxagentSetSelectionOwner(Selection *pSelection) ...@@ -1262,7 +1261,7 @@ void nxagentSetSelectionOwner(Selection *pSelection)
{ {
int i; int i;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentSetSelectionOwner: Got called.\n"); fprintf(stderr, "%s: Got called.\n", __func__);
#endif #endif
if (agentClipboardStatus != 1) if (agentClipboardStatus != 1)
...@@ -1271,14 +1270,14 @@ void nxagentSetSelectionOwner(Selection *pSelection) ...@@ -1271,14 +1270,14 @@ void nxagentSetSelectionOwner(Selection *pSelection)
} }
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentSetSelectionOwner: Setting selection owner to window [0x%x].\n", fprintf(stderr, "%s: Setting selection owner to window [0x%x].\n", __func__,
serverWindow); serverWindow);
#endif #endif
#ifdef TEST #ifdef TEST
if (lastServerRequestor != None) if (lastServerRequestor != None)
{ {
fprintf (stderr, "nxagentSetSelectionOwner: WARNING! Requestor window [0x%x] already found.\n", fprintf (stderr, "%s: WARNING! Requestor window [0x%x] already found.\n", __func__,
lastServerRequestor); lastServerRequestor);
} }
#endif #endif
...@@ -1310,7 +1309,7 @@ FIXME ...@@ -1310,7 +1309,7 @@ FIXME
if (XGetSelectionOwner(nxagentDisplay,pSelection->selection)==serverWindow) if (XGetSelectionOwner(nxagentDisplay,pSelection->selection)==serverWindow)
{ {
fprintf (stderr, "NXdispatch: SetSelectionOwner OK\n"); fprintf (stderr, "%s: SetSelectionOwner OK\n", __func__);
lastSelectionOwnerSelection = pSelection; lastSelectionOwnerSelection = pSelection;
lastSelectionOwnerClient = pSelection->client; lastSelectionOwnerClient = pSelection->client;
...@@ -1322,7 +1321,7 @@ FIXME ...@@ -1322,7 +1321,7 @@ FIXME
lastServerRequestor = None; lastServerRequestor = None;
} }
else fprintf (stderr, "nxagentSetSelectionOwner: SetSelectionOwner failed\n"); else fprintf (stderr, "%s: SetSelectionOwner failed\n", __func__);
*/ */
} }
...@@ -1338,7 +1337,7 @@ FIXME: Why this pointer can be not a valid ...@@ -1338,7 +1337,7 @@ FIXME: Why this pointer can be not a valid
if (clients[client -> index] != client) if (clients[client -> index] != client)
{ {
#ifdef WARNING #ifdef WARNING
fprintf(stderr, "nxagentNotifyConvertFailure: WARNING! Invalid client pointer."); fprintf(stderr, "%s: WARNING! Invalid client pointer.", __func__);
#endif #endif
return; return;
...@@ -1388,14 +1387,14 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, ...@@ -1388,14 +1387,14 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
if (lastClientWindowPtr != NULL) if (lastClientWindowPtr != NULL)
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentConvertSelection: lastClientWindowPtr != NULL.\n"); fprintf(stderr, "%s: lastClientWindowPtr != NULL.\n", __func__);
#endif #endif
if ((GetTimeInMillis() - lastClientReqTime) > 5000) if ((GetTimeInMillis() - lastClientReqTime) > 5000)
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentConvertSelection: timeout expired on last request, " fprintf(stderr, "%s: timeout expired on last request, "
"notifying failure to client\n"); "notifying failure to client\n", __func__);
#endif #endif
nxagentNotifyConvertFailure(lastClientClientPtr, lastClientRequestor, nxagentNotifyConvertFailure(lastClientClientPtr, lastClientRequestor,
...@@ -1407,8 +1406,8 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, ...@@ -1407,8 +1406,8 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
else else
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentConvertSelection: got request " fprintf(stderr, "%s: got request "
"before timeout expired on last request, notifying failure to client\n"); "before timeout expired on last request, notifying failure to client\n", __func__);
#endif #endif
nxagentNotifyConvertFailure(client, requestor, selection, target, time); nxagentNotifyConvertFailure(client, requestor, selection, target, time);
...@@ -1418,8 +1417,8 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, ...@@ -1418,8 +1417,8 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
} }
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentConvertSelection: client [%d] ask for sel [%s] " fprintf(stderr, "%s: client [%d] ask for sel [%s] "
"on window [%x] prop [%s] target [%s].\n", "on window [%x] prop [%s] target [%s].\n", __func__,
client -> index, validateString(NameForAtom(selection)), requestor, client -> index, validateString(NameForAtom(selection)), requestor,
validateString(NameForAtom(property)), validateString(NameForAtom(target))); validateString(NameForAtom(property)), validateString(NameForAtom(target)));
#endif #endif
...@@ -1508,8 +1507,8 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, ...@@ -1508,8 +1507,8 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
*/ */
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentConvertSelection: Consecutives request from client [%p] selection [%u] " fprintf(stderr, "%s: Consecutives request from client [%p] selection [%u] "
"elapsed time [%u] clientAccum [%d]\n", (void *) client, selection, "elapsed time [%u] clientAccum [%d]\n", __func__, (void *) client, selection,
GetTimeInMillis() - lastClientReqTime, clientAccum); GetTimeInMillis() - lastClientReqTime, clientAccum);
#endif #endif
...@@ -1557,7 +1556,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, ...@@ -1557,7 +1556,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
} }
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentConvertSelection: Sent XConvertSelection with target=[%s], property [%s]\n", fprintf(stderr, "%s: Sent XConvertSelection with target=[%s], property [%s]\n", __func__,
validateString(NameForAtom(target)), validateString(NameForAtom(property))); validateString(NameForAtom(target)), validateString(NameForAtom(property)));
#endif #endif
...@@ -1568,8 +1567,8 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, ...@@ -1568,8 +1567,8 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
xEvent x; xEvent x;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentConvertSelection: Xserver generates a SelectionNotify event " fprintf(stderr, "%s: Xserver generates a SelectionNotify event "
"to the requestor with property None.\n"); "to the requestor with property None.\n", __func__);
#endif #endif
memset(&x, 0, sizeof(xEvent)); memset(&x, 0, sizeof(xEvent));
...@@ -1654,7 +1653,7 @@ int nxagentSendNotify(xEvent *event) ...@@ -1654,7 +1653,7 @@ int nxagentSendNotify(xEvent *event)
return 1; return 1;
} }
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentSendNotify: sent nothing.\n"); fprintf(stderr, "%s: sent nothing.\n", __func__);
#endif #endif
return 0; return 0;
} }
...@@ -1699,7 +1698,7 @@ int nxagentInitClipboard(WindowPtr pWin) ...@@ -1699,7 +1698,7 @@ int nxagentInitClipboard(WindowPtr pWin)
Window iWindow = nxagentWindow(pWin); Window iWindow = nxagentWindow(pWin);
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentInitClipboard: Got called.\n"); fprintf(stderr, "%s: Got called.\n", __func__);
#endif #endif
free(lastSelectionOwner); free(lastSelectionOwner);
...@@ -1731,7 +1730,7 @@ int nxagentInitClipboard(WindowPtr pWin) ...@@ -1731,7 +1730,7 @@ int nxagentInitClipboard(WindowPtr pWin)
{ {
extern unsigned long startTime; extern unsigned long startTime;
fprintf(stderr, "nxagentInitClipboard: Initializing start [%d] milliseconds.\n", fprintf(stderr, "%s: Initializing start [%d] milliseconds.\n", __func__,
GetTimeInMillis() - startTime); GetTimeInMillis() - startTime);
} }
#endif #endif
...@@ -1775,7 +1774,7 @@ int nxagentInitClipboard(WindowPtr pWin) ...@@ -1775,7 +1774,7 @@ int nxagentInitClipboard(WindowPtr pWin)
else else
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentInitClipboard: Registering for XFixesSelectionNotify events.\n"); fprintf(stderr, "%s: Registering for XFixesSelectionNotify events.\n", __func__);
#endif #endif
for (i = 0; i < nxagentMaxSelections; i++) for (i = 0; i < nxagentMaxSelections; i++)
...@@ -1801,8 +1800,8 @@ int nxagentInitClipboard(WindowPtr pWin) ...@@ -1801,8 +1800,8 @@ int nxagentInitClipboard(WindowPtr pWin)
if (nxagentSessionId[0]) if (nxagentSessionId[0])
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentInitClipboard: setting the ownership of %s to %lx" fprintf(stderr, "%s: setting the ownership of %s to %lx"
" and registering for PropertyChangeMask events\n", " and registering for PropertyChangeMask events\n", __func__,
validateString(XGetAtomName(nxagentDisplay, nxagentAtoms[10])), iWindow); validateString(XGetAtomName(nxagentDisplay, nxagentAtoms[10])), iWindow);
#endif #endif
...@@ -1847,8 +1846,8 @@ int nxagentInitClipboard(WindowPtr pWin) ...@@ -1847,8 +1846,8 @@ int nxagentInitClipboard(WindowPtr pWin)
if (clientCutProperty == None) if (clientCutProperty == None)
{ {
#ifdef PANIC #ifdef PANIC
fprintf(stderr, "nxagentInitClipboard: PANIC! " fprintf(stderr, "%s: PANIC! "
"Could not create NX_CUT_BUFFER_CLIENT atom.\n"); "Could not create NX_CUT_BUFFER_CLIENT atom.\n", __func__);
#endif #endif
return -1; return -1;
...@@ -1858,14 +1857,14 @@ int nxagentInitClipboard(WindowPtr pWin) ...@@ -1858,14 +1857,14 @@ int nxagentInitClipboard(WindowPtr pWin)
agentClipboardStatus = 1; agentClipboardStatus = 1;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentInitClipboard: Clipboard initialization completed.\n"); fprintf(stderr, "%s: Clipboard initialization completed.\n", __func__);
#endif #endif
#ifdef NXAGENT_TIMESTAMP #ifdef NXAGENT_TIMESTAMP
{ {
extern unsigned long startTime; extern unsigned long startTime;
fprintf(stderr, "nxagentInitClipboard: initializing ends [%d] milliseconds.\n", fprintf(stderr, "%s: initializing ends [%d] milliseconds.\n", __func__,
GetTimeInMillis() - startTime); GetTimeInMillis() - startTime);
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment