diff --git a/HISTORY b/HISTORY index 3e9a898..c83d00a 100755 --- a/HISTORY +++ b/HISTORY @@ -1,5 +1,6 @@ Dec. 28 2015 Improved threshold algorithm for the memory pool +Polished code Dec. 25 2015 Added support to put a class instance into a variable diff --git a/LICENSE b/LICENSE index 232f990..eb2e6c8 100755 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License -Copyright (C) 2011 - 2015 Wang Renxin +Copyright (C) 2011 - 2016 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 697c980..47ccd5d 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -**Copyright (C) 2011 - 2015 [Wang Renxin](https://cn.linkedin.com/pub/wang-renxin/43/494/20). All rights reserved.** +**Copyright (C) 2011 - 2016 [Wang Renxin](https://cn.linkedin.com/pub/wang-renxin/43/494/20). All rights reserved.** Why are existing script interpreters so complex? Why is it so difficult to integrate with them? Why not try MY-BASIC today! Script should be simple and enjoyable. diff --git a/core/my_basic.c b/core/my_basic.c index ae324c7..d8c4004 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 - 2015 Wang Renxin +** Copyright (C) 2011 - 2016 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 @@ -84,7 +84,7 @@ extern "C" { /** Macros */ #define _VER_MAJOR 1 #define _VER_MINOR 1 -#define _VER_REVISION 110 +#define _VER_REVISION 111 #define _VER_SUFFIX #define _MB_VERSION ((_VER_MAJOR * 0x01000000) + (_VER_MINOR * 0x00010000) + (_VER_REVISION)) #define _STRINGIZE(A) _MAKE_STRINGIZE(A) @@ -6983,7 +6983,7 @@ void _tidy_intermediate_value(_ref_t* ref, void* data) { mb_make_nil(ref->s->running_context->intermediate_value); break; - default: + default: /* Do nothing */ break; } } @@ -7091,7 +7091,7 @@ _retry: result = _core_call(s, (void**)(&ast)); break; - default: + default: /* Do nothing */ break; } @@ -7640,7 +7640,7 @@ int mb_init(void) { _exp_assign->data.func = (_func_t*)mb_malloc(sizeof(_func_t)); memset(_exp_assign->data.func, 0, sizeof(_func_t)); _exp_assign->data.func->name = (char*)mb_malloc(strlen("#") + 1); - memcpy(_exp_assign->data.func->name, "#\0", strlen("#") + 1); + memcpy(_exp_assign->data.func->name, "#", strlen("#") + 1); _exp_assign->data.func->pointer = _core_dummy_assign; mb_assert(!_OBJ_BOOL_TRUE); @@ -10826,7 +10826,7 @@ _retry: ast = ast->prev; break; - default: + default: /* Do nothing */ break; } diff --git a/core/my_basic.h b/core/my_basic.h index 1079e04..4a2618f 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 - 2015 Wang Renxin +** Copyright (C) 2011 - 2016 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/output/my_basic.exe b/output/my_basic.exe index 74b2dd0..6b17015 100755 Binary files a/output/my_basic.exe and b/output/my_basic.exe differ diff --git a/resource/my_basic.rc b/resource/my_basic.rc index b2a9a73..fd850e1 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, 1, 0, 0" VALUE "InternalName", "my_basic" - VALUE "LegalCopyright", "Copyright (C) 2011 - 2015 Wang Renxin" + VALUE "LegalCopyright", "Copyright (C) 2011 - 2016 Wang Renxin" VALUE "LegalTrademarks", "MY-BASIC" VALUE "OriginalFilename", "my_basic.exe" VALUE "ProductName", "MY-BASIC" diff --git a/sample/sample01.bas b/sample/sample01.bas index d135c23..5d29428 100755 --- a/sample/sample01.bas +++ b/sample/sample01.bas @@ -1,5 +1,5 @@ ' This script is an example of MY-BASIC -' Copyright (c) 2011 - 2015 Wang Renxin. All rights reserved. +' Copyright (c) 2011 - 2016 Wang Renxin. All rights reserved. ' For more information, see https://github.com/paladin-t/my_basic/ s$ = "hello " diff --git a/sample/sample02.bas b/sample/sample02.bas index 7c4e638..f4723f5 100755 --- a/sample/sample02.bas +++ b/sample/sample02.bas @@ -1,5 +1,5 @@ ' This script is an example of MY-BASIC -' Copyright (c) 2011 - 2015 Wang Renxin. All rights reserved. +' Copyright (c) 2011 - 2016 Wang Renxin. All rights reserved. ' For more information, see https://github.com/paladin-t/my_basic/ e = 50 diff --git a/sample/sample03.bas b/sample/sample03.bas index 781808e..c91d797 100755 --- a/sample/sample03.bas +++ b/sample/sample03.bas @@ -1,5 +1,5 @@ ' This script is an example of MY-BASIC -' Copyright (c) 2011 - 2015 Wang Renxin. All rights reserved. +' Copyright (c) 2011 - 2016 Wang Renxin. All rights reserved. ' For more information, see https://github.com/paladin-t/my_basic/ print "Input: " diff --git a/sample/sample04.bas b/sample/sample04.bas index c62ec06..2c2a068 100755 --- a/sample/sample04.bas +++ b/sample/sample04.bas @@ -1,5 +1,5 @@ ' This script is an example of MY-BASIC -' Copyright (c) 2011 - 2015 Wang Renxin. All rights reserved. +' Copyright (c) 2011 - 2016 Wang Renxin. All rights reserved. ' For more information, see https://github.com/paladin-t/my_basic/ begin: diff --git a/sample/sample05.bas b/sample/sample05.bas index 96bd5d9..bf35a74 100755 --- a/sample/sample05.bas +++ b/sample/sample05.bas @@ -1,5 +1,5 @@ ' This script is an example of MY-BASIC -' Copyright (c) 2011 - 2015 Wang Renxin. All rights reserved. +' Copyright (c) 2011 - 2016 Wang Renxin. All rights reserved. ' For more information, see https://github.com/paladin-t/my_basic/ def area(a, b) diff --git a/shell/main.c b/shell/main.c index ec88029..f3de612 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 - 2015 Wang Renxin +** Copyright (C) 2011 - 2016 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 @@ -657,7 +657,7 @@ static void _kill_program(const char* path) { static void _show_tip(void) { _printf("MY-BASIC Interpreter Shell - %s\n", mb_ver_string()); - _printf("Copyright (C) 2011 - 2015 Wang Renxin. All Rights Reserved.\n"); + _printf("Copyright (C) 2011 - 2016 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"); }