Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-lcc!ames!ucbcad!ucbvax!PURDUE.EDU!bala From: bala@PURDUE.EDU Newsgroups: comp.windows.x Subject: XMenuFindSelection() -- strncmp --> strcmp ? Message-ID: <8704281338.AA23453@merlin.cs.purdue.edu> Date: Tue, 28-Apr-87 09:38:10 EDT Article-I.D.: merlin.8704281338.AA23453 Posted: Tue Apr 28 09:38:10 1987 Date-Received: Wed, 29-Apr-87 07:19:02 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 30 In XMenuFindSel.c, when you are trying to find the index of a selection the given label is strNcmp'd against the existing selections in the pane. Unfortunately the assumption is that the labels are a single word. Suppose there is a selection called "finger" and you want to add a new selection called "finger foo". XMenuFindSelection will *NOT* return XM_FAILURE as it takes "finger foo" and strncmp's it as follows: if (strncmp (label, s_ptr->label, s_ptr->label_length) == 0) { _XMErrorCode = XME_NO_ERROR; return (i); }