]> pd.if.org Git - pdclib.old/blobdiff - man3/assert.3
Manual pages: renmae man->man3 to follow existing conventions. Add files _Exit.3...
[pdclib.old] / man3 / assert.3
diff --git a/man3/assert.3 b/man3/assert.3
new file mode 100644 (file)
index 0000000..d2874e3
--- /dev/null
@@ -0,0 +1,43 @@
+.\" This file is part of the Public Domain C Library (PDCLib).\r
+.\" Permission is granted to use, modify, and / or redistribute at will.\r
+.\"\r
+.Dd\r
+.Dt assert 3\r
+.Os\r
+\r
+.Sh NAME\r
+.Nm assert\r
+.Nd validate assertion\r
+\r
+.Sh SYNOPSIS\r
+.In assert.h\r
+.Fn "void assert" "<scalar expression>"\r
+\r
+.Sh DESCRIPTION\r
+If\r
+.Dv NDEBUG\r
+was defined when\r
+.In assert.h\r
+was last included, the macro\r
+.Nm\r
+results in no code being generated. Otherwise, if the expression evaluates to \r
+false, an error message is printed to \r
+.Va stderr\r
+and execution is terminated by invoking\r
+.Fn abort .\r
+.Sh IMPLEMENTATION NOTES\r
+The enclosing function of the call to\r
+.Nm\r
+will only be printed in the error message when compiling for C99, or a later\r
+revision of the C standard. \r
+\r
+.Sh SEE ALSO\r
+.Xr _Exit 3\r
+.Xr quick_exit 3\r
+.Xr exit 3\r
+.Xr abort 3\r
+\r
+.Sh STANDARDS\r
+Conforming to\r
+.St -isoC-90 ,\r
+.St -isoC-99 .
\ No newline at end of file