diff options
author | axtloss <axtlos@getcryst.al> | 2024-09-26 15:15:16 +0200 |
---|---|---|
committer | axtloss <axtlos@getcryst.al> | 2024-09-26 15:15:16 +0200 |
commit | 27bb394bc0bf2ca66d06931bf1e73a3e20d5741a (patch) | |
tree | 99daf5b1fb77c5ad4ee3cb87a7dc5007269e0db5 | |
parent | 8996ee7580ed85b42b6399f9f64e29092ce21c41 (diff) | |
download | extlib-27bb394bc0bf2ca66d06931bf1e73a3e20d5741a.tar.gz extlib-27bb394bc0bf2ca66d06931bf1e73a3e20d5741a.tar.bz2 |
Add author section to manpages
-rw-r--r-- | .gitignore | 24 | ||||
-rw-r--r-- | doc/cap.3 | 6 | ||||
-rw-r--r-- | doc/fcopy.3 | 12 | ||||
-rw-r--r-- | doc/max.3 | 8 | ||||
-rw-r--r-- | doc/memset_s.3 | 6 | ||||
-rw-r--r-- | doc/memvcmp.3 | 6 | ||||
-rw-r--r-- | doc/min.3 | 8 | ||||
-rw-r--r-- | doc/replace_str.3 | 3 | ||||
-rw-r--r-- | doc/rrmdir.3 | 5 | ||||
-rw-r--r-- | doc/strlwr.3 | 3 | ||||
-rw-r--r-- | doc/strupr.3 | 3 | ||||
-rw-r--r-- | doc/trim.3 | 3 | ||||
-rw-r--r-- | src/extlib.c | 1 | ||||
-rw-r--r-- | src/extstring.c | 2 | ||||
-rw-r--r-- | src/memset_s.c | 4 |
15 files changed, 69 insertions, 25 deletions
@@ -1,6 +1,26 @@ *.so *.o *.pc -*# +*#* *.~undo-tree~ -*~
\ No newline at end of file +*~ +*lo +*la +config.* +depcomp +install-sh +libtool +ltmain.sh +aclocal.m4 +ar-lib +autom4te.cache +compile +configure +m4/ +missing +Makefile +Makefile.in +src/.deps/ +src/.libs/ +stamp-h1 +tests/test
\ No newline at end of file @@ -48,7 +48,7 @@ and .BR min () return the passed value .I v -if it is in above/below the given maximum/minimum. Otherwise the maximum/minimum is returned. +if it is higher/lower than the given maximum/minimum value. Otherwise the maximum/minimum is returned. .BR cap () returns the given value .I v @@ -57,4 +57,8 @@ Otherwise the maximum is returned if the value is above the maximum .IR max_v , the minimum is returned if the value is below the minimum .IR min_v . +.fi +.SH AUTHORS +This manual page was written by Rose +.IR <axtlos@disroot.org> . .\" SRC END diff --git a/doc/fcopy.3 b/doc/fcopy.3 index 5096fe4..44cd869 100644 --- a/doc/fcopy.3 +++ b/doc/fcopy.3 @@ -56,13 +56,13 @@ main(void) FILE *file_buf_a = open_memstream (&buf_a, &len_a); FILE *file_buf_b = open_memstream (&buf_b, &len_b); \& - fprintf (file_test_a, "hello"); - fflush (file_test_a); - fclose (file_test_a); - file_test_a = fmemopen(buf_a, len_a, "r"); + fprintf (file_buf_a, "hello"); + fflush (file_buf_a); + fclose (file_buf_a); + file_buf_a = fmemopen(buf_a, len_a, "r"); \& - fcopy (file_test_a, file_test_b); - fclose (file_test_b); + fcopy (file_buf_a, file_buf_b); + fclose (file_buf_b); \& puts (buf_a); puts (buf_b); @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: BSD-3-Clause -.TH max 3 2024-09-23 "extlib" +.TH cap 3 2024-09-23 "extlib" .SH NAME cap, min, max \- limit a float between a min/max value .SH LIBRARY @@ -48,7 +48,7 @@ and .BR min () return the passed value .I v -if it is in above/below the given maximum/minimum. Otherwise the maximum/minimum is returned. +if it is higher/lower than the given maximum/minimum value. Otherwise the maximum/minimum is returned. .BR cap () returns the given value .I v @@ -57,4 +57,8 @@ Otherwise the maximum is returned if the value is above the maximum .IR max_v , the minimum is returned if the value is below the minimum .IR min_v . +.fi +.SH AUTHORS +This manual page was written by Rose +.IR <axtlos@disroot.org> . .\" SRC END diff --git a/doc/memset_s.3 b/doc/memset_s.3 index 57956d0..14d54ae 100644 --- a/doc/memset_s.3 +++ b/doc/memset_s.3 @@ -43,9 +43,9 @@ is greater than max. The .BR memset_s () returns zero on success, non-zero on error. -.I *src -to -.IR *dst . .SH STANDARDS .BR memset_s () conforms to ISO/IEC 9899:2011 ("ISO C11") K.3.7.4.1. +.SH AUTHORS +This manual page was written by Rose +.IR <axtlos@disroot.org> . diff --git a/doc/memvcmp.3 b/doc/memvcmp.3 index 952c0cf..ccb0138 100644 --- a/doc/memvcmp.3 +++ b/doc/memvcmp.3 @@ -23,10 +23,12 @@ function compares bytes of .I *str to the value -.I val -. +.IR val . .fi .SH RETURN VALUE .BR memvcmp () returns zero if the area matches, non-zero if it does not. +.SH AUTHORS +This manual page was written by Rose +.IR <axtlos@disroot.org> . .\" SRC END @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: BSD-3-Clause -.TH min 3 2024-09-23 "extlib" +.TH cap 3 2024-09-23 "extlib" .SH NAME cap, min, max \- limit a float between a min/max value .SH LIBRARY @@ -48,7 +48,7 @@ and .BR min () return the passed value .I v -if it is in above/below the given maximum/minimum. Otherwise the maximum/minimum is returned. +if it is higher/lower than the given maximum/minimum value. Otherwise the maximum/minimum is returned. .BR cap () returns the given value .I v @@ -57,4 +57,8 @@ Otherwise the maximum is returned if the value is above the maximum .IR max_v , the minimum is returned if the value is below the minimum .IR min_v . +.fi +.SH AUTHORS +This manual page was written by Rose +.IR <axtlos@disroot.org> . .\" SRC END diff --git a/doc/replace_str.3 b/doc/replace_str.3 index 230f6d1..5428136 100644 --- a/doc/replace_str.3 +++ b/doc/replace_str.3 @@ -31,4 +31,7 @@ with the string returns a copy of .I *s with all the substrings replaced. +.SH AUTHORS +This manual page was written by Rose +.IR <axtlos@disroot.org> . .\" SRC END diff --git a/doc/rrmdir.3 b/doc/rrmdir.3 index bb4be4e..670c730 100644 --- a/doc/rrmdir.3 +++ b/doc/rrmdir.3 @@ -24,10 +24,9 @@ loops over using .BR nftw () and removes every file and directory found in -.I *pathname -. +.IR *pathname . .fi .SH RETURN VALUE .BR rrmdir () -return zero on sucess, non-zero on error. +returns zero on sucess, non-zero on error. .\" SRC END diff --git a/doc/strlwr.3 b/doc/strlwr.3 index ca2e971..8ec9c52 100644 --- a/doc/strlwr.3 +++ b/doc/strlwr.3 @@ -38,4 +38,7 @@ will be consumed and cannot be used after the function completes. and .BR strupr () return the string in the appropriate case, the resulting string will have to be manually free'd. +.SH AUTHORS +This manual page was written by Rose +.IR <axtlos@disroot.org> . .\" SRC END diff --git a/doc/strupr.3 b/doc/strupr.3 index ca2e971..8ec9c52 100644 --- a/doc/strupr.3 +++ b/doc/strupr.3 @@ -38,4 +38,7 @@ will be consumed and cannot be used after the function completes. and .BR strupr () return the string in the appropriate case, the resulting string will have to be manually free'd. +.SH AUTHORS +This manual page was written by Rose +.IR <axtlos@disroot.org> . .\" SRC END @@ -37,4 +37,7 @@ it needs to be free'd manually. .SH RETURN VALUE .BR trim () returns the trimmed string. +.SH AUTHORS +This manual page was written by Rose +.IR <axtlos@disroot.org> . .\" SRC END diff --git a/src/extlib.c b/src/extlib.c index 108e3e5..d559b4d 100644 --- a/src/extlib.c +++ b/src/extlib.c @@ -30,7 +30,6 @@ #include <string.h> #undef free -#undef malloc void free_secure (void **__ptr, size_t ptrlen) diff --git a/src/extstring.c b/src/extstring.c index 044e368..2fea204 100644 --- a/src/extstring.c +++ b/src/extstring.c @@ -83,7 +83,7 @@ replace_str (char *s, char *old, char *replace) } } - result = (char *) malloc_secure (i + cnt * (new_size - old_size) + 1); + result = (char *) malloc (i + cnt * (new_size - old_size) + 1); i = 0; while (*s) diff --git a/src/memset_s.c b/src/memset_s.c index 74c0025..d2e96e4 100644 --- a/src/memset_s.c +++ b/src/memset_s.c @@ -13,8 +13,8 @@ memset_s (void *s, rsize_t smax, int c, rsize_t n) errno_t ret = EINVAL; rsize_t limit = n < smax ? n : smax; - if (!s) - throw_constraint_handler_s ("memset_s: s = NULL", ret); + if (s == NULL) + throw_constraint_handler_s ("memset_s: s == NULL", ret); else if (n > RSIZE_MAX) throw_constraint_handler_s ("memset_s: n > RSIZE_MAX", ret); else if (smax > RSIZE_MAX) |