Mercurial > emacs
view oldXMenu/FindSel.c @ 52698:367c1b29dbee
(gdb-var-list, gdb-var-changed, gdb-update-flag)
(gdb-update-flag): New variables.
(gdb-var-update, gdb-var-update-handler,gdb-var-delete)
(gdb-speedbar-expand-node, gdb-var-evaluate-expression-handler)
(gud-watch, gdb-var-create-handler) : New functions.
(gdb-var-list-children, gdb-var-list-children-handler)
(gdb-var-create-regexp, gdb-var-update-regexp)
(gdb-var-list-children-regexp): New constants.
(gud-gdba-command-name): Don't specify -noasync so that GDB/MI
works.
(gdb-annotation-rules): Reduced annotation set (level 3).
(gdb-pre-prompt, gdb-prompt): Call handler in gdb-prompt.
(gdb-post-prompt): Don't update GDB buffers every time speedbar
updates.
(gdb-window-height, gdb-window-width, gdb-display-in-progress)
(gdb-expression-buffer-name, gdb-display-number, gdb-point)
(gdb-dive-display-number, gdb-nesting-level, gdb-expression)
(gdb-annotation-arg, gdb-dive-map, gdb-values, gdb-array-start)
(gdb-array-stop, gdb-array-slice-map, gdb-display-string)
(gdb-array-size, gdb-display-mode-map, gdb-expressions-mode-map):
(gdb-expressions-mode-menu, gdb-dive): Remove variables.
(gud-display, gud-display1)
(gdb-display-begin,gdb-display-number-end, gdb-delete-line)
(gdb-display-end, gdb-display-go-back, gdb-array-section-end)
(gdb-field-begin, gdb-field-end, gdb-elt,gdb-field-format-begin)
(gdb-field-format-end, gdb-dive, gdb-dive-new-frame)
(gdb-insert-field, gdb-array-format, gdb-mouse-array-slice)
(gdb-array-slice, gdb-array-format1, gdb-info-display-custom)
(gdb-delete-frames, gdb-display-mode, gdb-display-buffer-name)
(gdb-display-display-buffer, gdb-toggle-display)
(gdb-delete-display, gdb-expressions-popup-menu)
(gdb-expressions-mode, gdb-array-visualise): Remove functions.
(gdb-setup-windows, gdb-reset, gdb-source-info): Remove references
to display buffer.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Tue, 30 Sep 2003 17:56:24 +0000 |
parents | 695cf19ef79e |
children | f0eb34e60705 e8824c4f5f7e 375f2633d815 |
line wrap: on
line source
#include "copyright.h" /* $Header: /cvsroot/emacs/emacs/oldXMenu/FindSel.c,v 1.1 1999/10/03 19:35:03 fx Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* * XMenu: MIT Project Athena, X Window system menu package * * XMenuFindSelection - Find the first selection in a pane who's * label matches a particular string. * * Author: Tony Della Fera, DEC * January 22, 1986 * */ #include "XMenuInt.h" int XMenuFindSelection(menu, p_num, label) register XMenu *menu; int p_num; register char *label; { register XMPane *p_ptr; register XMSelect *s_ptr; register int i = 0; /* * Check for NULL pointers! */ if (label == NULL) { _XMErrorCode = XME_ARG_BOUNDS; return(XM_FAILURE); } /* * Find the right pane. */ p_ptr = _XMGetPanePtr(menu, p_num); if (p_ptr == NULL) return(XM_FAILURE); /* * Find the right selection. */ for ( s_ptr = p_ptr->s_list->next; s_ptr != p_ptr->s_list; s_ptr = s_ptr->next ){ if (s_ptr->label_length == 0) { if (*label == '\0') { _XMErrorCode = XME_NO_ERROR; return (i); } } else { if (strncmp (label, s_ptr->label, s_ptr->label_length) == 0) { _XMErrorCode = XME_NO_ERROR; return (i); } } i++; } /* * If we get here then we have not found * a match. */ _XMErrorCode = XME_S_NOT_FOUND; return (XM_FAILURE); } /* arch-tag: 564a4a95-9ab0-4580-b05f-6970c4b25dd4 (do not change this comment) */