From 8172ca0eff15f24567bdf51483be414966d91316 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 4 Nov 1995 00:08:40 +0000 Subject: [PATCH] Change OS2_menu_set_item_attributes to return the success value that the message-send returns. --- v7/src/microcode/os2pm.c | 10 +++++----- v7/src/microcode/os2pm.scm | 3 ++- v7/src/microcode/pros2pm.c | 16 ++++++++-------- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/v7/src/microcode/os2pm.c b/v7/src/microcode/os2pm.c index dda12b4c2..00d77f608 100644 --- a/v7/src/microcode/os2pm.c +++ b/v7/src/microcode/os2pm.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: os2pm.c,v 1.21 1995/11/03 01:29:14 cph Exp $ +$Id: os2pm.c,v 1.22 1995/11/04 00:08:27 cph Exp $ Copyright (c) 1994-95 Massachusetts Institute of Technology @@ -2025,13 +2025,13 @@ menu_get_item_attributes (qid_t qid, HWND menu, USHORT id, USHORT submenup, (MPFROMSHORT (mask))))); } -static void +static BOOL menu_set_item_attributes (qid_t qid, HWND menu, USHORT id, USHORT submenup, USHORT mask, USHORT attributes) { - (void) WinSendMsg (menu, MM_SETITEMATTR, - (MPFROM2SHORT (id, submenup)), - (MPFROM2SHORT (mask, attributes))); + return (LONGFROMMR (WinSendMsg (menu, MM_SETITEMATTR, + (MPFROM2SHORT (id, submenup)), + (MPFROM2SHORT (mask, attributes))))); } static HWND diff --git a/v7/src/microcode/os2pm.scm b/v7/src/microcode/os2pm.scm index 969a24036..ecad819ad 100644 --- a/v7/src/microcode/os2pm.scm +++ b/v7/src/microcode/os2pm.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: os2pm.scm,v 1.2 1995/11/03 01:29:45 cph Exp $ +$Id: os2pm.scm,v 1.3 1995/11/04 00:08:40 cph Exp $ Copyright (c) 1995 Massachusetts Institute of Technology @@ -1018,6 +1018,7 @@ MIT in each case. */ (ushort mask))) (define-pm-procedure menu_set_item_attributes + (value ("BOOL" successp)) (arguments qid ("HWND" menu) (ushort id) diff --git a/v7/src/microcode/pros2pm.c b/v7/src/microcode/pros2pm.c index fbf866fcd..c89b7b2c4 100644 --- a/v7/src/microcode/pros2pm.c +++ b/v7/src/microcode/pros2pm.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: pros2pm.c,v 1.11 1995/11/03 01:30:21 cph Exp $ +$Id: pros2pm.c,v 1.12 1995/11/04 00:08:15 cph Exp $ Copyright (c) 1994-95 Massachusetts Institute of Technology @@ -872,13 +872,13 @@ DEFINE_PRIMITIVE ("OS2MENU-GET-ITEM-ATTRIBUTES", Prim_OS2_menu_get_item_attribut DEFINE_PRIMITIVE ("OS2MENU-SET-ITEM-ATTRIBUTES", Prim_OS2_menu_set_item_attributes, 5, 5, 0) { PRIMITIVE_HEADER (5); - OS2_menu_set_item_attributes (pm_qid, - (HWND_ARG (1)), - (USHORT_ARG (2)), - (BOOLEAN_ARG (3)), - (USHORT_ARG (4)), - (USHORT_ARG (5))); - PRIMITIVE_RETURN (UNSPECIFIC); + PRIMITIVE_RETURN + (BOOLEAN_TO_OBJECT (OS2_menu_set_item_attributes (pm_qid, + (HWND_ARG (1)), + (USHORT_ARG (2)), + (BOOLEAN_ARG (3)), + (USHORT_ARG (4)), + (USHORT_ARG (5))))); } DEFINE_PRIMITIVE ("OS2WIN-LOAD-MENU", Prim_OS2_window_load_menu, 3, 3, 0) -- 2.25.1