links

lynx-like text mode web browser
git clone anongit@rnpnr.xyz:links.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 17aa5b0d1173873b8d6236fa318b0f524ed6f1be
Parent: fd46338c3de84a0aba110038e38edc5eee6b3e78
Author: opask
Date:   Wed,  8 Aug 2018 22:14:18 -0600

remove my_strtoll*

Diffstat:
Mhttp.c | 2+-
Mlinks.h | 2--
Mstring.c | 9---------
3 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/http.c b/http.c @@ -1121,7 +1121,7 @@ again: if (strlen((char *)d) > 6) { d[5] = 0; if (!(casestrcmp(d, cast_uchar "bytes")) && d[6] >= '0' && d[6] <= '9') { - my_strtoll_t f = my_strtoll(d + 6, NULL); + long f = strtol(d + 6, NULL, 10); if (f >= 0 && (off_t)f >= 0 && (off_t)f == f) c->from = f; } diff --git a/links.h b/links.h @@ -296,8 +296,6 @@ void add_unsigned_long_num_to_str(unsigned char **s, int *l, long n); void add_num_to_str(unsigned char **s, int *l, off_t n); void add_knum_to_str(unsigned char **s, int *l, off_t n); long strtolx(unsigned char *c, unsigned char **end); -#define my_strtoll_t longlong -my_strtoll_t my_strtoll(unsigned char *string, unsigned char **end); void safe_strncpy(unsigned char *dst, const unsigned char *src, size_t dst_size); /* case insensitive compare of 2 strings */ diff --git a/string.c b/string.c @@ -149,15 +149,6 @@ long strtolx(unsigned char *c, unsigned char **end) return l; } -my_strtoll_t my_strtoll(unsigned char *string, unsigned char **end) -{ - my_strtoll_t f; - errno = 0; - f = strtoll(cast_const_char string, (char **)(void *)end, 10); - if (f < 0 || errno) return -1; - return f; -} - /* Copies at most dst_size chars into dst. Ensures null termination of dst. */ void safe_strncpy(unsigned char *dst, const unsigned char *src, size_t dst_size) {