classify/sigmenu.h File Reference

#include "cutil.h"
#include <signal.h>

Go to the source code of this file.



Define Documentation

#define SIG_MENU   0

Definition at line 32 of file sigmenu.h.

#define SIG_RESUME   1

Definition of signal handler routines
Dan Johnson
10/2/89, DSJ, Created.
 **	(c) Copyright Hewlett-Packard Company, 1988.
 ** Licensed under the Apache License, Version 2.0 (the "License");
 ** you may not use this file except in compliance with the License.
 ** You may obtain a copy of the License at
 ** Unless required by applicable law or agreed to in writing, software
 ** distributed under the License is distributed on an "AS IS" BASIS,
 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ** See the License for the specific language governing permissions and
 ** limitations under the License.

Definition at line 31 of file sigmenu.h.

Referenced by MainSignalHandler().

Function Documentation

void AddSignalMenuItem ( int  Signal,
int  ItemNum,
const char  ItemLabel[],
int_void  ItemFunc 

Add a new menu item to the list of menu items for Signal; not functional in current state.

Signal Signal to be trapped for this menu
ItemNum Menu number for this item
ItemLabel Menu label for this item
ItemFunc Function to be called when item is selected
Globals: SignalMenus list of menu items for each possible signal
Whenever Signal is encountered, the user will be given a list of options to choose from. This list is the list of all of the menu items that have been specified for that Signal.
Exceptions: none
Mon Oct 2 07:42:19 1989, DSJ, Created.

Definition at line 82 of file sigmenu.cpp.

References cprintf(), ItemCompare(), MainSignalHandler(), NewSignalMenuItem(), NIL, s_adjoin(), and SignalMenus.

Referenced by init_dj_debug(), and init_ms_debug().

00083                                                         {
00084   #if 0
00085   #ifndef SECURE_NAMES
00086   SIG_MENU_ITEM *NewItem;
00088   /* check for a valid Signal */
00089   if (Signal >= NSIG || Signal <= 0) {
00090     cprintf ("Illegal signal (%d) specified for menu item!\n", Signal);
00091     return;
00092   }
00094   /* if this is the first item for this signal, indicate that the
00095      appropriate signal handler has been enabled */
00096   if (SignalMenus[Signal] == NIL)
00097     cprintf ("Signal handler enabled for signal %d.\n", Signal);
00099   /* add the new menu item to the appropriate list of menu items */
00100   NewItem = NewSignalMenuItem (ItemNum, ItemLabel, ItemFunc);
00101   SignalMenus[Signal] = s_adjoin (SignalMenus[Signal], NewItem, ItemCompare);
00103   /* set up the trap for the appropriate signal */
00104   signal(Signal, MainSignalHandler); 
00105   #endif
00106   #endif
00107 }                                /* AddSignalMenuItem */

Generated on Wed Feb 28 19:49:21 2007 for Tesseract by  doxygen 1.5.1