home *** CD-ROM | disk | FTP | other *** search
/ Super Net 1 / SUPERNET_1.iso / PC / OTROS / EXTRAS / UUCODE / UUPC / TEST / UPC12ES1.ZIP / LIB / usrcatch.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-11  |  3.3 KB  |  87 lines

  1. /*--------------------------------------------------------------------*/
  2. /*       u s r c a t c h e r . c                                      */
  3. /*                                                                    */
  4. /*       Ctrl-Break handler for UUPC/extended                         */
  5. /*--------------------------------------------------------------------*/
  6.  
  7. /*--------------------------------------------------------------------*/
  8. /*       Changes Copyright (c) 1989-1993 by Kendra Electronic         */
  9. /*       Wonderworks.                                                 */
  10. /*                                                                    */
  11. /*       All rights reserved except those explicitly granted by       */
  12. /*       the UUPC/extended license agreement.                         */
  13. /*--------------------------------------------------------------------*/
  14.  
  15. /*--------------------------------------------------------------------*/
  16. /*                          RCS Information                           */
  17. /*--------------------------------------------------------------------*/
  18.  
  19. /*
  20.  *    $Id: usrcatch.c 1.3 1993/09/30 03:06:28 ahd Exp $
  21.  *
  22.  *    Revision history:
  23.  *    $Log: usrcatch.c $
  24.  * Revision 1.3  1993/09/30  03:06:28  ahd
  25.  * Use straight signal value as flag
  26.  *
  27.  * Revision 1.3  1993/09/30  03:06:28  ahd
  28.  * Use straight signal value as flag
  29.  *
  30.  * Revision 1.2  1993/09/29  13:18:06  ahd
  31.  * Drop unneeded OS/2 ifdef
  32.  *
  33.  * Revision 1.1  1993/09/29  04:49:20  ahd
  34.  * Initial revision
  35.  *
  36.  */
  37.  
  38. /*--------------------------------------------------------------------*/
  39. /*                        System include files                        */
  40. /*--------------------------------------------------------------------*/
  41.  
  42. #include <stdio.h>
  43. #include <signal.h>
  44. #include <process.h>
  45. #include <stdlib.h>
  46.  
  47. /*--------------------------------------------------------------------*/
  48. /*                    UUPC/extended include files                     */
  49. /*--------------------------------------------------------------------*/
  50.  
  51. #include "lib.h"
  52. #include "timestmp.h"
  53. #include "usrcatch.h"
  54.  
  55. /*--------------------------------------------------------------------*/
  56. /*                          Global variables                          */
  57. /*--------------------------------------------------------------------*/
  58.  
  59. extern unsigned long raised = 0;
  60.  
  61. /*--------------------------------------------------------------------*/
  62. /*    u s r 1 h a n d l e r                                           */
  63. /*                                                                    */
  64. /*    Handles SIGUSR interrupt; from MicroSoft Programmer's           */
  65. /*    Workbench QuickHelp samples                                     */
  66. /*--------------------------------------------------------------------*/
  67.  
  68. void
  69. #ifdef __TURBOC__
  70. __cdecl
  71. #endif
  72. usrhandler( int sig )
  73. {
  74.    raised = sig;
  75.  
  76.    if ( raised == 0 )
  77.       abort();
  78.  
  79. /*--------------------------------------------------------------------*/
  80. /*    The handler pointer must be reset to our handler since by       */
  81. /*    default it is reset to the system handler.                      */
  82. /*--------------------------------------------------------------------*/
  83.  
  84.    signal( sig , usrhandler );
  85.  
  86. } /* usrhandler */
  87.