Merge in upstream changes to my-basic

We can't use their new mb_gets() because they call exit(3) in the
event of a read error, which isn't what we want.
This commit is contained in:
Travis Cross committed 2014-04-05 06:48:02 +00:00
commit c26343d0c9
2 files changed
+40 -8

No files matched your search

+6 -1
View File
@@ -3,7 +3,7 @@
**
** For the latest info, see http://code.google.com/p/my-basic/
**
** Copyright (c) 2011 - 2013 Tony & Tony's Toy Game Development Team
** Copyright (c) 2011 - 2014 paladin_t
**
** Permission is hereby granted, free of charge, to any person obtaining a copy of
** this software and associated documentation files (the "Software"), to deal in
@@ -141,12 +141,15 @@ typedef enum mb_error_e {
SE_RN_INTEGER_EXPECTED,
SE_RN_ELSE_EXPECTED,
SE_RN_TO_EXPECTED,
SE_RN_NEXT_EXPECTED,
SE_RN_UNTIL_EXPECTED,
SE_RN_LOOP_VAR_EXPECTED,
SE_RN_JUMP_LABEL_EXPECTED,
SE_RN_VARIABLE_EXPECTED,
SE_RN_INVALID_ID_USAGE,
SE_RN_CALCULATION_ERROR,
SE_RN_DIVIDE_BY_ZERO,
SE_RN_MOD_BY_ZERO,
SE_RN_INVALID_EXPRESSION,
SE_RN_OUT_OF_MEMORY,
/** Extended abort */
@@ -226,6 +229,8 @@ MBAPI const char* mb_get_error_desc(mb_error_e err);
MBAPI int mb_set_error_handler(mb_interpreter_t* s, mb_error_handler_t h);
MBAPI int mb_set_printer(mb_interpreter_t* s, mb_print_func_t p);
MBAPI int mb_gets(char* buf, int s);
MBAPI void mb_set_user_data(mb_interpreter_t* s, void *ptr);
MBAPI void *mb_get_user_data(mb_interpreter_t* s);