From: "Rodolfo García Peñas (kix)" <[email protected]>

The file funcs.h is removed. A new file osdep.h is created to hold
the definition for all osdep_*c files.

The files .c has been adjusted to include the right header files,
removing funcs.h, including osdep.h.

Signed-off-by: Rodolfo García Peñas (kix) <[email protected]>
---
 src/Makefile.am    |    2 +-
 src/application.c  |    1 +
 src/appmenu.c      |    1 -
 src/balloon.c      |    2 +-
 src/dialog.c       |    1 +
 src/dock.c         |    1 +
 src/dock.h         |    3 ---
 src/dockedapp.c    |    1 +
 src/event.h        |    2 ++
 src/framewin.c     |    1 +
 src/funcs.h        |   39 ---------------------------------------
 src/icon.h         |    1 -
 src/main.c         |    2 +-
 src/misc.c         |    1 +
 src/misc.h         |    3 ++-
 src/monitor.c      |    1 -
 src/motif.c        |    1 -
 src/moveres.c      |    1 -
 src/osdep.h        |   26 ++++++++++++++++++++++++++
 src/osdep_bsd.c    |    2 +-
 src/osdep_darwin.c |    2 +-
 src/osdep_linux.c  |    2 +-
 src/osdep_stub.c   |    2 +-
 src/placement.c    |    1 -
 src/screen.c       |    2 +-
 src/shutdown.c     |    1 -
 src/stacking.c     |    1 -
 src/texture.c      |    1 +
 src/window.c       |    1 +
 29 files changed, 46 insertions(+), 59 deletions(-)
 delete mode 100644 src/funcs.h
 create mode 100644 src/osdep.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 3df6742..41a7e83 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -41,7 +41,7 @@ wmaker_SOURCES =      \
        framewin.h \
        geomview.c \
        geomview.h \
-       funcs.h \
+       osdep.h \
        icon.c \
        icon.h \
        keybind.h \
diff --git a/src/application.c b/src/application.c
index abe1d2d..1bb0890 100644
--- a/src/application.c
+++ b/src/application.c
@@ -35,6 +35,7 @@
 #include "properties.h"
 #include "workspace.h"
 #include "dock.h"
+#include "defaults.h"
 
 /******** Global variables ********/
 
diff --git a/src/appmenu.c b/src/appmenu.c
index 0d6c7f4..343797b 100644
--- a/src/appmenu.c
+++ b/src/appmenu.c
@@ -33,7 +33,6 @@
 #include "WindowMaker.h"
 #include "menu.h"
 #include "actions.h"
-#include "funcs.h"
 #include "appmenu.h"
 #include "framewin.h"
 
diff --git a/src/balloon.c b/src/balloon.c
index c00375a..a904fe0 100644
--- a/src/balloon.c
+++ b/src/balloon.c
@@ -22,6 +22,7 @@
 
 #ifdef BALLOON_TEXT
 
+#include <stdio.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 #ifdef SHAPED_BALLOON
@@ -39,7 +40,6 @@
 #include "framewin.h"
 #include "icon.h"
 #include "appicon.h"
-#include "funcs.h"
 #include "workspace.h"
 #include "balloon.h"
 
diff --git a/src/dialog.c b/src/dialog.c
index 2c2e5d3..11d0325 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -51,6 +51,7 @@
 #include "WindowMaker.h"
 #include "GNUstep.h"
 #include "screen.h"
+#include "window.h"
 #include "dialog.h"
 #include "misc.h"
 #include "stacking.h"
diff --git a/src/dock.c b/src/dock.c
index 15d1679..b29fe62 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -24,6 +24,7 @@
 
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <strings.h>
diff --git a/src/dock.h b/src/dock.h
index 2c6c4bc..ffebb1e 100644
--- a/src/dock.h
+++ b/src/dock.h
@@ -23,10 +23,7 @@
 #ifndef WMDOCK_H_
 #define WMDOCK_H_
 
-
 #include "appicon.h"
