Initial version of donated sources by Avertec, 3.4p5.
[tas-yagle.git] / distrib / sources / beh / beh / beh_error.c
1
2 /* ###--------------------------------------------------------------### */
3 /* */
4 /* file : beh_error.c */
5 /* date : Oct 30 1995 */
6 /* version : v109 */
7 /* authors : Pirouz BAZARGAN SABET */
8 /* content : low-level function */
9 /* */
10 /* ###--------------------------------------------------------------### */
11
12 #include <stdio.h>
13 #include AVT_H
14
15 /* ###--------------------------------------------------------------### */
16 /* function : beh_error */
17 /* description : print an errorr message */
18 /* called func. : none */
19 /* ###--------------------------------------------------------------### */
20
21 unsigned int beh_error (code, str1)
22
23 int code;
24 char *str1;
25
26 {
27 char buf[16];
28
29 sprintf(buf,"%03d",code);
30
31 switch (code)
32 {
33 case 1:
34 case 40:
35 case 41:
36 case 68:
37 case 69:
38 case 100:
39 avt_errmsg(BEH_ERRMSG,buf,AVT_ERROR,str1);
40 break;
41 case 2:
42 case 4:
43 case 5:
44 case 6:
45 case 70:
46 case 107:
47 avt_errmsg(BEH_ERRMSG,buf,AVT_ERROR);
48 break;
49
50 default:
51 avt_errmsg(BEH_ERRMSG,"0",AVT_ERROR);
52 case 3: // do nothing
53 break;
54 }
55
56 return (1);
57 }