Mercurial > dillo_port1.3
changeset 51:6ff7b6758e0c
Added the "static" qualifier where missing.
author | jcid |
---|---|
date | Sat, 17 Nov 2007 15:18:35 +0100 |
parents | 22a3dedcb1a0 |
children | 1c6b55026e84 |
files | ChangeLog dpi/cookies.c dpi/datauri.c dpi/downloads.cc dpi/file.c src/IO/dpi.c src/cache.c src/capi.c src/ui.cc src/uicmd.cc |
diffstat | 10 files changed, 37 insertions(+), 36 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Nov 17 14:47:41 2007 +0100 +++ b/ChangeLog Sat Nov 17 15:18:35 2007 +0100 @@ -54,6 +54,7 @@ - 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!
--- a/dpi/cookies.c Sat Nov 17 14:47:41 2007 +0100 +++ b/dpi/cookies.c Sat Nov 17 15:18:35 2007 +0100 @@ -159,7 +159,7 @@ /* * 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 @@ /* * 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 @@ * 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 @@ /* * 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 @@ /* * 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 @@ /* * 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;
--- a/dpi/datauri.c Sat Nov 17 14:47:41 2007 +0100 +++ b/dpi/datauri.c Sat Nov 17 15:18:35 2007 +0100 @@ -32,7 +32,7 @@ -int b64decode(unsigned char* str) +static int b64decode(unsigned char* str) { unsigned char *cur, *start; int d, dlast, phase; @@ -144,8 +144,8 @@ /* * 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 @@ 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 @@ * 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 @@ /* * 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;
--- a/dpi/downloads.cc Sat Nov 17 14:47:41 2007 +0100 +++ b/dpi/downloads.cc Sat Nov 17 15:18:35 2007 +0100 @@ -654,7 +654,7 @@ /* * 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 @@ /*! 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 @@ /* * 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 @@ * 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;
--- a/dpi/file.c Sat Nov 17 14:47:41 2007 +0100 +++ b/dpi/file.c Sat Nov 17 15:18:35 2007 +0100 @@ -876,7 +876,7 @@ * 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;
--- a/src/IO/dpi.c Sat Nov 17 14:47:41 2007 +0100 +++ b/src/IO/dpi.c Sat Nov 17 15:18:35 2007 +0100 @@ -130,7 +130,7 @@ * 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; }
--- a/src/cache.c Sat Nov 17 14:47:41 2007 +0100 +++ b/src/cache.c Sat Nov 17 15:18:35 2007 +0100 @@ -274,7 +274,7 @@ * 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 @@ * 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") ||
--- a/src/capi.c Sat Nov 17 14:47:41 2007 +0100 +++ b/src/capi.c Sat Nov 17 15:18:35 2007 +0100 @@ -237,7 +237,7 @@ /* * 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);
--- a/src/ui.cc Sat Nov 17 14:47:41 2007 +0100 +++ b/src/ui.cc Sat Nov 17 15:18:35 2007 +0100 @@ -123,7 +123,7 @@ // // 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 @@ /* * 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 @@ /* * 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 @@ /* * 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 @@ /* * 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 @@ /* * 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 @@ /* * 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 @@ /* * 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 @@ /* * 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();
--- a/src/uicmd.cc Sat Nov 17 14:47:41 2007 +0100 +++ b/src/uicmd.cc Sat Nov 17 15:18:35 2007 +0100 @@ -250,7 +250,7 @@ /* * 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 @@ * 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);