home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / prog / utils / sercli.shr / sercli / src / rcs / errors.c,v < prev    next >
Encoding:
Text File  |  1993-06-16  |  2.1 KB  |  153 lines

  1. head    1.5;
  2. access;
  3. symbols
  4.     sercli_v1_10:1.5
  5.     sercli_v1_9:1.4
  6.     sercli_v1_8:1.4
  7.     sercli_v1_7:1.3
  8.     sercli_v1_6:1.2
  9.     sercli_v1_5:1.1;
  10. locks
  11.     rkr:1.5;
  12. comment    @**  @;
  13.  
  14.  
  15. 1.5
  16. date    93.06.16.23.30.56;    author rkr;    state Exp;
  17. branches;
  18. next    1.4;
  19.  
  20. 1.4
  21. date    91.12.20.09.43.51;    author rkr;    state Exp;
  22. branches;
  23. next    1.3;
  24.  
  25. 1.3
  26. date    91.12.10.02.48.18;    author rkr;    state Exp;
  27. branches;
  28. next    1.2;
  29.  
  30. 1.2
  31. date    91.12.02.10.51.35;    author rkr;    state Exp;
  32. branches;
  33. next    1.1;
  34.  
  35. 1.1
  36. date    91.11.28.08.25.21;    author rkr;    state Exp;
  37. branches;
  38. next    ;
  39.  
  40.  
  41. desc
  42. @sercli is a program to permit shell-like interface to the serial port,
  43. while also permitting easy config- and run-time-control over the way the
  44. serial port (or even _which_ serial port) is used.
  45.  
  46. @
  47.  
  48.  
  49. 1.5
  50. log
  51. @Added per-file copyright notice, as suggested by GPL.
  52. @
  53. text
  54. @/*
  55. **  $Source: WB_2.1:ho/rcs/errors.c,v $
  56. **  $Author: rkr $
  57. **  $Revision: 1.4 $
  58. **  $Locker:  $
  59. **  $State: Exp $
  60. **  $Date: 1991/12/20 09:43:51 $
  61. **
  62. **  sercli (an Amiga .device <-> FIFO interface tool)
  63. **  Copyright (C) 1993  Richard Rauch
  64. **
  65. **  See /doc/sercli.doc and /COPYING for use and distribution license.
  66. **
  67. */
  68.  
  69. #include "errors.h"
  70.  
  71. static error_handler handlers [num_error_types];
  72.  
  73. error_handler set_error_handler (error_type type, error_handler new_handler)
  74. {
  75.     error_handler old_handler;
  76.  
  77.     old_handler = handlers [type];
  78.     handlers [type] = new_handler;
  79.  
  80.     return (old_handler);
  81. }
  82.  
  83.  
  84.  
  85. void handle_error (error_type type, void *error)
  86. {
  87.     error_handler handler;
  88.  
  89.     handler = handlers [type];
  90.     if (handler)
  91.     handler (error);
  92. }
  93. @
  94.  
  95.  
  96. 1.4
  97. log
  98. @*** empty log message ***
  99. @
  100. text
  101. @d2 1
  102. a2 1
  103. **  $Source: Workbench:personal/rkr/prog/sercli/src/rcs/errors.c,v $
  104. d4 2
  105. a5 2
  106. **  $Revision: 1.3 $
  107. **  $Locker: rkr $
  108. d7 6
  109. a12 1
  110. **  $Date: 91/12/10 02:48:18 $
  111. @
  112.  
  113.  
  114. 1.3
  115. log
  116. @*** empty log message ***
  117. @
  118. text
  119. @d4 1
  120. a4 1
  121. **  $Revision: 1.2 $
  122. d7 1
  123. a7 1
  124. **  $Date: 91/12/02 10:51:35 $
  125. @
  126.  
  127.  
  128. 1.2
  129. log
  130. @*** empty log message ***
  131. @
  132. text
  133. @d7 1
  134. a7 1
  135. **  $Date: 91/12/02 10:42:13 $
  136. @
  137.  
  138.  
  139. 1.1
  140. log
  141. @Initial revision
  142. @
  143. text
  144. @d2 6
  145. a7 6
  146. **  $Source$
  147. **  $Author$
  148. **  $Revision$
  149. **  $Locker$
  150. **  $State$
  151. **  $Date$
  152. @
  153.