aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
Diffstat (limited to 'man')
-rw-r--r--man/libsimple_memcasecmp.379
-rw-r--r--man/libsimple_memcaseends.381
-rw-r--r--man/libsimple_memcaseeq.375
-rw-r--r--man/libsimple_memcaseeqlen.31
-rw-r--r--man/libsimple_memcasemem.380
-rw-r--r--man/libsimple_memcasestarts.379
-rw-r--r--man/libsimple_memends.31
-rw-r--r--man/libsimple_memeq.33
-rw-r--r--man/libsimple_memeqlen.31
-rw-r--r--man/libsimple_memmem.31
-rw-r--r--man/libsimple_mempcpy.32
-rw-r--r--man/libsimple_mempset.32
-rw-r--r--man/libsimple_memrcasemem.380
-rw-r--r--man/libsimple_memrmem.31
-rw-r--r--man/libsimple_memstarts.31
-rw-r--r--man/libsimple_strcasecmpnul.34
16 files changed, 486 insertions, 5 deletions
diff --git a/man/libsimple_memcasecmp.3 b/man/libsimple_memcasecmp.3
new file mode 100644
index 0000000..9f93995
--- /dev/null
+++ b/man/libsimple_memcasecmp.3
@@ -0,0 +1,79 @@
+.TH LIBSIMPLE_MEMCASECMP 3 2018-10-21 libsimple
+.SH NAME
+libsimple_memcasecmp \- compare two memory segments
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+static inline int libsimple_memcasecmp(const void *\fIa\fP, const void *\fIb\fP, size_t \fIn\fP);
+
+#ifndef memcasecmp
+# define memcasecmp libsimple_memcasecmp
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_memcasecmp ()
+function compares the first
+.I n
+bytes of
+.I a
+and
+.IR b .
+.PP
+The comparison is case-insensitive and made as
+if the strings were converted to lowercase and as
+.IR "unsigned char *" s.
+.SH RETURN VALUE
+The
+.BR libsimple_memcasecmp ()
+function returns a negative value if
+.I a
+is less than
+.IR b ,
+a positive value if
+.I a
+is greater than
+.IR b ,
+and 0 otherwise.
+.SH ERRORS
+The
+.BR libsimple_memcasecmp ()
+function cannot fail.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR libsimple_memcasecmp ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_memcasecmp ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_memcasecmp ()
+T} Async-cancel safety AC-Safe
+.TE
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR libsimple_memcaseeq (3),
+.BR libsimple_memcaseeqlen (3),
+.BR memcmp (3)
diff --git a/man/libsimple_memcaseends.3 b/man/libsimple_memcaseends.3
new file mode 100644
index 0000000..1cba467
--- /dev/null
+++ b/man/libsimple_memcaseends.3
@@ -0,0 +1,81 @@
+.TH LIBSIMPLE_MEMCASEENDS 3 2018-10-21 libsimple
+.SH NAME
+libsimple_memcaseends \- checks end of memory
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+void *libsimple_memcaseends(const void *\fIs\fP, size_t \fIn\fP, const void *\fIt\fP, size_t \fIm\fP);
+
+#ifndef memcaseends
+# define memcaseends libsimple_memcaseends
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_memcaseends ()
+function checks whether the
+.I n
+is at least as great as
+.I m
+and that the
+.I m
+last bytes of
+.IR s ,
+with the size
+.IR n ,
+is the same as the
+.I m
+first bytes of
+.IR t .
+.PP
+The comparison is case-insensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_memcaseends ()
+function returns 1 if
+.I s
+ends with
+.IR t ,
+otherwise it returns 0.
+.SH ERRORS
+The
+.BR libsimple_memcaseends ()
+function cannot fail.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR libsimple_memcaseends ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_memcaseends ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_memcaseends ()
+T} Async-cancel safety AC-Safe
+.TE
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR libsimple_memends (3),
+.BR libsimple_memcasestarts (3),
+.BR libsimple_memrcasemem (3)
diff --git a/man/libsimple_memcaseeq.3 b/man/libsimple_memcaseeq.3
new file mode 100644
index 0000000..314fd63
--- /dev/null
+++ b/man/libsimple_memcaseeq.3
@@ -0,0 +1,75 @@
+.TH LIBSIMPLE_MEMCASEEQ 3 2018-10-21 libsimple
+.SH NAME
+libsimple_memcaseeq \- check two memory segments for equality
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+static inline int libsimple_memcaseeq(const void *\fIa\fP, const void *\fIb\fP, size_t \fIn\fP);
+
+#ifndef memcaseeq
+# define memcaseeq libsimple_memcaseeq
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_memcaseeq ()
+function checks whether the first
+.I n
+bytes of
+.I a
+and
+.I b
+are equal.
+.PP
+The comparison is case-insensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_memcaseeq ()
+function returns 1 one if
+.I a
+and
+.I b
+are equal, with the possible exception if
+their case, otherwise it returns 0.
+.SH ERRORS
+The
+.BR libsimple_memcaseeq ()
+function cannot fail.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR libsimple_memcaseeq ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_memcaseeq ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_memcaseeq ()
+T} Async-cancel safety AC-Safe
+.TE
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR libsimple_memeq (3),
+.BR libsimple_memcaseeqlen (3),
+.BR libsimple_memcasecmp (3)
diff --git a/man/libsimple_memcaseeqlen.3 b/man/libsimple_memcaseeqlen.3
index 8cad3ca..410da7d 100644
--- a/man/libsimple_memcaseeqlen.3
+++ b/man/libsimple_memcaseeqlen.3
@@ -71,5 +71,6 @@ None.
.SH BUGS
None.
.SH SEE ALSO
+.BR libsimple_memcaseeq (3),
.BR libsimple_memeqlen (3),
.BR libsimple_memrcaseeqlen (3)
diff --git a/man/libsimple_memcasemem.3 b/man/libsimple_memcasemem.3
new file mode 100644
index 0000000..1b22e9b
--- /dev/null
+++ b/man/libsimple_memcasemem.3
@@ -0,0 +1,80 @@
+.TH LIBSIMPLE_MEMCASEMEM 3 2018-10-21 libsimple
+.SH NAME
+libsimple_memcasemem \- find byte string in memory
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+void *libsimple_memcasemem(const void *\fIhaystack\fP, size_t \fInhaystack\fP, const void *\fIneedle\fP, size_t \fInneedle\fP);
+
+#ifndef memcasemem
+# define memcasemem libsimple_memcasemem
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_memcasemem ()
+function scans the memory segment
+.IR haystack ,
+with the size
+.IR nhaystack ,
+for the first occurence of the byte string
+.I needle
+with the size
+.IR nneedle .
+.PP
+The comparison is case-insensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_memcasemem ()
+function returns the pointer
+.I s
+with a minimal offset such that
+.IR !memcasecmp(r,needle,nneedle) ,
+where
+.I r
+is the returned pointer.
+If no such offset exists,
+.B NULL
+is returned.
+.SH ERRORS
+The
+.BR libsimple_memcasemem ()
+function cannot fail.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR libsimple_memcasemem ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_memcasemem ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_memcasemem ()
+T} Async-cancel safety AC-Safe
+.TE
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR libsimple_memmem (3),
+.BR libsimple_memrcasemem (3),
+.BR libsimple_memcasechr (3)
diff --git a/man/libsimple_memcasestarts.3 b/man/libsimple_memcasestarts.3
new file mode 100644
index 0000000..b89c0f3
--- /dev/null
+++ b/man/libsimple_memcasestarts.3
@@ -0,0 +1,79 @@
+.TH LIBSIMPLE_MEMCASESTARTS 3 2018-10-21 libsimple
+.SH NAME
+libsimple_memcasestarts \- checks beginning of memory
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+void *libsimple_memcasestarts(const void *\fIs\fP, size_t \fIn\fP, const void *\fIt\fP, size_t \fIm\fP);
+
+#ifndef memcasestarts
+# define memcasestarts libsimple_memcasestarts
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_memcasestarts ()
+function checks whether the
+.I n
+is at least as great as
+.I m
+and that the
+.I m
+first bytes of
+.I s
+is the same as the
+.I m
+first bytes of
+.IR t .
+.PP
+The comparison is case-insensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_memcasestarts ()
+function returns 1 if
+.I s
+begins with
+.IR t ,
+otherwise it returns 0.
+.SH ERRORS
+The
+.BR libsimple_memcasestarts ()
+function cannot fail.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR libsimple_memcasestarts ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_memcasestarts ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_memcasestarts ()
+T} Async-cancel safety AC-Safe
+.TE
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR libsimple_memstarts (3),
+.BR libsimple_memcaseends (3),
+.BR libsimple_memcasemem (3)
diff --git a/man/libsimple_memends.3 b/man/libsimple_memends.3
index 201788e..ab0d9c5 100644
--- a/man/libsimple_memends.3
+++ b/man/libsimple_memends.3
@@ -76,5 +76,6 @@ None.
.SH BUGS
None.
.SH SEE ALSO
+.BR libsimple_memcaseends (3),
.BR libsimple_memstarts (3),
.BR libsimple_memrmem (3)
diff --git a/man/libsimple_memeq.3 b/man/libsimple_memeq.3
index 0b9ce1e..d0c2a99 100644
--- a/man/libsimple_memeq.3
+++ b/man/libsimple_memeq.3
@@ -5,7 +5,7 @@ libsimple_memeq \- check two memory segments for equality
.nf
#include <libsimple.h>
-void *libsimple_memeq(const void *\fIa\fP, const void *\fIb\fP, size_t \fIn\fP);
+static inline int libsimple_memeq(const void *\fIa\fP, const void *\fIb\fP, size_t \fIn\fP);
#ifndef memeq
# define memeq libsimple_memeq
@@ -69,5 +69,6 @@ None.
.SH BUGS
None.
.SH SEE ALSO
+.BR libsimple_memcaseeq (3),
.BR libsimple_memeqlen (3),
.BR memcmp (3)
diff --git a/man/libsimple_memeqlen.3 b/man/libsimple_memeqlen.3
index 6ef9121..277e382 100644
--- a/man/libsimple_memeqlen.3
+++ b/man/libsimple_memeqlen.3
@@ -71,5 +71,6 @@ None.
.SH BUGS
None.
.SH SEE ALSO
+.BR libsimple_memeq (3),
.BR libsimple_memcaseeqlen (3),
.BR libsimple_memreqlen (3)
diff --git a/man/libsimple_memmem.3 b/man/libsimple_memmem.3
index 05f9f37..4c1a628 100644
--- a/man/libsimple_memmem.3
+++ b/man/libsimple_memmem.3
@@ -75,6 +75,7 @@ None.
.SH BUGS
None.
.SH SEE ALSO
+.BR libsimple_memrcasemem (3),
.BR libsimple_memrmem (3),
.BR libsimple_memelem (3),
.BR memchr (3)
diff --git a/man/libsimple_mempcpy.3 b/man/libsimple_mempcpy.3
index 26531b5..2953e47 100644
--- a/man/libsimple_mempcpy.3
+++ b/man/libsimple_mempcpy.3
@@ -5,7 +5,7 @@ libsimple_mempcpy \- copy an array of bytes into another
.nf
#include <libsimple.h>
-void *libsimple_mempcpy(void *\fIdest\fP, const void *\fIsrc\fP, size_t \fIn\fP);
+static inline void *libsimple_mempcpy(void *\fIdest\fP, const void *\fIsrc\fP, size_t \fIn\fP);
#ifndef mempcpy
# define mempcpy libsimple_mempcpy
diff --git a/man/libsimple_mempset.3 b/man/libsimple_mempset.3
index f75e424..c88257b 100644
--- a/man/libsimple_mempset.3
+++ b/man/libsimple_mempset.3
@@ -5,7 +5,7 @@ libsimple_mempset \- fill an array of bytes
.nf
#include <libsimple.h>
-void *libsimple_mempset(void *\fIs\fP, int \fIc\fP, size_t \fIn\fP);
+static inline void *libsimple_mempset(void *\fIs\fP, int \fIc\fP, size_t \fIn\fP);
#ifndef mempset
# define mempset libsimple_mempset
diff --git a/man/libsimple_memrcasemem.3 b/man/libsimple_memrcasemem.3
new file mode 100644
index 0000000..712cb03
--- /dev/null
+++ b/man/libsimple_memrcasemem.3
@@ -0,0 +1,80 @@
+.TH LIBSIMPLE_MEMRCASEMEM 3 2018-10-21 libsimple
+.SH NAME
+libsimple_memrcasemem \- find byte string in memory
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+void *libsimple_memrcasemem(const void *\fIhaystack\fP, size_t \fInhaystack\fP, const void *\fIneedle\fP, size_t \fInneedle\fP);
+
+#ifndef memrcasemem
+# define memrcasemem libsimple_memrcasemem
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_memrcasemem ()
+function scans the memory segment
+.IR haystack ,
+with the size
+.IR nhaystack ,
+for the last occurence of the byte string
+.I needle
+with the size
+.IR nneedle .
+.PP
+The comparison is case-insensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_memrcasemem ()
+function returns the pointer
+.I s
+with a maximal offset such that
+.IR !memcasecmp(r,needle,nneedle) ,
+where
+.I r
+is the returned pointer.
+If no such offset exists,
+.B NULL
+is returned.
+.SH ERRORS
+The
+.BR libsimple_memrcasemem ()
+function cannot fail.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR libsimple_memrcasemem ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_memrcasemem ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_memrcasemem ()
+T} Async-cancel safety AC-Safe
+.TE
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR libsimple_memrmem (3),
+.BR libsimple_memcasemem (3),
+.BR libsimple_memrcasechr (3)
diff --git a/man/libsimple_memrmem.3 b/man/libsimple_memrmem.3
index f7d9945..c08d577 100644
--- a/man/libsimple_memrmem.3
+++ b/man/libsimple_memrmem.3
@@ -75,6 +75,7 @@ None.
.SH BUGS
None.
.SH SEE ALSO
+.BR libsimple_memcasemem (3),
.BR libsimple_memmem (3),
.BR libsimple_memrelem (3),
.BR libsimple_memrchr (3)
diff --git a/man/libsimple_memstarts.3 b/man/libsimple_memstarts.3
index f031837..9cc4cbf 100644
--- a/man/libsimple_memstarts.3
+++ b/man/libsimple_memstarts.3
@@ -74,5 +74,6 @@ None.
.SH BUGS
None.
.SH SEE ALSO
+.BR libsimple_memcasestarts (3),
.BR libsimple_memends (3),
.BR libsimple_memmem (3)
diff --git a/man/libsimple_strcasecmpnul.3 b/man/libsimple_strcasecmpnul.3
index e07b551..197cac7 100644
--- a/man/libsimple_strcasecmpnul.3
+++ b/man/libsimple_strcasecmpnul.3
@@ -29,8 +29,8 @@ If one of the strings begins with the other string
but is longer, the longer string is treated as
greater than the shorter string.
.PP
-The comparison is case-insensitive and made as if the
-strings were converted to lowercase and as
+The comparison is case-insensitive and made as
+if the strings were converted to lowercase and as
.IR "unsigned char *" s.
.SH RETURN VALUE
The