summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/u8c_abrt.314
-rw-r--r--docs/u8c_abrtfn.327
-rw-r--r--docs/u8c_u32max.318
-rw-r--r--docs/u8c_unimax.319
-rw-r--r--docs/u8c_ver.32
5 files changed, 50 insertions, 30 deletions
diff --git a/docs/u8c_abrt.3 b/docs/u8c_abrt.3
index 6ea816c..7c92b28 100644
--- a/docs/u8c_abrt.3
+++ b/docs/u8c_abrt.3
@@ -7,19 +7,13 @@ u8c_abrt - Abort - Abort program with diagnostic information.
.nf
\f[C]
/* # include <u8c/main.h> */
-# include <stdbool.h
-# include <stdnoreturn.h>
-# include <uchar.h>
-extern noreturn bool u8c_abrt(char const * const fl,long long const ln,char const * const fn,char const * const why);
+# include <u8c/main.h
+# define u8c_abrt(why) u8c_abrtfn(__FILE__,(long)__LINE__,__func__,why)
\f[R]
.fi
.SH DESCRIPTION
.PP
-The function \f[B]u8c_abrt\f[R] aborts the program and prints diagnostic infiormation to \f[B]stderr\f[R].
-.PP
-\f[B]__FILE__\f[R] is to be passed at \f[B]fl\f[R], \f[B](long long)__LINE__\f[R] at \f[B]ln\f[R], and \f[B]__func__\f[R] at \f[B]fn\f[R]. A standard string (\f[B]char const *\f[R]) must be passed at \f[B]why\f[R], which explains the reason for aborting.
-.PP
-All arguments are printed, in the end followed by a timestamp representing the number of seconds passed since the current epoch (as returned by \f[B]time(NULL)\f[R]).
+The macro \f[B]u8c_abrt\f[R] expands to a valid call to \f[B]u8c_abrtfn\f[R].
.SH VERSION
.PP
-u8c 16
+u8c 21
diff --git a/docs/u8c_abrtfn.3 b/docs/u8c_abrtfn.3
new file mode 100644
index 0000000..5fbba82
--- /dev/null
+++ b/docs/u8c_abrtfn.3
@@ -0,0 +1,27 @@
+.TH "u8c_abrtfn" "3" "" "u8c" "u8c API Manual"
+.SH NAME
+.PP
+u8c_abrtfn - Abort functions - Abort program with diagnostic information.
+.SH DECLARATION
+.PP
+.nf
+\f[C]
+/* # include <u8c/main.h> */
+# include <stdbool.h
+# include <stdnoreturn.h>
+# include <uchar.h>
+extern noreturn bool u8c_abrtfn(char const * const fl,long const ln,char const * const fn,char const * const why);
+\f[R]
+.fi
+.SH DESCRIPTION
+.PP
+The function \f[B]u8c_abrtfn\f[R] aborts the program and prints diagnostic infiormation to \f[B]stderr\f[R].
+.PP
+\f[B]__FILE__\f[R] is to be passed at \f[B]fl\f[R], \f[B](long)__LINE__\f[R] at \f[B]ln\f[R], and \f[B]__func__\f[R] at \f[B]fn\f[R]. A standard string (\f[B]char const *\f[R]) must be passed at \f[B]why\f[R], which explains the reason for aborting.
+.PP
+All arguments are printed, in the end followed by a timestamp representing the number of seconds passed since the current epoch (as returned by \f[B]time(NULL)\f[R]).
+.PP
+It's recommended to use the convenience macro \f[B]u8c_abrt\f[R], as it expands to a valid call to \f[B]u8c_abrt\f[R].
+.SH VERSION
+.PP
+u8c 16 (as \f[B]u8c_abrt\f[R]), u8c 21
diff --git a/docs/u8c_u32max.3 b/docs/u8c_u32max.3
new file mode 100644
index 0000000..fdb7270
--- /dev/null
+++ b/docs/u8c_u32max.3
@@ -0,0 +1,18 @@
+.TH "u8c_u32max" "3" "" "u8c" "u8c API Manual"
+.SH NAME
+.PP
+u8c_u32max - UTF-32 maximum - Maximum valid UTF-32 value.
+.SH DECLARATION
+.PP
+.nf
+\f[C]
+/* # include <u8c/u32.h> */
+# include <uchar.h>
+static char32_t const u8c_u32max = U'\x10FFFF';
+\f[R]
+.fi
+.SH DESCRIPTION
+.PP
+.SH VERSION
+.PP
+u8c 16 (as \f[B]u8c_unimax\f[R]), u8c 21
diff --git a/docs/u8c_unimax.3 b/docs/u8c_unimax.3
deleted file mode 100644
index 8f6165d..0000000
--- a/docs/u8c_unimax.3
+++ /dev/null
@@ -1,19 +0,0 @@
-.TH "u8c_unimax" "3" "" "u8c" "u8c API Manual"
-.SH NAME
-.PP
-u8c_unimax - Unicode maximum - Maximum valid Unicode codepoint.
-.SH DECLARATION
-.PP
-.nf
-\f[C]
-/* # include <u8c/main.h> */
-# include <stdint.h>
-# include <uchar.h>
-# define u8c_unimax ((char32_t)UINT32_C(0x10FFFF))
-\f[R]
-.fi
-.SH DESCRIPTION
-.PP
-.SH VERSION
-.PP
-u8c 16
diff --git a/docs/u8c_ver.3 b/docs/u8c_ver.3
index 388b5cb..c1a2dc3 100644
--- a/docs/u8c_ver.3
+++ b/docs/u8c_ver.3
@@ -8,7 +8,7 @@ u8c_ver - Version - Version of the u8c API.
\f[C]
/* # include <u8c/main.h> */
# include <stdint.h>
-# define u8c_ver (UINT64_C(/* version */))
+static uint_least64_t const u8c_ver = /* version */;
\f[R]
.fi
.SH DESCRIPTION