diff options
| author | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:08:27 +0200 |
|---|---|---|
| committer | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:08:27 +0200 |
| commit | c9b6b9a5ca082fe7c1b6f58d7713f785a9eb6a5c (patch) | |
| tree | 3e4f42f93c7ae89a364e4d51fff6e5cec4e55fa9 /rushs/tinyprintf/my_memset | |
add: graphs et rushs
Diffstat (limited to 'rushs/tinyprintf/my_memset')
| -rw-r--r-- | rushs/tinyprintf/my_memset/my_memset.c | 12 | ||||
| -rw-r--r-- | rushs/tinyprintf/my_memset/my_memset.h | 6 |
2 files changed, 18 insertions, 0 deletions
diff --git a/rushs/tinyprintf/my_memset/my_memset.c b/rushs/tinyprintf/my_memset/my_memset.c new file mode 100644 index 0000000..243a5ac --- /dev/null +++ b/rushs/tinyprintf/my_memset/my_memset.c @@ -0,0 +1,12 @@ +#include "my_memset.h" + +void *my_memset(void *s, int c, size_t n) +{ + unsigned char *t = s; + for (size_t i = 0; i < n; i++) + { + t[i] = c; + } + + return t; +} diff --git a/rushs/tinyprintf/my_memset/my_memset.h b/rushs/tinyprintf/my_memset/my_memset.h new file mode 100644 index 0000000..e5ed0f0 --- /dev/null +++ b/rushs/tinyprintf/my_memset/my_memset.h @@ -0,0 +1,6 @@ +#ifndef MY_MEMSET_H +#define MY_MEMSET_H + +#include <stddef.h> + +#endif /* ! MY_MEMSET_H */ |
