summaryrefslogtreecommitdiff
path: root/eg/returnerr.h
diff options
context:
space:
mode:
Diffstat (limited to 'eg/returnerr.h')
-rw-r--r--eg/returnerr.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/eg/returnerr.h b/eg/returnerr.h
new file mode 100644
index 0000000..2292585
--- /dev/null
+++ b/eg/returnerr.h
@@ -0,0 +1,16 @@
+/*
+ * Do an operating system operation
+ * This is an example of a function which performs some sort of operating
+ * system operation, returning an errno-like indication of its success or
+ * failure. We'd like the documentation to list all the possible failure
+ * indications that this function can return, which is only a tiny subset of
+ * all the possible errno values. Hence, we don't define it as returning an
+ * enum of some sort, since that would cause c2man to list every possible value
+ * that type can have.
+ * Returns an indication of success or failure, as follows:
+ * EOK: Success
+ * EIO: I/O error
+ * ENOMEM: Out of memory
+ * EIEIO: Old Macdonald error
+ */
+int reterrno();