Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!cs325ec From: cs325ec@ux1.cso.uiuc.edu Newsgroups: comp.sys.atari.st Subject: C help - Critical replacement Message-ID: <16000023@ux1.cso.uiuc.edu> Date: 12 Mar 90 10:39:37 GMT Lines: 48 Nf-ID: #N:ux1.cso.uiuc.edu:16000023:000:782 Nf-From: ux1.cso.uiuc.edu!cs325ec Mar 11 23:02:00 1990 I am trying to set a function name to an absolute value in Turbo C: Could someone just drop a note on how to call olderrh (the old critical error handler) if I do not want to service the call? Thanks in advance -- Greg I have tried this and more: #include #include #define drivebits 0x0030 void *olderrh; /**************************** Critical Error Handler ****************************/ long criterr(int err, int drive) { if (drive & drivebits) return(1L); else return(eval(olderrh)); } /**************************** Replace Error Handler ****************************/ void replerr(void) { olderrh = (void *)(*(long *)0x404L); *(long *)0x404L = (long)criterr; } void main(void) { Supexec(replerr); Ptermres(0x400L,0); }