Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2014-08-09
Renamed command "#UNIT-PATH:" to "UNITPATH"
Renamed command "#INC:" to "INCLUDE"
Fixed/implemented INCLUDE command
Refactored comp_pass_1 function is scan.c breaking into
smaller helper functions

2014-07-07
Update SDL to use SDL2 and common widget

Expand Down
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ deb:
fakeroot dpkg-buildpackage

test:
(cd $(SUBDIRS) && make test)
(cd @TEST_DIR@ && make test)

release:
(cd $(SUBDIRS) && make release)
Expand Down
15 changes: 10 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dnl This program is distributed under the terms of the GPL v2.0
dnl Download the GNU Public License (GPL) from www.gnu.org
dnl

AC_INIT([smallbasic], [0.11.11])
AC_INIT([smallbasic], [0.11.12])
AC_CONFIG_SRCDIR([configure.ac])

AC_CANONICAL_TARGET
Expand Down Expand Up @@ -88,12 +88,12 @@ function checkDebugMode() {
AC_MSG_RESULT([$with_debug])
if test "$with_debug" = "yes" || test "$with_debug" = "full"
then
CFLAGS="-g -O0"
CXXFLAGS="-g -O0"
CFLAGS="${CFLAGS} -g -O0"
CXXFLAGS="${CXXFLAGS} -g -O0"
AC_DEFINE(_DEBUG, 1, [debugging build enabled])
else
CFLAGS="-O3 -Os"
CXXFLAGS="-O3 -Os"
CFLAGS="${CFLAGS} -O3 -Os"
CXXFLAGS="${CXXFLAGS} -O3 -Os"
fi
AC_SUBST(CFLAGS)
}
Expand Down Expand Up @@ -522,6 +522,9 @@ function buildAndroid() {

BUILD_SUBDIRS="src/platform/android"
AC_SUBST(BUILD_SUBDIRS)

TEST_DIR="src/platform/android"
AC_SUBST(TEST_DIR)
}

