Commit dc7ea073 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Minor rlib cleanups

dbox.c: address of cancelled by dereference
event.c: spelling
txtar.c: don't grab the caret when clicking toggle size
txtedit.c: use BOOL for a boolean
win.c: when looking at the behind window handle we want -1 not 'DUD' (which happens to be -1)
wimp.h: add comment about window handle -3
Retagged as RISC_OSLib-5_83.

Version 5.83. Not tagged
parent 9ac4cc52
......@@ -14,10 +14,10 @@
Module_MajorVersion SETS "5.83"
Module_Version SETA 583
Module_MinorVersion SETS ""
Module_Date SETS "31 Jul 2014"
Module_ApplicationDate SETS "31-Jul-14"
Module_Date SETS "23 Aug 2014"
Module_ApplicationDate SETS "23-Aug-14"
Module_ComponentName SETS "RISC_OSLib"
Module_ComponentPath SETS "castle/RiscOS/Sources/Lib/RISC_OSLib"
Module_FullVersion SETS "5.83"
Module_HelpVersion SETS "5.83 (31 Jul 2014)"
Module_HelpVersion SETS "5.83 (23 Aug 2014)"
END
......@@ -6,18 +6,18 @@
*/
#define Module_MajorVersion_CMHG 5.83
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 31 Jul 2014
#define Module_Date_CMHG 23 Aug 2014
#define Module_MajorVersion "5.83"
#define Module_Version 583
#define Module_MinorVersion ""
#define Module_Date "31 Jul 2014"
#define Module_Date "23 Aug 2014"
#define Module_ApplicationDate "31-Jul-14"
#define Module_ApplicationDate "23-Aug-14"
#define Module_ComponentName "RISC_OSLib"
#define Module_ComponentPath "castle/RiscOS/Sources/Lib/RISC_OSLib"
#define Module_FullVersion "5.83"
#define Module_HelpVersion "5.83 (31 Jul 2014)"
#define Module_HelpVersion "5.83 (23 Aug 2014)"
#define Module_LibraryVersionInfo "5:83"
......@@ -720,7 +720,7 @@ dbox dbox_new(char *name)
{ os_error *er;
er = wimp_create_wind(&d->window, &d->w);
if (er != 0) {
werr(FALSE, &er->errmess[0]);
werr(FALSE, er->errmess);
dbox__dispose(d);
return 0;
}
......
......@@ -27,7 +27,7 @@
/************************************************************************/
/* Title: c.event
* Purpose: central processing for window sytem events.
* Purpose: central processing for window system events.
* History: IDJ: 06-Feb-92: prepared for source release
*
*/
......
......@@ -770,7 +770,7 @@ static int txtar__charwidth(char c) {
return(str.x);
}
#if 0
#if FALSE
static int txtar__UCScharwidth(UCS4 c) {
/* Measure the width of a UCS character. */
/* The font must already be set up using font_setfont. */
......@@ -1857,7 +1857,7 @@ static int txtar__doqueue(txt t)
static void txtar__dounget(txt t, int code)
{
#if 0
#if FALSE
txtar__insertevent(t, code);
if (t->inbufhead == 0) {
if (t->inbuftail == txt1_INBUFMAX) return; /* full */
......@@ -2350,15 +2350,12 @@ static void txtar__doopenevent(txt t, wimp_openstr *o /*in*/)
};
/* If we've just been toggled, may set the caret. */
if ((s->d->info.flags & wimp_WFULL) != 0 && !wasfull) {
#if FALSE
txtar__setarthurcaret(t, 0 != (txt_CARET & t->charoptionset));
#else
/* txtar__rawshowcaret(t); */
/* Style Guide says no, leave the friggin caret alone */
if ((s->d->info.flags & wimp_WFULL) != 0 && !wasfull) {
txt_setcharoptions(s->t, txt_CARET, txt_CARET);
#endif
};
#endif
};
#if TRACE
txtar__checkwinfo(t);
......
......@@ -449,7 +449,6 @@ if (txtedits == s) {
};
free(s);
}
static int txtedit__countupdated(void) {
......@@ -516,12 +515,7 @@ void txtedit_prequit(void) {
wimpt_noerr(wimp_sendmessage(wimp_EKEY, (wimp_msgstr*) &ee, taskmgr));
}
/* and stop. */
#if FALSE
exit(0);
#else
/* 25-Nov-88 */
while (txtedits != 0) txtedit_dispose(txtedits);
#endif
};
};
};
......@@ -1069,15 +1063,13 @@ static void txtedit_mouse(txtedit_state *s, txt_mouseeventflag mflags, txt_index
{
int drag;
txtedit_SELACTION action;
BOOL selectwasrecent = s->selectrecent;
BOOL drag = (((mflags & txt_MSELOLD) != 0) ||
((mflags & txt_MEXTOLD) != 0));
s->selectrecent = FALSE;
drag = (((mflags & txt_MSELOLD) != 0) ||
((mflags & txt_MEXTOLD) != 0));
tracef1("Mouse drag=%d.\n", drag);
if (!drag)
......
......@@ -349,7 +349,7 @@ click somewhere. */
tracef1("get state of window %i.", win__allwindows[i].w);
(void) wimp_get_wind_state(win__allwindows[i].w, &s);
tracef2("behind=%i flags=%i.\n", s.o.behind, s.flags);
if (s.o.behind == DUD && (s.flags & wimp_WOPEN) != 0) {
if (s.o.behind == -1 && (s.flags & wimp_WOPEN) != 0) {
/* w is the top window */
/* if it wants the caret, it will grab it. */
tracef0("Opening it.\n");
......
......@@ -222,7 +222,7 @@ typedef struct {
wimp_box box; /* position on screen of visible work area */
int x, y; /* 'real' coordinates of visible work area */
wimp_w behind; /* handle of window to go behind (-1 = top,
* -2 = bottom) */
* -2 = bottom, -3 = iconised) */
} wimp_openstr;
typedef struct { /* result for window state enquiry */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment