Atlas - ASSERT.H
Home / ext / JunkDrawer / DOS / BuildTools / v4.0 / BLD / INC Lines: 2 | Size: 664 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1/*** 2*assert.h - define the assert macro 3* 4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved. 5* 6*Purpose: 7* Defines the assert(exp) macro. 8* [ANSI/System V] 9* 10*******************************************************************************/ 11 12 13#ifndef _ASSERT_DEFINED 14 15#ifndef NDEBUG 16 17static char _assertstring[] = "Assertion failed: %s, file %s, line %d\n"; 18 19#define assert(exp) { \ 20 if (!(exp)) { \ 21 fprintf(stderr, _assertstring, #exp, __FILE__, __LINE__); \ 22 fflush(stderr); \ 23 abort(); \ 24 } \ 25 } 26 27#else 28 29#define assert(exp) 30 31#endif /* NDEBUG */ 32 33#define _ASSERT_DEFINED 34 35#endif /* _ASSERT_DEFINED */ 36[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.