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
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2014-09-06
RTE command renamed THROW

2014-09-01
Added try/catch

2014-08-30
Added reference variable type
Fixed HASH var handling with parenthesis
Expand Down
63 changes: 1 addition & 62 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.14])
AC_INIT([smallbasic], [0.11.15])
AC_CONFIG_SRCDIR([configure.ac])

AC_CANONICAL_TARGET
Expand All @@ -34,11 +34,6 @@ AC_ARG_ENABLE(sdl,
[ac_build_sdl="yes"],
[ac_build_sdl="no"])

AC_ARG_ENABLE(mosync,
AS_HELP_STRING([--enable-mosync],[build common library for Mosync(default=no)]),
[ac_build_mosync="yes"],
[ac_build_mosync="no"])

AC_ARG_ENABLE(tizen,
AS_HELP_STRING([--enable-tizen],[build common library for Tizen(default=no)]),
[ac_build_tizen="yes"],
Expand Down Expand Up @@ -94,9 +89,6 @@ function checkPCRE() {
have_pcre="no"
esac

if test x$ac_build_mosync = xyes; then
have_pcre="no"
fi
if test x$ac_build_tizen = xyes; then
have_pcre="no"
fi
Expand Down Expand Up @@ -175,7 +167,6 @@ function buildFLTK() {
AC_DEFINE(USE_CLIB, 1, [Implements clibmgr.])
AC_DEFINE(DEV_EVENTS_OSD, 1, [dev_events() implemented using osd_events().])
AC_DEFINE(IMPL_IMAGE, 1, [Driver implements image commands])
AC_DEFINE(IMPL_HTML, 1, [Driver implements the html command])
AC_DEFINE(IMPL_DEV_GETS, 1, [Driver implements dev_gets()])
AC_DEFINE(IMPL_DEV_DELAY, 1, [Driver implements dev_delay()])
AC_DEFINE(IMPL_DEV_ENV, 1, [Driver implements dev_env funcs])
Expand Down Expand Up @@ -243,55 +234,6 @@ function buildSDL() {
(cd ide/android/assets && xxd -i main.bas > ../../../src/platform/sdl/main_bas.h)
}

function buildMosync() {
TARGET="Building common library for Mosync."

defaultConditionals

AC_DEFINE(_UnixOS, 1, [Building under Unix like systems.])
AC_DEFINE(HAVE_SEARCH_H, 1, [Found GNU search.h])
AC_DEFINE(HAVE_TDESTROY, 1, [Found GNU search.h])
AC_DEFINE(INET_UNSUP, 1, [inet not supported.])
AC_DEFINE(RUN_UNSUP, 1, [run not supported.])
AC_DEFINE(SERIAL_UNSUP, 1, [serial not supported.])
AC_DEFINE(DEV_EVENTS_OSD, 1, [dev_events() implemented using osd_events().])
AC_DEFINE(IMPL_DEV_READ, 1, [Implement dev_read()])
AC_DEFINE(IMPL_DEV_GETS, 1, [Driver implements dev_gets()])
AC_DEFINE(IMPL_DEV_DELAY, 1, [Driver implements dev_delay()])
AC_DEFINE(IMPL_IMAGE, 1, [Driver implements image commands])
AC_DEFINE(HAVE_MALLOC_USABLE_SIZE, 0, [Newlib version causes mosync stack panic])
AC_DEFINE(CPU_BIGENDIAN, 1, [Mosync uses big-endian])
AC_DEFINE(IMPL_LOG_WRITE, 1, [Driver implements lwrite()])
AC_DEFINE(NONSTANDARD_PORT, 1, [sys.h should include portdefs.h])
AC_DEFINE(USE_TERM_IO, 0, [Does not use terminal-io functions.])
AC_DEFINE(_MOSYNC, 1, [Defined for Mosync build.])

dnl Checks for mosync
AC_CHECK_PROG(have_mosync, pipe-tool, [yes], [no])

PACKAGE_CFLAGS="-MMD -S -DMAPIP -O2 -MF "

dnl find out where mosync is installed
win32=no
case "${host_os}" in
*mingw* | pw32* | cygwin*)
win32="yes"
esac
if test $win32 = yes; then
MOSYNC_HOME="`which xgcc | cygpath -m -f - | sed 's/\/bin\/xgcc//'`"
EXTN=".exe"
else
dnl see: http://www.mosync.com/documentation/manualpages/building-mosync-source-linux
MOSYNC_HOME=${MOSYNCDIR}
EXTN=""
fi
AC_SUBST(MOSYNC_HOME)
AC_SUBST(EXTN)

BUILD_SUBDIRS="src/platform/mosync/common"
AC_SUBST(BUILD_SUBDIRS)
}

function buildTizen() {
TARGET="Building common library for Tizen."

Expand Down Expand Up @@ -426,8 +368,6 @@ elif test x$ac_build_fltk = xyes; then
buildFLTK
elif test x$ac_build_sdl = xyes; then
buildSDL
elif test x$ac_build_mosync = xyes; then
buildMosync
elif test x$ac_build_tizen = xyes; then
buildTizen
elif test x$ac_build_android = xyes; then
Expand All @@ -451,7 +391,6 @@ src/platform/sdl/Makefile
src/platform/cygwin/Makefile
src/platform/mingw/Makefile
src/platform/unix/Makefile
src/platform/mosync/common/Makefile
src/platform/tizen/common/Makefile
src/platform/android/Makefile
])
Expand Down
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
smallbasic (0.11.15) unstable; urgency=low
* RTE renamed THROW

-- Chris Warren-Smith <cwarrensmith@gmail.com> Sat, 6 Sept 2014 09:45:25 +1000

smallbasic (0.11.14) unstable; urgency=low
* Added reference variable type

Expand Down
16 changes: 0 additions & 16 deletions ide/mosync/.cproject

This file was deleted.

56 changes: 0 additions & 56 deletions ide/mosync/.mosyncproject

This file was deleted.

30 changes: 0 additions & 30 deletions ide/mosync/.project

This file was deleted.

43 changes: 0 additions & 43 deletions ide/mosync/AndroidManifest.xml

This file was deleted.

20 changes: 0 additions & 20 deletions ide/mosync/workfile.rb

This file was deleted.

1 change: 1 addition & 0 deletions samples/distro-examples/graphics/3dtorus.bas
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ repeat
anglez = (anglez + 1) mod 360
RotateAndProject Model(), anglex, angley, anglez
DrawModel Model() , Poly()
SHOWPAGE
until

end
Expand Down
4 changes: 4 additions & 0 deletions samples/distro-examples/tests/output/ptr.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
foo: called from ptr @foo
foo: called from ptr p
in bar
in bar
6 changes: 6 additions & 0 deletions samples/distro-examples/tests/output/trycatch.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
start
inner try
open failed FS(2): NO SUCH FILE OR DIRECTORY
after try
catch by error name
outer after try
2 changes: 1 addition & 1 deletion samples/distro-examples/tests/proc.bas
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ next
vn()=va()
for i=0 to 4
if ( va(i) <> vn(i) )
rte "array copy error"
throw "array copy error"
fi
next

Expand Down
16 changes: 16 additions & 0 deletions samples/distro-examples/tests/ptr.bas
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
func foo(s)
foo="foo: " + s
end

sub bar
? "in bar"
end

p = @foo
? call(@foo, "called from ptr @foo")
? call(p, "called from ptr p")

pb = @bar
call pb
call @bar

43 changes: 43 additions & 0 deletions samples/distro-examples/tests/trycatch.bas
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
? "start"
try
? "inner try"
if (1==1) then
try
catch
? "should never be printed"
end try
if (2==2) then
try
open "com2000:" AS #1
try
? "should never be printed"
catch
? "should never be printed"
end try
? "should never be printed"
catch "err"
? "should never be printed"
catch err
? "open failed", err
end try
? "after try
throw "an error has occurred"
? "should never be printed"
fi
fi
try
? "should never be printed"
catch
? "should never be printed"
end try
open "com2000:" AS #1
? "should never be printed"
catch "some error that is not thrown"
? "should never be printed"
catch "an error has occurred"
? "catch by error name"
end try

? "outer after try"


Loading