From e2efda19df7a52f11a9c9ed421ac34e6804b30d4 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Tue, 4 Mar 2003 11:59:36 +0000 Subject: [project @ 2003-03-04 11:59:35 by bursa] More compiler warning fixes. svn path=/import/netsurf/; revision=104 --- desktop/browser.c | 46 ++++++++++++++++++++++------------------------ desktop/browser.h | 9 ++++++--- desktop/gui.h | 4 ++-- desktop/netsurf.c | 5 ++++- 4 files changed, 34 insertions(+), 30 deletions(-) (limited to 'desktop') diff --git a/desktop/browser.c b/desktop/browser.c index 4661325ed..1d94971fa 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -1,5 +1,5 @@ /** - * $Id: browser.c,v 1.29 2003/03/03 22:40:39 bursa Exp $ + * $Id: browser.c,v 1.30 2003/03/04 11:59:35 bursa Exp $ */ #include "netsurf/content/cache.h" @@ -18,30 +18,27 @@ #include #include -void browser_window_start_throbber(struct browser_window* bw); -void browser_window_stop_throbber(struct browser_window* bw); -void browser_window_reformat(struct browser_window* bw); -void browser_window_text_selection(struct browser_window* bw, +static void browser_window_start_throbber(struct browser_window* bw); +static void browser_window_stop_throbber(struct browser_window* bw); +static void browser_window_reformat(struct browser_window* bw); +static void browser_window_text_selection(struct browser_window* bw, unsigned long click_x, unsigned long click_y, int click_type); -void browser_window_clear_text_selection(struct browser_window* bw); -void browser_window_change_text_selection(struct browser_window* bw, struct box_position* new_start, struct box_position* new_end); -int redraw_box_list(struct browser_window* bw, struct box* current, +static void browser_window_clear_text_selection(struct browser_window* bw); +static void browser_window_change_text_selection(struct browser_window* bw, struct box_position* new_start, struct box_position* new_end); +static int redraw_box_list(struct browser_window* bw, struct box* current, unsigned long x, unsigned long y, struct box_position* start, struct box_position* end, int* plot); -void browser_window_redraw_boxes(struct browser_window* bw, struct box_position* start, struct box_position* end); -void browser_window_follow_link(struct browser_window* bw, +static void browser_window_redraw_boxes(struct browser_window* bw, struct box_position* start, struct box_position* end); +static void browser_window_follow_link(struct browser_window* bw, unsigned long click_x, unsigned long click_y, int click_type); -void browser_window_callback(fetchcache_msg msg, struct content *c, +static void browser_window_callback(fetchcache_msg msg, struct content *c, void *p, const char *error); -void clear_radio_gadgets(struct browser_window* bw, struct box* box, struct gui_gadget* group); -void gui_redraw_gadget2(struct browser_window* bw, struct box* box, struct gui_gadget* g, +static void clear_radio_gadgets(struct browser_window* bw, struct box* box, struct gui_gadget* group); +static void gui_redraw_gadget2(struct browser_window* bw, struct box* box, struct gui_gadget* g, unsigned long x, unsigned long y); -void gui_redraw_gadget(struct browser_window* bw, struct gui_gadget* g); -void browser_window_gadget_select(struct browser_window* bw, struct gui_gadget* g, int item); -int browser_window_gadget_click(struct browser_window* bw, unsigned long click_x, unsigned long click_y); -void box_under_area(struct box* box, unsigned long x, unsigned long y, unsigned long ox, unsigned long oy, - struct box_selection** found, int* count, int* plot_index); -char *url_join(const char* new, const char* base); +static void browser_window_gadget_select(struct browser_window* bw, struct gui_gadget* g, int item); +static int browser_window_gadget_click(struct browser_window* bw, unsigned long click_x, unsigned long click_y); +static char *url_join(const char* new, const char* base); void browser_window_start_throbber(struct browser_window* bw) @@ -211,7 +208,7 @@ void browser_window_destroy(struct browser_window* bw) LOG(("end")); } -void browser_window_open_location_historical(struct browser_window* bw, char* url) +void browser_window_open_location_historical(struct browser_window* bw, const char* url) { LOG(("bw = %p, url = %s", bw, url)); @@ -224,11 +221,12 @@ void browser_window_open_location_historical(struct browser_window* bw, char* ur LOG(("end")); } -void browser_window_open_location(struct browser_window* bw, char* url) +void browser_window_open_location(struct browser_window* bw, const char* url0) { - LOG(("bw = %p, url = %s", bw, url)); - assert(bw != 0 && url != 0); - url = url_join(url, bw->url); + char *url; + LOG(("bw = %p, url0 = %s", bw, url0)); + assert(bw != 0 && url0 != 0); + url = url_join(url0, bw->url); browser_window_open_location_historical(bw, url); if (bw->history == NULL) bw->history = history_create(NULL, url); diff --git a/desktop/browser.h b/desktop/browser.h index 25fc6f6ed..299b17f73 100644 --- a/desktop/browser.h +++ b/desktop/browser.h @@ -1,5 +1,5 @@ /** - * $Id: browser.h,v 1.10 2003/03/03 22:40:39 bursa Exp $ + * $Id: browser.h,v 1.11 2003/03/04 11:59:35 bursa Exp $ */ #ifndef _NETSURF_DESKTOP_BROWSER_H_ @@ -93,19 +93,22 @@ struct box_selection struct browser_window* create_browser_window(int flags, int width, int height); void browser_window_destroy(struct browser_window* bw); -void browser_window_open_location(struct browser_window* bw, char* url); -void browser_window_open_location_historical(struct browser_window* bw, char* url); +void browser_window_open_location(struct browser_window* bw, const char* url); +void browser_window_open_location_historical(struct browser_window* bw, const char* url); int browser_window_action(struct browser_window* bw, struct browser_action* act); void browser_window_set_status(struct browser_window* bw, const char* text); void browser_window_back(struct browser_window* bw); void browser_window_forward(struct browser_window* bw); +void box_under_area(struct box* box, unsigned long x, unsigned long y, unsigned long ox, unsigned long oy, + struct box_selection** found, int* count, int* plot_index); int box_position_lt(struct box_position* x, struct box_position* y); int box_position_gt(struct box_position* x, struct box_position* y); int box_position_eq(struct box_position* x, struct box_position* y); int box_position_distance(struct box_position* x, struct box_position* y); +void gui_redraw_gadget(struct browser_window* bw, struct gui_gadget* g); #endif diff --git a/desktop/gui.h b/desktop/gui.h index 685def3f2..c80c56b4e 100644 --- a/desktop/gui.h +++ b/desktop/gui.h @@ -1,5 +1,5 @@ /** - * $Id: gui.h,v 1.5 2003/03/03 22:40:39 bursa Exp $ + * $Id: gui.h,v 1.6 2003/03/04 11:59:35 bursa Exp $ */ #ifndef _NETSURF_DESKTOP_GUI_H_ @@ -30,7 +30,7 @@ void gui_window_hide(gui_window* g); void gui_window_redraw(gui_window* g, unsigned long x0, unsigned long y0, unsigned long x1, unsigned long y1); void gui_window_redraw_window(gui_window* g); -void gui_window_set_scroll(gui_window* g, int sx, int sy); +void gui_window_set_scroll(gui_window* g, unsigned long sx, unsigned long sy); unsigned long gui_window_get_width(gui_window* g); void gui_window_set_extent(gui_window* g, unsigned long width, unsigned long height); void gui_window_set_status(gui_window* g, const char* text); diff --git a/desktop/netsurf.c b/desktop/netsurf.c index f8161c975..446f8c05a 100644 --- a/desktop/netsurf.c +++ b/desktop/netsurf.c @@ -1,5 +1,5 @@ /** - * $Id: netsurf.c,v 1.6 2003/02/09 12:58:15 bursa Exp $ + * $Id: netsurf.c,v 1.7 2003/03/04 11:59:35 bursa Exp $ */ #include "netsurf/desktop/netsurf.h" @@ -13,6 +13,9 @@ int netsurf_quit = 0; gui_window* netsurf_gui_windows = NULL; +static void netsurf_init(int argc, char** argv); +static void netsurf_exit(void); + void netsurf_poll(void) { -- cgit v1.2.3