]> git.sur5r.net Git - i3/i3/blobdiff - src/main.c
Make default shmlog_size a const int
[i3/i3] / src / main.c
index a49241dda9d4ec39737c397caeed73ac830e727b..0912d48ebcaa5c63d59ac81e1f39863410d95ba5 100644 (file)
@@ -4,7 +4,7 @@
  * vim:ts=4:sw=4:expandtab
  *
  * i3 - an improved dynamic tiling window manager
- * © 2009-2012 Michael Stapelberg and contributors (see also: LICENSE)
+ * © 2009-2013 Michael Stapelberg and contributors (see also: LICENSE)
  *
  * main.c: Initialization, main loop
  *
@@ -19,6 +19,7 @@
 #include <sys/mman.h>
 #include <sys/stat.h>
 #include "all.h"
+#include "shmlog.h"
 
 #include "sd-daemon.h"
 
@@ -67,6 +68,9 @@ xcb_key_symbols_t *keysyms;
 /* Those are our connections to X11 for use with libXcursor and XKB */
 Display *xlibdpy, *xkbdpy;
 
+/* Default shmlog size if not set by user. */
+const int default_shmlog_size = 25 * 1024 * 1024;
+
 /* The list of key bindings */
 struct bindings_head *bindings;
 
@@ -291,7 +295,7 @@ int main(int argc, char *argv[]) {
     init_logging();
 
     /* On non-release builds, disable SHM logging by default. */
-    shmlog_size = (is_debug_build() ? 25 * 1024 * 1024 : 0);
+    shmlog_size = (is_debug_build() ? default_shmlog_size : 0);
 
     start_argv = argv;
 
@@ -315,11 +319,11 @@ int main(int argc, char *argv[]) {
                 only_check_config = true;
                 break;
             case 'v':
-                printf("i3 version " I3_VERSION " © 2009-2012 Michael Stapelberg and contributors\n");
+                printf("i3 version " I3_VERSION " © 2009-2013 Michael Stapelberg and contributors\n");
                 exit(EXIT_SUCCESS);
                 break;
             case 'm':
-                printf("Binary i3 version:  " I3_VERSION " © 2009-2012 Michael Stapelberg and contributors\n");
+                printf("Binary i3 version:  " I3_VERSION " © 2009-2013 Michael Stapelberg and contributors\n");
                 display_running_version();
                 exit(EXIT_SUCCESS);
                 break;