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:
committed by
Carlos R. Mafra
parent
4b89104aca
commit
d517d5cac0
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
|
||||
#include <WINGs/WINGsP.h>
|
||||
|
||||
#include "geomview.h"
|
||||
|
||||
|
||||
typedef struct W_GeometryView {
|
||||
W_Class widgetClass;
|
||||
WMView *view;
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#include "session.h"
|
||||
#include "shutdown.h"
|
||||
#include "dialog.h"
|
||||
#include "main.h"
|
||||
|
||||
#include <WINGs/WUtil.h>
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
/****** Global Variables ******/
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
int showCrashDialog(int sig)
|
||||
static int showCrashDialog(int sig)
|
||||
{
|
||||
int crashAction;
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "funcs.h"
|
||||
#include "actions.h"
|
||||
#include "workspace.h"
|
||||
#include "placement.h"
|
||||
|
||||
#include "geomview.h"
|
||||
#include "screen.h"
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#include <WINGs/WUtil.h>
|
||||
|
||||
#include "wconfig.h"
|
||||
#include "funcs.h"
|
||||
|
||||
|
||||
#define RETRY( x ) do { \
|
||||
x; \
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <WINGs/WUtil.h>
|
||||
|
||||
#include "wconfig.h"
|
||||
#include "funcs.h"
|
||||
|
||||
Bool GetCommandForPid(int pid, char ***argv, int *argc)
|
||||
{
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "WindowMaker.h"
|
||||
#include "window.h"
|
||||
#include "GNUstep.h"
|
||||
#include "properties.h"
|
||||
|
||||
/* atoms */
|
||||
extern Atom _XA_WM_STATE;
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#include "session.h"
|
||||
#include "shutdown.h"
|
||||
#include "xmodifier.h"
|
||||
#include "rootmenu.h"
|
||||
|
||||
#include <WINGs/WUtil.h>
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user