3 /* Copyright Massachusetts Institute of Technology 1985 */
4 /* Copyright (C) 2002, 2003, 2004, 2005,
5 2006 Free Software Foundation, Inc. */
8 * XMenu: MIT Project Athena, X Window system menu package
10 * XMenuFindPane - Find the first menu pane who's label matches a
13 * Author: Tony Della Fera, DEC
21 XMenuFindPane(menu
, label
)
25 register XMPane
*p_ptr
;
29 * Check for NULL pointers!
32 _XMErrorCode
= XME_ARG_BOUNDS
;
37 * Find the pane who's label matches the given label.
40 p_ptr
= menu
->p_list
->next
;
41 p_ptr
!= menu
->p_list
;
44 if (p_ptr
->label_length
== 0) {
46 _XMErrorCode
= XME_NO_ERROR
;
51 if (strncmp (label
, p_ptr
->label
, p_ptr
->label_length
) == 0) {
52 _XMErrorCode
= XME_NO_ERROR
;
60 * If we get here then we have not found
63 _XMErrorCode
= XME_P_NOT_FOUND
;
67 /* arch-tag: b6c94285-0d1d-4569-a071-b34b63c67a54
68 (do not change this comment) */