1*47946SbosticC 2*47946SbosticC Copyright (c) 1980 The Regents of the University of California. 3*47946SbosticC All rights reserved. 4*47946SbosticC 5*47946SbosticC %sccs.include.proprietary.f% 6*47946SbosticC 7*47946SbosticC @(#)sigtst.f 5.2 (Berkeley) 04/12/91 8*47946SbosticC 9*47946Sbostic 1044005Sbostic external fpe 1144005Sbostic integer signal 1244005Sbostic isave = signal(8, 0, 1) 1344005Sbostic write(*,*) "1", signal(8, 0, 0) 1444005Sbostic write(*,*) "0", signal(8, fpe, -1) 1544005Sbostic write(*,*) "addr fpe", signal(8, 0, isave) 1644005Sbostic write(*,*) isave, signal(8, fpe, -1) 1744005Sbostic x = 1/x 1844005Sbostic write(*,*) "Back again" 1944005Sbostic z = 1/z 2044005Sbostic write(*,*) "Saved again" 2144005Sbostic end 2244005Sbostic 2344005Sbostic subroutine fpe(flag) 2444005Sbostic call signal(8, fpe, -1) 2544005Sbosticc call sigset() 2644005Sbostic write(*,*) "Hi there sports fans!" 2744005Sbostic call flush(6) 2844005Sbostic return 2944005Sbostic end 3044005Sbostic 3144005Sbostic subroutine sigset() 3244005Sbostic external fpe 3344005Sbostic call signal(8, fpe, -1) 3444005Sbostic return 3544005Sbostic end 36