summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.mk3
-rw-r--r--src/commands.c28
-rw-r--r--src/commands.h25
-rw-r--r--src/completion.c24
-rw-r--r--src/completion.h22
-rw-r--r--src/config.h18
-rw-r--r--src/download.c23
-rw-r--r--src/download.h21
-rw-r--r--src/dwb.c35
-rw-r--r--src/dwb.h31
-rw-r--r--src/icon.xpm19
-rw-r--r--src/session.c26
-rw-r--r--src/session.h21
-rw-r--r--src/util.c27
-rw-r--r--src/util.h20
-rw-r--r--src/view.c30
-rw-r--r--src/view.h25
17 files changed, 331 insertions, 67 deletions
diff --git a/config.mk b/config.mk
index 79b9acdf..600e168d 100644
--- a/config.mk
+++ b/config.mk
@@ -16,6 +16,9 @@ FLAGS += -pipe
FLAGS += `pkg-config --cflags --libs $(LIBS)`
FLAGS +=--ansi
FLAGS +=-std=c99
+FLAGS +=-D_POSIX_SOURCE
+FLAGS +=-D_BSD_SOURCE
+
DFLAGS += -g -B
diff --git a/src/commands.c b/src/commands.c
index b7886992..ea8d9663 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -1,14 +1,22 @@
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <gtk/gtk.h>
-#include <webkit/webkit.h>
-#include "dwb.h"
+/*
+ * Copyright (c) 2010-2011 Stefan Bolte <portix@gmx.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#include "commands.h"
-#include "completion.h"
-#include "util.h"
-#include "view.h"
-#include "session.h"
/* dwb_com_simple_command(keyMap *km) {{{*/
void
diff --git a/src/commands.h b/src/commands.h
index 0381c7cb..102daf14 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -1,6 +1,31 @@
+/*
+ * Copyright (c) 2010-2011 Stefan Bolte <portix@gmx.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#ifndef COMMANDS_H
#define COMMANDS_H
+#include "dwb.h"
+#include "commands.h"
+#include "completion.h"
+#include "util.h"
+#include "view.h"
+#include "session.h"
+
void dwb_com_simple_command(KeyMap *km);
gboolean dwb_com_add_search_field(Arg *);
gboolean dwb_com_allow_content(Arg *a);
diff --git a/src/completion.c b/src/completion.c
index f00c31dd..82b42b95 100644
--- a/src/completion.c
+++ b/src/completion.c
@@ -1,10 +1,22 @@
-#include <string.h>
-#include <gtk/gtk.h>
-#include <webkit/webkit.h>
-#include "dwb.h"
+/*
+ * Copyright (c) 2010-2011 Stefan Bolte <portix@gmx.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#include "completion.h"
-#include "commands.h"
-#include "util.h"
static GList * dwb_comp_update_completion(GtkWidget *box, GList *comps, GList *active, int max, int back);
static GList * dwb_comp_get_simple_completion(GList *gl);
diff --git a/src/completion.h b/src/completion.h
index fda66e5a..0b7b1b33 100644
--- a/src/completion.h
+++ b/src/completion.h
@@ -1,6 +1,28 @@
+/*
+ * Copyright (c) 2010-2011 Stefan Bolte <portix@gmx.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#ifndef COMPLETION_H
#define COMPLETION_H
+#include "dwb.h"
+#include "commands.h"
+#include "util.h"
+
typedef struct _Completion Completion;
struct _Completion {
diff --git a/src/config.h b/src/config.h
index beb21268..a128e015 100644
--- a/src/config.h
+++ b/src/config.h
@@ -1,3 +1,21 @@
+/*
+ * Copyright (c) 2010-2011 Stefan Bolte <portix@gmx.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
static KeyValue KEYS[] = {
{ "add_view", { "ga", 0, }, },
{ "allow_cookie", { "CC", 0, }, },
diff --git a/src/download.c b/src/download.c
index 30d14ae0..75772229 100644
--- a/src/download.c
+++ b/src/download.c
@@ -1,8 +1,21 @@
-#include <string.h>
-#include <gtk/gtk.h>
-#include <webkit/webkit.h>
-#include "dwb.h"
-#include "util.h"
+/*
+ * Copyright (c) 2010-2011 Stefan Bolte <portix@gmx.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#include "completion.h"
typedef struct _DwbDownload {
diff --git a/src/download.h b/src/download.h
index 56b14f6d..b20982fc 100644
--- a/src/download.h
+++ b/src/download.h
@@ -1,6 +1,27 @@
+/*
+ * Copyright (c) 2010-2011 Stefan Bolte <portix@gmx.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#ifndef DOWNLOAD_H
#define DOWNLOAD_H
+#include "dwb.h"
+#include "util.h"
+
void dwb_dl_get_path(GList *, WebKitDownload *);
void dwb_dl_start(void);
diff --git a/src/dwb.c b/src/dwb.c
index 4187dc58..bc357327 100644
--- a/src/dwb.c
+++ b/src/dwb.c
@@ -1,26 +1,29 @@
-#define _POSIX_SOURCE || _BSD_SOURCE
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <libsoup/soup.h>
-#include <locale.h>
-#include <stdarg.h>
-
-#include <gtk/gtk.h>
-#include <webkit/webkit.h>
-#include <JavaScriptCore/JavaScript.h>
-#include <gdk/gdkkeysyms.h>
+/*
+ * Copyright (c) 2010-2011 Stefan Bolte <portix@gmx.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#include "dwb.h"
#include "completion.h"
#include "commands.h"
#include "view.h"
#include "util.h"
#include "download.h"
-#include "config.h"
#include "session.h"
+#include "config.h"
#include "icon.xpm"
diff --git a/src/dwb.h b/src/dwb.h
index 74418fbd..65c39a1d 100644
--- a/src/dwb.h
+++ b/src/dwb.h
@@ -1,8 +1,37 @@
+/*
+ * Copyright (c) 2010-2011 Stefan Bolte <portix@gmx.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#ifndef DWB_H
#define DWB_H
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <libsoup/soup.h>
+#include <locale.h>
+#include <stdarg.h>
#include <gtk/gtk.h>
#include <webkit/webkit.h>
-#include <stdlib.h>
+#include <JavaScriptCore/JavaScript.h>
+#include <gdk/gdkkeysyms.h>
#define NAME "dwb"
/* SETTINGS MAKROS {{{*/
diff --git a/src/icon.xpm b/src/icon.xpm
index a7c389b5..1574dd98 100644
--- a/src/icon.xpm
+++ b/src/icon.xpm
@@ -1,4 +1,21 @@
-/* XPM */
+/*
+ * Copyright (c) 2010-2011 Stefan Bolte <portix@gmx.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
static const char *icon[] = {
/* columns rows colors chars-per-pixel */
"64 64 3 1 ",
diff --git a/src/session.c b/src/session.c
index 336adcef..d2fe92d3 100644
--- a/src/session.c
+++ b/src/session.c
@@ -1,10 +1,22 @@
-#include <stdlib.h>
-#include <string.h>
-#include <gtk/gtk.h>
-#include <webkit/webkit.h>
-#include "dwb.h"
-#include "util.h"
-#include "view.h"
+/*
+ * Copyright (c) 2010-2011 Stefan Bolte <portix@gmx.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "session.h"
/* dwb_session_get_groups() return char ** (alloc){{{*/
static char **
diff --git a/src/session.h b/src/session.h
index 65fb97ed..5da75ddc 100644
--- a/src/session.h
+++ b/src/session.h
@@ -1,5 +1,26 @@
+/*
+ * Copyright (c) 2010-2011 Stefan Bolte <portix@gmx.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#ifndef SESSION_H
#define SESSION_H
+#include "dwb.h"
+#include "util.h"
+#include "view.h"
gboolean dwb_session_save(const char *);
gboolean dwb_session_restore(const char *);
diff --git a/src/util.c b/src/util.c
index 550ed657..082d105d 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1,12 +1,21 @@
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <gtk/gtk.h>
-#include <errno.h>
-#include <sys/socket.h>
-#include <webkit/webkit.h>
-#include <gdk/gdkkeysyms.h>
-#include "dwb.h"
+/*
+ * Copyright (c) 2010-2011 Stefan Bolte <portix@gmx.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#include "util.h"
/* dwb_util_string_replace(const char *haystack, const char *needle, const char *replace) return: char * (alloc){{{*/
diff --git a/src/util.h b/src/util.h
index 45789202..7fe8f3c7 100644
--- a/src/util.h
+++ b/src/util.h
@@ -1,6 +1,26 @@
+/*
+ * Copyright (c) 2010-2011 Stefan Bolte <portix@gmx.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#ifndef UTIL_H
#define UTIL_H
+#include "dwb.h"
+
// strings
char * dwb_util_string_replace(const char *haystack, const char *needle, const char *replacemant);
void dwb_util_cut_text(char *, int, int);
diff --git a/src/view.c b/src/view.c
index b685a149..b14d67b1 100644
--- a/src/view.c
+++ b/src/view.c
@@ -1,16 +1,22 @@
-#include <string.h>
-#include <stdlib.h>
-#include <gtk/gtk.h>
-#include <webkit/webkit.h>
-#include <JavaScriptCore/JavaScript.h>
-#include <gdk/gdkkeysyms.h>
-#include "dwb.h"
+/*
+ * Copyright (c) 2010-2011 Stefan Bolte <portix@gmx.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#include "view.h"
-#include "commands.h"
-#include "completion.h"
-#include "util.h"
-#include "download.h"
-#include "session.h"
static void dwb_parse_setting(const char *);
static void dwb_parse_key_setting(const char *);
diff --git a/src/view.h b/src/view.h
index 79b1b7d6..4aae172a 100644
--- a/src/view.h
+++ b/src/view.h
@@ -1,6 +1,31 @@
+/*
+ * Copyright (c) 2010-2011 Stefan Bolte <portix@gmx.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#ifndef VIEW_H
#define VIEW_H
+#include "dwb.h"
+#include "commands.h"
+#include "completion.h"
+#include "util.h"
+#include "download.h"
+#include "session.h"
+
GList * dwb_add_view(Arg *);
GList * dwb_add_view_new_with_webview(void);
void dwb_view_set_active_style(GList *);