aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--man0/libsimple-arg.h.054
-rw-r--r--man3/libsimple_memalign.313
-rw-r--r--man3/libsimple_pvalloc.313
-rw-r--r--man3/libsimple_valloc.313
4 files changed, 59 insertions, 34 deletions
diff --git a/man0/libsimple-arg.h.0 b/man0/libsimple-arg.h.0
index 842f816..550eddd 100644
--- a/man0/libsimple-arg.h.0
+++ b/man0/libsimple-arg.h.0
@@ -13,21 +13,21 @@ struct longopt {
int with_arg;
};
-#define ARGBEGIN ARGBEGIN4(1, 1, argc, argv)
-#define SUBARGBEGIN ARGBEGIN4(0, 1, argc, argv)
-#define ARGBEGIN4(\fIWITH_ARGV0\fP, \fIKEEP_DASHDASH\fP, \fIargc\fP, \fIargv\fP) /* implementation omitted */
-#define ARGMAPLONG(\fILONGOPTS\fP) /* implementation omitted */
-#define ARGALT(\fISYMBOL\fP) /* implementation omitted */
-#define ARGEND /* implementation omitted */
-#define ARGNUM /* implementation omitted */
-#define FLAG() /* implementation omitted */
-#define LFLAG() /* implementation omitted */
-#define ARG() /* implementation omitted */
-#define ARGHERE() /* implementation omitted */
-#define NOFLAGS(...) /* implementation omitted */
-#define TESTLONG(\fIFLG\fP, \fIWARG\fP) /* implementation omitted */
-#define USAGE(\fISYNOPSIS\fP) /* implementation omitted */
-#define NUSAGE(\fISTATUS\fP, \fISYNOPSIS\fP) /* implementation omitted */
+#define ARGBEGIN ARGBEGIN2(1, 0)
+#define SUBARGBEGIN ARGBEGIN2(0, 0)
+#define ARGBEGIN2(\fIWITH_ARGV0\fP, \fIKEEP_DASHDASH\fP) /* implementation omitted */
+#define ARGMAPLONG(\fILONGOPTS\fP) /* implementation omitted */
+#define ARGALT(\fISYMBOL\fP) /* implementation omitted */
+#define ARGEND /* implementation omitted */
+#define ARGNUM /* implementation omitted */
+#define FLAG() /* implementation omitted */
+#define LFLAG() /* implementation omitted */
+#define ARG() /* implementation omitted */
+#define ARGHERE() /* implementation omitted */
+#define NOFLAGS(...) /* implementation omitted */
+#define TESTLONG(\fIFLG\fP, \fIWARG\fP) /* implementation omitted */
+#define USAGE(\fISYNOPSIS\fP) /* implementation omitted */
+#define NUSAGE(\fISTATUS\fP, \fISYNOPSIS\fP) /* implementation omitted */
.fi
.SH DESCRIPTION
The
@@ -179,7 +179,7 @@ and
are set to only contain the remaining, unparsed, arguments.
.PP
The
-.BR ARGBEGIN4 ()
+.BR ARGBEGIN2 ()
macro can be used instead of the
.B ARGBEGIN
and
@@ -214,12 +214,6 @@ is encounted, and it becomes visible to the application
code, implement GNU behaviour by running the parsing
in a loop and stop when the application code sees
.BR -- .
-The
-.BR ARGBEGIN4 ()
-also lets the user choose which variables to use as
-.I argc
-and
-.IR argv .
.PP
If the application should support flags starting with
another symbol than a dash
@@ -394,18 +388,18 @@ macro shall be used directly in a
(or
.BR default )
for
-.IR ARGBEGIN ,
-.IR SUBARGBEGIN ,
+.BR ARGBEGIN ,
+.BR SUBARGBEGIN ,
or
-.IR ARGBEGIN4 ,
+.BR ARGBEGIN2 ,
and not inside a loop or inner
.BR switch ),
and in the next iteration of the argument parsing loop,
the flag will be the short flag consisting of the two
characters
-.B long_flag[0]
+.I long_flag[0]
and
-.B short_flag
+.I short_flag
(in that order). Example:
.nf
@@ -435,13 +429,13 @@ have to map entries, one where
ends with
.RB ' = '
and
-.B with_arg
+.I with_arg
is non-zero, and one where
-.B long_flag
+.I long_flag
does not end with
.RB ' = '
and
-.B with_arg
+.I with_arg
is zero. These
.I cannot
have the same
diff --git a/man3/libsimple_memalign.3 b/man3/libsimple_memalign.3
index 8df0d50..8bf04a1 100644
--- a/man3/libsimple_memalign.3
+++ b/man3/libsimple_memalign.3
@@ -36,7 +36,9 @@ pointer with an alignment of
bytes to the allocated memory. The function
.BR free (3)
shall be called with the returned pointer as
-input when the allocated memory is no longer needed.
+input when the allocated memory is no longer needed,
+but see
+.BR NOTES .
.PP
The
.BR libsimple_enmemalign ()
@@ -144,7 +146,14 @@ None.
.SH FUTURE DIRECTIONS
None.
.SH NOTES
-None.
+Portable applications shall assume that pointer
+returned by the
+.BR memalign ()
+function can be deallocated with the
+.BR free (3)
+functon, unless the namespaced alias
+.BR libsimple_memalign ()
+is used explicitly.
.SH BUGS
None.
.SH SEE ALSO
diff --git a/man3/libsimple_pvalloc.3 b/man3/libsimple_pvalloc.3
index 63473b3..b6cf4c6 100644
--- a/man3/libsimple_pvalloc.3
+++ b/man3/libsimple_pvalloc.3
@@ -36,7 +36,9 @@ alignment of the page size to the allocated memory.
The function
.BR free (3)
shall be called with the returned pointer as
-input when the allocated memory is no longer needed.
+input when the allocated memory is no longer needed,
+but see
+.BR NOTES .
.PP
The
.BR libsimple_enpvalloc ()
@@ -132,6 +134,15 @@ None.
.SH FUTURE DIRECTIONS
None.
.SH NOTES
+Portable applications shall assume that pointer
+returned by the
+.BR pvalloc ()
+function can be deallocated with the
+.BR free (3)
+functon, unless the namespaced alias
+.BR libsimple_pvalloc ()
+is used explicitly.
+.PP
The GNU implementation of
.BR pvalloc (3)
is \(dqMT-Unsafe init\(dq.
diff --git a/man3/libsimple_valloc.3 b/man3/libsimple_valloc.3
index 033e5e9..84cce32 100644
--- a/man3/libsimple_valloc.3
+++ b/man3/libsimple_valloc.3
@@ -35,7 +35,9 @@ pointer with an alignment of the page size
to the allocated memory. The function
.BR free (3)
shall be called with the returned pointer as
-input when the allocated memory is no longer needed.
+input when the allocated memory is no longer needed,
+but see
+.BR NOTES .
.PP
The
.BR libsimple_envalloc ()
@@ -131,6 +133,15 @@ None.
.SH FUTURE DIRECTIONS
None.
.SH NOTES
+Portable applications shall assume that pointer
+returned by the
+.BR valloc ()
+function can be deallocated with the
+.BR free (3)
+functon, unless the namespaced alias
+.BR libsimple_valloc ()
+is used explicitly.
+.PP
The GNU implementation of
.BR valloc (3)
is \(dqMT-Unsafe init\(dq.