Mercurial > flash_v2
comparison packages/isoinfra/current/include/assert.h @ 119:77cec8369160 ecos-sw-2000-09-01
Merge from eCos master repository on 2000-09-01-07:47:03-BST
| author | jlarmour |
|---|---|
| date | Fri, 01 Sep 2000 13:45:23 +0000 |
| parents | 6ed91473a1cd |
| children | e0c0827131d1 |
comparison
equal
deleted
inserted
replaced
| 118:59c1a83fb200 | 119:77cec8369160 |
|---|---|
| 69 # include <stdio.h> | 69 # include <stdio.h> |
| 70 # include <stdlib.h> | 70 # include <stdlib.h> |
| 71 | 71 |
| 72 # define assert( __bool ) \ | 72 # define assert( __bool ) \ |
| 73 do { \ | 73 do { \ |
| 74 if (0 != (__bool)) { \ | 74 if (0 == (__bool)) { \ |
| 75 fprintf( stderr, "User assertion failed: \"%s\", at %s:%d\n", \ | 75 fprintf( stderr, "User assertion failed: \"%s\", at %s:%d\n", \ |
| 76 #__bool, __FILE__, __LINE__); \ | 76 #__bool, __FILE__, __LINE__); \ |
| 77 abort(); \ | 77 abort(); \ |
| 78 } \ | 78 } \ |
| 79 } while(0) | 79 } while(0) |
| 93 | 93 |
| 94 # include <cyg/infra/diag.h> | 94 # include <cyg/infra/diag.h> |
| 95 | 95 |
| 96 # define assert( __bool ) \ | 96 # define assert( __bool ) \ |
| 97 do { \ | 97 do { \ |
| 98 if (0 != (__bool)) { \ | 98 if (0 == (__bool)) { \ |
| 99 diag_printf( "User assertion failed: \"%s\", at %s:%d\n", \ | 99 diag_printf( "User assertion failed: \"%s\", at %s:%d\n", \ |
| 100 #__bool, __FILE__, __LINE__); \ | 100 #__bool, __FILE__, __LINE__); \ |
| 101 for (;;); \ | 101 for (;;); \ |
| 102 } \ | 102 } \ |
| 103 } while(0) | 103 } while(0) |
