static status unlinkWinPrinter(WinPrinter prt) { closeWinPrinter(prt); resetDataWinPrinter(prt); if ( prt->ws_ref ) { unalloc(sizeof(ws_printer), prt->ws_ref); prt->ws_ref = NULL; } deleteChain(WinPrinters, prt); succeed; }
static status deleteChainTable(ChainTable ct, Any name, Any value) { Chain ch; if ( isDefault(value) ) return deleteHashTable((HashTable)ct, name); if ( (ch = getMemberHashTable((HashTable) ct, name)) ) { TRY(deleteChain(ch, value)); if ( emptyChain(ch) ) deleteHashTable((HashTable) ct, name); succeed; } fail; }
void ws_uncreate_window(PceWindow sw) { Widget w; if ( grabbedWindows ) deleteChain(grabbedWindows, sw); if ( (w=widgetWindow(sw)) ) { XtRemoveAllCallbacks(w, XtNeventCallback); XtRemoveAllCallbacks(w, XtNexposeCallback); XtRemoveAllCallbacks(w, XtNresizeCallback); XtRemoveAllCallbacks(w, XtNdestroyCallback); destroy_window(w, (XtPointer)sw, NULL); /* callback may be delayed */ XtDestroyWidget(w); /* too long */ } }