summaryrefslogtreecommitdiff
path: root/eg/returnerr.h
diff options
context:
space:
mode:
authorbehdad <behdad>2004-05-03 05:17:48 +0000
committerbehdad <behdad>2004-05-03 05:17:48 +0000
commit577ed4095383ef5284225d45709e6b5f0598a064 (patch)
tree6c7d0ce55124a688b4d7050e684d9d7a1e3aa71d /eg/returnerr.h
downloadc2man-577ed4095383ef5284225d45709e6b5f0598a064.tar.gz
Initial revisionHEADoriginmaster
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();