summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2004-05-05 16:33:15 +0000
committerJames Bursa <james@netsurf-browser.org>2004-05-05 16:33:15 +0000
commitbb41604045cbabbf9aea502ccc9b0e9db50e6aa7 (patch)
tree73e84936444d0e418cf4c029b347e2205edd552a /riscos
parent9deb539031dbd92dc9caa45221e21a018fb2a570 (diff)
downloadnetsurf-bb41604045cbabbf9aea502ccc9b0e9db50e6aa7.tar.gz
netsurf-bb41604045cbabbf9aea502ccc9b0e9db50e6aa7.tar.bz2
[project @ 2004-05-05 16:33:15 by bursa]
Fix some compiler warnings. Ignore size attribute for file inputs. svn path=/import/netsurf/; revision=828
Diffstat (limited to 'riscos')
-rw-r--r--riscos/gif.c12
-rw-r--r--riscos/gui.c16
-rw-r--r--riscos/history.c1
-rw-r--r--riscos/menus.c1
-rw-r--r--riscos/plugin.c3
-rw-r--r--riscos/plugin.h3
-rw-r--r--riscos/save.c3
7 files changed, 22 insertions, 17 deletions
diff --git a/riscos/gif.c b/riscos/gif.c
index 63952342e..2b227af6d 100644
--- a/riscos/gif.c
+++ b/riscos/gif.c
@@ -4,9 +4,6 @@
* http://www.opensource.org/licenses/gpl-license
* Copyright 2003 John M Bell <jmb202@ecs.soton.ac.uk>
* Copyright 2004 Richard Wilson <not_ginger_matt@sourceforge.net>
- *
- * Parts modified from IGviewer source by Peter Hartley
- * http://utter.chaos.org/~pdh/software/intergif.htm
*/
#include <assert.h>
@@ -94,9 +91,12 @@ void nsgif_redraw(struct content *c, long x, long y,
/* Decode from the last frame to the current frame
*/
- previous_frame = c->data.gif.gif->decoded_frame;
- if (previous_frame > c->data.gif.current_frame) previous_frame = -1;
- for (frame = previous_frame + 1; frame <= c->data.gif.current_frame; frame++) {
+ if (c->data.gif.current_frame < c->data.gif.gif->decoded_frame)
+ previous_frame = 0;
+ else
+ previous_frame = c->data.gif.gif->decoded_frame + 1;
+
+ for (frame = previous_frame; frame <= c->data.gif.current_frame; frame++) {
gif_decode_frame(c->data.gif.gif, frame);
}
diff --git a/riscos/gui.c b/riscos/gui.c
index dd7254bfa..cc3dfe747 100644
--- a/riscos/gui.c
+++ b/riscos/gui.c
@@ -68,7 +68,7 @@ static clock_t gui_last_poll; /**< Time of last wimp_poll. */
osspriteop_area *pointers; /**< Sprite area containing pointer data */
gui_pointer_shape curr_pointer; /**< Current shape of the pointer */
/** Accepted wimp user messages. */
-static const wimp_MESSAGE_LIST(27) task_messages = { {
+static wimp_MESSAGE_LIST(27) task_messages = { {
message_DATA_SAVE,
message_DATA_SAVE_ACK,
message_DATA_LOAD,
@@ -158,7 +158,7 @@ void gui_init(int argc, char** argv)
messages_load("<NetSurf$Dir>.Resources.LangNames");
error = xwimp_initialise(wimp_VERSION_RO38, "NetSurf",
- (wimp_message_list*) &task_messages, 0,
+ (const wimp_message_list *) &task_messages, 0,
&task_handle);
if (error) {
LOG(("xwimp_initialise failed: 0x%x: %s",
@@ -215,7 +215,7 @@ void gui_init(int argc, char** argv)
void gui_window_clone_options(struct browser_window *new_bw, struct browser_window *old_bw) {
gui_window *old_gui = NULL;
gui_window *new_gui;
-
+
/* Abort on bad input
*/
if (new_bw == NULL) return;
@@ -239,10 +239,10 @@ void gui_window_clone_options(struct browser_window *new_bw, struct browser_wind
} else {
new_gui->scale = old_gui->scale;
new_gui->option_dither_sprites = old_gui->option_dither_sprites;
- new_gui->option_filter_sprites = old_gui->option_filter_sprites;
+ new_gui->option_filter_sprites = old_gui->option_filter_sprites;
new_gui->option_animate_images = old_gui->option_animate_images;
}
-
+
/* Set up the toolbar
*/
if (new_gui->data.browser.toolbar) {
@@ -271,7 +271,7 @@ void gui_window_clone_options(struct browser_window *new_bw, struct browser_wind
*/
void gui_window_default_options(struct browser_window *bw) {
gui_window *gui;
-
+
/* Abort on bad input
*/
if (bw == NULL) return;
@@ -287,7 +287,7 @@ void gui_window_default_options(struct browser_window *bw) {
option_dither_sprites = gui->option_dither_sprites;
option_filter_sprites = gui->option_filter_sprites;
option_animate_images = gui->option_animate_images;
-
+
/* Set up the toolbar
*/
if (gui->data.browser.toolbar) {
@@ -769,7 +769,7 @@ void ro_gui_open_window_request(wimp_open *open) {
if (g) {
toolbar = g->data.browser.toolbar;
if (toolbar) {
- toolbar->resize_status = 1;
+ toolbar->resize_status = 1;
ro_theme_resize_toolbar(g);
}
}
diff --git a/riscos/history.c b/riscos/history.c
index 112727810..f29dd8ad4 100644
--- a/riscos/history.c
+++ b/riscos/history.c
@@ -20,6 +20,7 @@
#include "netsurf/riscos/gui.h"
#include "netsurf/riscos/thumbnail.h"
#include "netsurf/riscos/tinct.h"
+#include "netsurf/riscos/wimp.h"
#include "netsurf/utils/log.h"
#include "netsurf/utils/utils.h"
diff --git a/riscos/menus.c b/riscos/menus.c
index 9fcc3dc4e..44f12aaac 100644
--- a/riscos/menus.c
+++ b/riscos/menus.c
@@ -20,6 +20,7 @@
#include "netsurf/riscos/gui.h"
#include "netsurf/riscos/theme.h"
#include "netsurf/riscos/options.h"
+#include "netsurf/riscos/wimp.h"
#include "netsurf/utils/log.h"
#include "netsurf/utils/messages.h"
#include "netsurf/utils/url.h"
diff --git a/riscos/plugin.c b/riscos/plugin.c
index 4a63f2900..6baa41c4f 100644
--- a/riscos/plugin.c
+++ b/riscos/plugin.c
@@ -525,7 +525,8 @@ void plugin_destroy(struct content *c)
*/
void plugin_redraw(struct content *c, long x, long y,
unsigned long width, unsigned long height,
- long clip_x0, long clip_y0, long clip_x1, long clip_y1)
+ long clip_x0, long clip_y0, long clip_x1, long clip_y1,
+ float scale)
{
struct plugin_list *npl;
diff --git a/riscos/plugin.h b/riscos/plugin.h
index f08465897..b996b977f 100644
--- a/riscos/plugin.h
+++ b/riscos/plugin.h
@@ -78,7 +78,8 @@ void plugin_reformat(struct content *c, unsigned int width, unsigned int height)
void plugin_destroy(struct content *c);
void plugin_redraw(struct content *c, long x, long y,
unsigned long width, unsigned long height,
- long clip_x0, long clip_y0, long clip_x1, long clip_y1);
+ long clip_x0, long clip_y0, long clip_x1, long clip_y1,
+ float scale);
void plugin_add_instance(struct content *c, struct browser_window *bw,
struct content *page, struct box *box,
struct object_params *params, void **state);
diff --git a/riscos/save.c b/riscos/save.c
index 79c79adfb..9c91becb3 100644
--- a/riscos/save.c
+++ b/riscos/save.c
@@ -23,6 +23,7 @@
#include "netsurf/riscos/save_complete.h"
#include "netsurf/riscos/save_draw.h"
#include "netsurf/riscos/thumbnail.h"
+#include "netsurf/riscos/wimp.h"
#include "netsurf/utils/log.h"
#include "netsurf/utils/messages.h"
#include "netsurf/utils/utils.h"
@@ -286,7 +287,7 @@ void ro_gui_save_complete(struct content *c, char *path)
/* !Paint gets confused with uppercase characters
*/
- for (int index = 0; index < 12; index++) {
+ for (index = 0; index < 12; index++) {
sprite_header->name[index] = tolower(sprite_header->name[index]);
}
thumbnail_create(c, area,