| Revision: | 1046 |
| Committed: | Mon Aug 29 13:19:38 2016 UTC (9 years, 2 months ago) by alloc |
| File size: | 382 byte(s) |
| Log Message: | Daodan: Added Windows MinGW and build batch file |
| # | Content |
|---|---|
| 1 | # assert --- assert that a condition is true. Otherwise exit. |
| 2 | |
| 3 | # |
| 4 | # Arnold Robbins, arnold@skeeve.com, Public Domain |
| 5 | # May, 1993 |
| 6 | |
| 7 | function assert(condition, string) |
| 8 | { |
| 9 | if (! condition) { |
| 10 | printf("%s:%d: assertion failed: %s\n", |
| 11 | FILENAME, FNR, string) > "/dev/stderr" |
| 12 | _assert_exit = 1 |
| 13 | exit 1 |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | END { |
| 18 | if (_assert_exit) |
| 19 | exit 1 |
| 20 | } |