Skip to content

Commit

Permalink
COMMON: Fix 'Print #' on Windows to use Windows line endings
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisws committed Jul 16, 2020
1 parent 2aa7814 commit 00bc338
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 10 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2020-07-16 (12.19)
COMMON: Fix 'Print #' on Windows to use Windows line endings

2020-07-12 (12.19)
ANDROID: fix layout issue with samsung mobiles
ANDROID: save and restore the selected theme
Expand Down
4 changes: 2 additions & 2 deletions src/common/blib.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ void cmd_print(int output) {
if (code_peek() == kwTYPE_EOC || code_peek() == kwTYPE_LINE) {
// There are no parameters
if (dev_fstatus(handle)) {
dev_fwrite(handle, (byte *) "\n", 1);
dev_fwrite(handle, (byte *)OS_LINESEPARATOR, sizeof(OS_LINESEPARATOR));
} else {
err_fopen();
}
Expand Down Expand Up @@ -642,7 +642,7 @@ void cmd_print(int output) {
};

if (last_op == 0) {
pv_write("\n", output, handle);
pv_write(output == PV_FILE ? OS_LINESEPARATOR : "\n", output, handle);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/common/blib_db.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ void cmd_fsaveln() {
for (int i = 0; i < v_asize(array_p); i++) {
var_p = v_elem(array_p, i);
fprint_var(handle, var_p);
dev_fwrite(handle, (byte *)"\n", 1);
dev_fwrite(handle, (byte *)OS_LINESEPARATOR, sizeof(OS_LINESEPARATOR));
}
} else {
// parameter is an string
Expand Down
2 changes: 2 additions & 0 deletions src/common/sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ extern "C" {

#if defined(_Win32)
#define SB_VERSYS "Win"
#define OS_LINESEPARATOR "\r\n"
#else
#define SB_VERSYS "Unix"
#define OS_LINESEPARATOR "\r\n"
#endif

#if UINTPTR_MAX == 0xffffffff
Expand Down
2 changes: 1 addition & 1 deletion src/lib/miniaudio
6 changes: 3 additions & 3 deletions src/platform/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ android {
defaultConfig {
applicationId 'net.sourceforge.smallbasic'
minSdkVersion 16
targetSdkVersion 29
versionCode 39
versionName "0.12.17"
targetSdkVersion 28
versionCode 40
versionName "12.19"
resConfigs "en"
}

Expand Down
2 changes: 1 addition & 1 deletion src/platform/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.android.tools.build:gradle:4.0.1'
classpath "com.github.ben-manes:gradle-versions-plugin:0.22.0"
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/platform/android/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

JNI_PATH := $(call my-dir)
SB_HOME := $(JNI_PATH)/../../../..
FREETYPE_HOME := $(HOME)/android-sdk/freetype-2.7.1
FREETYPE_HOME := $(HOME)/android-sdk/freetype-2.10.2

include $(call all-subdir-makefiles)
LOCAL_PATH := $(JNI_PATH)
Expand Down
1 change: 1 addition & 0 deletions src/platform/android/jni/freetype/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ LOCAL_SRC_FILES:= \
$(FREETYPE_HOME)/src/pcf/pcf.c \
$(FREETYPE_HOME)/src/psaux/psaux.c \
$(FREETYPE_HOME)/src/bdf/bdf.c \
$(FREETYPE_HOME)/src/base/ftdebug.c \
$(FREETYPE_HOME)/src/base/ftbbox.c \
$(FREETYPE_HOME)/src/base/ftbitmap.c \
$(FREETYPE_HOME)/src/base/ftglyph.c \
Expand Down

0 comments on commit 00bc338

Please sign in to comment.