projects
/
uzbl-mobile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f679c8c
)
removing more static keywords
author
uranther
<jwheaton@purdue.edu>
Mon, 29 Jun 2009 16:10:00 +0000
(12:10 -0400)
committer
uranther
<jwheaton@purdue.edu>
Mon, 29 Jun 2009 16:10:00 +0000
(12:10 -0400)
uzbl.c
patch
|
blob
|
history
uzbl.h
patch
|
blob
|
history
diff --git
a/uzbl.c
b/uzbl.c
index
d986a42
..
27611b4
100644
(file)
--- a/
uzbl.c
+++ b/
uzbl.c
@@
-192,7
+192,7
@@
make_var_to_name_hash() {
/* --- UTILITY FUNCTIONS --- */
enum {EXP_ERR, EXP_SIMPLE_VAR, EXP_BRACED_VAR, EXP_EXPR, EXP_JS};
/* --- UTILITY FUNCTIONS --- */
enum {EXP_ERR, EXP_SIMPLE_VAR, EXP_BRACED_VAR, EXP_EXPR, EXP_JS};
-static guint
+guint
get_exp_type(gchar *s) {
/* variables */
if(*(s+1) == '(')
get_exp_type(gchar *s) {
/* variables */
if(*(s+1) == '(')
@@
-211,7
+211,7
@@
return EXP_ERR;
* recurse == 1: don't expand '@(command)@'
* recurse == 2: don't expand '@<java script>@'
*/
* recurse == 1: don't expand '@(command)@'
* recurse == 2: don't expand '@<java script>@'
*/
-static gchar *
+gchar *
expand(char *s, guint recurse) {
uzbl_cmdprop *c;
guint etype;
expand(char *s, guint recurse) {
uzbl_cmdprop *c;
guint etype;
@@
-569,20
+569,20
@@
scroll_begin(WebKitWebView* page, GArray *argv, GString *result) {
gtk_adjustment_set_value (uzbl.gui.bar_v, gtk_adjustment_get_lower(uzbl.gui.bar_v));
}
gtk_adjustment_set_value (uzbl.gui.bar_v, gtk_adjustment_get_lower(uzbl.gui.bar_v));
}
-static void
+void
scroll_end(WebKitWebView* page, GArray *argv, GString *result) {
(void) page; (void) argv; (void) result;
gtk_adjustment_set_value (uzbl.gui.bar_v, gtk_adjustment_get_upper(uzbl.gui.bar_v) -
gtk_adjustment_get_page_size(uzbl.gui.bar_v));
}
scroll_end(WebKitWebView* page, GArray *argv, GString *result) {
(void) page; (void) argv; (void) result;
gtk_adjustment_set_value (uzbl.gui.bar_v, gtk_adjustment_get_upper(uzbl.gui.bar_v) -
gtk_adjustment_get_page_size(uzbl.gui.bar_v));
}
-static void
+void
scroll_vert(WebKitWebView* page, GArray *argv, GString *result) {
(void) page; (void) result;
scroll(uzbl.gui.bar_v, argv);
}
scroll_vert(WebKitWebView* page, GArray *argv, GString *result) {
(void) page; (void) result;
scroll(uzbl.gui.bar_v, argv);
}
-static void
+void
scroll_horz(WebKitWebView* page, GArray *argv, GString *result) {
(void) page; (void) result;
scroll(uzbl.gui.bar_h, argv);
scroll_horz(WebKitWebView* page, GArray *argv, GString *result) {
(void) page; (void) result;
scroll(uzbl.gui.bar_h, argv);
@@
-598,7
+598,7
@@
cmd_set_status() {
update_title();
}
update_title();
}
-static void
+void
toggle_zoom_type (WebKitWebView* page, GArray *argv, GString *result) {
(void)page;
(void)argv;
toggle_zoom_type (WebKitWebView* page, GArray *argv, GString *result) {
(void)page;
(void)argv;
@@
-714,7
+714,7
@@
log_history_cb () {
/* VIEW funcs (little webkit wrappers) */
/* VIEW funcs (little webkit wrappers) */
-#define VIEWFUNC(name) static void view_##name(WebKitWebView *page, GArray *argv, GString *result){(void)argv; (void)result; webkit_web_view_##name(page);}
+#define VIEWFUNC(name) void view_##name(WebKitWebView *page, GArray *argv, GString *result){(void)argv; (void)result; webkit_web_view_##name(page);}
VIEWFUNC(reload)
VIEWFUNC(reload_bypass_cache)
VIEWFUNC(stop_loading)
VIEWFUNC(reload)
VIEWFUNC(reload_bypass_cache)
VIEWFUNC(stop_loading)
@@
-725,7
+725,7
@@
VIEWFUNC(go_forward)
#undef VIEWFUNC
/* -- command to callback/function map for things we cannot attach to any signals */
#undef VIEWFUNC
/* -- command to callback/function map for things we cannot attach to any signals */
-static struct {char *key; CommandInfo value;} cmdlist[] =
+struct {char *key; CommandInfo value;} cmdlist[] =
{ /* key function no_split */
{ "back", {view_go_back, 0} },
{ "forward", {view_go_forward, 0} },
{ /* key function no_split */
{ "back", {view_go_back, 0} },
{ "forward", {view_go_forward, 0} },
@@
-803,7
+803,7
@@
file_exists (const char * filename) {
return (access(filename, F_OK) == 0);
}
return (access(filename, F_OK) == 0);
}
-static void
+void
set_var(WebKitWebView *page, GArray *argv, GString *result) {
(void) page; (void) result;
gchar **split = g_strsplit(argv_idx(argv, 0), "=", 2);
set_var(WebKitWebView *page, GArray *argv, GString *result) {
(void) page; (void) result;
gchar **split = g_strsplit(argv_idx(argv, 0), "=", 2);
@@
-813,7
+813,7
@@
set_var(WebKitWebView *page, GArray *argv, GString *result) {
g_strfreev(split);
}
g_strfreev(split);
}
-static void
+void
print(WebKitWebView *page, GArray *argv, GString *result) {
(void) page; (void) result;
gchar* buf;
print(WebKitWebView *page, GArray *argv, GString *result) {
(void) page; (void) result;
gchar* buf;
@@
-823,7
+823,7
@@
print(WebKitWebView *page, GArray *argv, GString *result) {
g_free(buf);
}
g_free(buf);
}
-static void
+void
act_bind(WebKitWebView *page, GArray *argv, GString *result) {
(void) page; (void) result;
gchar **split = g_strsplit(argv_idx(argv, 0), " = ", 2);
act_bind(WebKitWebView *page, GArray *argv, GString *result) {
(void) page; (void) result;
gchar **split = g_strsplit(argv_idx(argv, 0), " = ", 2);
@@
-839,7
+839,7
@@
act_dump_config() {
dump_config();
}
dump_config();
}
-static void
+void
toggle_insert_mode(WebKitWebView *page, GArray *argv, GString *result) {
(void) page; (void) result;
toggle_insert_mode(WebKitWebView *page, GArray *argv, GString *result) {
(void) page; (void) result;
@@
-856,7
+856,7
@@
toggle_insert_mode(WebKitWebView *page, GArray *argv, GString *result) {
update_title();
}
update_title();
}
-static void
+void
load_uri (WebKitWebView *web_view, GArray *argv, GString *result) {
(void) result;
load_uri (WebKitWebView *web_view, GArray *argv, GString *result) {
(void) result;
@@
-876,7
+876,7
@@
load_uri (WebKitWebView *web_view, GArray *argv, GString *result) {
/* Javascript*/
/* Javascript*/
-static JSValueRef
+JSValueRef
js_run_command (JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject,
size_t argumentCount, const JSValueRef arguments[],
JSValueRef* exception) {
js_run_command (JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject,
size_t argumentCount, const JSValueRef arguments[],
JSValueRef* exception) {
@@
-904,11
+904,11
@@
js_run_command (JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject,
return JSValueMakeString(ctx, js_result_string);
}
return JSValueMakeString(ctx, js_result_string);
}
-static JSStaticFunction js_static_functions[] = {
+JSStaticFunction js_static_functions[] = {
{"run", js_run_command, kJSPropertyAttributeNone},
};
{"run", js_run_command, kJSPropertyAttributeNone},
};
-static void
+void
js_init() {
/* This function creates the class and its definition, only once */
if (!uzbl.js.initialized) {
js_init() {
/* This function creates the class and its definition, only once */
if (!uzbl.js.initialized) {
@@
-921,7
+921,7
@@
js_init() {
}
}
-static void
+void
eval_js(WebKitWebView * web_view, gchar *script, GString *result) {
WebKitWebFrame *frame;
JSGlobalContextRef context;
eval_js(WebKitWebView * web_view, gchar *script, GString *result) {
WebKitWebFrame *frame;
JSGlobalContextRef context;
@@
-968,13
+968,13
@@
eval_js(WebKitWebView * web_view, gchar *script, GString *result) {
JSStringRelease(js_script);
}
JSStringRelease(js_script);
}
-static void
+void
run_js (WebKitWebView * web_view, GArray *argv, GString *result) {
if (argv_idx(argv, 0))
eval_js(web_view, argv_idx(argv, 0), result);
}
run_js (WebKitWebView * web_view, GArray *argv, GString *result) {
if (argv_idx(argv, 0))
eval_js(web_view, argv_idx(argv, 0), result);
}
-static void
+void
run_external_js (WebKitWebView * web_view, GArray *argv, GString *result) {
(void) result;
if (argv_idx(argv, 0)) {
run_external_js (WebKitWebView * web_view, GArray *argv, GString *result) {
(void) result;
if (argv_idx(argv, 0)) {
@@
-1026,19
+1026,19
@@
search_text (WebKitWebView *page, GArray *argv, const gboolean forward) {
}
}
}
}
-static void
+void
search_forward_text (WebKitWebView *page, GArray *argv, GString *result) {
(void) result;
search_text(page, argv, TRUE);
}
search_forward_text (WebKitWebView *page, GArray *argv, GString *result) {
(void) result;
search_text(page, argv, TRUE);
}
-static void
+void
search_reverse_text (WebKitWebView *page, GArray *argv, GString *result) {
(void) result;
search_text(page, argv, FALSE);
}
search_reverse_text (WebKitWebView *page, GArray *argv, GString *result) {
(void) result;
search_text(page, argv, FALSE);
}
-static void
+void
dehilight (WebKitWebView *page, GArray *argv, GString *result) {
(void) argv; (void) result;
webkit_web_view_set_highlight_text_matches (page, FALSE);
dehilight (WebKitWebView *page, GArray *argv, GString *result) {
(void) argv; (void) result;
webkit_web_view_set_highlight_text_matches (page, FALSE);
@@
-1064,7
+1064,7
@@
new_window_load_uri (const gchar * uri) {
g_string_free (to_execute, TRUE);
}
g_string_free (to_execute, TRUE);
}
-static void
+void
chain (WebKitWebView *page, GArray *argv, GString *result) {
(void) page; (void) result;
gchar *a = NULL;
chain (WebKitWebView *page, GArray *argv, GString *result) {
(void) page; (void) result;
gchar *a = NULL;
@@
-1077,7
+1077,7
@@
chain (WebKitWebView *page, GArray *argv, GString *result) {
}
}
}
}
-static void
+void
keycmd (WebKitWebView *page, GArray *argv, GString *result) {
(void)page;
(void)argv;
keycmd (WebKitWebView *page, GArray *argv, GString *result) {
(void)page;
(void)argv;
@@
-1087,7
+1087,7
@@
keycmd (WebKitWebView *page, GArray *argv, GString *result) {
update_title();
}
update_title();
}
-static void
+void
keycmd_nl (WebKitWebView *page, GArray *argv, GString *result) {
(void)page;
(void)argv;
keycmd_nl (WebKitWebView *page, GArray *argv, GString *result) {
(void)page;
(void)argv;
@@
-1097,7
+1097,7
@@
keycmd_nl (WebKitWebView *page, GArray *argv, GString *result) {
update_title();
}
update_title();
}
-static void
+void
keycmd_bs (WebKitWebView *page, GArray *argv, GString *result) {
gchar *prev;
(void)page;
keycmd_bs (WebKitWebView *page, GArray *argv, GString *result) {
gchar *prev;
(void)page;
@@
-1109,7
+1109,7
@@
keycmd_bs (WebKitWebView *page, GArray *argv, GString *result) {
update_title();
}
update_title();
}
-static void
+void
close_uzbl (WebKitWebView *page, GArray *argv, GString *result) {
(void)page;
(void)argv;
close_uzbl (WebKitWebView *page, GArray *argv, GString *result) {
(void)page;
(void)argv;
@@
-1445,7
+1445,7
@@
split_quoted(const gchar* src, const gboolean unquote) {
return ret;
}
return ret;
}
-static void
+void
spawn(WebKitWebView *web_view, GArray *argv, GString *result) {
(void)web_view; (void)result;
//TODO: allow more control over argument order so that users can have some arguments before the default ones from run_command, and some after
spawn(WebKitWebView *web_view, GArray *argv, GString *result) {
(void)web_view; (void)result;
//TODO: allow more control over argument order so that users can have some arguments before the default ones from run_command, and some after
@@
-1453,7
+1453,7
@@
spawn(WebKitWebView *web_view, GArray *argv, GString *result) {
run_command(argv_idx(argv, 0), 0, ((const gchar **) (argv->data + sizeof(gchar*))), FALSE, NULL);
}
run_command(argv_idx(argv, 0), 0, ((const gchar **) (argv->data + sizeof(gchar*))), FALSE, NULL);
}
-static void
+void
spawn_sync(WebKitWebView *web_view, GArray *argv, GString *result) {
(void)web_view; (void)result;
spawn_sync(WebKitWebView *web_view, GArray *argv, GString *result) {
(void)web_view; (void)result;
@@
-1462,7
+1462,7
@@
spawn_sync(WebKitWebView *web_view, GArray *argv, GString *result) {
TRUE, &uzbl.comm.sync_stdout);
}
TRUE, &uzbl.comm.sync_stdout);
}
-static void
+void
spawn_sh(WebKitWebView *web_view, GArray *argv, GString *result) {
(void)web_view; (void)result;
if (!uzbl.behave.shell_cmd) {
spawn_sh(WebKitWebView *web_view, GArray *argv, GString *result) {
(void)web_view; (void)result;
if (!uzbl.behave.shell_cmd) {
@@
-1483,7
+1483,7
@@
spawn_sh(WebKitWebView *web_view, GArray *argv, GString *result) {
g_strfreev (cmd);
}
g_strfreev (cmd);
}
-static void
+void
spawn_sh_sync(WebKitWebView *web_view, GArray *argv, GString *result) {
(void)web_view; (void)result;
if (!uzbl.behave.shell_cmd) {
spawn_sh_sync(WebKitWebView *web_view, GArray *argv, GString *result) {
(void)web_view; (void)result;
if (!uzbl.behave.shell_cmd) {
@@
-1505,7
+1505,7
@@
spawn_sh_sync(WebKitWebView *web_view, GArray *argv, GString *result) {
g_strfreev (cmd);
}
g_strfreev (cmd);
}
-static void
+void
parse_command(const char *cmd, const char *param, GString *result) {
CommandInfo *c;
parse_command(const char *cmd, const char *param, GString *result) {
CommandInfo *c;
@@
-1839,7
+1839,7
@@
render_html() {
}
enum {M_CMD, M_HTML};
}
enum {M_CMD, M_HTML};
-static void
+void
parse_cmd_line(const char *ctl_line, GString *result) {
Behaviour *b = &uzbl.behave;
size_t len=0;
parse_cmd_line(const char *ctl_line, GString *result) {
Behaviour *b = &uzbl.behave;
size_t len=0;
@@
-2006,7
+2006,7
@@
control_socket(GIOChannel *chan) {
return TRUE;
}
return TRUE;
}
-static gboolean
+gboolean
control_client_socket(GIOChannel *clientchan) {
char *ctl_line;
GString *result = g_string_new("");
control_client_socket(GIOChannel *clientchan) {
char *ctl_line;
GString *result = g_string_new("");
@@
-2294,8
+2294,8
@@
create_window () {
return window;
}
return window;
}
-static
-GtkPlug* create_plug () {
+GtkPlug*
+create_plug () {
GtkPlug* plug = GTK_PLUG (gtk_plug_new (uzbl.state.socket_id));
g_signal_connect (G_OBJECT (plug), "destroy", G_CALLBACK (destroy_cb), NULL);
g_signal_connect (G_OBJECT (plug), "key-press-event", G_CALLBACK (key_press_cb), NULL);
GtkPlug* plug = GTK_PLUG (gtk_plug_new (uzbl.state.socket_id));
g_signal_connect (G_OBJECT (plug), "destroy", G_CALLBACK (destroy_cb), NULL);
g_signal_connect (G_OBJECT (plug), "key-press-event", G_CALLBACK (key_press_cb), NULL);
@@
-2304,7
+2304,7
@@
GtkPlug* create_plug () {
}
}
-static gchar**
+gchar**
inject_handler_args(const gchar *actname, const gchar *origargs, const gchar *newargs) {
/*
If actname is one that calls an external command, this function will inject
inject_handler_args(const gchar *actname, const gchar *origargs, const gchar *newargs) {
/*
If actname is one that calls an external command, this function will inject
diff --git
a/uzbl.h
b/uzbl.h
index
5ae8ca5
..
2f58786
100644
(file)
--- a/
uzbl.h
+++ b/
uzbl.h
@@
-254,7
+254,7
@@
setup_signal(int signe, sigfunc *shandler);
gboolean
set_var_value(gchar *name, gchar *val);
gboolean
set_var_value(gchar *name, gchar *val);
-static void
+void
print(WebKitWebView *page, GArray *argv, GString *result);
gboolean
print(WebKitWebView *page, GArray *argv, GString *result);
gboolean
@@
-269,10
+269,10
@@
create_web_view_cb (WebKitWebView *web_view, WebKitWebFrame *frame, gpointer us
gboolean
download_cb (WebKitWebView *web_view, GObject *download, gpointer user_data);
gboolean
download_cb (WebKitWebView *web_view, GObject *download, gpointer user_data);
-static void
+void
toggle_zoom_type (WebKitWebView* page, GArray *argv, GString *result);
toggle_zoom_type (WebKitWebView* page, GArray *argv, GString *result);
-static void
+void
toggle_status_cb (WebKitWebView* page, GArray *argv, GString *result);
void
toggle_status_cb (WebKitWebView* page, GArray *argv, GString *result);
void
@@
-311,50
+311,50
@@
new_action(const gchar *name, const gchar *param);
bool
file_exists (const char * filename);
bool
file_exists (const char * filename);
-static void
+void
toggle_insert_mode(WebKitWebView *page, GArray *argv, GString *result);
toggle_insert_mode(WebKitWebView *page, GArray *argv, GString *result);
-static void
+void
load_uri (WebKitWebView * web_view, GArray *argv, GString *result);
void
new_window_load_uri (const gchar * uri);
load_uri (WebKitWebView * web_view, GArray *argv, GString *result);
void
new_window_load_uri (const gchar * uri);
-static void
+void
chain (WebKitWebView *page, GArray *argv, GString *result);
chain (WebKitWebView *page, GArray *argv, GString *result);
-static void
+void
keycmd (WebKitWebView *page, GArray *argv, GString *result);
keycmd (WebKitWebView *page, GArray *argv, GString *result);
-static void
+void
keycmd_nl (WebKitWebView *page, GArray *argv, GString *result);
keycmd_nl (WebKitWebView *page, GArray *argv, GString *result);
-static void
+void
keycmd_bs (WebKitWebView *page, GArray *argv, GString *result);
keycmd_bs (WebKitWebView *page, GArray *argv, GString *result);
-static void
+void
close_uzbl (WebKitWebView *page, GArray *argv, GString *result);
gboolean
run_command(const gchar *command, const guint npre,
const gchar **args, const gboolean sync, char **output_stdout);
close_uzbl (WebKitWebView *page, GArray *argv, GString *result);
gboolean
run_command(const gchar *command, const guint npre,
const gchar **args, const gboolean sync, char **output_stdout);
-static void
+void
spawn(WebKitWebView *web_view, GArray *argv, GString *result);
spawn(WebKitWebView *web_view, GArray *argv, GString *result);
-static void
+void
spawn_sh(WebKitWebView *web_view, GArray *argv, GString *result);
spawn_sh(WebKitWebView *web_view, GArray *argv, GString *result);
-static void
+void
spawn_sync(WebKitWebView *web_view, GArray *argv, GString *result);
spawn_sync(WebKitWebView *web_view, GArray *argv, GString *result);
-static void
+void
spawn_sh_sync(WebKitWebView *web_view, GArray *argv, GString *result);
spawn_sh_sync(WebKitWebView *web_view, GArray *argv, GString *result);
-static void
+void
parse_command(const char *cmd, const char *param, GString *result);
parse_command(const char *cmd, const char *param, GString *result);
-static void
+void
parse_cmd_line(const char *ctl_line, GString *result);
gchar*
parse_cmd_line(const char *ctl_line, GString *result);
gchar*
@@
-378,10
+378,10
@@
init_socket(gchar *dir);
gboolean
control_socket(GIOChannel *chan);
gboolean
control_socket(GIOChannel *chan);
-static gboolean
+gboolean
control_client_socket(GIOChannel *chan);
control_client_socket(GIOChannel *chan);
-static void
+void
update_title (void);
gboolean
update_title (void);
gboolean
@@
-402,10
+402,10
@@
create_mainbar ();
GtkWidget*
create_window ();
GtkWidget*
create_window ();
-static
-GtkPlug* create_plug ();
+GtkPlug*
+create_plug ();
-static void
+void
run_handler (const gchar *act, const gchar *args);
void
run_handler (const gchar *act, const gchar *args);
void
@@
-423,22
+423,22
@@
settings_init ();
void
search_text (WebKitWebView *page, GArray *argv, const gboolean forward);
void
search_text (WebKitWebView *page, GArray *argv, const gboolean forward);
-static void
+void
search_forward_text (WebKitWebView *page, GArray *argv, GString *result);
search_forward_text (WebKitWebView *page, GArray *argv, GString *result);
-static void
+void
search_reverse_text (WebKitWebView *page, GArray *argv, GString *result);
search_reverse_text (WebKitWebView *page, GArray *argv, GString *result);
-static void
+void
dehilight (WebKitWebView *page, GArray *argv, GString *result);
dehilight (WebKitWebView *page, GArray *argv, GString *result);
-static void
+void
run_js (WebKitWebView * web_view, GArray *argv, GString *result);
run_js (WebKitWebView * web_view, GArray *argv, GString *result);
-static void
+void
run_external_js (WebKitWebView * web_view, GArray *argv, GString *result);
run_external_js (WebKitWebView * web_view, GArray *argv, GString *result);
-static void
+void
eval_js(WebKitWebView * web_view, gchar *script, GString *result);
void handle_cookies (SoupSession *session,
eval_js(WebKitWebView * web_view, gchar *script, GString *result);
void handle_cookies (SoupSession *session,
@@
-448,10
+448,10
@@
void
save_cookies (SoupMessage *msg,
gpointer user_data);
save_cookies (SoupMessage *msg,
gpointer user_data);
-static void
+void
set_var(WebKitWebView *page, GArray *argv, GString *result);
set_var(WebKitWebView *page, GArray *argv, GString *result);
-static void
+void
act_bind(WebKitWebView *page, GArray *argv, GString *result);
void
act_bind(WebKitWebView *page, GArray *argv, GString *result);
void