[project @ 2004-01-26 22:55:23 by rob]

Changes in positioning of variable declarations to allow compile with 2.95.5 compiler again

svn path=/import/netsurf/; revision=512
This commit is contained in:
Rob Jackson 2004-01-26 22:55:23 +00:00
parent 23c204d575
commit c05a832714
3 changed files with 21 additions and 17 deletions

View File

@ -177,12 +177,14 @@ void about_create(void) {
continue;
}
else {
void *name;
/* Type 3: image file with name xxwwwwhhhh */
/* get actual file name */
sprintf(var, "%2.2d*", j);
LOG(("var: %s", var));
void *name = (void*)xcalloc((unsigned int)20, sizeof(char));
name = (void*)xcalloc((unsigned int)20, sizeof(char));
e = xosgbpb_dir_entries(val, (osgbpb_string_list*)name,
1, 0, 255, var, NULL, NULL);

View File

@ -189,12 +189,12 @@ int nsjpeg_convert(struct content *c, unsigned int width, unsigned int height)
LOG(("creating sprite area"));
{
struct osspriteop_header *spr;
unsigned int abw = ((c->width + 3) &~ 3u) * c->height; /* sprite */
/* nBytes = spr + msk + spr ctrl blk + area ctrl blk + palette */
unsigned int nBytes = abw*2 + 44 + 16 /*+ 256*8*/; /* 8bpp */
c->data.jpeg.sprite_area = xcalloc(1, nBytes);
struct osspriteop_header *spr = (osspriteop_header*)
(c->data.jpeg.sprite_area + 1);
spr = (osspriteop_header*) (c->data.jpeg.sprite_area + 1);
/* area control block */
c->data.jpeg.sprite_area->size = nBytes;

View File

@ -736,20 +736,22 @@ bool ro_gui_window_keypress(gui_window *g, int key, bool toolbar)
case wimp_KEY_RETURN:
if (!toolbar)
break;
char *url = xcalloc(1, 10 + strlen(g->url));
char *url2;
if (g->url[strspn(g->url, "abcdefghijklmnopqrstuvwxyz")] != ':') {
strcpy(url, "http://");
strcpy(url + 7, g->url);
} else {
strcpy(url, g->url);
}
url2 = url_join(url, 0);
free(url);
if (url2) {
gui_window_set_url(g, url2);
browser_window_open_location(g->data.browser.bw, url2);
free(url2);
else {
char *url = xcalloc(1, 10 + strlen(g->url));
char *url2;
if (g->url[strspn(g->url, "abcdefghijklmnopqrstuvwxyz")] != ':') {
strcpy(url, "http://");
strcpy(url + 7, g->url);
} else {
strcpy(url, g->url);
}
url2 = url_join(url, 0);
free(url);
if (url2) {
gui_window_set_url(g, url2);
browser_window_open_location(g->data.browser.bw, url2);
free(url2);
}
}
return true;