From d3f18ccae673ca4f874d7c4a1d79398ef46c29b2 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 29 May 2015 20:01:11 -0400 Subject: [PATCH] Fixed *some* errors... --- redo/types.c | 2 +- redo/ui.idl | 16 ++++++++-------- redo/windows/button.c | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/redo/types.c b/redo/types.c index d7942fb8..ac0a0bdc 100644 --- a/redo/types.c +++ b/redo/types.c @@ -64,7 +64,7 @@ uiTyped *newTyped(uintmax_t type) struct typeinfo *ti; uiTyped *instance; - if (type == 0 || id >= types->len) + if (type == 0 || type >= types->len) complain("invalid type ID given to newTyped()"); ti = ptrArrayIndex(types, struct typeinfo *, type); instance = (uiTyped *) uiAlloc(ti->size, ti->name); diff --git a/redo/ui.idl b/redo/ui.idl index 944ba400..322866a2 100644 --- a/redo/ui.idl +++ b/redo/ui.idl @@ -66,7 +66,7 @@ interface Control { func SysFunc(p *uiControlSysFuncParams); func StartZOrder(p *uiControlSysFuncParams) int; func CommitDestroy(void); - func CommitSetParent(uiControl *); + func CommitSetParent(parent *uiControl); func CommitShow(void); func CommitHide(void); func CommitEnable(void); @@ -76,13 +76,13 @@ interface Control { func NewControl(type uintmax_t) *Control; -raw "#define uiDefineControlType(typename, funcname, realtype) \"; -raw " static uintmax_t type_ ## typename = 0; \"; -raw " uintmax_t funcname(void) \"; -raw " { \"; -raw " if (type_ ## typename == 0) \"; -raw " type_ ## typename = uiRegisterType(#typename, uiTypeControl(), sizeof (realtype)); \"; -raw " return type_ ## typename; \"; +raw "#define uiDefineControlType(typename, funcname, realtype) \\"; +raw " static uintmax_t type_ ## typename = 0; \\"; +raw " uintmax_t funcname(void) \\"; +raw " { \\"; +raw " if (type_ ## typename == 0) \\"; +raw " type_ ## typename = uiRegisterType(#typename, uiTypeControl(), sizeof (realtype)); \\"; +raw " return type_ ## typename; \\"; raw " }"; func FreeSizing(d *Sizing); diff --git a/redo/windows/button.c b/redo/windows/button.c index 40156f03..01b25502 100644 --- a/redo/windows/button.c +++ b/redo/windows/button.c @@ -89,7 +89,7 @@ uiButton *uiNewButton(const char *text) struct button *b; WCHAR *wtext; - b = (struct button *) uiWindowsNewControl(uiTypeButton()); + b = (struct button *) uiWindowsNewSingleHWNDControl(uiTypeButton()); wtext = toUTF16(text); b->hwnd = uiWindowsUtilCreateControlHWND(0,