use the c++ std cheaders

This commit is contained in:
Dana Jansens 2003-02-09 23:07:54 +00:00
parent 74cfb1b4c1
commit 115fedf432
34 changed files with 73 additions and 188 deletions

View file

@ -39,8 +39,8 @@ ALL_LINGUAS=""
AM_GNU_GETTEXT_VERSION(0.11.5) AM_GNU_GETTEXT_VERSION(0.11.5)
AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT([external])
AC_CHECK_HEADERS(ctype.h dirent.h fcntl.h libgen.h locale.h nl_types.h process.h signal.h stdarg.h stdint.h stdio.h stdlib.h string.h time.h unistd.h sys/param.h sys/select.h sys/signal.h sys/stat.h sys/time.h sys/types.h sys/wait.h) AC_CHECK_HEADERS(fcntl.h signal.h stdarg.h stdint.h unistd.h sys/select.h sys/signal.h sys/stat.h sys/time.h sys/types.h sys/wait.h)
AC_HEADER_TIME # AC_HEADER_TIME
# AC_TYPE_SIGNAL # AC_TYPE_SIGNAL
# Check for Xft2 # Check for Xft2

View file

@ -1,8 +1,6 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif
#include "application.hh" #include "application.hh"
#include "eventhandler.hh" #include "eventhandler.hh"

View file

@ -1,8 +1,6 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif
#include "appwidget.hh" #include "appwidget.hh"
#include "application.hh" #include "application.hh"

View file

@ -1,8 +1,6 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif
#include "button.hh" #include "button.hh"

View file

