1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 04:20:27 +01:00

wmaker: Cleaned dangerous function prototype usage

- remove extern declaration in source file, use header instead

- add inclusion of header defining the functions of the file to
get the compiler to cross-check them

- marked static the functions that should not be visible ouside
their file
This commit is contained in:
Christophe CURIS
2013-05-12 00:24:52 +02:00
committed by Carlos R. Mafra
parent 4b89104aca
commit d517d5cac0
17 changed files with 21 additions and 9 deletions

View File

@@ -56,7 +56,6 @@ extern Time LastTimestamp;
extern Time LastFocusChange;
extern WPreferences wPreferences;
extern Atom _XA_WM_TAKE_FOCUS;
extern void ProcessPendingEvents();
static void find_Maximus_geometry(WWindow *wwin, WArea usableArea, int *new_x, int *new_y,
unsigned int *new_width, unsigned int *new_height);

View File

@@ -27,9 +27,12 @@
#include "WindowMaker.h"
#include <X11/Xatom.h>
#include "window.h"
#include "window.h"
#include "framewin.h"
#include "colormap.h"
void wColormapInstallForWindow(WScreen * scr, WWindow * wwin)
{
int i;

View File

@@ -327,7 +327,6 @@ void DispatchEvent(XEvent * event)
#define BUFF_SIZE ((sizeof(struct inotify_event) + 64)*5)
static void handle_inotify_events(int fd, int wd)
{
extern void wDefaultsCheckDomains(void *);
ssize_t eventQLength, i = 0;
char buff[BUFF_SIZE] = { 0 };
/* Check config only once per read of the event queue */

View File

@@ -41,6 +41,7 @@ void StartWindozeCycle(WWindow *wwin, XEvent *event, Bool next, Bool class_only)
void EventLoop(void);
void DispatchEvent(XEvent *event);
void ProcessPendingEvents(void);
WMagicNumber wAddDeathHandler(pid_t pid, WDeathHandler *callback, void *cdata);
Bool IsDoubleClick(WScreen *scr, XEvent *event);

View File

@@ -1,6 +1,9 @@
#include <WINGs/WINGsP.h>
#include "geomview.h"
typedef struct W_GeometryView {
W_Class widgetClass;
WMView *view;

View File

@@ -52,6 +52,7 @@
#include "session.h"
#include "shutdown.h"
#include "dialog.h"
#include "main.h"
#include <WINGs/WUtil.h>

View File

@@ -43,7 +43,7 @@
/****** Global Variables ******/
extern WPreferences wPreferences;
int showCrashDialog(int sig)
static int showCrashDialog(int sig)
{
int crashAction;

View File

@@ -37,6 +37,7 @@
#include "funcs.h"
#include "actions.h"
#include "workspace.h"
#include "placement.h"
#include "geomview.h"
#include "screen.h"

View File

@@ -32,6 +32,7 @@
#include <WINGs/WUtil.h>
#include "wconfig.h"
#include "funcs.h"
/*
* copy argc and argv for an existing process identified by `pid'

View File

@@ -9,6 +9,7 @@
#include <WINGs/WUtil.h>
#include "wconfig.h"
#include "funcs.h"
/*
* copy argc and argv for an existing process identified by `pid'

View File

@@ -12,6 +12,8 @@
#include <WINGs/WUtil.h>
#include "wconfig.h"
#include "funcs.h"
#define RETRY( x ) do { \
x; \

View File

@@ -4,6 +4,7 @@
#include <WINGs/WUtil.h>
#include "wconfig.h"
#include "funcs.h"
Bool GetCommandForPid(int pid, char ***argv, int *argc)
{

View File

@@ -38,6 +38,7 @@
#include "application.h"
#include "dock.h"
#include "xinerama.h"
#include "placement.h"
extern WPreferences wPreferences;
@@ -47,10 +48,6 @@ extern WPreferences wPreferences;
#define Y_ORIGIN WMAX(usableArea.y1,\
wPreferences.window_place_origin.y)
/* interactive window placement is in moveres.c */
extern void InteractivePlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
unsigned width, unsigned height);
/* Returns True if it is an icon and is in this workspace */
static Bool
iconPosition(WCoreWindow *wcore, int sx1, int sy1, int sx2, int sy2,

View File

@@ -33,6 +33,8 @@ int calcIntersectionArea(int x1, int y1, int w1, int h1, int x2, int y2, int w2,
void PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret, unsigned width, unsigned height);
void InteractivePlaceWindow(WWindow * wwin, int *x_ret, int *y_ret, unsigned width, unsigned height);
/* Set the points x and y inside the screen */
void get_right_position_on_screen(WScreen *scr, int *x, int *y, int size_x, int size_y);

View File

@@ -29,6 +29,7 @@
#include "WindowMaker.h"
#include "window.h"
#include "GNUstep.h"
#include "properties.h"
/* atoms */
extern Atom _XA_WM_STATE;

View File

@@ -52,6 +52,7 @@
#include "session.h"
#include "shutdown.h"
#include "xmodifier.h"
#include "rootmenu.h"
#include <WINGs/WUtil.h>

View File

@@ -61,7 +61,6 @@
extern int ignore_wks_change;
extern WPreferences wPreferences;
extern XContext wVEdgeContext;
extern void ProcessPendingEvents();
extern WShortKey wKeyBindings[WKBD_LAST];
static WMPropList *dWorkspaces = NULL;