Commit f11f2074 authored by Robert Sprowson's avatar Robert Sprowson

Clean up pass.

No functional changes, but it's now a consistent ball of spaghetti.
parent af6ac588
......@@ -27,33 +27,33 @@
#include "SprWindow.h"
#include "akbd.h"
static wimp_i rename_icon=-1;
static wimp_i rename_icon = -1;
static char rename_buffer[16];
static main_window *rename_window;
static main_sprite *rename_sprite;
static wimp_box rename_bbox;
static int rename_sprites_per_row;
static void AltRename_renamesprite(main_sprite *sprite, char *newname)
{
sprite_id sid;
static void altrename_renamesprite (main_sprite *sprite, char *newname)
{ sprite_id sid;
char name[NAME_LIMIT+1];
sid.tag = sprite_id_name; /*doesn't flex*/
sid.s.name = newname;
if (*newname==0) return;
if (*newname == 0) return;
/* check if new name exists */
if (!sprite_select (sprite->file->spritearea,&sid)) return ;
if (!sprite_select (sprite->file->spritearea,&sid)) return;
strncpy(name,psprite_address(sprite)->name,NAME_LIMIT);
name[NAME_LIMIT]=0;
sid.s.name=name;
strncpy (name, psprite_address (sprite)->name, NAME_LIMIT);
name[NAME_LIMIT] = 0;
sid.s.name = name;
if (wimpt_complain (sprite_rename
(sprite->file->spritearea, &sid, newname)) !=
NULL) return;
main_set_modified(sprite->file);
main_set_modified (sprite->file);
sprwindow_set_window_titles (sprite);
/* rename must reset the titles of all the windows open on
......@@ -75,7 +75,7 @@ static void AltRename_renamesprite(main_sprite *sprite, char *newname)
wimp_wstate wstate;
winfo.w = sprite->colourhandle;
wimpt_noerr (PaintLib_get_wind_info (&winfo));
wimpt_noerr (paintlib_get_wind_info (&winfo));
sprintf (winfo.info.title.indirecttext.buffer,
msgs_lookup ("PntW7"), newname);
......@@ -93,21 +93,22 @@ static void AltRename_renamesprite(main_sprite *sprite, char *newname)
}
}
void AltRename_delete(void)
{
wimp_redrawstr ds;
void altrename_delete (void)
{ wimp_redrawstr ds;
if (!rename_window) return;
wimp_delete_icon(rename_window->handle,rename_icon);
ds.w=rename_window->handle;
ds.box=rename_bbox;
wimp_force_redraw(&ds);
wimp_delete_icon (rename_window->handle, rename_icon);
ds.w = rename_window->handle;
ds.box = rename_bbox;
wimp_force_redraw (&ds);
rename_window=0;
rename_window = NULL;
}
static int AltRename_sprites_per_row(int *toggled)
{
wimp_wstate ws;
static int altrename_sprites_per_row (int *toggled)
{ wimp_wstate ws;
int width;
if (!rename_window) return 0;
......@@ -117,147 +118,140 @@ static int AltRename_sprites_per_row(int *toggled)
else
width = main_FILER_TotalWidth;
wimp_get_wind_state(rename_window->handle,&ws);
if (toggled) *toggled=(ws.flags & wimp_WCLICK_TOGGLE);
wimp_get_wind_state(rename_window->handle, &ws);
width=(ws.o.box.x1-ws.o.box.x0)/width;
if (toggled) *toggled = (ws.flags & wimp_WCLICK_TOGGLE);
width = (ws.o.box.x1-ws.o.box.x0)/width;
return width?width:1;
return width ? width : 1;
}
void AltRename_start(main_window *window, main_sprite *sprite)
{
wimp_box bbox;
void altrename_start (main_window *window, main_sprite *sprite)
{ wimp_box bbox;
psprite_info sinfo;
wimp_icreate icon;
wimp_wstate ws;
int y,scy;
int y, scy;
wimp_redrawstr ds;
wimp_caretstr caret;
if (!window || ! sprite) return;
if (!window || !sprite) return;
if (window==rename_window && sprite==rename_sprite) return;
AltRename_delete();
altrename_delete();
if (!main_get_all_sprite_bboxes (window,sprite,&bbox,0,&icon.i.box))
if (!main_get_all_sprite_bboxes (window, sprite, &bbox, 0, &icon.i.box))
return;
if (window->data->file.fullinfo)
icon.i.box.x1=icon.i.box.x0+12*main_FILER_TextWidth;
icon.i.box.x1 = icon.i.box.x0+12*main_FILER_TextWidth;
else
{
icon.i.box.x0=bbox.x0;
icon.i.box.x1=bbox.x1;
{ icon.i.box.x0 = bbox.x0;
icon.i.box.x1 = bbox.x1;
}
icon.w=window->handle;
icon.i.flags=(wimp_iconflags)(wimp_ITEXT | wimp_INDIRECT | wimp_IHCENTRE |
wimp_IFILLED | wimp_IBORDER |
(7*wimp_IFORECOL) | (0*wimp_IBACKCOL) |
(wimp_BWRITABLE*wimp_IBTYPE));
icon.w = window->handle;
icon.i.flags = (wimp_iconflags)(wimp_ITEXT | wimp_INDIRECT | wimp_IHCENTRE |
wimp_IFILLED | wimp_IBORDER |
(7 * wimp_IFORECOL) | (0 * wimp_IBACKCOL) |
(wimp_BWRITABLE * wimp_IBTYPE));
icon.i.data.indirecttext.buffer=rename_buffer;
icon.i.data.indirecttext.validstring="";
icon.i.data.indirecttext.bufflen=NAME_LIMIT+1;
icon.i.data.indirecttext.buffer = rename_buffer;
icon.i.data.indirecttext.validstring = "";
icon.i.data.indirecttext.bufflen = NAME_LIMIT+1;
psprite_read_full_info (sprite, &sinfo);
strcpy(rename_buffer,sinfo.name);
if (wimpt_complain(wimp_create_icon(&icon,&rename_icon))) return;
wimp_redrawstr ds;
wimp_caretstr caret;
rename_window=window;
rename_sprite=sprite;
ds.w=icon.w;
ds.box=icon.i.box;
rename_bbox=ds.box;
rename_sprites_per_row=AltRename_sprites_per_row(0);
caret.w=window->handle;
caret.i=rename_icon;
caret.x=caret.y=0;
caret.height=-1;
caret.index=strlen(sinfo.name);
wimp_set_caret_pos(&caret);
wimp_force_redraw(&ds);
wimp_get_wind_state(window->handle,&ws);
scy=ws.o.y;
y=WORKAREA_TO_SCREEN_Y(&ws,bbox.y1);
strcpy (rename_buffer, sinfo.name);
if (wimpt_complain (wimp_create_icon (&icon, &rename_icon))) return;
rename_window = window;
rename_sprite = sprite;
ds.w = icon.w;
ds.box = icon.i.box;
rename_bbox = ds.box;
rename_sprites_per_row = altrename_sprites_per_row (0);
caret.w = window->handle;
caret.i = rename_icon;
caret.x = caret.y = 0;
caret.height = -1;
caret.index = strlen (sinfo.name);
wimp_set_caret_pos (&caret);
wimp_force_redraw (&ds);
wimp_get_wind_state (window->handle,&ws);
scy = ws.o.y;
y = WORKAREA_TO_SCREEN_Y(&ws, bbox.y1);
if (y>ws.o.box.y1)
ws.o.y+=(y-ws.o.box.y1);
ws.o.y += (y-ws.o.box.y1);
y=WORKAREA_TO_SCREEN_Y(&ws,bbox.y0);
y = WORKAREA_TO_SCREEN_Y(&ws, bbox.y0);
if (y<ws.o.box.y0)
ws.o.y+=(y-ws.o.box.y0);
if (scy != ws.o.y) wimp_open_wind(&ws.o);
ws.o.y += (y-ws.o.box.y0);
if (scy != ws.o.y) wimp_open_wind (&ws.o);
}
BOOL AltRename_claim_event(wimp_eventstr *e,main_window *window)
{
if (!rename_window) return 0;
BOOL altrename_claim_event (wimp_eventstr *e, main_window *window)
{ if (!rename_window) return FALSE;
switch (e->e)
{
case wimp_EBUT:
if (window->handle!=rename_window->handle ||
(e->data.but.m.bbits & 2))
{
AltRename_delete();
break;
{ altrename_delete ();
break;
}
if ( e->data.but.m.i==rename_icon &&
window->handle==rename_window->handle) return 1;
window->handle==rename_window->handle) return TRUE;
if (e->data.but.m.bbits & (wimp_BCLICKLEFT | wimp_BCLICKRIGHT))
{
AltRename_delete();
{ altrename_delete ();
break;
}
return 1;
return TRUE;
case wimp_EOPEN:
{
int wid;
{ int wid;
if (window->handle==rename_window->handle)
{
int toggled;
wid = AltRename_sprites_per_row(&toggled);
if (wid != rename_sprites_per_row || toggled)
AltRename_delete();
{ int toggled;
wid = altrename_sprites_per_row (&toggled);
if (wid != rename_sprites_per_row || toggled)
altrename_delete();
}
break;
}
case wimp_EKEY:
if (window->handle!=rename_window->handle) break;
switch (e->data.key.chcode)
{
case 13:
AltRename_renamesprite(rename_sprite,rename_buffer);
if (!akbd_pollctl())
{
AltRename_delete();
case 13:
altrename_renamesprite (rename_sprite, rename_buffer);
if (!akbd_pollctl ())
{ altrename_delete ();
break;
}
/*fall through*/
case 0x18A: /* TAB - next sprite */
{
main_sprite *sprite=rename_sprite->link;
case 0x18A: /* TAB - next sprite */
{ main_sprite *sprite=rename_sprite->link;
if (sprite==0) sprite=rename_window->data->file.sprites;
AltRename_start(rename_window,sprite);
altrename_start (rename_window, sprite);
}
break;
case 0x19A: /* Shift TAB - previous sprite */
{
main_sprite *sprite=rename_sprite;
for (sprite=rename_window->data->file.sprites;
!(sprite->link==0 || sprite->link==rename_sprite);
sprite=sprite->link);
AltRename_start(rename_window,sprite);
{ main_sprite *sprite=rename_sprite;
for (sprite = rename_window->data->file.sprites;
!(sprite->link == NULL || sprite->link == rename_sprite);
sprite = sprite->link);
altrename_start (rename_window, sprite);
}
break;
}
}
return 0;
return FALSE;
}
......@@ -80,7 +80,8 @@ void colours_set_gcol (int col, int action, int back)
os_swi2 (OS_SetColour, action | back << 4, col);
ftracef2 ("SetColour 0x%X=%d\n", col, col);
break;
} }
}
}
/***********************************************************
* Set the gcol, doing sprite ECF selection if appropriate *
......@@ -232,7 +233,9 @@ void colours_event_handler (wimp_eventstr *e, void *handle)
os_swi2 (OS_SetColour, 0, t [i]);
}
break;
} } }
}
}
}
if (!ECF) bbc_rectanglefill (x, y, coloursize - (1 << x_eig),
coloursize - (1 << y_eig));
......@@ -276,7 +279,8 @@ void colours_event_handler (wimp_eventstr *e, void *handle)
/*Copy nybbles.*/
bg |= bg >> 4;
} }
}
}
if (mono_ttab [i /*was colour 31st Jan 1994*/])
fg = 0 /*black*/;
......@@ -319,7 +323,10 @@ void colours_event_handler (wimp_eventstr *e, void *handle)
puts ("T");
else
printf ("E%d", ECF);
} } } }
}
}
}
}
wimpt_noerr (wimp_get_rectangle (&rds, &more));
}
......@@ -477,7 +484,7 @@ void colours_set_extent (main_sprite *sprite)
wimp_redrawstr newext;
curr.w = sprite->colourhandle;
wimpt_noerr (PaintLib_get_wind_info (&curr));
wimpt_noerr (paintlib_get_wind_info (&curr));
newext.w = sprite->colourhandle;
calculate_colour_extent (sprite, &newext.box,
......@@ -545,7 +552,8 @@ void colours_create_window (main_sprite *sprite)
{ m_FREE (sprite->colourtitle, 23);
sprite->colourtitle = 0;
return;
} }
}
}
else
{ wimp_wind colours_wind;
......@@ -579,7 +587,8 @@ void colours_create_window (main_sprite *sprite)
colours_open_str.x = 0;
colours_open_str.y = 0;
wimpt_noerr (wimp_open_wind (&colours_open_str));
} }
}
}
else
{ /* if the window is already open, then bring it to the front */
wimp_wstate colour_w_state;
......@@ -591,11 +600,10 @@ void colours_create_window (main_sprite *sprite)
}
}
extern int colours_entry (int nc, int colour)
int colours_entry (int nc, int colour)
/*Returns the palette entry corresponding to the given colour number.*/
{ ftracef0 ("colours_entry\n");
{ /*Returns the palette entry corresponding to the given colour number.*/
ftracef0 ("colours_entry\n");
switch (nc)
{ case 1 << 15:
......@@ -616,4 +624,5 @@ extern int colours_entry (int nc, int colour)
ftracef0 ("INVALID SPRITE MODE!!!\n");
return 0;
break;
} }
}
}
This diff is collapsed.
......@@ -400,12 +400,10 @@ static BOOL myxfersend (int filetype, char *name, int estsize,
ftracef0 ("myxfersend\n");
main_claim_idle ((wimp_w) -1);
#if (1)
ftracef1 ("myxfersend: calling saveas (..., \"%s\", ...)\n", name);
res = saveas (filetype, name, estsize, p1, p2, p3, handle);
#else
res = xfersend (filetype, name, estsize, p1, p2, p3, handle);
#endif
main_claim_idle (nullc);
return res;
}
......@@ -565,7 +563,8 @@ static void build_sprite_palette_file (main_sprite *sprite,
*p++ = palette_str.c [16 + i].bytes.red;
*p++ = palette_str.c [16 + i].bytes.green;
*p++ = palette_str.c [16 + i].bytes.blue;
} }
}
}
finish:
wimpt_noerr (error);
......@@ -590,7 +589,7 @@ static BOOL save_sprite_palette (char *filename, void *shandle)
r.r [0] = 17; /* Read cat info */
r.r [1] = (int) filename;
(void) os_swix (OS_File, &r);
/* if something is already there,remember its attributes */
/* if something is already there, remember its attributes */
if (r.r [0] != 0) oldattribs = r.r [5];
r.r [0] = 10;
......@@ -702,17 +701,20 @@ static BOOL buffer_sprite_palette (void *shandle, int *max)
}
static void menus_save_selection (main_window *window)
{
ftracef0 ("menus_save_selection\n");
{ ftracef0 ("menus_save_selection\n");
if (window->selection.count==1)
{
main_sprite *sprite;
for (sprite=window->data->file.sprites;sprite;sprite=sprite->link)
{
if (sprite->flags & MSF_SELECTED) break;
{ main_sprite *sprite;
/* Just one selected, find it, and save it on its own with
the sprite name as the filename instead */
for (sprite = window->data->file.sprites; sprite != NULL; sprite = sprite->link)
{ if (sprite->flags & MSF_SELECTED)
{ menus_save_sprite (sprite);
break;
}
}
if (sprite) menus_save_sprite(sprite);
return;
}
......@@ -731,13 +733,8 @@ void menus_save_sprite (main_sprite *sprite)
ftracef1 ("sprite called \"%s\"\n", name);
myxfersend (FileType_Sprite, name,
psprite_address (sprite)->next + sizeof (sprite_area),
&save_sprite, &buffer_sprite,
&Do_Print, /*Protocol now in xfersend(), immediate printing
allowed. Was NULL. JRC 4 Apr 1992*/
/*FIX G-RO-7139 JRC 16 Oct '91 Use new printer protocol - was
&call_print_sprite*/
sprite);
psprite_address (sprite)->next + sizeof (sprite_area),
&save_sprite, &buffer_sprite, &Do_Print, sprite);
}
BOOL menus_save_file (main_window *window, int askfor_name)
......@@ -809,7 +806,8 @@ static void Change_Size (sprite_area **sarea, sprite_id *sid,
if (!menus_ensure_size (sarea, newsize - info.size))
{ msg = msgs_lookup ("PntEG");
goto finish;
} }
}
}
else
{ /* Deleting - find the maximum number or rows or columns that can go */
int max;
......@@ -864,7 +862,7 @@ void menus_restart_tool (void)
for (window = main_windows; window != NULL; window = window->link)
if (window->tag == main_window_is_file)
for (sprite = window->data->file.sprites; sprite != NULL;
sprite=sprite->link)
sprite = sprite->link)
sprite->needsnull = 1;
}
......@@ -881,8 +879,8 @@ static void stop_insdel_graphics (void)
}
static void insdel_drawEOR(main_sprite_window *sprw, int x0, int y0)
{
int xmul = sprw->blobsize.scale_xmul*insdel_sprite->mode.scale_xmul;
{ int xmul = sprw->blobsize.scale_xmul*insdel_sprite->mode.scale_xmul;
int xdiv = sprw->blobsize.scale_xdiv;
int ymul = sprw->blobsize.scale_ymul*insdel_sprite->mode.scale_ymul;
int ydiv = sprw->blobsize.scale_ydiv;
......@@ -895,16 +893,16 @@ static void insdel_drawEOR(main_sprite_window *sprw, int x0, int y0)
if (insdel_rowfield != -1)
{ ftracef0 ("insdel_EOR row\n");
int top=MAX(insdel_row,Row)+1;
int bottom=MIN(insdel_row,Row);
int top = MAX(insdel_row, Row) + 1;
int bottom = MIN(insdel_row, Row);
bbc_rectanglefill (MAX (x0, 0), y0 + bottom*ymul/ydiv,
0x1FFF, (top - bottom)*ymul/ydiv-1);
}
if (insdel_colfield != -1)
{ ftracef0 ("insdel_EOR column\n");
int left=MIN(insdel_col,Column);
int right=MAX(insdel_col,Column)+1;
int left = MIN(insdel_col, Column);
int right = MAX(insdel_col, Column) + 1;
bbc_rectanglefill (x0 + left*xmul/xdiv, MAX (y0, 0),
(right-left)*xmul/xdiv-1, 0x1FFF);
}
......@@ -922,7 +920,7 @@ static void insdel_EOR (void)
wimp_winfo curr;
curr.w = sprw->window->handle;
wimpt_noerr (PaintLib_get_wind_info (&curr));
wimpt_noerr (paintlib_get_wind_info (&curr));
rds.w = sprw->window->handle;
rds.box = main_big_extent;
wimpt_noerr (wimp_update_wind (&rds, &more));
......@@ -931,8 +929,7 @@ static void insdel_EOR (void)
y0 = rds.box.y1 - rds.scy + curr.info.ex.y0;
while (more)
{
insdel_drawEOR(sprw,x0,y0);
{ insdel_drawEOR(sprw, x0, y0);
wimpt_noerr (wimp_get_rectangle (&rds, &more));
}
}
......@@ -990,11 +987,10 @@ static void insdeltool_null (main_window *window, wimp_mousestr *mpos)
static void insdeltool_redraw (main_window *window, int x0, int y0)
{
ftracef0 ("insdeltool_redraw\n");
{ ftracef0 ("insdeltool_redraw\n");
if (window->data->sprite.sprite->needsnull)
insdel_drawEOR(&window->data->sprite,x0,y0);
insdel_drawEOR(&window->data->sprite, x0, y0);
}
static void insdeltool_stop (main_sprite *sprite)
......@@ -1109,15 +1105,15 @@ static void sprite_palette_has_changed (main_sprite *sprite)
void menus_set_palette (main_sprite *sprite, int entries, int *palette)
/*Note: this routine assumes the palette is the right length for the
sprite.*/
{ BOOL create = palette != NULL;
char *start, *end;
int old_size, new_size, diff;
sprite_area **sarea = &sprite->file->spritearea;
sprite_header *header;
/*Note: this routine assumes the palette is the right length for the
sprite.*/
ftracef1 ("%s palette\n", create? "Create": "Delete");
header = psprite_address (sprite);
......@@ -1148,7 +1144,8 @@ void menus_set_palette (main_sprite *sprite, int entries, int *palette)
for (i = 0; i < entries; i++)
{ *e = *(e + 1) = palette [i];
e += 2;
} }
}
}
/*Fix up every pointer in the world.*/
header->image += diff;
......@@ -1352,7 +1349,9 @@ void menus_sprite_handler (void *handle, char *hit)
os_swi3 (ColourPicker_UpdateDialogue,
colourpicker_UPDATE_COLOUR, sprite->colourdialogue,
&dialogue);
} } }
}
}
}
break;
case s_Paint_Show_Col:
......@@ -1653,7 +1652,8 @@ void menus_sprite_handler (void *handle, char *hit)
Change_Size (sarea, &sid, sprite, number, !col,
!col? MIN (Row, insdel_row): MIN (Column, insdel_col));
menus_ensure_size (sarea, 0);
} }
}
}
break;
case s_Edit_Mask:
......@@ -1710,7 +1710,8 @@ void menus_sprite_handler (void *handle, char *hit)
sprite->colourdialogue, &dialogue)) != NULL)
{ msg = error->errmess;
goto masked;
} }
}
}
/*Fix MED-xxx J R C 21st Jul 1994*/
if (!create)
......@@ -1958,7 +1959,8 @@ BOOL menus_do_print (main_sprite *sprite)
if ((err = os_swix3 (PDriver_DeclareFont, 0, NULL, 0)) != NULL)
{ txt = err->errmess;
goto finish;
} }
}
}
if (print_landscape) menus_print_where.dx += ssize.y1*72000/180;
......@@ -2001,7 +2003,8 @@ BOOL menus_do_print (main_sprite *sprite)
if ((err = print_getrectangle (&pbox, &more, &ID)) != NULL)
{ txt = err->errmess;
goto finish;
} }
}
}
finish:
if (done_translate)
......@@ -2141,9 +2144,11 @@ void menus_print_sprite (main_sprite *sprite, BOOL ask)
case dbox_CLOSE:
open = FALSE;
break;
} }
}
}
dbox_dispose (&d);
} }
}
}
else
/*FIX G-RO-7139 JRC 17 Oct '91 Call queue_print() instead of
menus_do_print().*/
......@@ -2166,7 +2171,9 @@ void menus_hack_palette (main_sprite *sprite)
ftracef2 ("was 0x%.8X now 0x%.8X\n",
*palstart, t | ((t >> 4) & 0xF0F0F00));
*palstart = t | ((t >> 4) & 0xF0F0F00);
} } }
}
}
}
/***************************************************************************
* *
......@@ -2221,7 +2228,8 @@ void menus_file_handler (void *handle, char *hit)
dbox_setfield (d, d_File_Mod, yesno (window->data->file.modified));
dbox_show (d);
dbox_raw_eventhandler (d, sprite_file_info_events, NULL);
} }
}
}
break;
case m_Misc_SBName:
......@@ -2242,7 +2250,7 @@ void menus_file_handler (void *handle, char *hit)
ftracef1 ("sort - sorting %d sprites\n", count);
count = 0;
for (sprite=file->sprites;sprite!=NULL;sprite=sprite->link)
for (sprite = file->sprites; sprite != NULL; sprite = sprite->link)
{ if (byname)
{ /* Sprite names can be the full 12 letters long so take a copy */
memcpy ((char *)tosort[count].type.orgname,
......@@ -2348,29 +2356,27 @@ void menus_file_handler (void *handle, char *hit)
switch (hit [1])
{
case m_Sprite_SelectAll:
main_select_all(window);
main_select_all(window);
break;
case m_Sprite_ClearAll:
main_clear_all(window);
main_clear_all(window);
break;
case m_Sprite_Delete:
{
main_sprite *sprite;
{ main_sprite *sprite;
main_sprite *next;
int count;
int total=window->selection.count;
if (window->selection.count==0) break;
visdelay_begin();
for (count=1,sprite=window->data->file.sprites;sprite;sprite=next,count++)
{
visdelay_percent(count*100/total);
next=sprite->link;
for (count = 1, sprite = window->data->file.sprites; sprite != NULL;
sprite = next, count++)
{ visdelay_percent(count*100/total);
next = sprite->link;
if (sprite->flags & MSF_SELECTED)
{
sprite_area *sarea = sprite->file->spritearea;
{ sprite_area *sarea = sprite->file->spritearea;
main_file *spritefile = sprite->file;
sprite_id sid;
......@@ -2386,12 +2392,11 @@ void menus_file_handler (void *handle, char *hit)
fatal error. So do it this way*/
wimpt_complain (sprite_delete (sarea, &sid));
menus_ensure_size(&spritefile->spritearea,0);
menus_ensure_size(&spritefile->spritearea, 0);
psprite_delete (window,sprite);
psprite_delete (window, sprite);
ftracef0("do menus_file_has_changed\n");
menus_file_has_changed (window);
ftracef0("do menus_ensure_size(,0)\n");
}
}
visdelay_end();
......@@ -2473,7 +2478,7 @@ void menus_file_handler (void *handle, char *hit)
wimp_wstate wstate;
winfo.w = hit_sprite->colourhandle;
wimpt_noerr (PaintLib_get_wind_info (&winfo));
wimpt_noerr (paintlib_get_wind_info (&winfo));
sprintf (winfo.info.title.indirecttext.buffer,