Commit 24e49f55 authored by Ben Avison's avatar Ben Avison
Browse files

Lots of bools changed to osbools to keep the new compiler happy.

No longer assumes the location of the SVC stack.

Version 0.49. Tagged as 'Picker-0_49'
parent 763af135
......@@ -14,4 +14,4 @@
|
Dir <Obey$Dir>
wimpslot 5000k
amu_machine rom
amu_machine rom THROWBACK=-throwback
......@@ -172,11 +172,11 @@ os_error *callback_delete (callback_l l)
return NULL;
}
/*------------------------------------------------------------------------*/
static os_error *Callback (void *dh, Level level, bool *unclaimed, int limit,
static os_error *Callback (void *dh, Level level, osbool *unclaimed, int limit,
int *k)
{ Function f;
bool u = TRUE;
osbool u = TRUE;
os_error *error = NULL;
#ifdef XTRACE
......@@ -231,12 +231,12 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
os_error *callback (callback_l l, void *dh, bool *unclaimed, int limit, ...)
os_error *callback (callback_l l, void *dh, osbool *unclaimed, int limit, ...)
/*Makes the non-portable assumption that the arguments after |limit| are
on the stack in order of increasing address.*/
{ bool u = TRUE;
{ osbool u = TRUE;
os_error *error = NULL;
tracef ("callback ...\n");
......@@ -267,7 +267,7 @@ os_error *callback_register (callback_l l, callback_fn *fn, void *sh,
for (i = 0; i < limit; i++)
{ Entry e;
bool found = FALSE;
osbool found = FALSE;
if (*level == NULL)
{ /*Need a new one for this level. First create the new |Level|.*/
......@@ -474,7 +474,7 @@ void Trace_Entry (Entry entry, int indent)
static void Trace_Function (Function fns, int indent)
{ Function f;
bool first = TRUE;
osbool first = TRUE;
for (f = fns; f != NULL; f = f->next)
{ if (first)
......
......@@ -57,7 +57,7 @@ os_error *icon_set_slider (wimp_w w, wimp_i knob, wimp_i track,
wimp_icon_state state;
wimp_icon_create create;
wimp_draw update;
bool more;
osbool more;
tracef ("icon_set_slider (w 0x%X, knob %d, track %d)\n" _
w _ knob _ track);
......
......@@ -17,8 +17,6 @@
#include "relocate.h"
#include "trace.h"
#define relocate_LIMIT ((relocate_frame *) 0x1C00000)
typedef
struct Workspace
{
......@@ -34,17 +32,22 @@ void relocate_begin (void *workspace, relocate_frame *frame)
{ tracef ("relocate_begin\n");
relocate_frame *relocate_limit = (relocate_frame *) ((((unsigned int) &relocate_limit) >> 20) << 20);
/*Save the current offsets on the stack.*/
*frame = *relocate_LIMIT;
*frame = *relocate_limit;
/*Update the offsets used by the shared C library.*/
*relocate_LIMIT = (*(Workspace **) workspace)->frame;
*relocate_limit = (*(Workspace **) workspace)->frame;
}
/*------------------------------------------------------------------------*/
void relocate_end (relocate_frame *frame)
{ /*Set the library offsets to the saved values.*/
*relocate_LIMIT = *frame;
{
relocate_frame *relocate_limit = (relocate_frame *) ((((unsigned int) &relocate_limit) >> 20) << 20);
/*Set the library offsets to the saved values.*/
*relocate_limit = *frame;
tracef ("relocate_end\n");
}
......@@ -55,7 +55,7 @@ os_error *resource_messages_alloc (lookup_t t, char *file_name)
messagetrans_control_block cb;
int size, extra_size, context;
bits flags;
bool done_open_file = FALSE;
osbool done_open_file = FALSE;
char *tmp, *messages;
tracef ("resource_messages_alloc\n");
......@@ -109,7 +109,7 @@ os_error *resource_messages_alloc (lookup_t t, char *file_name)
context = 0;
while (TRUE)
{ char token [255 + 1];
bool cont;
osbool cont;
int size;
char *lookup;
......@@ -314,7 +314,7 @@ finish:
os_error *resource_templates_alloc (lookup_t t, char *file_name)
{ os_error *error = NULL;
bool done_open_template = FALSE;
osbool done_open_template = FALSE;
char template_name [wimp_TEMPLATE_NAME_LIMIT + 1];
int context;
......
......@@ -35,7 +35,7 @@ struct steppable_s
{ steppable_steppable steppable;
/*state variables*/
bool dragging;
osbool dragging;
};
/*------------------------------------------------------------------------*/
......@@ -94,7 +94,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Up (void *h, void *b, bool *unclaimed)
static os_error *Up (void *h, void *b, osbool *unclaimed)
{ os_error *error = NULL;
steppable_s s = (steppable_s) h;
......@@ -111,7 +111,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Down (void *h, void *b, bool *unclaimed)
static os_error *Down (void *h, void *b, osbool *unclaimed)
{ os_error *error = NULL;
steppable_s s = (steppable_s) h;
......@@ -128,7 +128,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *SUp (void *h, void *b, bool *unclaimed)
static os_error *SUp (void *h, void *b, osbool *unclaimed)
{ os_error *error = NULL;
steppable_s s = (steppable_s) h;
......@@ -146,7 +146,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *SDown (void *h, void *b, bool *unclaimed)
static os_error *SDown (void *h, void *b, osbool *unclaimed)
{ os_error *error = NULL;
steppable_s s = (steppable_s) h;
......@@ -165,7 +165,7 @@ finish:
}
/*------------------------------------------------------------------------*/
static os_error *Set_Position (steppable_s s, os_coord *pos,
bool start_drag)
osbool start_drag)
/*Update the icons of the steppable to follow the mouse position given,
optionally also starting a drag.*/
......@@ -234,7 +234,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Jump (void *h, void *b, bool *unclaimed)
static os_error *Jump (void *h, void *b, osbool *unclaimed)
{ os_error *error = NULL;
steppable_s s = (steppable_s) h;
......@@ -251,7 +251,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Start_Drag (void *h, void *b, bool *unclaimed)
static os_error *Start_Drag (void *h, void *b, osbool *unclaimed)
{ os_error *error = NULL;
steppable_s s = (steppable_s) h;
......@@ -268,7 +268,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Dragging (void *h, void *b, bool *unclaimed)
static os_error *Dragging (void *h, void *b, osbool *unclaimed)
/*Remember this function gets called for EVERY steppable, not only the
right one.*/
......@@ -299,7 +299,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *End_Drag (void *h, void *b, bool *unclaimed)
static os_error *End_Drag (void *h, void *b, osbool *unclaimed)
/*Remember this function gets called for EVERY steppable, not only the
right one.*/
......@@ -330,7 +330,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Click (void *h, void *b, bool *unclaimed)
static os_error *Click (void *h, void *b, osbool *unclaimed)
{ os_error *error = NULL;
steppable_s s = (steppable_s) h;
......@@ -350,7 +350,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Press (void *h, void *b, bool *unclaimed)
static os_error *Press (void *h, void *b, osbool *unclaimed)
{ os_error *error = NULL;
steppable_s s = (steppable_s) h;
......@@ -381,7 +381,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Lose (void *h, void *b, bool *unclaimed)
static os_error *Lose (void *h, void *b, osbool *unclaimed)
{ os_error *error = NULL;
steppable_s s = (steppable_s) h;
......
......@@ -84,7 +84,7 @@ struct task_r
byte events [20]; /*reference counts for events*/
bits mask;
callback_l list; /*callback list for WIMP events*/
bool selection_was_adjust;
osbool selection_was_adjust;
int event; /*the last event returned*/
task_thread thread_list;
task_thread *last_thread;
......@@ -95,7 +95,7 @@ struct task_r
static bits Modifier_Keys (void)
{ /*Get the states of SHIFT, CTRL and ALT.*/
bool x, y;
osbool x, y;
bits down = NONE;
tracef ("Modifier_Keys\n");
......@@ -302,7 +302,7 @@ os_error *task_new (char *programme, wimp_t task, task_r *r_out)
{ os_error *error = NULL;
int i;
task_r r = NULL;
bool done_alloc = FALSE, done_new = FALSE;
osbool done_alloc = FALSE, done_new = FALSE;
tracef ("task_new\n");
......@@ -377,9 +377,9 @@ os_error *task_delete (task_r r)
wimp_t task_info_task (task_r r) {return r->task;}
/*------------------------------------------------------------------------*/
os_error *task_callback (task_r r, callback_l list, int event,
wimp_block *block, bool *unclaimed)
wimp_block *block, osbool *unclaimed)
{ bool u;
{ osbool u;
os_error *error = NULL;
tracef ("task_callback\n");
......@@ -480,7 +480,7 @@ os_error *task_callback (task_r r, callback_l list, int event,
case wimp_USER_MESSAGE_ACKNOWLEDGE:
{ int action = block ASREF message.action;
task_thread *tt;
bool handled = FALSE;
osbool handled = FALSE;
/*First, check to see if there is a thread open for this
message.*/
......
......@@ -39,7 +39,7 @@ os_error *window_set_title (wimp_w w, char *title)
wimp_open open;
wimp_window window;
wimp_w new;
bool done_create = FALSE;
osbool done_create = FALSE;
int pixel_size;
tracef ("window_set_title (0x%X, \"%s\")\n" _ w _ title);
......@@ -99,7 +99,7 @@ finish:
return error;
}
os_error *window_open (void *s, void *d, bool *unclaimed)
os_error *window_open (void *s, void *d, osbool *unclaimed)
{ os_error *error = NULL;
......
......@@ -28,7 +28,7 @@
/* The type of a callback function.
*/
typedef os_error *callback_fn (void *, void *, bool *);
typedef os_error *callback_fn (void *, void *, osbool *);
/* The type of a callback list.
*/
......@@ -54,7 +54,7 @@ extern os_error *callback_delete (callback_l);
* values will be called, and passed the given handle, until
* one is claimed.
*/
extern os_error *callback (callback_l, void *, bool *, int, ...);
extern os_error *callback (callback_l, void *, osbool *, int, ...);
/* Function to register a new callback function.
*
......
......@@ -41,7 +41,7 @@ typedef struct steppable_s *steppable_s;
/* Types for the callbacks generated by this module.
*/
typedef os_error *steppable_value_changed (steppable_s v, int value,
bool dragging, void *);
osbool dragging, void *);
typedef os_error *steppable_caret_moved (steppable_s, wimp_w, wimp_i,
void *);
......
......@@ -51,7 +51,7 @@ extern wimp_t task_info_task (task_r);
*/
extern os_error *task_callback (task_r r, callback_l list, int event,
wimp_block *block, bool *unclaimed);
wimp_block *block, osbool *unclaimed);
/* ------------------------------------------------------------------------
* Function to call Wimp_ReportError (on a deprocedured argument,
......
......@@ -23,7 +23,7 @@
extern os_error *window_set_title (wimp_w, char *);
extern os_error *window_open (void *, void *, bool *);
extern os_error *window_open (void *, void *, osbool *);
/*Just register this for wimp_OPEN_WINDOW_REQUEST and
all your problems are over.*/
......
/* (0.48)
/* (0.49)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.68.
*
*/
#define Module_MajorVersion_CMHG 0.48
#define Module_MajorVersion_CMHG 0.49
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 11 Jul 2001
#define Module_Date_CMHG 25 Oct 2002
#define Module_MajorVersion "0.48"
#define Module_Version 48
#define Module_MajorVersion "0.49"
#define Module_Version 49
#define Module_MinorVersion ""
#define Module_Date "11 Jul 2001"
#define Module_Date "25 Oct 2002"
#define Module_ApplicationDate2 "11-Jul-01"
#define Module_ApplicationDate4 "11-Jul-2001"
#define Module_ApplicationDate "25-Oct-02"
#define Module_ComponentName "Picker"
#define Module_ComponentPath "RiscOS/Sources/Video/UserI/Picker"
#define Module_FullVersion "0.48"
#define Module_HelpVersion "0.48 (11 Jul 2001)"
#define Module_FullVersion "0.49"
#define Module_HelpVersion "0.49 (25 Oct 2002)"
#define Module_LibraryVersionInfo "0:49"
......@@ -98,7 +98,7 @@ static os_colour Colour (cmyk_colour *cmyk)
RATIO (b*os_COLOUR_RANGE, colourtrans_COLOUR_RANGE) << os_BSHIFT;
}
/*------------------------------------------------------------------------*/
static os_error *Value_Changed (steppable_s v, int value, bool dragging,
static os_error *Value_Changed (steppable_s v, int value, osbool dragging,
void *h)
{ os_error *error = NULL;
......@@ -264,7 +264,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Open (void *h, void *b, bool *unclaimed)
static os_error *Open (void *h, void *b, osbool *unclaimed)
/* Handler for OpenWindowRequest on the main window. (Done here because
we used to have to open the pane at the right offset.)
......@@ -285,7 +285,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Return (void *h, void *b, bool *unclaimed)
static os_error *Return (void *h, void *b, osbool *unclaimed)
{ os_error *error = NULL;
colourpicker_colour *colour = (colourpicker_colour *) h;
......@@ -346,7 +346,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Pass (void *h, void *b, bool *unclaimed)
static os_error *Pass (void *h, void *b, osbool *unclaimed)
/*Ideally, this would be registered for key-presses only, but it would
then happen before the key-pressed handlers for the steppables.*/
......@@ -373,7 +373,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Desktop (void *h, void *b, bool *unclaimed)
static os_error *Desktop (void *h, void *b, osbool *unclaimed)
/*Click on one of the desktop colour icons.*/
......@@ -426,7 +426,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Gain (void *h, void *b, bool *unclaimed)
static os_error *Gain (void *h, void *b, osbool *unclaimed)
/*Gain caret event on my pane.*/
......@@ -451,7 +451,7 @@ static os_error *Gain (void *h, void *b, bool *unclaimed)
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Lose (void *h, void *b, bool *unclaimed)
static os_error *Lose (void *h, void *b, osbool *unclaimed)
/*Lose caret event on my pane.*/
......@@ -469,7 +469,7 @@ static os_error *Lose (void *h, void *b, bool *unclaimed)
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Help (void *h, void *b, bool *unclaimed)
static os_error *Help (void *h, void *b, osbool *unclaimed)
{ wimp_message *message = &((wimp_block *) b) ASREF message;
os_error *error = NULL;
......@@ -497,7 +497,7 @@ static os_error *Dialogue_Starting (task_r r, wimp_w main_w,
{ os_error *error = NULL;
colourpicker_colour *colour;
int size, c;
bool first, done_create_pane = FALSE, done_register_cyan = FALSE,
osbool first, done_create_pane = FALSE, done_register_cyan = FALSE,
done_register_magenta = FALSE, done_register_yellow = FALSE,
done_register_key = FALSE, done_new = FALSE;
cmyk_colour *cmyk = SKIP;
......@@ -997,7 +997,7 @@ os_error *cmyk_initialise (char *tail, int podule_base,
void *workspace)
{ os_error *error = NULL;
bool done_messages = FALSE, done_templates = FALSE;
osbool done_messages = FALSE, done_templates = FALSE;
NOT_USED (tail)
NOT_USED (podule_base)
......@@ -1066,7 +1066,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
os_error *cmyk_terminate (bool fatal, int instance, void *workspace)
os_error *cmyk_terminate (osbool fatal, int instance, void *workspace)
{ os_error *error = NULL, *error1;
......
......@@ -100,10 +100,10 @@ static void Trace_Dialogues (char *s)
#define Trace_Dialogues(s) SKIP
#endif
/*------------------------------------------------------------------------*/
static os_error *None_Selected (wimp_w w, bool *none_out)
static os_error *None_Selected (wimp_w w, osbool *none_out)
{ wimp_icon_state state;
bool none;
osbool none;
os_error *error = NULL;
tracef ("None_Selected\n");
......@@ -131,7 +131,7 @@ static os_error *Update (dialogue_list l)
{ os_error *error = NULL;
relocate_frame frame;
bool none, more;
osbool none, more;
wimp_draw update;
osspriteop_TRANS_TAB (2) trans_tab;
......@@ -195,7 +195,7 @@ static os_error *Colour_Choice (dialogue_list l)
{ os_error *error = NULL;
colourpicker_message_colour_choice *colour_choice = NULL;
bool none;
osbool none;
tracef ("Colour_Choice\n");
......@@ -287,7 +287,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Choice (void *h, void *b, bool *unclaimed)
static os_error *Choice (void *h, void *b, osbool *unclaimed)
/*Called back when click SELECT or ADJUST on OK. N B: |block| may be NULL
because this may be called for key presses on the model pane.*/
......@@ -308,7 +308,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Reset (void *h, void *b, bool *unclaimed)
static os_error *Reset (void *h, void *b, osbool *unclaimed)
/*Called back when click ADJUST on Cancel.*/
......@@ -327,7 +327,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Close (void *h, void *b, bool *unclaimed)
static os_error *Close (void *h, void *b, osbool *unclaimed)
/*Click SELECT on OK or Cancel. N B: |block| may be NULL
because this may be called for key presses on the model pane.*/
......@@ -349,7 +349,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Parent (void *h, void *b, bool *unclaimed)
static os_error *Parent (void *h, void *b, osbool *unclaimed)
/*Click ADJUST on Close.*/
......@@ -368,7 +368,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Dismiss (void *h, void *b, bool *unclaimed)
static os_error *Dismiss (void *h, void *b, osbool *unclaimed)
/*Click SELECT on OK or Cancel when the dialogue is transient.
N B: |block| may be NULL because this may be called for key presses on
......@@ -398,11 +398,11 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Colour_Changed (dialogue_list l, bool none, bool dragging)
static os_error *Colour_Changed (dialogue_list l, osbool none, osbool dragging)
/*Sends the message appropriate when |l| enters state |none|.*/
{ bool suppress;
{ osbool suppress;
os_error *error = NULL;
colourpicker_message_colour_changed *colour_changed = NULL;
......@@ -470,12 +470,12 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *None (void *h, void *b, bool *unclaimed)
static os_error *None (void *h, void *b, osbool *unclaimed)
{ dialogue_list l = (dialogue_list) h;
wimp_block *block = (wimp_block *) b;
os_error *error = NULL;
bool none;
osbool none;
NOT_USED (unclaimed)
......@@ -492,12 +492,12 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Redraw (void *h, void *b, bool *unclaimed)
static os_error *Redraw (void *h, void *b, osbool *unclaimed)
{ dialogue_list l = (dialogue_list) h;
wimp_draw *redraw = &((wimp_block *) b) ASREF redraw;
os_error *error = NULL;
bool more;
osbool more;
relocate_frame frame;
NOT_USED (unclaimed)
......@@ -545,7 +545,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Menus_Deleted (void *h, void *b, bool *unclaimed)
static os_error *Menus_Deleted (void *h, void *b, osbool *unclaimed)
{ dialogue_list l = (dialogue_list) h;
wimp_message *message = &((wimp_block *) b) ASREF message;
......@@ -569,7 +569,7 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Model (void *h, void *b, bool *unclaimed)
static os_error *Model (void *h, void *b, osbool *unclaimed)
/*Change from one model to another.*/
......@@ -582,7 +582,7 @@ static os_error *Model (void *h, void *b, bool *unclaimed)
wimp_window_state window_state;
relocate_frame frame;
colourpicker_dialogue dialogue; /*only colour is used*/
bool none;
osbool none;
NOT_USED (unclaimed)
......@@ -672,14 +672,14 @@ finish:
return error;
}
/*------------------------------------------------------------------------*/
static os_error *Help_Reply (wimp_message *message, bool *replied_out)
static os_error *Help_Reply (wimp_message *message, osbool *replied_out)
/*Reply to the given message.*/
{ help_message_request *request = (help_message_request *) &message->data;
os_error *error = NULL;
char token [80 + 1], *reply;
bool replied = FALSE;