view oldXMenu/SetSel.c @ 30929:3d5ccbaddc59

Set to standard author/maintainer/keyword fields. Fine tuning to menu map appearance and operation, and added help. Remove `start' and `end' error messages when compiling. (ispell-choices-win-default-height): Fixed comment string. (ispell-dictionary-alist-1): Fixed regexp in castellano and castellano8 dictionaries. (ispell-dictionary-alist-3): Fixed regexp in francais dictionary. (ispell-dictionary-alist-4): Fixed regexp in francais-tex dictionary, added italiano dictionary. (ispell-skip-region-alist): Removed regexp thrashing when `-' is a word character (ispell-tex-skip-alists): Added psfig support. (ispell-skip-html): Renamed from ispell-skip-sgml. (ispell-begin-skip-region-regexp, ispell-skip-region) (ispell-minor-check): Improved html skipping support to skip across code, and recognize `&' commands without propper `;' syntax; (ispell-process-line): Fix alignment error when manually correcting spelling. (ispell): Fix comment string. (ispell-add-per-file-word-list): Always put word list on new line.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 17 Aug 2000 20:54:01 +0000
parents bbce331da1be
children 23a1cea22d13
line wrap: on
line source

#include "copyright.h"

/* $Header: /u/src/emacs/19.0/oldXMenu/RCS/SetSel.c,v 1.1 1992/04/11 22:10:21 jimb Exp $ */
/* Copyright    Massachusetts Institute of Technology    1985	*/

/*
 * XMenu:	MIT Project Athena, X Window system menu package
 *
 *	XMenuSetSelection - Set a menu selection to be active or inactive.
 *
 *	Author:		Tony Della Fera, DEC
 *			August, 1985
 *
 */

#include "XMenuInt.h"

int
XMenuSetSelection(menu, p_num, s_num, active)
    register XMenu *menu;	/* Menu object to be modified. */
    register int p_num;		/* Pane number to be modified. */
    register int s_num;		/* Selection number to modified. */
    int active;			/* Make selection active? */
{
    register XMPane *p_ptr;	/* XMPane pointer. */
    register XMSelect *s_ptr;	/* XMSelect pointer. */
    
    /*
     * Find the right pane.
     */
    p_ptr = _XMGetPanePtr(menu, p_num);
    if (p_ptr == NULL) return(XM_FAILURE);

    /*
     * Find the right selection.
     */
    s_ptr = _XMGetSelectionPtr(p_ptr, s_num);
    if (s_ptr == NULL) return(XM_FAILURE);

    /*
     * Set its active switch.
     */
    s_ptr->active = active;

    /*
     * Return the selection number just set.
     */
    _XMErrorCode = XME_NO_ERROR;
    return(s_num);
}