AM_GNU_GETTEXT_VERSION(0.11.5)
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_HEADER_TIME
+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_TYPE_SIGNAL
# Check for Xft2
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif
+#include "config.h"
#include "application.hh"
#include "eventhandler.hh"
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif
+#include "config.h"
#include "appwidget.hh"
#include "application.hh"
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif
+#include "config.h"
#include "button.hh"
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif
+#include "config.h"
#include "display.hh"
#include "screeninfo.hh"
#include <X11/extensions/Xinerama.h>
#endif // XINERAMA
-#ifdef HAVE_STDIO_H
-# include <stdio.h>
-#endif // HAVE_STDIO_H
-
#ifdef HAVE_SIGNAL_H
# include <signal.h>
#endif // HAVE_SIGNAL_H
#define _(str) gettext(str)
}
+#include <cstdio>
+
namespace otk {
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif
+#include "config.h"
#include "eventdispatcher.hh"
#include "display.hh"
-extern "C" {
-#ifdef HAVE_STDIO_H
-# include <stdio.h>
-#endif
-}
-
+#include <cstdio>
#include <iostream>
namespace otk {
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif
+#include "config.h"
#include "display.hh"
#include "eventhandler.hh"
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif // HAVE_CONFIG_H
-
-extern "C" {
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif // HAVE_STDLIB_H
-}
+#include "config.h"
+#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <X11/Xft/Xft.h>
}
-#include <assert.h>
+#include <cassert>
namespace otk {
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif
+#include "config.h"
#include "label.hh"
#include "display.hh"
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif
+#include "config.h"
#include "application.hh"
#include "appwidget.hh"
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif // HAVE_CONFIG_H
+#include "config.h"
#include "property.hh"
#include "display.hh"
extern "C" {
#include <X11/Xatom.h>
-
-#include <assert.h>
}
#include <algorithm>
+#include <cassert>
namespace otk {
extern "C" {
#include <X11/Xlib.h>
-
-#include <assert.h>
}
#include <vector>
+#include <cassert>
namespace otk {
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif // HAVE_CONFIG_H
+#include "config.h"
#include "pseudorendercontrol.hh"
#include "display.hh"
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif // HAVE_CONFIG_H
+#include "config.h"
#include "rendercolor.hh"
#include "display.hh"
#include "screeninfo.hh"
-extern "C" {
-#ifdef HAVE_STDIO_H
-# include <stdio.h>
-#endif
-}
+#include <cstdio>
namespace otk {
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif // HAVE_CONFIG_H
+#include "config.h"
#include "rendercontrol.hh"
#include "truerendercontrol.hh"
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif // HAVE_CONFIG_H
+#include "config.h"
#include "renderstyle.hh"
#include "display.hh"
+#include "config.h"
+
#include "otk.hh"
#include "rendercontrol.hh"
#include "rendertexture.hh"
-#include <stdio.h>
+extern "C" {
#include <X11/Xlib.h>
+}
+
+#include <cstdio>
int main(int argc, char **argv)
{
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif // HAVE_CONFIG_H
+#include "config.h"
extern "C" {
#include <X11/Xlib.h>
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif // HAVE_CONFIG_H
+#include "config.h"
#include "surface.hh"
#include "display.hh"
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif // HAVE_CONFIG_H
+#include "config.h"
#include "timer.hh"
#include "display.hh"
extern "C" {
#ifdef HAVE_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
+
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
}
namespace otk {
*/
extern "C" {
-#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 <ctime>
}
#include <queue>
struct TimerCompare {
//! Compares two timeval structs
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
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif // HAVE_CONFIG_H
+#include "config.h"
#include "truerendercontrol.hh"
#include "display.hh"
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif // HAVE_CONFIG_H
+#include "config.h"
#include "ustring.hh"
-extern "C" {
-#include <assert.h>
-}
+#include <cassert>
namespace otk {
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif // HAVE_CONFIG_H
+#include "config.h"
extern "C" {
#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
#include <unistd.h>
#endif // HAVE_UNISTD_H
-#if defined(HAVE_PROCESS_H) && defined(__EMX__)
-# include <process.h>
-#endif // HAVE_PROCESS_H __EMX__
+// this is not checked in configure anymore!!
+//#if defined(HAVE_PROCESS_H) && defined(__EMX__)
+//# include <process.h>
+//#endif // HAVE_PROCESS_H __EMX__
#include "../src/gettext.h"
#define _(str) gettext(str)
-#include <assert.h>
}
#include <algorithm>
+#include <cassert>
+#include <cstdio>
+#include <cstring>
+#include <cstdlib>
#include "util.hh"
void bexec(const string& command, const string& displaystring) {
-#ifndef __EMX__
+//#ifndef __EMX__
if (! fork()) {
setsid();
putenv(displaystring);
int ret = execl("/bin/sh", "/bin/sh", "-c", command.c_str(), NULL);
exit(ret);
}
-#else // __EMX__
- spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", command.c_str(), NULL);
-#endif // !__EMX__
+//#else // __EMX__
+// spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", command.c_str(), NULL);
+//#endif // !__EMX__
}
extern "C" {
#include <X11/Xlib.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>
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif
+#include "config.h"
#include "actions.hh"
#include "openbox.hh"
#include "bindings.hh"
#include "otk/display.hh"
-#include <stdio.h>
+#include <cstdio>
#include <algorithm>
namespace ob {
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif
+#include "config.h"
#include "bindings.hh"
#include "screen.hh"
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif
+#include "config.h"
#include "client.hh"
#include "frame.hh"
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif
+#include "config.h"
extern "C" {
#ifdef SHAPE
@brief Main entry point for the application
*/
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif // HAVE_CONFIG_H
+#include "config.h"
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
# include <sys/types.h>
# include <unistd.h>
#include "openbox.hh"
#include "otk/util.hh"
+#include <clocale>
+#include <cstdio>
+
int main(int argc, char **argv) {
// initialize the locale
if (!setlocale(LC_ALL, ""))
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif
+#include "config.h"
#include "openbox.hh"
#include "client.hh"
extern "C" {
#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
# include <signal.h>
#endif // HAVE_SIGNAL_H
}
#include <algorithm>
+#include <cstdio>
+#include <cstdlib>
namespace ob {
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif
+#include "config.h"
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
# include <sys/types.h>
# include <unistd.h>
#include <vector>
#include <algorithm>
+#include <cstdio>
+#include <cstring>
static bool running;
static int anotherWMRunning(Display *display, XErrorEvent *) {
%module ob
%{
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif
+#include "config.h"
#include "frame.hh"
#include "openbox.hh"