aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2007-11-17 15:18:35 +0100
committerjcid <devnull@localhost>2007-11-17 15:18:35 +0100
commit9fce735bdcebd04957360f4b673b1dfe4645f0af (patch)
tree4d4321f2f1ba3aa089e61b48bf3812415bc76e1a
parentdfd741a2a60c8013cf96666bb9f24408b863790e (diff)
Added the "static" qualifier where missing.
-rw-r--r--ChangeLog1
-rw-r--r--dpi/cookies.c16
-rw-r--r--dpi/datauri.c14
-rw-r--r--dpi/downloads.cc10
-rw-r--r--dpi/file.c2
-rw-r--r--src/IO/dpi.c2
-rw-r--r--src/cache.c4
-rw-r--r--src/capi.c2
-rw-r--r--src/ui.cc18
-rw-r--r--src/uicmd.cc4
10 files changed, 37 insertions, 36 deletions
diff --git a/ChangeLog b/ChangeLog
index b1af7837..e6ac4e4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -54,6 +54,7 @@ dillo-fltk2
- Enabled hiding widgets of the control panel from dillorc2.
- Added a save-directory preference (save_dir in dillorc2).
- Fixed page-popup-menu to use the stack's top URL instead of base_url.
+ - Added the "static" qualifier where missing.
Patches: place
+- Fixed a problem with locally-installed dpis.
- Added code for optional image loading (nice interface) very advanced!
diff --git a/dpi/cookies.c b/dpi/cookies.c
index 0a3f0652..fd91e0cc 100644
--- a/dpi/cookies.c
+++ b/dpi/cookies.c
@@ -159,7 +159,7 @@ static int Cookies_cmp(const void *a, const void *b);
/*
* Compare function for searching a cookie node
*/
-int Cookie_node_cmp(const void *v1, const void *v2)
+static int Cookie_node_cmp(const void *v1, const void *v2)
{
const CookieNode *n1 = v1, *n2 = v2;
@@ -169,7 +169,7 @@ int Cookie_node_cmp(const void *v1, const void *v2)
/*
* Compare function for searching a cookie node by domain
*/
-int Cookie_node_by_domain_cmp(const void *v1, const void *v2)
+static int Cookie_node_by_domain_cmp(const void *v1, const void *v2)
{
const CookieNode *node = v1;
const char *domain = v2;
@@ -223,7 +223,7 @@ static void Cookies_free_cookie(CookieData_t *cookie)
* Initialize the cookies module
* (The 'disabled' variable is writable only within Cookies_init)
*/
-void Cookies_init()
+static void Cookies_init()
{
CookieData_t *cookie;
char *filename;
@@ -417,7 +417,7 @@ void Cookies_init()
/*
* Flush cookies to disk and free all the memory allocated.
*/
-void Cookies_save_and_free()
+static void Cookies_save_and_free()
{
int i, fd;
CookieNode *node;
@@ -1045,8 +1045,8 @@ static char *Cookies_strip_path(const char *path)
/*
* Set the value corresponding to the cookie string
*/
-void Cookies_set(char *cookie_string, char *url_host,
- char *url_path, int url_port)
+static void Cookies_set(char *cookie_string, char *url_host,
+ char *url_path, int url_port)
{
CookieControlAction action;
CookieData_t *cookie;
@@ -1113,8 +1113,8 @@ static bool_t Cookies_match(CookieData_t *cookie, int port,
/*
* Return a string that contains all relevant cookies as headers.
*/
-char *Cookies_get(char *url_host, char *url_path,
- char *url_scheme, int url_port)
+static char *Cookies_get(char *url_host, char *url_path,
+ char *url_scheme, int url_port)
{
char *domain_str, *q, *str, *path;
CookieData_t *cookie;
diff --git a/dpi/datauri.c b/dpi/datauri.c
index 468a2cf8..ef67e5ed 100644
--- a/dpi/datauri.c
+++ b/dpi/datauri.c
@@ -32,7 +32,7 @@ static SockHandler *sh = NULL;
-int b64decode(unsigned char* str)
+static int b64decode(unsigned char* str)
{
unsigned char *cur, *start;
int d, dlast, phase;
@@ -144,8 +144,8 @@ char *a_Url_decode_hex_str(const char *str, size_t *p_sz)
/*
* Send decoded data to dillo in an HTTP envelope.
*/
-void send_decoded_data(const char *url, const char *mime_type,
- unsigned char *data, size_t data_sz)
+static void send_decoded_data(const char *url, const char *mime_type,
+ unsigned char *data, size_t data_sz)
{
char *d_cmd;
@@ -163,8 +163,8 @@ void send_decoded_data(const char *url, const char *mime_type,
sock_handler_write(sh, 0, (char *)data, data_sz);
}
-void send_failure_message(const char *url, const char *mime_type,
- unsigned char *data, size_t data_sz)
+static void send_failure_message(const char *url, const char *mime_type,
+ unsigned char *data, size_t data_sz)
{
char *d_cmd;
char buf[1024];
@@ -204,7 +204,7 @@ void send_failure_message(const char *url, const char *mime_type,
* only handles ISO-LATIN-1. The FLTK2 version (utf-8) could use it in the
* future.
*/
-char *datauri_get_mime(char *url)
+static char *datauri_get_mime(char *url)
{
char buf[256];
char *mime_type = NULL, *p;
@@ -239,7 +239,7 @@ char *datauri_get_mime(char *url)
/*
* Return a decoded data string.
*/
-unsigned char *datauri_get_data(char *url, size_t *p_sz)
+static unsigned char *datauri_get_data(char *url, size_t *p_sz)
{
char *p;
int is_base64 = 0;
diff --git a/dpi/downloads.cc b/dpi/downloads.cc
index afadee2b..b9c89941 100644
--- a/dpi/downloads.cc
+++ b/dpi/downloads.cc
@@ -654,7 +654,7 @@ void DLItem::child_finished(int status)
/*
* Convert seconds into human readable [hour]:[min]:[sec] string.
*/
-void secs2timestr(int et, char *str)
+static void secs2timestr(int et, char *str)
{
int eh, em, es;
@@ -743,13 +743,13 @@ void DLItem::update()
/*! SIGCHLD handler
*/
-void raw_sigchld(int)
+static void raw_sigchld(int)
{
caught_sigchld = 1;
}
/*! Establish SIGCHLD handler */
-void est_sigchld(void)
+static void est_sigchld(void)
{
struct sigaction sigact;
sigset_t set;
@@ -767,7 +767,7 @@ void est_sigchld(void)
/*
* Timeout function to check wget's exit status.
*/
-void cleanup_cb(void *data)
+static void cleanup_cb(void *data)
{
DLItemList *list = (DLItemList *)data;
@@ -793,7 +793,7 @@ void cleanup_cb(void *data)
* Timeout function to update the widget indicators,
* also remove widgets marked "done".
*/
-void update_cb(void *data)
+static void update_cb(void *data)
{
static int cb_used = 0;
diff --git a/dpi/file.c b/dpi/file.c
index 04cdf362..edbbc9ec 100644
--- a/dpi/file.c
+++ b/dpi/file.c
@@ -876,7 +876,7 @@ static void *File_serve_clients(void *client)
* Check a fd for activity, with a max timeout.
* return value: 0 if timeout, 1 if input available, -1 if error.
*/
-int File_check_fd(int filedes, unsigned int seconds)
+static int File_check_fd(int filedes, unsigned int seconds)
{
int st;
fd_set set;
diff --git a/src/IO/dpi.c b/src/IO/dpi.c
index 3e68fb6f..c253f08c 100644
--- a/src/IO/dpi.c
+++ b/src/IO/dpi.c
@@ -130,7 +130,7 @@ static void Dpi_conn_free(dpi_conn_t *conn)
* Check whether a conn is still valid.
* Return: 1 if found, 0 otherwise
*/
-int Dpi_conn_valid(int key)
+static int Dpi_conn_valid(int key)
{
return (a_Klist_get_data(ValidConns, key)) ? 1 : 0;
}
diff --git a/src/cache.c b/src/cache.c
index eeeb5162..84e93fc6 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -274,7 +274,7 @@ static void Cache_entry_free(CacheEntry_t *entry)
* All the entry clients are removed too! (it may stop rendering of this
* same resource on other windows, but nothing more).
*/
-void Cache_entry_remove(CacheEntry_t *entry, DilloUrl *url)
+static void Cache_entry_remove(CacheEntry_t *entry, DilloUrl *url)
{
int i;
CacheClient_t *Client;
@@ -691,7 +691,7 @@ static int Cache_redirect(CacheEntry_t *entry, int Flags, BrowserWindow *bw)
* Check whether a URL scheme is downloadable.
* Return: 1 enabled, 0 disabled.
*/
-int Cache_download_enabled(const DilloUrl *url)
+static int Cache_download_enabled(const DilloUrl *url)
{
if (!dStrcasecmp(URL_SCHEME(url), "http") ||
!dStrcasecmp(URL_SCHEME(url), "https") ||
diff --git a/src/capi.c b/src/capi.c
index 428442cd..38e78f71 100644
--- a/src/capi.c
+++ b/src/capi.c
@@ -237,7 +237,7 @@ static int Capi_dpi_verify_request(DilloWeb *web)
/*
* If the url belongs to a dpi server, return its name.
*/
-int Capi_url_uses_dpi(DilloUrl *url, char **server_ptr)
+static int Capi_url_uses_dpi(DilloUrl *url, char **server_ptr)
{
char *p, *server = NULL, *url_str = URL_STR(url);
diff --git a/src/ui.cc b/src/ui.cc
index f5ea2c0a..a8ed894b 100644
--- a/src/ui.cc
+++ b/src/ui.cc
@@ -123,7 +123,7 @@ int NewHighlightButton::handle(int e)
//
// Global event handler function ---------------------------------------------
//
-int global_event_handler(int e, Window *win)
+static int global_event_handler(int e, Window *win)
{
int ret = 0;
@@ -162,7 +162,7 @@ int global_event_handler(int e, Window *win)
/*
* Callback handler for the close window event.
*/
-void close_window_cb(Widget *wid, void *data)
+static void close_window_cb(Widget *wid, void *data)
{
a_UIcmd_close_bw(data);
}
@@ -188,7 +188,7 @@ static void search_cb(Widget *wid, void *data)
/*
* Callback for the location's clear-button.
*/
-void clear_cb(Widget *w, void *data)
+static void clear_cb(Widget *w, void *data)
{
UI *ui = (UI*)data;
@@ -216,7 +216,7 @@ static void color_change_cb(Widget *wid, void *data)
/*
* Send the browser to the new URL in the location.
*/
-void location_cb(Widget *wid, void *data)
+static void location_cb(Widget *wid, void *data)
{
Input *i = (Input*)wid;
@@ -233,7 +233,7 @@ void location_cb(Widget *wid, void *data)
/*
* Callback handler for button press on the panel
*/
-void b1_cb(Widget *wid, void *cb_data)
+static void b1_cb(Widget *wid, void *cb_data)
{
int bn = VOIDP2INT(cb_data);
int k = event_key();
@@ -289,7 +289,7 @@ void b1_cb(Widget *wid, void *cb_data)
/*
* Callback handler for fullscreen button press
*/
-void fullscreen_cb(Widget *wid, void *data)
+static void fullscreen_cb(Widget *wid, void *data)
{
((UI*)data)->fullscreen_cb_i();
}
@@ -297,7 +297,7 @@ void fullscreen_cb(Widget *wid, void *data)
/*
* Callback for the bug meter button.
*/
-void bugmeter_cb(Widget *w, void *data)
+static void bugmeter_cb(Widget *w, void *data)
{
int k = event_key();
if (k && k <= 7)
@@ -312,7 +312,7 @@ void bugmeter_cb(Widget *w, void *data)
/*
* Callback for the image loading button.
*/
-void imageload_cb(Widget *w, void *data)
+static void imageload_cb(Widget *w, void *data)
{
int k = event_key();
if (k && k <= 7)
@@ -325,7 +325,7 @@ void imageload_cb(Widget *w, void *data)
/*
* File menu item callback.
*/
-void menu_cb(Widget* w, void*)
+static void menu_cb(Widget* w, void*)
{
Menu* menu = (Menu*)w;
Widget* item = menu->get_item();
diff --git a/src/uicmd.cc b/src/uicmd.cc
index eca9e76c..ed72356e 100644
--- a/src/uicmd.cc
+++ b/src/uicmd.cc
@@ -250,7 +250,7 @@ void a_UIcmd_reload(void *vbw)
/*
* Return a suitable filename for a given URL path.
*/
-char *UIcmd_make_save_filename(const char *pathstr)
+static char *UIcmd_make_save_filename(const char *pathstr)
{
size_t MaxLen = 64;
char *FileName, *name;
@@ -363,7 +363,7 @@ void a_UIcmd_open_url_dialog(void *vbw)
* a string of keywords (separarated by blanks) and prefs.search_url.
* The search string is urlencoded.
*/
-char *UIcmd_make_search_str(const char *str)
+static char *UIcmd_make_search_str(const char *str)
{
char *keys = a_Url_encode_hex_str(str), *c = prefs.search_url;
Dstr *ds = dStr_sized_new(128);