diff options
Diffstat (limited to 'man3')
-rw-r--r-- | man3/libsimple_memcasechr.3 | 1 | ||||
-rw-r--r-- | man3/libsimple_memcasescan.3 | 86 | ||||
-rw-r--r-- | man3/libsimple_memscan.3 | 84 | ||||
-rw-r--r-- | man3/libsimple_rawmemcasechr.3 | 1 | ||||
-rw-r--r-- | man3/libsimple_rawmemchr.3 | 1 | ||||
-rw-r--r-- | man3/libsimple_strcasechrnul.3 | 1 | ||||
-rw-r--r-- | man3/libsimple_strchrnul.3 | 1 | ||||
-rw-r--r-- | man3/libsimple_strncasechrnul.3 | 3 | ||||
-rw-r--r-- | man3/libsimple_strnchrnul.3 | 3 | ||||
l--------- | man3/memcasescan.3libsimple | 1 | ||||
l--------- | man3/memscan.3libsimple | 1 |
11 files changed, 181 insertions, 2 deletions
diff --git a/man3/libsimple_memcasechr.3 b/man3/libsimple_memcasechr.3 index 3934598..5c6e5d9 100644 --- a/man3/libsimple_memcasechr.3 +++ b/man3/libsimple_memcasechr.3 @@ -78,6 +78,7 @@ None. .BR libsimple_memrcasechr (3), .BR libsimple_rawmemcasechr (3), .BR libsimple_memcasemem (3), +.BR libsimple_memcasescan (3), .BR libsimple_strncasechr (3), .BR libsimple_strcasechr (3), .BR memchr (3) diff --git a/man3/libsimple_memcasescan.3 b/man3/libsimple_memcasescan.3 new file mode 100644 index 0000000..9c11c2e --- /dev/null +++ b/man3/libsimple_memcasescan.3 @@ -0,0 +1,86 @@ +.TH LIBSIMPLE_MEMCASESCAN 3 2018-11-17 libsimple +.SH NAME +libsimple_memcasescan \- find byte in memory +.SH SYNOPSIS +.nf +#include <libsimple.h> + +void *libsimple_memcasescan(const void *\fIs\fP, int \fIc\fP, size_t \fIn\fP); + +#ifndef memcasescan +# define memcasescan libsimple_memcasescan +#endif +.fi +.PP +Link with +.IR \-lsimple . +.SH DESCRIPTION +The +.BR libsimple_memcasescan () +function scans the memory segment +.IR s , +with the size +.IR n , +for the first occurence of the byte +.I c +(it is converted to a +.BR char ). +If no such character exist in the memory +segment, the memory segment's end is returned. +.PP +The comparison is case-insensitive. +.SH RETURN VALUE +The +.BR libsimple_memcasescan () +function returns the pointer +.I s +with a minimal offset such that +.IR tolower(*r)==tolower(c) , +where +.I r +is the returned pointer. +If no such offset exists, +.I &s[n] +is returned. +.SH ERRORS +The +.BR libsimple_memcasescan () +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_memcasescan () +T} Thread safety MT-Safe +T{ +.BR libsimple_memcasescan () +T} Async-signal safety AS-Safe +T{ +.BR libsimple_memcasescan () +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_memscan (3), +.BR libsimple_memcasechr (3), +.BR libsimple_memrcasechr (3), +.BR libsimple_rawmemcasechr (3), +.BR libsimple_memcasemem (3), +.BR libsimple_strncasechrnul (3), +.BR libsimple_strcasechrnul (3) diff --git a/man3/libsimple_memscan.3 b/man3/libsimple_memscan.3 new file mode 100644 index 0000000..c9db7da --- /dev/null +++ b/man3/libsimple_memscan.3 @@ -0,0 +1,84 @@ +.TH LIBSIMPLE_MEMSCAN 3 2018-11-17 libsimple +.SH NAME +libsimple_memscan \- find byte in memory +.SH SYNOPSIS +.nf +#include <libsimple.h> + +void *libsimple_memscan(const void *\fIs\fP, int \fIc\fP, size_t \fIn\fP); + +#ifndef memscan +# define memscan libsimple_memscan +#endif +.fi +.PP +Link with +.IR \-lsimple . +.SH DESCRIPTION +The +.BR libsimple_memscan () +function scans the memory segment +.IR s , +with the size +.IR n , +for the first occurence of the byte +.I c +(it is converted to a +.BR char ). +.PP +The comparison is case-sensitive. +.SH RETURN VALUE +The +.BR libsimple_memscan () +function returns the pointer +.I s +with a minimal offset such that +.IR *r==c , +where +.I r +is the returned pointer. +If no such offset exists, +.B NULL +is returned. +.SH ERRORS +The +.BR libsimple_memscan () +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_memscan () +T} Thread safety MT-Safe +T{ +.BR libsimple_memscan () +T} Async-signal safety AS-Safe +T{ +.BR libsimple_memscan () +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_memcasescan (3), +.BR libsimple_memrchr (3), +.BR libsimple_rawmemchr (3), +.BR libsimple_memmem (3), +.BR libsimple_strnchrnul (3), +.BR libsimple_strchrnul (3), +.BR memchr (3) diff --git a/man3/libsimple_rawmemcasechr.3 b/man3/libsimple_rawmemcasechr.3 index 2e06898..308ea91 100644 --- a/man3/libsimple_rawmemcasechr.3 +++ b/man3/libsimple_rawmemcasechr.3 @@ -79,4 +79,5 @@ None. .BR libsimple_memcasechr (3), .BR libsimple_rawmemchr (3), .BR libsimple_rawmemrcasechr (3), +.BR libsimple_memcasescan (3), .BR libsimple_memcasechr (3) diff --git a/man3/libsimple_rawmemchr.3 b/man3/libsimple_rawmemchr.3 index 79b480e..3cf13dd 100644 --- a/man3/libsimple_rawmemchr.3 +++ b/man3/libsimple_rawmemchr.3 @@ -78,4 +78,5 @@ None. .SH SEE ALSO .BR libsimple_rawmemcasechr (3), .BR libsimple_rawmemrchr (3), +.BR libsimple_memscan (3), .BR memchr (3) diff --git a/man3/libsimple_strcasechrnul.3 b/man3/libsimple_strcasechrnul.3 index d2098bb..4f4badc 100644 --- a/man3/libsimple_strcasechrnul.3 +++ b/man3/libsimple_strcasechrnul.3 @@ -75,4 +75,5 @@ None. .BR libsimple_strcasechr (3), .BR libsimple_strchrnul (3), .BR libsimple_strncasechrnul (3), +.BR libsimple_memcasescan (3), .BR libsimple_inchrcaseset (3) diff --git a/man3/libsimple_strchrnul.3 b/man3/libsimple_strchrnul.3 index 2196933..846895b 100644 --- a/man3/libsimple_strchrnul.3 +++ b/man3/libsimple_strchrnul.3 @@ -75,5 +75,6 @@ None. .BR libsimple_strcasechrnul (3), .BR libsimple_strend (3), .BR libsimple_strnchrnul (3), +.BR libsimple_memscan (3), .BR libsimple_inchrset (3), .BR strchr (3) diff --git a/man3/libsimple_strncasechrnul.3 b/man3/libsimple_strncasechrnul.3 index 241b61a..ed0fa03 100644 --- a/man3/libsimple_strncasechrnul.3 +++ b/man3/libsimple_strncasechrnul.3 @@ -82,4 +82,5 @@ None. .SH SEE ALSO .BR libsimple_strncasechr (3), .BR libsimple_strnchrnul (3), -.BR libsimple_strcasechrnul (3) +.BR libsimple_strcasechrnul (3), +.BR libsimple_memcasescan (3) diff --git a/man3/libsimple_strnchrnul.3 b/man3/libsimple_strnchrnul.3 index ae0b994..6a26bd2 100644 --- a/man3/libsimple_strnchrnul.3 +++ b/man3/libsimple_strnchrnul.3 @@ -83,4 +83,5 @@ None. I promise! .BR libsimple_strncasechrnul (3), .BR libsimple_strnchr (3), .BR libsimple_strnend (3), -.BR libsimple_strchrnul (3) +.BR libsimple_strchrnul (3), +.BR libsimple_memscan (3) diff --git a/man3/memcasescan.3libsimple b/man3/memcasescan.3libsimple new file mode 120000 index 0000000..86e265e --- /dev/null +++ b/man3/memcasescan.3libsimple @@ -0,0 +1 @@ +libsimple_memcasescan.3
\ No newline at end of file diff --git a/man3/memscan.3libsimple b/man3/memscan.3libsimple new file mode 120000 index 0000000..41ccaab --- /dev/null +++ b/man3/memscan.3libsimple @@ -0,0 +1 @@ +libsimple_memscan.3
\ No newline at end of file |