function buildConsole() {
Expand Down Expand Up @@ -582,6 +585,8 @@ function buildConsole() {
AC_CHECK_HEADER(readline/readline.h, [], [AC_MSG_ERROR("install libreadline-dev")])
PACKAGE_LIBS="${PACKAGE_LIBS} -lm -ldl -lpthread -lncurses -lreadline"
BUILD_SUBDIRS="src/common src/platform/unix"
TEST_DIR="src/platform/unix"
AC_SUBST(TEST_DIR)
fi

AC_SUBST(BUILD_SUBDIRS)
Expand Down
4 changes: 2 additions & 2 deletions ide/android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.sourceforge.smallbasic"
android:installLocation="preferExternal"
android:versionCode="13"
android:versionName="0.11.11">
android:versionCode="14"
android:versionName="0.11.12">
<!-- This is the platform API where NativeActivity was introduced. -->
<uses-sdk android:minSdkVersion="9"/>

Expand Down
2 changes: 1 addition & 1 deletion ide/android/assets/main.bas
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ sub about()
print "(_ ._ _ _.|||_) /\ (_ |/ "
print "__)| | |(_||||_)/--\__)|\_"
print
print "Version 0.11.11"
print "Version 0.11.12"
print
print "Copyright (c) 2002-2014 Chris Warren-Smith"
print "Copyright (c) 2000-2006 Nic Christopoulos" + chr(10)
Expand Down
2 changes: 1 addition & 1 deletion ide/android/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-15
4 changes: 1 addition & 3 deletions samples/distro-examples/tests/metaa.bas
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/sbasic
#inc:"metac.bas"

INCLUDE "metac.bas"
? "Module: Meta-A"

1 change: 0 additions & 1 deletion samples/distro-examples/tests/metac.bas
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

? "Module: Meta-B"


1 change: 1 addition & 0 deletions samples/distro-examples/tests/output/array.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TEST: Arrays, unound, lbound
5 changes: 5 additions & 0 deletions samples/distro-examples/tests/output/break.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
TEST REPEAT
TEST WHILE
TEST FOR
TEST SUB
DONE
24 changes: 24 additions & 0 deletions samples/distro-examples/tests/output/byref.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
* simple
psa:1
1
psb:1
-1

* array
psa:[1,2,3]
[1,2,3]
psb:[1,2,3]
[-1,2,3]

* nested array #1
psa:[[2,3,4],2,3]
[[2,3,4],2,3]
psb:[[2,3,4],2,3]
[[-1,3,4],2,3]

* nested array #2
psa:[2,3,4]
[2,3,4]
psb:[2,3,4]
[-1,3,4]
3
20 changes: 20 additions & 0 deletions samples/distro-examples/tests/output/call_tau.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
TauChild::initialized

Tau::initilized

Tau's exported variable: Tau's exported variable
Function fooF : Tau's fooF(Hi) is here
Procedure fooP :
Tau's fooP(Hi) is here
message from main
message from tau
[1,2,3,4]
Predefined Variables
OS VER =0x0
OS NAME=Unix/Linux version 3.13.0-32-generic (buildd@kissel) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014
SB VER =0x0
PI =3.14159265358979
XMAX =161
YMAX =42
CWD =/home/chrisws/src/SmallBASIC/src/platform/unix/
HOME =/home/chrisws/
43 changes: 43 additions & 0 deletions samples/distro-examples/tests/output/eval-test.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Generic
0.6: ERROR (acceptable?) <> 0.6

Auto type convertion
n=i+n = 2.2 = 2.2
n=n+i = 2.2 = 2.2
n=n+n = 2.2 = 2.2
i=i+i = 2 = 2
n=i+s = 2.2 = 2.2
n=i+s = -.1 = -0.1
n=n+s = 2.2 = 2.2
n=s+i = 2 = 2
n=s+n = 2.2 = 2.2
s=i+s = 1a = 1a
s=n+s = 1.1a = 1.1a
s=s+i = a1 = a1
s=s+n = a1.1 = a1.1
s=s+s = 11 = 11

Compare
s=s = 1 = 1
s=i = 1 = 1
s=n = 1 = 1
i=s = 1 = 1
n=s = 1 = 1
n=n = 1 = 1
n=i = 1 = 1
i=n = 1 = 1
i=i = 1 = 1
i>i = 1 = 1
i>=i = 1 = 1
i<=i = 1 = 1
i<>i = 1 = 1

Array

Nested arrays
true
true

Testing base-convertion...
Scientific notation = 2E+.3 = 3.99052462993776 --- 2E-2 = 0.02 = 0.02
Bob's bug = -30 = -30
8 changes: 8 additions & 0 deletions samples/distro-examples/tests/output/iifs.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Normal IF - Ok
Inline IF - Ok
Ok
Ok
label 500 - Ok
label 600 - Ok
3 inline IFs
True
20 changes: 20 additions & 0 deletions samples/distro-examples/tests/output/matrices.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
MATRICES

[-6;2;-7] + [5;4;-6] = [-1;6;-13]
[-6;2;-7] - [5;4;-6] = [-11;-2;-1]
[-6;2;-7] * 0.5 = [-3;1;-3.5]
A = [-6;2;-7], -A = [6;-2;7]

[-2;3] * [7,6,-3,5] = [-14,-12,6,-10;21,18,-9,15]

[2,4;-1,-2] * [-2,2,4;1,-1,-2] = [0,0,0;0,0,0]

[-3,0;2,-1] * [4,-2;3,5] = [-12,6;5,-9]

Solve this:
5x - 2y + 3z = -2
-2x + 7y + 5z = 7
3x + 5y + 6z = 9

[x; y; z] = [2;3;-2]

2 changes: 2 additions & 0 deletions samples/distro-examples/tests/output/metaa.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Module: Meta-B
Module: Meta-A
4 changes: 4 additions & 0 deletions samples/distro-examples/tests/output/ongoto.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
10
20
30
40
2 changes: 2 additions & 0 deletions samples/distro-examples/tests/output/pass1.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
OK
OK
2 changes: 2 additions & 0 deletions samples/distro-examples/tests/output/uds.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
start of test
end of test
17 changes: 17 additions & 0 deletions samples/distro-examples/tests/pass1.bas
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
OPTION PREDEF QUIET
OPTION PREDEF TEXTMODE
OPTION PREDEF COMMAND FOO

if (command <> "FOO") then
print "ERROR"
else
print "OK"
end if

UNITPATH = "/foo"
if ENV("UNITPATH") != "/foo" then
print "ERROR" + " WAS:" + ENV("UNITPATH")
else
print "OK"
end if

8 changes: 8 additions & 0 deletions samples/distro-examples/tests/predef.bas
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
unit predef

export prsys

sub prsys
? cat(1);"Predefined Variables";cat(0)
? "OS VER =0x"; HEX$(osver)
? "OS NAME="; osname
? "SB VER =0x"; HEX$(sbver)
? "PI ="; pi
? "XMAX ="; xmax
? "YMAX ="; ymax
? "CWD ="; CWD
? "HOME ="; HOME
end



File renamed without changes.
18 changes: 0 additions & 18 deletions samples/unit-tests/predef.bas

This file was deleted.

Loading