8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / sendmail / include / sm / xtrap.h
blob78f4316d39905d00d8f140b295e4d722f1dd5225
1 /*
2 * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
3 * All rights reserved.
5 * By using this file, you agree to the terms and conditions set
6 * forth in the LICENSE file which can be found at the top level of
7 * the sendmail distribution.
9 * $Id: xtrap.h,v 1.7 2001/04/03 01:53:01 gshapiro Exp $
12 #pragma ident "%Z%%M% %I% %E% SMI"
15 ** scaffolding for testing exception handler code
18 #ifndef SM_XTRAP_H
19 # define SM_XTRAP_H
21 # include <sm/debug.h>
22 # include <sm/exc.h>
24 extern SM_ATOMIC_UINT_T SmXtrapCount;
25 extern SM_DEBUG_T SmXtrapDebug;
26 extern SM_DEBUG_T SmXtrapReport;
28 # if SM_DEBUG_CHECK
29 # define sm_xtrap_check() (++SmXtrapCount == sm_debug_level(&SmXtrapDebug))
30 # else /* SM_DEBUG_CHECK */
31 # define sm_xtrap_check() (0)
32 # endif /* SM_DEBUG_CHECK */
34 # define sm_xtrap_raise_x(exc) \
35 if (sm_xtrap_check()) \
36 { \
37 sm_exc_raise_x(exc); \
38 } else
40 #endif /* ! SM_XTRAP_H */