Some cleaning of code, and stricter compiling options (with warnings I don't know...
authoruranther <jwheaton@purdue.edu>
Fri, 29 May 2009 19:11:23 +0000 (15:11 -0400)
committeruranther <jwheaton@purdue.edu>
Fri, 29 May 2009 19:11:23 +0000 (15:11 -0400)
Makefile
uzbl.c
uzbl.h

index d158a9b..f8277fb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-CPPFLAGS=$(shell pkg-config --cflags gtk+-2.0 webkit-1.0) -ggdb -Wall -W -DARCH="\"$(shell uname -m)\"" -DG_ERRORCHECK_MUTEXES -DCOMMIT="\"$(shell git log | head -n1 | sed "s/.* //")\""
+CPPFLAGS=$(shell pkg-config --cflags gtk+-2.0 webkit-1.0) -ggdb -Wall -pedantic -std=gnu99 -W -DARCH="\"$(shell uname -m)\"" -DG_ERRORCHECK_MUTEXES -DCOMMIT="\"$(shell git log | head -n1 | sed "s/.* //")\""
 LDFLAGS=$(shell pkg-config --libs gtk+-2.0 webkit-1.0)
 all: uzbl uzblctrl
 
diff --git a/uzbl.c b/uzbl.c
index 60c9eaa..1758638 100644 (file)
--- a/uzbl.c
+++ b/uzbl.c
@@ -1,6 +1,6 @@
 /* -*- c-basic-offset: 4; -*- */
-// Original code taken from the example webkit-gtk+ application. see notice below.
-// Modified code is licensed under the GPL 3.  See LICENSE file.
+/* Original code taken from the example webkit-gtk+ application. see notice below. */
+/* Modified code is licensed under the GPL 3.  See LICENSE file. */
 
 
 /*
 #include <gtk/gtk.h>
 #include <gdk/gdkx.h>
 #include <gdk/gdkkeysyms.h>
+
+#include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
-#include <sys/types.h>
-#include <sys/un.h>
 #include <sys/utsname.h>
 #include <sys/time.h>
+#include <sys/un.h>
+
 #include <webkit/webkit.h>
+#include <libsoup/soup.h>
+
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include <errno.h>
-#include <string.h>
 #include <fcntl.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <libsoup/soup.h>
 #include <signal.h>
 #include "uzbl.h"
 #include "config.h"
@@ -531,7 +531,6 @@ VIEWFUNC(go_forward)
 #undef VIEWFUNC
 
 /* -- command to callback/function map for things we cannot attach to any signals */
-// TODO: reload
 static struct {char *name; Command command[2];} cmdlist[] =
 {   /* key                   function      no_split      */
     { "back",               {view_go_back, 0}              },
diff --git a/uzbl.h b/uzbl.h
index cd5e3ef..4c4c4ea 100644 (file)
--- a/uzbl.h
+++ b/uzbl.h
@@ -71,10 +71,10 @@ typedef struct {
     GtkWidget*     vbox;
     GtkWidget*     mainbar;
     GtkWidget*     mainbar_label;
-    GtkScrollbar*  scbar_v;   // Horizontal and Vertical Scrollbar
-    GtkScrollbar*  scbar_h;   // (These are still hidden)
-    GtkAdjustment* bar_v; // Information about document length
-    GtkAdjustment* bar_h; // and scrolling position
+    GtkScrollbar*  scbar_v;   /* Horizontal and Vertical Scrollbar */
+    GtkScrollbar*  scbar_h;   /* (These are still hidden) */
+    GtkAdjustment* bar_v; /* Information about document length */
+    GtkAdjustment* bar_h; /* and scrolling position */
     WebKitWebView* web_view;
     gchar*         main_title;