classify/sigmenu.h File Reference

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

Go to the source code of this file.

Defines

Functions


Define Documentation

#define SIG_MENU   0

Definition at line 32 of file sigmenu.h.

#define SIG_RESUME   1

Note:
File:sigmenu.h
Definition of signal handler routines
Author:
Dan Johnson
Date:
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
 ** http://www.apache.org/licenses/LICENSE-2.0
 ** 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.

Parameters:
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
Note:
Globals: SignalMenus list of menu items for each possible signal
Returns:
none
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.
Note:
Exceptions: none
Date:
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;
00087 
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   }
00093 
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);
00098 
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);
00102 
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