@ -1,8 +1,6 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif
#include "display.hh" #include "display.hh"
#include "screeninfo.hh" #include "screeninfo.hh"
@ -24,10 +22,6 @@ extern "C" {
#include <X11/extensions/Xinerama.h> #include <X11/extensions/Xinerama.h>
#endif // XINERAMA #endif // XINERAMA
#ifdef HAVE_STDIO_H
# include <stdio.h>
#endif // HAVE_STDIO_H
#ifdef HAVE_SIGNAL_H #ifdef HAVE_SIGNAL_H
# include <signal.h> # include <signal.h>
#endif // HAVE_SIGNAL_H #endif // HAVE_SIGNAL_H
@ -45,6 +39,8 @@ extern "C" {
#define _(str) gettext(str) #define _(str) gettext(str)
} }
#include <cstdio>
namespace otk { namespace otk {

View file

@ -1,18 +1,11 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif
#include "eventdispatcher.hh" #include "eventdispatcher.hh"
#include "display.hh" #include "display.hh"
extern "C" { #include <cstdio>
#ifdef HAVE_STDIO_H
# include <stdio.h>
#endif
}
#include <iostream> #include <iostream>
namespace otk { namespace otk {

View file

@ -1,8 +1,6 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif
#include "display.hh" #include "display.hh"
#include "eventhandler.hh" #include "eventhandler.hh"

View file

@ -1,15 +1,8 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif // HAVE_CONFIG_H
extern "C" {
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif // HAVE_STDLIB_H
}
#include <cstdlib>
#include <iostream> #include <iostream>
#include <algorithm> #include <algorithm>

View file

@ -11,7 +11,7 @@ extern "C" {
#include <X11/Xft/Xft.h> #include <X11/Xft/Xft.h>
} }
#include <assert.h> #include <cassert>
namespace otk { namespace otk {

View file

@ -1,8 +1,6 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif
#include "label.hh" #include "label.hh"
#include "display.hh" #include "display.hh"

View file

@ -1,8 +1,6 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif
#include "application.hh" #include "application.hh"
#include "appwidget.hh" #include "appwidget.hh"

View file

@ -1,19 +1,16 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif // HAVE_CONFIG_H
#include "property.hh" #include "property.hh"
#include "display.hh" #include "display.hh"
extern "C" { extern "C" {
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <assert.h>
} }
#include <algorithm> #include <algorithm>
#include <cassert>
namespace otk { namespace otk {

View file

@ -11,11 +11,10 @@
extern "C" { extern "C" {
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <assert.h>
} }
#include <vector> #include <vector>
#include <cassert>
namespace otk { namespace otk {

View file

@ -1,8 +1,6 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif // HAVE_CONFIG_H
#include "pseudorendercontrol.hh" #include "pseudorendercontrol.hh"
#include "display.hh" #include "display.hh"

View file

@ -1,18 +1,12 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif // HAVE_CONFIG_H
#include "rendercolor.hh" #include "rendercolor.hh"
#include "display.hh" #include "display.hh"
#include "screeninfo.hh" #include "screeninfo.hh"
extern "C" { #include <cstdio>
#ifdef HAVE_STDIO_H
# include <stdio.h>
#endif
}
namespace otk { namespace otk {

View file

@ -1,8 +1,6 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif // HAVE_CONFIG_H
#include "rendercontrol.hh" #include "rendercontrol.hh"
#include "truerendercontrol.hh" #include "truerendercontrol.hh"

View file

@ -1,8 +1,6 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif // HAVE_CONFIG_H
#include "renderstyle.hh" #include "renderstyle.hh"
#include "display.hh" #include "display.hh"

View file

@ -1,9 +1,14 @@
#include "config.h"
#include "otk.hh" #include "otk.hh"
#include "rendercontrol.hh" #include "rendercontrol.hh"
#include "rendertexture.hh" #include "rendertexture.hh"
#include <stdio.h> extern "C" {
#include <X11/Xlib.h> #include <X11/Xlib.h>
}
#include <cstdio>
int main(int argc, char **argv) int main(int argc, char **argv)
{ {

View file

@ -1,8 +1,6 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif // HAVE_CONFIG_H
extern "C" { extern "C" {
#include <X11/Xlib.h> #include <X11/Xlib.h>

View file

@ -1,8 +1,6 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif // HAVE_CONFIG_H
#include "surface.hh" #include "surface.hh"
#include "display.hh" #include "display.hh"

View file

@ -1,8 +1,6 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif // HAVE_CONFIG_H
#include "timer.hh" #include "timer.hh"
#include "display.hh" #include "display.hh"
@ -10,12 +8,11 @@
extern "C" { extern "C" {
#ifdef HAVE_SYS_SELECT_H #ifdef HAVE_SYS_SELECT_H
# include <sys/select.h> # include <sys/select.h>
#else
# ifdef HAVE_UNISTD_H
# include <sys/types.h>
# include <unistd.h>
# endif // HAVE_UNISTD_H
#endif // HAVE_SYS_SELECT_H #endif // HAVE_SYS_SELECT_H
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
} }
namespace otk { namespace otk {

View file

@ -7,16 +7,7 @@
*/ */
extern "C" { extern "C" {
#ifdef TIME_WITH_SYS_TIME #include <ctime>
# include <sys/time.h>
# include <time.h>
#else // !TIME_WITH_SYS_TIME
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# else // !HAVE_SYS_TIME_H
# include <time.h>
# endif // HAVE_SYS_TIME_H
#endif // TIME_WITH_SYS_TIME
} }
#include <queue> #include <queue>
@ -39,7 +30,9 @@ private:
struct TimerCompare { struct TimerCompare {
//! Compares two timeval structs //! Compares two timeval structs
inline bool operator()(const Timer *a, const Timer *b) const { inline bool operator()(const Timer *a, const Timer *b) const {
return timercmp(&a->_timeout, &b->_timeout, >); return ((&a->_timeout)->tv_sec == (&b->_timeout)->tv_sec) ?
((&a->_timeout)->tv_usec > (&b->_timeout)->tv_usec) :
((&a->_timeout)->tv_sec > (&b->_timeout)->tv_sec);
} }
}; };
friend struct TimerCompare; // give access to _timeout for shitty compilers friend struct TimerCompare; // give access to _timeout for shitty compilers

View file

@ -1,8 +1,6 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif // HAVE_CONFIG_H
#include "truerendercontrol.hh" #include "truerendercontrol.hh"
#include "display.hh" #include "display.hh"

View file

@ -1,14 +1,10 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif // HAVE_CONFIG_H
#include "ustring.hh" #include "ustring.hh"
extern "C" { #include <cassert>
#include <assert.h>
}
namespace otk { namespace otk {

View file

@ -1,39 +1,29 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif // HAVE_CONFIG_H
extern "C" { extern "C" {
#include <X11/Xatom.h> #include <X11/Xatom.h>
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif // HAVE_UNISTD_H #endif // HAVE_UNISTD_H
#if defined(HAVE_PROCESS_H) && defined(__EMX__) // this is not checked in configure anymore!!
# include <process.h> //#if defined(HAVE_PROCESS_H) && defined(__EMX__)
#endif // HAVE_PROCESS_H __EMX__ //# include <process.h>
//#endif // HAVE_PROCESS_H __EMX__
#include "../src/gettext.h" #include "../src/gettext.h"
#define _(str) gettext(str) #define _(str) gettext(str)
#include <assert.h>
} }
#include <algorithm> #include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include "util.hh" #include "util.hh"
@ -52,16 +42,16 @@ string expandTilde(const string& s) {
void bexec(const string& command, const string& displaystring) { void bexec(const string& command, const string& displaystring) {
#ifndef __EMX__ //#ifndef __EMX__
if (! fork()) { if (! fork()) {
setsid(); setsid();
putenv(displaystring); putenv(displaystring);
int ret = execl("/bin/sh", "/bin/sh", "-c", command.c_str(), NULL); int ret = execl("/bin/sh", "/bin/sh", "-c", command.c_str(), NULL);
exit(ret); exit(ret);
} }
#else // __EMX__ //#else // __EMX__
spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", command.c_str(), NULL); // spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", command.c_str(), NULL);
#endif // !__EMX__ //#endif // !__EMX__
} }

View file

@ -5,17 +5,6 @@
extern "C" { extern "C" {
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else // !TIME_WITH_SYS_TIME
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# else // !HAVE_SYS_TIME_H
# include <time.h>
# endif // HAVE_SYS_TIME_H
#endif // TIME_WITH_SYS_TIME
} }
#include <string> #include <string>

View file

@ -1,8 +1,6 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif
#include "actions.hh" #include "actions.hh"
#include "openbox.hh" #include "openbox.hh"
@ -13,7 +11,7 @@
#include "bindings.hh" #include "bindings.hh"
#include "otk/display.hh" #include "otk/display.hh"
#include <stdio.h> #include <cstdio>
#include <algorithm> #include <algorithm>
namespace ob { namespace ob {

View file

@ -1,8 +1,6 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif
#include "bindings.hh" #include "bindings.hh"
#include "screen.hh" #include "screen.hh"

View file

@ -1,8 +1,6 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif
#include "client.hh" #include "client.hh"
#include "frame.hh" #include "frame.hh"

View file

@ -1,8 +1,6 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif
extern "C" { extern "C" {
#ifdef SHAPE #ifdef SHAPE

View file

@ -4,19 +4,9 @@
@brief Main entry point for the application @brief Main entry point for the application
*/ */
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif // HAVE_CONFIG_H
extern "C" { extern "C" {
#ifdef HAVE_LOCALE_H
# include <locale.h>
#endif // HAVE_LOCALE_H
#ifdef HAVE_STDIO_H
# include <stdio.h>
#endif // HAVE_STDIO_H
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <sys/types.h> # include <sys/types.h>
# include <unistd.h> # include <unistd.h>
@ -28,6 +18,9 @@ extern "C" {
#include "openbox.hh" #include "openbox.hh"
#include "otk/util.hh" #include "otk/util.hh"
#include <clocale>
#include <cstdio>
int main(int argc, char **argv) { int main(int argc, char **argv) {
// initialize the locale // initialize the locale
if (!setlocale(LC_ALL, "")) if (!setlocale(LC_ALL, ""))

View file

@ -1,8 +1,6 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif
#include "openbox.hh" #include "openbox.hh"
#include "client.hh" #include "client.hh"
@ -20,14 +18,6 @@
extern "C" { extern "C" {
#include <X11/cursorfont.h> #include <X11/cursorfont.h>
#ifdef HAVE_STDIO_H
# include <stdio.h>
#endif // HAVE_STDIO_H
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif // HAVE_STDLIB_H
#ifdef HAVE_SIGNAL_H #ifdef HAVE_SIGNAL_H
# include <signal.h> # include <signal.h>
#endif // HAVE_SIGNAL_H #endif // HAVE_SIGNAL_H
@ -45,6 +35,8 @@ extern "C" {
} }
#include <algorithm> #include <algorithm>
#include <cstdio>
#include <cstdlib>
namespace ob { namespace ob {

View file

@ -1,18 +1,8 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif
extern "C" { extern "C" {
#ifdef HAVE_STDIO_H
# include <stdio.h>
#endif // HAVE_STDIO_H
#ifdef HAVE_STRING_H
# include <string.h>
#endif // HAVE_STRING_H
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <sys/types.h> # include <sys/types.h>
# include <unistd.h> # include <unistd.h>
@ -33,6 +23,8 @@ extern "C" {
#include <vector> #include <vector>
#include <algorithm> #include <algorithm>
#include <cstdio>
#include <cstring>
static bool running; static bool running;
static int anotherWMRunning(Display *display, XErrorEvent *) { static int anotherWMRunning(Display *display, XErrorEvent *) {

View file

@ -3,9 +3,7 @@
%module ob %module ob
%{ %{
#ifdef HAVE_CONFIG_H #include "config.h"
# include "../config.h"
#endif
#include "frame.hh" #include "frame.hh"
#include "openbox.hh" #include "openbox.hh"