[hackers] [tabbed] sanity patch || Connor Lane Smith

From: <hg_AT_suckless.org>
Date: Mon, 9 Aug 2010 10:59:17 +0000 (UTC)

changeset: 142:f8f6841b3c1c
tag: tip
user: Connor Lane Smith <cls_AT_lubutu.com>
date: Mon Aug 09 11:59:13 2010 +0100
files: tabbed.c
description:
sanity patch

diff -r 31a28343c6f8 -r f8f6841b3c1c tabbed.c
--- a/tabbed.c Sun May 30 22:34:51 2010 +0200
+++ b/tabbed.c Mon Aug 09 11:59:13 2010 +0100
@@ -2,8 +2,6 @@
  *
  * To understand tabbed, start reading main().
  */
-#include <sys/select.h>
-#include <sys/types.h>
 #include <sys/wait.h>
 #include <locale.h>
 #include <stdarg.h>
@@ -12,13 +10,10 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#include <X11/cursorfont.h>
-#include <X11/keysym.h>
 #include <X11/Xatom.h>
 #include <X11/Xlib.h>
 #include <X11/Xproto.h>
 #include <X11/Xutil.h>
-#include <errno.h>
 
 /* XEMBED messages */
 #define XEMBED_EMBEDDED_NOTIFY 0
@@ -852,17 +847,17 @@
         int detach = 0;
 
         if(argc == 2 && !strcmp("-v", argv[1]))
- die("tabbed-"VERSION", © 2006-2008 tabbed engineers, see LICENSE for details\n");
+ die("tabbed-"VERSION", © 2009-2010 tabbed engineers, see LICENSE for details\n");
         else if(argc == 2 && strcmp("-d", argv[1]) == 0)
                 detach = 1;
         else if(argc != 1)
                 die("usage: tabbed [-d] [-v]\n");
         if(!setlocale(LC_CTYPE, "") || !XSupportsLocale())
                 fprintf(stderr, "warning: no locale support\n");
- if(!(dpy = XOpenDisplay(0)))
+ if(!(dpy = XOpenDisplay(NULL)))
                 die("tabbed: cannot open display\n");
         setup();
- printf("%i\n", (int)win);
+ printf("%lu\n", win);
         fflush(NULL);
         if(detach) {
                 if(fork() == 0)
Received on Mon Aug 09 2010 - 12:59:17 CEST

This archive was generated by hypermail 2.2.0 : Mon Aug 09 2010 - 13:00:09 CEST