#include "cutil.h"
#include <signal.h>
Go to the source code of this file.
#define SIG_RESUME 1 |
** (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().
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 |
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 */