diff --git a/HISTORY b/HISTORY index 32aeb97..647614b 100755 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,6 @@ +Dec. 31 2018 +Fixed a wrong scope processing bug when resetting interpreter + Nov. 10 2018 Fixed a mod by zero bug with real number diff --git a/LICENSE b/LICENSE index 5030656..0e307bb 100755 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License -Copyright (C) 2011 - 2018 Wang Renxin +Copyright (C) 2011 - 2019 Wang Renxin 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 diff --git a/README.md b/README.md index 7244cfc..d869066 100755 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ |_|_|_| |_| |_____|__|__|_____|_____|_____| ~~~~~~~~~~ -**Copyright (C) 2011 - 2018 Wang Renxin** +**Copyright (C) 2011 - 2019 Wang Renxin** [![Build status](https://travis-ci.org/paladin-t/my_basic.svg?branch=master)](https://travis-ci.org/paladin-t/my_basic) [![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT) diff --git a/core/my_basic.c b/core/my_basic.c index 760f15e..92be6f4 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -3,7 +3,7 @@ ** ** For the latest info, see https://github.com/paladin-t/my_basic/ ** -** Copyright (C) 2011 - 2018 Wang Renxin +** Copyright (C) 2011 - 2019 Wang Renxin ** ** 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 @@ -12231,6 +12231,8 @@ int mb_reset(struct mb_interpreter_t** s, bool_t clrf) { if(!s || !(*s)) return MB_FUNC_ERR; + (*s)->valid = false; + (*s)->run_count = 0; (*s)->has_run = false; (*s)->jump_set = _JMP_NIL; @@ -12291,6 +12293,8 @@ int mb_reset(struct mb_interpreter_t** s, bool_t clrf) { result = _open_constant(*s); mb_assert(MB_FUNC_OK == result); + (*s)->valid = true; + return result; } diff --git a/core/my_basic.h b/core/my_basic.h index fe5cf6a..9c32cf3 100755 --- a/core/my_basic.h +++ b/core/my_basic.h @@ -3,7 +3,7 @@ ** ** For the latest info, see https://github.com/paladin-t/my_basic/ ** -** Copyright (C) 2011 - 2018 Wang Renxin +** Copyright (C) 2011 - 2019 Wang Renxin ** ** 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 diff --git a/donate.html b/donate.html index b581556..41a0c5f 100644 --- a/donate.html +++ b/donate.html @@ -1,6 +1,6 @@ @@ -10,19 +10,21 @@ LIST OF DONORS. Donate to MY-BASIC @@ -113,6 +115,6 @@ LIST OF DONORS. BACK TO MY-BASIC

-

Copyright (C) 2011 - 2018 Wang Renxin. All rights reserved.

+

Copyright (C) 2011 - 2019 Wang Renxin. All rights reserved.

diff --git a/my_basic_mac.xcodeproj/project.pbxproj b/my_basic_mac.xcodeproj/project.pbxproj index f63f655..e6f05d7 100644 --- a/my_basic_mac.xcodeproj/project.pbxproj +++ b/my_basic_mac.xcodeproj/project.pbxproj @@ -101,7 +101,7 @@ 03F4D7221A1D0081009F920C /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0800; + LastUpgradeCheck = 1000; ORGANIZATIONNAME = "Wang Renxin"; TargetAttributes = { 03F4D7291A1D0081009F920C = { @@ -147,14 +147,22 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -191,14 +199,22 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; diff --git a/output/my_basic.exe b/output/my_basic.exe index ddbab12..fa850af 100755 Binary files a/output/my_basic.exe and b/output/my_basic.exe differ diff --git a/output/my_basic_mac b/output/my_basic_mac index d916c17..6ab50a9 100755 Binary files a/output/my_basic_mac and b/output/my_basic_mac differ diff --git a/resource/my_basic.rc b/resource/my_basic.rc index ea7998e..af64238 100755 --- a/resource/my_basic.rc +++ b/resource/my_basic.rc @@ -57,7 +57,7 @@ VALUE "FileDescription", "MY-BASIC Interpreter for Windows" VALUE "FileVersion", "1, 2, 0, 0" VALUE "InternalName", "my_basic" - VALUE "LegalCopyright", "Copyright (C) 2011 - 2018 Wang Renxin" + VALUE "LegalCopyright", "Copyright (C) 2011 - 2019 Wang Renxin" VALUE "LegalTrademarks", "MY-BASIC" VALUE "OriginalFilename", "my_basic.exe" VALUE "ProductName", "MY-BASIC" diff --git a/shell/main.c b/shell/main.c index 3788e64..25ed031 100755 --- a/shell/main.c +++ b/shell/main.c @@ -3,7 +3,7 @@ ** ** For the latest info, see https://github.com/paladin-t/my_basic/ ** -** Copyright (C) 2011 - 2018 Wang Renxin +** Copyright (C) 2011 - 2019 Wang Renxin ** ** 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 @@ -979,7 +979,7 @@ static void _list_directory(const char* path) { static void _show_tip(void) { _printf("MY-BASIC Interpreter Shell - %s\n", mb_ver_string()); - _printf("Copyright (C) 2011 - 2018 Wang Renxin. All Rights Reserved.\n"); + _printf("Copyright (C) 2011 - 2019 Wang Renxin. All Rights Reserved.\n"); _printf("For more information, see https://github.com/paladin-t/my_basic/.\n"); _printf("Input HELP and hint enter to view help information.\n"); }