summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/strtoll.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-09-06 13:40:51 +1000
committerDamien George <damien.p.george@gmail.com>2017-09-06 13:40:51 +1000
commit01dd7804b87d60b2deab16712eccb3b97351a9b7 (patch)
tree1aa21f38a872b8e62a3d4e4f74f68033c6f827e4 /esp8266/strtoll.c
parenta9862b30068fc9df1022f08019fb35aaa5085f64 (diff)
downloadmicropython-01dd7804b87d60b2deab16712eccb3b97351a9b7.tar.gz
micropython-01dd7804b87d60b2deab16712eccb3b97351a9b7.zip
ports: Make new ports/ sub-directory and move all ports there.
This is to keep the top-level directory clean, to make it clear what is core and what is a port, and to allow the repository to grow with new ports in a sustainable way.
Diffstat (limited to 'esp8266/strtoll.c')
-rw-r--r--esp8266/strtoll.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/esp8266/strtoll.c b/esp8266/strtoll.c
deleted file mode 100644
index 4e8a4d0566..0000000000
--- a/esp8266/strtoll.c
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <stdlib.h>
-
-// assumes endptr != NULL
-// doesn't check for sign
-// doesn't check for base-prefix
-long long int strtoll(const char *nptr, char **endptr, int base) {
- long long val = 0;
-
- for (; *nptr; nptr++) {
- int v = *nptr;
- if ('0' <= v && v <= '9') {
- v -= '0';
- } else if ('A' <= v && v <= 'Z') {
- v -= 'A' - 10;
- } else if ('a' <= v && v <= 'z') {
- v -= 'a' - 10;
- } else {
- break;
- }
- if (v >= base) {
- break;
- }
- val = val * base + v;
- }
-
- *endptr = (char*)nptr;
-
- return val;
-}