summaryrefslogtreecommitdiffstatshomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libm/sf_ldexp.c2
-rw-r--r--lib/timeutils/timeutils.c2
-rw-r--r--lib/utils/interrupt_char.c12
-rw-r--r--lib/utils/stdout_helpers.c2
4 files changed, 7 insertions, 11 deletions
diff --git a/lib/libm/sf_ldexp.c b/lib/libm/sf_ldexp.c
index 32a134eea1..a0941df9fd 100644
--- a/lib/libm/sf_ldexp.c
+++ b/lib/libm/sf_ldexp.c
@@ -32,7 +32,7 @@
float value; int exp;
#endif
{
- if(!finitef(value)||value==(float)0.0) return value;
+ if(!isfinite(value)||value==(float)0.0) return value;
value = scalbnf(value,exp);
//if(!finitef(value)||value==(float)0.0) errno = ERANGE;
return value;
diff --git a/lib/timeutils/timeutils.c b/lib/timeutils/timeutils.c
index 0af39a2958..06915f25ae 100644
--- a/lib/timeutils/timeutils.c
+++ b/lib/timeutils/timeutils.c
@@ -165,7 +165,7 @@ mp_uint_t timeutils_mktime(mp_uint_t year, mp_int_t month, mp_int_t mday,
//
// tm_tomorrow = list(time.localtime())
// tm_tomorrow[2] += 1 # Adds 1 to mday
- // tomorrow = time.mktime(tm_tommorrow)
+ // tomorrow = time.mktime(tm_tomorrow)
//
// And not have to worry about all the weird overflows.
//
diff --git a/lib/utils/interrupt_char.c b/lib/utils/interrupt_char.c
index 344db88c72..fca0f95b5b 100644
--- a/lib/utils/interrupt_char.c
+++ b/lib/utils/interrupt_char.c
@@ -27,28 +27,24 @@
#include "py/obj.h"
#include "py/mpstate.h"
+#if MICROPY_KBD_EXCEPTION
+
int mp_interrupt_char;
void mp_hal_set_interrupt_char(int c) {
if (c != -1) {
- #if MICROPY_KBD_EXCEPTION
mp_obj_exception_clear_traceback(MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception)));
- #else
- mp_obj_exception_clear_traceback(MP_STATE_PORT(mp_kbd_exception));
- #endif
}
mp_interrupt_char = c;
}
void mp_keyboard_interrupt(void) {
- #if MICROPY_KBD_EXCEPTION
MP_STATE_VM(mp_pending_exception) = MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception));
- #else
- MP_STATE_VM(mp_pending_exception) = MP_STATE_PORT(mp_kbd_exception);
- #endif
#if MICROPY_ENABLE_SCHEDULER
if (MP_STATE_VM(sched_state) == MP_SCHED_IDLE) {
MP_STATE_VM(sched_state) = MP_SCHED_PENDING;
}
#endif
}
+
+#endif
diff --git a/lib/utils/stdout_helpers.c b/lib/utils/stdout_helpers.c
index 5f7a17d320..3de1197571 100644
--- a/lib/utils/stdout_helpers.c
+++ b/lib/utils/stdout_helpers.c
@@ -9,7 +9,7 @@
* implementation below can be used.
*/
-// Send "cooked" string of given length, where every occurance of
+// Send "cooked" string of given length, where every occurrence of
// LF character is replaced with CR LF.
void mp_hal_stdout_tx_strn_cooked(const char *str, size_t len) {
while (len--) {