Blob


1 .TH ASSERT 3
2 .SH NAME
3 assert \- check program invariants
4 .SH SYNOPSIS
5 .B #include <u.h>
6 .br
7 .B #include <libc.h>
8 .PP
9 .B
10 #define assert if(cond);else _assert("cond")
11 .PP
12 .B
13 void _assert(int cond)
14 .SH DESCRIPTION
15 .I Assert
16 is a preprocessor macro that
17 (via
18 .IR _assert )
19 prints a message and calls
20 .I abort
21 when
22 .I cond
23 is false.
24 .SH SOURCE
25 .B /usr/local/plan9/src/libc/port/_assert.c