From 4b89104aca4ec7e1a72851074b2bf05305d86454 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sun, 12 May 2013 00:24:51 +0200 Subject: [PATCH] WINGs: Added a few missing 'static' attributes to functions Some functions are not meant to be visible by user; the use of the attribute avoid risk of name clash with user functions at link time. --- WINGs/dragdestination.c | 12 ++++++------ WINGs/selection.c | 2 +- WINGs/tree.c | 2 +- WINGs/wpopupbutton.c | 2 +- WINGs/wtext.c | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/WINGs/dragdestination.c b/WINGs/dragdestination.c index 24c3ac48..17bbd8a7 100644 --- a/WINGs/dragdestination.c +++ b/WINGs/dragdestination.c @@ -108,7 +108,7 @@ static WMArray *getTypesFromThreeTypes(WMScreen * scr, XClientMessageEvent * eve return typeList; } -void storeRequiredTypeList(WMDraggingInfo * info) +static void storeRequiredTypeList(WMDraggingInfo * info) { WMView *destView = XDND_DEST_VIEW(info); WMScreen *scr = W_VIEW_SCREEN(destView); @@ -140,7 +140,7 @@ void storeRequiredTypeList(WMDraggingInfo * info) XDND_REQUIRED_TYPES(info) = requiredTypes; } -char *getNextRequestedDataType(WMDraggingInfo * info) +static char *getNextRequestedDataType(WMDraggingInfo * info) { /* get the type of the first data not yet retrieved from selection */ int nextTypeIndex; @@ -155,7 +155,7 @@ char *getNextRequestedDataType(WMDraggingInfo * info) /* ----- Action list ----- */ -WMArray *sourceOperationList(WMScreen * scr, Window sourceWin) +static WMArray *sourceOperationList(WMScreen * scr, Window sourceWin) { Atom dataType, *actionList; int i, size; @@ -417,7 +417,7 @@ storeDropData(WMView * destView, Atom selection, Atom target, Time timestamp, vo } } -Bool requestDropDataInSelection(WMView * destView, const char *type) +static Bool requestDropDataInSelection(WMView * destView, const char *type) { WMScreen *scr = W_VIEW_SCREEN(destView); @@ -436,7 +436,7 @@ Bool requestDropDataInSelection(WMView * destView, const char *type) return False; } -Bool requestDropData(WMDraggingInfo * info) +static Bool requestDropData(WMDraggingInfo * info) { WMView *destView = XDND_DEST_VIEW(info); char *nextType = getNextRequestedDataType(info); @@ -832,7 +832,7 @@ static void realizedObserver(void *self, WMNotification * notif) WMRemoveNotificationObserver(self); } -void W_SetXdndAwareProperty(WMScreen * scr, WMView * view, Atom * types, int typeCount) +static void W_SetXdndAwareProperty(WMScreen * scr, WMView * view, Atom * types, int typeCount) { WMView *toplevel = W_TopLevelOfView(view); diff --git a/WINGs/selection.c b/WINGs/selection.c index b07739d3..200b919a 100644 --- a/WINGs/selection.c +++ b/WINGs/selection.c @@ -78,7 +78,7 @@ void WMDeleteSelectionHandler(WMView * view, Atom selection, Time timestamp) XUngrabServer(dpy); } -void WMDeleteSelectionCallback(WMView * view, Atom selection, Time timestamp) +static void WMDeleteSelectionCallback(WMView * view, Atom selection, Time timestamp) { SelectionCallback *handler; WMArrayIterator iter; diff --git a/WINGs/tree.c b/WINGs/tree.c index e72e34a7..457ca833 100644 --- a/WINGs/tree.c +++ b/WINGs/tree.c @@ -17,7 +17,7 @@ typedef struct W_TreeNode { WMFreeDataProc *destructor; } W_TreeNode; -void destroyNode(void *data) +static void destroyNode(void *data) { WMTreeNode *aNode = (WMTreeNode *) data; diff --git a/WINGs/wpopupbutton.c b/WINGs/wpopupbutton.c index d41c7657..ef7af090 100644 --- a/WINGs/wpopupbutton.c +++ b/WINGs/wpopupbutton.c @@ -367,7 +367,7 @@ static void paintMenuEntry(PopUpButton * bPtr, int index, int highlight) } } -Pixmap makeMenuPixmap(PopUpButton * bPtr) +static Pixmap makeMenuPixmap(PopUpButton * bPtr) { Pixmap pixmap; W_Screen *scr = bPtr->view->screen; diff --git a/WINGs/wtext.c b/WINGs/wtext.c index e04e7177..cadc1512 100644 --- a/WINGs/wtext.c +++ b/WINGs/wtext.c @@ -2047,7 +2047,7 @@ static void releaseSelection(Text * tPtr) paintText(tPtr); } -WMData *requestHandler(WMView * view, Atom selection, Atom target, void *cdata, Atom * type) +static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *cdata, Atom * type) { Text *tPtr = view->self; Display *dpy = tPtr->view->screen->display; @@ -2788,7 +2788,7 @@ static WMDragDestinationProcs _DragDestinationProcs = { NULL }; -char *getStream(WMText * tPtr, int sel, int array) +static char *getStream(WMText * tPtr, int sel, int array) { TextBlock *tb = NULL; char *text = NULL; @@ -2864,7 +2864,7 @@ static void releaseStreamObjects(void *data) wfree(data); } -WMArray *getStreamObjects(WMText * tPtr, int sel) +static WMArray *getStreamObjects(WMText * tPtr, int sel) { WMArray *array = WMCreateArrayWithDestructor(4, releaseStreamObjects); WMData *data; -- 2.11.4.GIT