Skip to content

Commit dae2ab6

Browse files
committed
Merge pull request #15 from chrisws/android
Android
2 parents 8b0cdbb + 2e013a0 commit dae2ab6

File tree

129 files changed

+1953
-11507
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+1953
-11507
lines changed

ChangeLog

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
2014-08-22
2+
Fix HASH var crash
3+
Fix HASH var handling of mixed types
4+
Fix illegal UDS field variable names
5+
Unitfy HASH and UDS
6+
7+
2014-08-15
8+
Improved runtime performance
9+
Fixed memory leak with UDS variables
10+
Fixed FUNC call with parenthesis
11+
12+
2014-08-14
13+
Added SHOWPAGE. code cleanup
14+
115
2014-08-11
216
Cleanup system var handling, removed os_ver
317

configure.ac

Lines changed: 5 additions & 195 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ PKG_PROG_PKG_CONFIG
2424
TARGET=""
2525

2626
dnl define build arguments
27-
AC_ARG_ENABLE(gtk,
28-
AS_HELP_STRING([--enable-gtk],[build gtk version(default=no)]),
29-
[ac_build_gtk="yes"],
30-
[ac_build_gtk="no"])
31-
3227
AC_ARG_ENABLE(fltk,
3328
AS_HELP_STRING([--enable-fltk],[build fltk version(default=no)]),
3429
[ac_build_fltk="yes"],
@@ -39,11 +34,6 @@ AC_ARG_ENABLE(sdl,
3934
[ac_build_sdl="yes"],
4035
[ac_build_sdl="no"])
4136

42-
AC_ARG_ENABLE(qt,
43-
AS_HELP_STRING([--enable-qt],[build QT version(default=no)]),
44-
[ac_build_qt="yes"],
45-
[ac_build_qt="no"])
46-
4737
AC_ARG_ENABLE(mosync,
4838
AS_HELP_STRING([--enable-mosync],[build common library for Mosync(default=no)]),
4939
[ac_build_mosync="yes"],
@@ -91,9 +81,6 @@ function checkDebugMode() {
9181
CFLAGS="${CFLAGS} -g -O0"
9282
CXXFLAGS="${CXXFLAGS} -g -O0"
9383
AC_DEFINE(_DEBUG, 1, [debugging build enabled])
94-
else
95-
CFLAGS="${CFLAGS} -O3 -Os"
96-
CXXFLAGS="${CXXFLAGS} -O3 -Os"
9784
fi
9885
AC_SUBST(CFLAGS)
9986
}
@@ -124,135 +111,9 @@ function checkPCRE() {
124111
}
125112

126113
function defaultConditionals() {
127-
AM_CONDITIONAL(WITH_HILDON, false)
128114
AM_CONDITIONAL(WITH_CYGWIN_CONSOLE, false)
129115
}
130116

131-
function checkHILDON() {
132-
# copied from
133-
# https://stage.maemo.org/svn/maemo/projects/tools/branches/maemopad/chinook/configure.ac
134-
135-
# Hildon library dependsncies
136-
PKG_CHECK_MODULES(HILDON, hildon-1 hildon-fm-2 hildon-help conbtdialogs)
137-
AC_SUBST(HILDON_LIBS)
138-
AC_SUBST(HILDON_CFLAGS)
139-
140-
# Only used for the .service file path
141-
PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.60)
142-
143-
# OSSO application framework dependencies
144-
PKG_CHECK_MODULES(OSSO, osso-af-settings >= 0.8.5 libosso >= 0.9.17
145-
gnome-vfs-2.0 >= 2.8.4.11 gnome-vfs-module-2.0 >= 2.8.4.11)
146-
AC_SUBST(OSSO_LIBS)
147-
AC_SUBST(OSSO_CFLAGS)
148-
149-
# To make application visible in maemo Task Navigator it needs a Desktop
150-
# file for the application.
151-
# D-BUS service file is needed to be able to launch the maemo application
152-
# and connect it to D-BUS services.
153-
# The following line defines install directories for these files.
154-
desktopentrydir=`$PKG_CONFIG osso-af-settings --variable=desktopentrydir`
155-
serviceentrydir=`$PKG_CONFIG osso-af-settings --variable=dbusservicedir`
156-
157-
# Application locale install directory
158-
localedir=`$PKG_CONFIG osso-af-settings --variable=localedir`
159-
160-
# Application pixmaps install directory
161-
pixmapdir=`$PKG_CONFIG osso-af-settings --variable=hildonpixmapdir`
162-
163-
# Application icon install directories
164-
icon_26x26dir=$datadir/icons/hicolor/26x26/hildon
165-
icon_34x34dir=$datadir/icons/hicolor/34x34/hildon
166-
icon_40x40dir=$datadir/icons/hicolor/40x40/hildon
167-
icon_50x50dir=$datadir/icons/hicolor/50x50/hildon
168-
icon_scalabledir=$datadir/icons/hicolor/scalable/hildon
169-
170-
# Hildon control panel plugin install directories
171-
pluginlibdir=`$PKG_CONFIG hildon-control-panel --variable=plugindir`
172-
plugindesktopentrydir=`$PKG_CONFIG hildon-control-panel --variable=plugindesktopentrydir`
173-
174-
# Define as variables in Makefiles
175-
AC_SUBST(desktopentrydir)
176-
AC_SUBST(serviceentrydir)
177-
AC_SUBST(localedir)
178-
AC_SUBST(pixmapdir)
179-
AC_SUBST(icon_26x26dir)
180-
AC_SUBST(icon_34x34dir)
181-
AC_SUBST(icon_40x40dir)
182-
AC_SUBST(icon_50x50dir)
183-
AC_SUBST(icon_scalabledir)
184-
AC_SUBST(pluginlibdir)
185-
AC_SUBST(plugindesktopentrydir)
186-
187-
AC_DEFINE_UNQUOTED([LOCALEDIR], "${localedir}", [Runtime locale catalog files path])
188-
AC_DEFINE_UNQUOTED([PIXMAPDIR], "${pixmapdir}", [Runtime pixmap files path])
189-
190-
PACKAGE_CFLAGS="${PACKAGE_CFLAGS} ${HILDON_CFLAGS} ${OSSO_CFLAGS}"
191-
PACKAGE_LIBS="${PACKAGE_LIBS} ${HILDON_LIBS} ${OSSO_LIBS}"
192-
ln -s src/gtk/debian
193-
}
194-
195-
function buildGTK() {
196-
TARGET="Building GTK version."
197-
198-
dnl disable build for hildon
199-
AC_ARG_ENABLE(hildon,
200-
AS_HELP_STRING([--enable-hildon],[disable hildon build (default=yes)]),
201-
[ac_hildon_build="yes"],
202-
[ac_hildon_build="no"])
203-
204-
AM_CONDITIONAL(WITH_HILDON, test "x$ac_hildon_build" = "xyes")
205-
AM_CONDITIONAL(WITH_CYGWIN_CONSOLE, false)
206-
207-
if test "x$ac_hildon_build" = "xyes"; then
208-
AC_DEFINE(USE_HILDON, 1, [Define if building for hildon/maemo/n770.])
209-
checkHILDON
210-
else
211-
dnl check for gtk libraries
212-
pkg_modules="gtk+-2.0 >= 2.0.0"
213-
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
214-
215-
dnl Checks for glade-2
216-
AC_CHECK_PROG(have_glade, glade-2, [yes], [no])
217-
218-
if test "${have_glade}" = "yes" ; then
219-
dnl build the user interface
220-
glade-2 -w src/platform/gtk/sbgtk.glade
221-
AC_DEFINE(gtk_widget_unref, g_object_unref, [hack for glade-2.])
222-
else
223-
AC_MSG_ERROR([
224-
glade-2 not found: configure failed.
225-
])
226-
fi
227-
228-
dnl check for dbus
229-
PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.35 dbus-glib-1 >= 0.35], [
230-
PACKAGE_CFLAGS="${PACKAGE_CFLAGS} ${DBUS_CFLAGS}"
231-
PACKAGE_LIBS="${PACKAGE_LIBS} ${DBUS_LIBS}"
232-
AC_DEFINE(USE_DBUS, 1, [use dbus-glib])
233-
])
234-
fi
235-
236-
dnl preconfigured values for GTK build
237-
AC_DEFINE(_UnixOS, 1, [Building under Unix like systems.])
238-
AC_DEFINE(USE_TERM_IO, 0, [Does not use terminal-io functions.])
239-
AC_DEFINE(DEV_EVENTS_OSD, 1, [dev_events() implemented using osd_events().])
240-
AC_DEFINE(KBHIT_PWR_CONSERVE, 1, [Conserve power in dev_kbhit()])
241-
AC_DEFINE(DRV_SOUND, 1, [Driver implements functions in drvsound.h])
242-
AC_DEFINE(IMPL_IMAGE, 1, [Driver implements image commands])
243-
AC_DEFINE(IMPL_DEV_GETS, 1, [Driver implements dev_gets()])
244-
AC_DEFINE(IMPL_DEV_DELAY, 1, [Driver implements dev_delay()])
245-
AC_DEFINE(GTK_DISABLE_DEPRECATED, 1, [avoid building obsolete code)])
246-
AC_DEFINE(HILDON_DISABLE_DEPRECATED, 1, [avoid building obsolete code)])
247-
AC_DEFINE(IMPL_HTML, 1, [Driver implements the html command])
248-
AC_DEFINE(OS_PREC64, 1, [64 bit variables])
249-
AC_DEFINE(NO_SCAN_ERROR_PROMPT, 1, [No prompt for detailed scan report])
250-
AC_DEFINE(DRV_BEEP, 1, [Use the driver based beep function])
251-
252-
BUILD_SUBDIRS="src/common src/platform/gtk/src src/platform/gtk/data src/platform/gtk/icons"
253-
AC_SUBST(BUILD_SUBDIRS)
254-
}
255-
256117
function buildFLTK() {
257118
TARGET="Building FLTK version."
258119

@@ -384,50 +245,6 @@ function buildSDL() {
384245
(cd ide/android/assets && xxd -i main.bas > ../../../src/platform/sdl/main_bas.h)
385246
}
386247

387-
function buildQT() {
388-
TARGET="Building QT version."
389-
390-
dnl Checks for qmake
391-
AC_CHECK_PROG(have_qt, qmake, [yes], [no])
392-
if test "${have_qt}" = "no" ; then
393-
AC_MSG_ERROR([You need QT version 4.* configure failed.])
394-
fi
395-
396-
dnl avoid using MSCRT versions of printf for long double
397-
case "${host_os}" in
398-
cygwin*)
399-
PACKAGE_CFLAGS="${PACKAGE_CFLAGS} -D__USE_MINGW_ANSI_STDIO"
400-
esac
401-
402-
defaultConditionals
403-
404-
dnl preconfigured values for QT build
405-
AC_DEFINE(_UnixOS, 1, [Building under Unix like systems.])
406-
AC_DEFINE(_QT, 1, [Defined for QT build.])
407-
AC_DEFINE(USE_TERM_IO, 0, [Does not use terminal-io functions.])
408-
AC_DEFINE(DEV_EVENTS_OSD, 1, [dev_events() implemented using osd_events().])
409-
AC_DEFINE(IMPL_IMAGE, 1, [Driver implements image commands])
410-
AC_DEFINE(IMPL_DEV_GETS, 1, [Driver implements dev_gets()])
411-
AC_DEFINE(IMPL_DEV_DELAY, 1, [Driver implements dev_delay()])
412-
AC_DEFINE(IMPL_DEV_ENV, 1, [Driver implements dev_env funcs])
413-
AC_DEFINE(IMPL_LOG_WRITE, 1, [Driver implements lwrite()])
414-
AC_DEFINE(OS_PREC64, 1, [64 bit variables])
415-
AC_DEFINE(NO_SCAN_ERROR_PROMPT, 1, [No prompt for detailed scan report])
416-
AC_DEFINE(DRV_BEEP, 1, [Use the driver based beep function])
417-
AC_DEFINE(IMPL_OSD_SOUND, 1, [Driver implements osd_sound()])
418-
AC_DEFINE(IMPL_DEV_RUN, 1, [Driver implements dev_run()])
419-
AC_DEFINE(IMPL_DEV_CIRCLE, 1, [Driver implements circle/elipse funcs])
420-
421-
BUILD_SUBDIRS="src/common src/platform/qt"
422-
AC_SUBST(BUILD_SUBDIRS)
423-
424-
desktopentrydir='$(datarootdir)'/applications
425-
AC_SUBST(desktopentrydir)
426-
427-
dnl generate qt project files
428-
(cd src/platform/qt && qmake -o Makefile.qt)
429-
}
430-
431248
function buildMosync() {
432249
TARGET="Building common library for Mosync."
433250

@@ -534,7 +351,6 @@ function buildConsole() {
534351
win32="yes"
535352
esac
536353

537-
AM_CONDITIONAL(WITH_HILDON, false)
538354
AM_CONDITIONAL(WITH_CYGWIN_CONSOLE, test $win32 = yes)
539355

540356
if test $win32 = yes; then
@@ -601,7 +417,6 @@ function buildDist() {
601417
BUILD_SUBDIRS="${BUILD_SUBDIRS} src/platform/cygwin"
602418
BUILD_SUBDIRS="${BUILD_SUBDIRS} src/platform/unix"
603419
BUILD_SUBDIRS="${BUILD_SUBDIRS} src/platform/mingw"
604-
BUILD_SUBDIRS="${BUILD_SUBDIRS} src/platform/qt"
605420
AC_SUBST(BUILD_SUBDIRS)
606421
}
607422

@@ -612,14 +427,10 @@ AC_DEFINE(HAVE_C_MALLOC, 1, [allocate memory with regular malloc calls])
612427

613428
if test x$ac_build_dist = xyes; then
614429
buildDist
615-
elif test x$ac_build_gtk = xyes; then
616-
buildGTK
617430
elif test x$ac_build_fltk = xyes; then
618431
buildFLTK
619432
elif test x$ac_build_sdl = xyes; then
620433
buildSDL
621-
elif test x$ac_build_qt = xyes; then
622-
buildQT
623434
elif test x$ac_build_mosync = xyes; then
624435
buildMosync
625436
elif test x$ac_build_tizen = xyes; then
@@ -634,17 +445,14 @@ checkPCRE
634445
checkDebugMode
635446
checkForWindows
636447

448+
AC_SUBST(PACKAGE_CFLAGS)
449+
AC_SUBST(PACKAGE_LIBS)
450+
637451
AC_CONFIG_FILES([
638452
Makefile
639453
src/common/Makefile
640-
src/platform/gtk/src/Makefile
641-
src/platform/gtk/data/sbasic.desktop
642-
src/platform/gtk/data/com.nokia.sbasic.service
643-
src/platform/gtk/data/Makefile
644-
src/platform/gtk/icons/Makefile
645454
src/platform/fltk/Makefile
646455
src/platform/sdl/Makefile
647-
src/platform/qt/Makefile
648456
src/platform/cygwin/Makefile
649457
src/platform/mingw/Makefile
650458
src/platform/unix/Makefile
@@ -656,6 +464,8 @@ AC_OUTPUT
656464

657465
echo
658466
echo ${TARGET}
467+
echo "CFLAGS=${CFLAGS}"
468+
echo "CXXFLAGS=${CXXFLAGS}"
659469
echo
660470

661471
if test x$ac_build_dist = xyes; then
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
DIM r(256)
2+
DIM g(256)
3+
DIM b(256)
4+
LET f=0
5+
CLS
6+
7+
FOR x=0 TO 255
8+
LET r(x)=255-CEIL((SIN(PI*2*x/255)+1)*127)
9+
LET g(x)=CEIL((SIN(PI*2*x/127)+1)*64)
10+
LET b(x)=255-r(x)
11+
NEXT x
12+
13+
bw=xmax/3
14+
bh=ymax/3
15+
t1=timer
16+
17+
while 1
18+
t=TICKS
19+
FOR y=0 TO bh
20+
FOR x=0 TO bw
21+
LET c1=SIN(x/50+f+y/200)
22+
LET c2=SQR((SIN(0.8*f)*400-x+400)*(SIN(0.8*f)*400-x+400)+(COS(1.2*f)*240-y+240)*(COS(1.2*f)*240-y+240))
23+
LET c2=SIN(c2/50)
24+
LET c3=(c1+c2)/2
25+
LET res=(c3+1)*127
26+
27+
color RGB(r(res),g(res),b(res))
28+
pset x,y
29+
NEXT x
30+
NEXT y
31+
32+
fps=TICKSPERSEC/(TICKS-t)
33+
iter++
34+
at bw+10,0
35+
print format("Fps: ###.##", fps)
36+
at bw+10,20
37+
print format("Cnt: ###", iter)
38+
at bw+10,40
39+
print format("Elap: ###", timer-t1)
40+
41+
SHOWPAGE
42+
f += 0.1
43+
wend
44+

samples/distro-examples/tests/call_tau.bas

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,22 @@ tau.build_ta
1919
rem check system-variables
2020
predef.prsys
2121

22+
x=PI
23+
dim foyer
24+
foyer.name= "my name is PI"
25+
? "test"
26+
? foyer("NAME")
27+
? foyer("name")
28+
? foyer.Name
29+
? foyer.name
2230

31+
? "end"
32+
33+
tau.addRoom(foyer,x)
34+
35+
36+
sub addRoom(the_thing, d)
37+
print the_thing.name, d
38+
end
39+
40+
addRoom(foyer,x)

samples/distro-examples/tests/hash.bas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ dim foo
33
key="blah"
44
foo(key) = "something"
55
foo("other") = 123
6+
foo(100) = "cats"
67

78
? foo(key)
89
? foo("other")

samples/distro-examples/tests/output/call_tau.out

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,10 @@ message from tau
1111
[1,2,3,4]
1212
Predefined Variables
1313
PI =3.14159265358979
14+
test
15+
my name is PI
16+
my name is PI
17+
my name is PI
18+
my name is PI
19+
end
20+
my name is PI 3.14159265358979
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
something
2+
123
3+
[blah=something,other=123,100=cats]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
start of test
2+
end of test

0 commit comments

Comments
 (0)