Skip to content

Commit 2ddcb5b

Browse files
authored
Merge pull request #89 from chrisws/0_12_18
0 12 18
2 parents a6db1a0 + abec24a commit 2ddcb5b

File tree

22 files changed

+180
-61
lines changed

22 files changed

+180
-61
lines changed

ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2020-02-13 (0.12.18)
2+
Fix path for HOME constant
3+
4+
2020-02-08 (0.12.18)
5+
SDL: fix issue #81 - numlock handling
6+
FLTK: added live editing menu item
7+
COMMON: increase stack size to 1024
8+
19
2019-12-21 (0.12.17)
210
SDL: fix issue #81 - numlock handling
311

Makefile.am

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,6 @@ release:
6464
ndk-stack:
6565
adb logcat | ${NDK}/ndk-stack -sym src/platform/android/obj/local/armeabi
6666

67+
appImage:
68+
~/apps/linuxdeploy-x86_64.AppImage --appdir=AppDir --executable=./src/platform/fltk/sbasici && \
69+
~/apps/appimagetool-x86_64.AppImage AppDir

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
dnl
22
dnl Configure script for SmallBASIC
33
dnl
4-
dnl Copyright(C) 2001-2019 Chris Warren-Smith.
4+
dnl Copyright(C) 2001-2020 Chris Warren-Smith.
55
dnl
66
dnl This program is distributed under the terms of the GPL v2.0
77
dnl Download the GNU Public License (GPL) from www.gnu.org
88
dnl
99

10-
AC_INIT([smallbasic], [0.12.17])
10+
AC_INIT([smallbasic], [0.12.18])
1111
AC_CONFIG_SRCDIR([configure.ac])
1212

1313
AC_CANONICAL_TARGET

debian/changelog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
smallbasic (0.12.18) unstable; urgency=low
2+
* Various see web site
3+
4+
-- Chris Warren-Smith <[email protected]> Wed, 05 Feb 2020 09:45:25 +1000
5+
16
smallbasic (0.12.17) unstable; urgency=low
27
* Various see web site
38

src/common/brun.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,14 @@ void exec_setup_predefined_variables() {
272272
if (getenv("HOME_DIR")) {
273273
strlcpy(homedir, getenv("HOME_DIR"), sizeof(homedir));
274274
}
275-
#else
276-
#if defined(_Win32)
275+
#elif defined(_Win32)
277276
if (getenv("HOMEPATH")) {
278-
strlcpy(homedir, getenv("HOMEPATH"), sizeof(homedir));
277+
if (getenv("HOMEDRIVE")) {
278+
strlcpy(homedir, getenv("HOMEDRIVE"), sizeof(homedir));
279+
strlcat(homedir, getenv("HOMEPATH"), sizeof(homedir));
280+
} else {
281+
strlcpy(homedir, getenv("HOMEPATH"), sizeof(homedir));
282+
}
279283
} else {
280284
GetModuleFileName(NULL, homedir, sizeof(homedir) - 1);
281285
char *p = strrchr(homedir, '\\');
@@ -295,12 +299,11 @@ void exec_setup_predefined_variables() {
295299
strcpy(homedir, "/tmp/");
296300
}
297301
#endif
302+
// don't end with trailing slash
298303
int l = strlen(homedir);
299-
if (homedir[l - 1] != OS_DIRSEP) {
300-
homedir[l] = OS_DIRSEP;
301-
homedir[l + 1] = '\0';
304+
if (homedir[l - 1] == OS_DIRSEP) {
305+
homedir[l - 1] = '\0';
302306
}
303-
#endif
304307
setsysvar_str(SYSVAR_HOME, homedir);
305308
}
306309

src/common/proc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ int sys_search_path(const char *path, const char *file, char *retbuf) {
6767
if (getenv("HOME")) {
6868
strlcpy(cur_path, getenv("HOME"), sizeof(cur_path));
6969
} else {
70-
strlcpy(cur_path, getenv("HOMEPATH"), sizeof(cur_path));
70+
strlcpy(cur_path, getenv("HOMEDRIVE"), sizeof(cur_path));
71+
strlcat(cur_path, getenv("HOMEPATH"), sizeof(cur_path));
7172
}
7273
strlcat(cur_path, "/", sizeof(cur_path));
7374
strlcat(cur_path, old_path, sizeof(cur_path));

src/common/sys.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ extern "C" {
7878
#define SB_KEYWORD_SIZE 128
7979
#define SB_SOURCELINE_SIZE 65536 // compiler
8080
#define SB_TEXTLINE_SIZE 8192 // RTL
81-
#define SB_EXEC_STACK_SIZE 512 // executor's stack size
81+
#define SB_EXEC_STACK_SIZE 1024 // executor's stack size
8282
#define SB_EVAL_STACK_SIZE 16 // evaluation stack size
8383
#define SB_KW_NONE_STR "Nil"
8484

src/languages/messages.en.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
#define ERR_MISSING_LP "Missing '('"
174174
#define ERR_PARFMT "Parameters count/format error (%s)"
175175
#define ERR_BYREF "Parameter %d cannot BYREF"
176-
#define ERR_BAD_FILE_HANDLE "VFS: Bad file number (Use OPEN)"
176+
#define ERR_BAD_FILE_HANDLE "Invalid file number (Use OPEN)"
177177
#define ERR_SEP_FMT "No separator found (missing %s)"
178178
#define ERR_POLY "Parsing polyline: type mismatch (element: %d, info: %d)"
179179
#define ERR_CRITICAL_MISSING_FUNC "Unsupported built-in function call %ld, please report this bug"

src/lib/jsmn

Submodule jsmn updated 1 file

0 commit comments

Comments
 (0)