FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/gpf/inc/alert.h @ 316:79080922d8e4
GPF: FRAME C sources and include files imported from LoCosto source
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Thu, 10 Apr 2014 04:06:05 +0000 |
parents | |
children | 06ee56829697 |
comparison
equal
deleted
inserted
replaced
315:1b4beffc8055 | 316:79080922d8e4 |
---|---|
1 /* | |
2 +------------------------------------------------------------------------------ | |
3 | File: alert.h | |
4 +------------------------------------------------------------------------------ | |
5 | Copyright 2002 Texas Instruments Berlin, AG | |
6 | All rights reserved. | |
7 | | |
8 | This file is confidential and a trade secret of Texas | |
9 | Instruments Berlin, AG | |
10 | The receipt of or possession of this file does not convey | |
11 | any rights to reproduce or disclose its contents or to | |
12 | manufacture, use, or sell anything it may describe, in | |
13 | whole, or in part, without the specific written consent of | |
14 | Texas Instruments Berlin, AG. | |
15 +----------------------------------------------------------------------------- | |
16 | Purpose : definitions for the ALERT macro. | |
17 +----------------------------------------------------------------------------- | |
18 */ | |
19 | |
20 #ifndef ALERT_H | |
21 #define ALERT_H | |
22 | |
23 #undef ALERT | |
24 #undef E_ALERT | |
25 | |
26 #ifndef ALERT_OFF | |
27 #include "typedefs.h" | |
28 #include "vsi.h" | |
29 | |
30 extern BOOL _Alert(char *, T_HANDLE, ULONG); | |
31 extern BOOL alert_info(char *, ...); | |
32 #define NO_ALERT_INFO alert_info("") | |
33 | |
34 #define _STR(x) _VAL(x) | |
35 #define _VAL(x) #x | |
36 /* | |
37 * The && FALSE in the end is just to notify the reader that | |
38 * FALSE is always returned if the predicate evaluates to false. | |
39 */ | |
40 #define ALERT(expression, alertclass, function) ((expression) ? ((void) 0) : \ | |
41 (void) (_Alert(__FILE__ "(" _STR(__LINE__) ") \"" #expression "\"", VSI_CALLER TC_ALERT_##alertclass) && (function))) | |
42 | |
43 #define E_ALERT(expression, alertclass, function) ((expression) ? (TRUE) : \ | |
44 (BOOL) (_Alert(__FILE__ "(" _STR(__LINE__) ") \"" #expression "\"", VSI_CALLER TC_ALERT_##alertclass) && (function) && FALSE)) | |
45 | |
46 #else /* ALERT_OFF */ | |
47 #define NO_ALERT_INFO (0) | |
48 #define ALERT(expression, alertclass, function) ((void) 0) | |
49 #define E_ALERT(expression, alertclass, function) (expression) | |
50 #endif /* ALERT_OFF */ | |
51 | |
52 #endif /* ALERT_H */ | |
53 |