1 |
//$Header$ |
2 |
//{375a45aa-6e13-45dc-aee9-ad5b4cffece7} |
3 |
//------------------------------------------------------------------------------------------------- |
4 |
//This file is part of "Embedded Tool Set", a tool set designed to facilitate embedded system |
5 |
//software and hardware development. |
6 |
//------------------------------------------------------------------------------------------------- |
7 |
//This source code and any program in which it is compiled/used is provided under the MIT License, |
8 |
//reproduced below. |
9 |
//------------------------------------------------------------------------------------------------- |
10 |
//Permission is hereby granted, free of charge, to any person obtaining a copy of |
11 |
//this software and associated documentation files(the "Software"), to deal in the |
12 |
//Software without restriction, including without limitation the rights to use, |
13 |
//copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the |
14 |
//Software, and to permit persons to whom the Software is furnished to do so, |
15 |
//subject to the following conditions : |
16 |
// |
17 |
//The above copyright notice and this permission notice shall be included in all |
18 |
//copies or substantial portions of the Software. |
19 |
// |
20 |
//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
21 |
//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
22 |
//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE |
23 |
//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
24 |
//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
25 |
//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
26 |
//SOFTWARE. |
27 |
//------------------------------------------------------------------------------------------------- |
28 |
#define MODULE_CCMFATAL |
29 |
|
30 |
#include <process.h> |
31 |
#include <stdio.h> |
32 |
|
33 |
#include "ccmfatal.h" |
34 |
|
35 |
|
36 |
void CCMFATAL_fatal(const char *desc, |
37 |
const char *file, |
38 |
int line) |
39 |
{ |
40 |
printf("Fatal error. Must terminate execution.\n"); |
41 |
printf("File: %s, Line: %d.\n", file, line); |
42 |
printf("Error description: %s\n", desc); |
43 |
exit(4); //Error code 4 for error termination. |
44 |
} |
45 |
|
46 |
|
47 |
const char *CCMFATAL_cvcinfo(void) |
48 |
{ |
49 |
return("$Header$"); |
50 |
} |
51 |
|
52 |
|
53 |
const char *CCMFATAL_hvcinfo(void) |
54 |
{ |
55 |
return(CCMFATAL_H_VERSION); |
56 |
} |
57 |
|
58 |
//End of ccmfatal.c. |