-#include "funcs.h"
-
 
 typedef struct WDock {
     WScreen *screen_ptr;
diff --git a/src/dockedapp.c b/src/dockedapp.c
index cc592e0..0ef180f 100644
--- a/src/dockedapp.c
+++ b/src/dockedapp.c
@@ -25,6 +25,7 @@
 #include <X11/Xutil.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdio.h>
 
 #include "WindowMaker.h"
 #include "window.h"
diff --git a/src/event.h b/src/event.h
index 33a7a05..cfc245d 100644
--- a/src/event.h
+++ b/src/event.h
@@ -22,6 +22,8 @@
 #ifndef WMEVENT_H
 #define WMEVENT_H
 
+typedef void (WDeathHandler)(pid_t pid, unsigned int status, void *cdata);
+
 void EventLoop(void);
 void DispatchEvent(XEvent *event);
 void ProcessPendingEvents(void);
diff --git a/src/framewin.c b/src/framewin.c
index 40fd2a3..7304da7 100644
--- a/src/framewin.c
+++ b/src/framewin.c
@@ -37,6 +37,7 @@
 #include "resources.h"
 #include "screen.h"
 #include "wcore.h"
+#include "window.h"
 #include "framewin.h"
 #include "stacking.h"
 #include "misc.h"
diff --git a/src/funcs.h b/src/funcs.h
deleted file mode 100644
index 1eb5d78..0000000
--- a/src/funcs.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *  Window Maker window manager
- *
- *  Copyright (c) 1997-2003 Alfredo K. Kojima
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef WMFUNCS_H_
-#define WMFUNCS_H_
-
-#include <sys/types.h>
-#include <stdio.h>
-
-#include "window.h"
-#include "defaults.h"
-#include "keybind.h"
-
-typedef void (WCallBack)(void *cdata);
-typedef void (WDeathHandler)(pid_t pid, unsigned int status, void *cdata);
-
-
-/* ---[ osdep_*.c ]------------------------------------------------------- */
-
-Bool GetCommandForPid(int pid, char ***argv, int *argc);
-
-#endif
diff --git a/src/icon.h b/src/icon.h
index 368696f..e2c7d91 100644
--- a/src/icon.h
+++ b/src/icon.h
@@ -24,7 +24,6 @@
 
 #include "wcore.h"
 #include "window.h"
-#include "funcs.h"
 
 #define TILE_NORMAL    0
 #define TILE_CLIP      1
diff --git a/src/main.c b/src/main.c
index c087804..a0c096e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -45,7 +45,7 @@
 
 #include "WindowMaker.h"
 #include "window.h"
-#include "funcs.h"
+#include "defaults.h"
 #include "event.h"
 #include "startup.h"
 #include "menu.h"
diff --git a/src/misc.c b/src/misc.c
index a791a4a..6b3336d 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -38,6 +38,7 @@
 #include <WINGs/WUtil.h>
 #include <wraster.h>
 
+#include "window.h"
 #include "misc.h"
 #include "WindowMaker.h"
 #include "GNUstep.h"
diff --git a/src/misc.h b/src/misc.h
index 791bc59..39b4d32 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -21,9 +21,10 @@
 #ifndef WMMISC_H_
 #define WMMISC_H_
 
+#include "defaults.h"
+#include "keybind.h"
 #include "appicon.h"
 
-
 Bool wFetchName(Display *dpy, Window win, char **winname);
 Bool wGetIconName(Display *dpy, Window win, char **iconname);
 Bool UpdateDomainFile(WDDomain * domain);
diff --git a/src/monitor.c b/src/monitor.c
index 22eaaa9..d33372d 100644
--- a/src/monitor.c
+++ b/src/monitor.c
@@ -38,7 +38,6 @@
 #include "window.h"
 #include "dialog.h"
 #include "main.h"
-#include "funcs.h"
 
 /****** Global Variables ******/
 extern WPreferences wPreferences;
diff --git a/src/motif.c b/src/motif.c
index 9db9db8..5fca916 100644
--- a/src/motif.c
+++ b/src/motif.c
@@ -35,7 +35,6 @@
 #include "properties.h"
 #include "icon.h"
 #include "client.h"
-#include "funcs.h"
 #include "motif.h"
 
 /* Motif window hints */
diff --git a/src/moveres.c b/src/moveres.c
index 23045eb..fc44712 100644
--- a/src/moveres.c
+++ b/src/moveres.c
@@ -34,7 +34,6 @@
 #include "client.h"
 #include "icon.h"
 #include "dock.h"
-#include "funcs.h"
 #include "actions.h"
 #include "workspace.h"
 #include "placement.h"
diff --git a/src/osdep.h b/src/osdep.h
new file mode 100644
index 0000000..485995c
--- /dev/null
+++ b/src/osdep.h
@@ -0,0 +1,26 @@
+/*
+ *  Window Maker window manager
+ *
+ *  Copyright (c) 1997-2003 Alfredo K. Kojima
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef WMOSDEP_H_
+#define WMOSDEP_H_
+
+Bool GetCommandForPid(int pid, char ***argv, int *argc);
+
+#endif
diff --git a/src/osdep_bsd.c b/src/osdep_bsd.c
index e92a7c8..3393240 100644
--- a/src/osdep_bsd.c
+++ b/src/osdep_bsd.c
@@ -32,7 +32,7 @@
 #include <WINGs/WUtil.h>
 
 #include "wconfig.h"
-#include "funcs.h"
+#include "osdep.h"
 
 /*
  * copy argc and argv for an existing process identified by `pid'
diff --git a/src/osdep_darwin.c b/src/osdep_darwin.c
index 04ece9f..b3a7b4f 100644
--- a/src/osdep_darwin.c
+++ b/src/osdep_darwin.c
@@ -9,7 +9,7 @@
 #include <WINGs/WUtil.h>
 
 #include "wconfig.h"
-#include "funcs.h"
+#include "osdep.h"
 
 /*
  * copy argc and argv for an existing process identified by `pid'
diff --git a/src/osdep_linux.c b/src/osdep_linux.c
index 1336d2f..6d246e5 100644
--- a/src/osdep_linux.c
+++ b/src/osdep_linux.c
@@ -12,7 +12,7 @@
 #include <WINGs/WUtil.h>
 
 #include "wconfig.h"
-#include "funcs.h"
+#include "osdep.h"
 
 
 #define        RETRY( x )      do {                            \
diff --git a/src/osdep_stub.c b/src/osdep_stub.c
index d0349cd..18b170c 100644
--- a/src/osdep_stub.c
+++ b/src/osdep_stub.c
@@ -4,7 +4,7 @@
 #include <WINGs/WUtil.h>
 
 #include "wconfig.h"
-#include "funcs.h"
+#include "osdep.h"
 
 Bool GetCommandForPid(int pid, char ***argv, int *argc)
 {
diff --git a/src/placement.c b/src/placement.c
index 1e70709..a445ec1 100644
--- a/src/placement.c
+++ b/src/placement.c
@@ -34,7 +34,6 @@
 #include "icon.h"
 #include "appicon.h"
 #include "actions.h"
-#include "funcs.h"
 #include "application.h"
 #include "dock.h"
 #include "xinerama.h"
diff --git a/src/screen.c b/src/screen.c
index c61aa1f..90b5445 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -45,7 +45,7 @@
 #include "texture.h"
 #include "pixmap.h"
 #include "menu.h"
-#include "funcs.h"
+#include "window.h"
 #include "main.h"
 #include "actions.h"
 #include "properties.h"
diff --git a/src/shutdown.c b/src/shutdown.c
index 67c39ab..23f02ac 100644
--- a/src/shutdown.c
+++ b/src/shutdown.c
@@ -30,7 +30,6 @@
 #include "WindowMaker.h"
 #include "window.h"
 #include "client.h"
-#include "funcs.h"
 #include "main.h"
 #include "properties.h"
 #include "session.h"
diff --git a/src/stacking.c b/src/stacking.c
index 890e4d1..f28e5b3 100644
--- a/src/stacking.c
+++ b/src/stacking.c
@@ -30,7 +30,6 @@
 #include "WindowMaker.h"
 #include "screen.h"
 #include "window.h"
-#include "funcs.h"
 #include "actions.h"
 #include "properties.h"
 #include "stacking.h"
diff --git a/src/texture.c b/src/texture.c
index 47258a5..b7ddf89 100644
--- a/src/texture.c
+++ b/src/texture.c
@@ -31,6 +31,7 @@
 
 #include "WindowMaker.h"
 #include "texture.h"
+#include "window.h"
 #include "misc.h"
 
 extern WPreferences wPreferences;
diff --git a/src/window.c b/src/window.c
index 5b42d0c..eb72223 100644
--- a/src/window.c
+++ b/src/window.c
@@ -63,6 +63,7 @@
 #include "misc.h"
 #include "startup.h"
 #include "winmenu.h"
+#include "osdep.h"
 
 #ifdef MWM_HINTS
 # include "motif.h"
-- 
1.7.10.4


-- 
To unsubscribe, send mail to [email protected].

Reply via email to