diff options
| author | Jakob Kaivo <jkk@ung.org> | 2019-02-27 19:17:39 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2019-02-27 19:17:39 -0500 |
| commit | e1477898d0203dae4b2fe9ad62998bc27d4b4fc9 (patch) | |
| tree | bda9ccc11307e41de7c5a4e6e4e92088fe4b1804 /src/wchar | |
| parent | fcb83049b1942fafa784fc51869818651c04acbb (diff) | |
add common _strtoi function body
Diffstat (limited to 'src/wchar')
| -rw-r--r-- | src/wchar/wcstol.c | 11 | ||||
| -rw-r--r-- | src/wchar/wcstoll.c | 9 | ||||
| -rw-r--r-- | src/wchar/wcstoul.c | 11 | ||||
| -rw-r--r-- | src/wchar/wcstoull.c | 9 |
4 files changed, 36 insertions, 4 deletions
diff --git a/src/wchar/wcstol.c b/src/wchar/wcstol.c index 5d4a605d..d349ee9c 100644 --- a/src/wchar/wcstol.c +++ b/src/wchar/wcstol.c @@ -1,9 +1,16 @@ #include <wchar.h> +#include "limits.h" +#include "errno.h" long int wcstol(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base) { - (void)nptr; (void)endptr; (void)base; - return 0L; + long int ret = 0; + long int max = LONG_MAX; + long int min = LONG_MIN; + + #include "../stdlib/_strtoi.h" + + return ret; } /* diff --git a/src/wchar/wcstoll.c b/src/wchar/wcstoll.c index fc231433..60c4a475 100644 --- a/src/wchar/wcstoll.c +++ b/src/wchar/wcstoll.c @@ -1,7 +1,16 @@ #include <wchar.h> +#include "limits.h" +#include "errno.h" long long int wcstoll(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base) { + long long int ret = 0; + long long int max = LLONG_MAX; + long long int min = LLONG_MIN; + + #include "../stdlib/_strtoi.h" + + return ret; } /* diff --git a/src/wchar/wcstoul.c b/src/wchar/wcstoul.c index 8fcaeb8e..f8373c05 100644 --- a/src/wchar/wcstoul.c +++ b/src/wchar/wcstoul.c @@ -1,9 +1,16 @@ #include <wchar.h> +#include "limits.h" +#include "errno.h" unsigned long int wcstoul(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base) { - (void)nptr; (void)endptr; (void)base; - return 0UL; + unsigned long int ret = 0; + unsigned long int max = ULONG_MAX; + unsigned long int min = 0; + + #include "../stdlib/_strtoi.h" + + return ret; } /* diff --git a/src/wchar/wcstoull.c b/src/wchar/wcstoull.c index 92e12e59..632ff2e9 100644 --- a/src/wchar/wcstoull.c +++ b/src/wchar/wcstoull.c @@ -1,7 +1,16 @@ #include <wchar.h> +#include "limits.h" +#include "errno.h" unsigned long long int wcstoull(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base) { + unsigned long long int ret = 0; + unsigned long long int max = ULLONG_MAX; + unsigned long long int min = 0; + + #include "../stdlib/_strtoi.h" + + return ret; } /* |
