Permalink
Browse files

clean-up

  • Loading branch information...
1 parent 95eb612 commit d340ead907e001e98239f037d379567860a36bd3 @bilam bilam committed Sep 29, 2013
Showing 735 changed files with 2,793 additions and 48,356 deletions.
View
@@ -8,5 +8,4 @@
# project structure.
# Project target.
-#target=android-14
-target=android-7
+target=android-14
@@ -495,7 +495,7 @@ jniCheck=: 3 : 0
]`('JNI exception' (13!:8) 3:)@.(0 ~: a. i. x&ExceptionCheck_jni_@(''"_)) y
)
jniToJString=: 3 : 0
-if. 0=y do. '' return. end.
+assert. 0~:y
jniCheck str=. GetStringUTFChars y;<<0
z=. memr str,0,_1
jniCheck ReleaseStringUTFChars y;<<str
@@ -518,7 +518,7 @@ clz=. FindClass <'java/lang/String'
z=. jniCheck NewObjectArray (#y);clz;0
jniCheck DeleteLocalRef <clz
for_i. i.#y do.
- jniCheck SetObjectArrayElement z;i;s=. NewStringUTF utf8@,&.> i{y
+ jniCheck SetObjectArrayElement z;i;s=. NewStringUTF i{y
jniCheck DeleteLocalRef <s
end.
z
@@ -530,13 +530,13 @@ try.
jniCheck mid=. GetMethodID cls;'getMessage';'()Ljava/lang/String;'
jniCheck jstr=. 'x x x x' (ID_CallObjectMethod jniVararg) y ; mid
z=. jniToJString jstr
- jniCheck DeleteLocalRef <jstr
- jniCheck DeleteLocalRef <cls
- jniCheck DeleteLocalRef <y
+ DeleteLocalRef <jstr
+ DeleteLocalRef <cls
+ DeleteLocalRef <y
ExceptionClear''
z
catch.
- jniCheck DeleteLocalRef <y
+ DeleteLocalRef <y
ExceptionClear''
'' return.
end.
@@ -553,8 +553,8 @@ try.
jniCheck jstr=. 'x x x x' (ID_CallObjectMethod jniVararg) ecls ; mid
z=. jniToJString jstr
if. 0=x do. DeleteLocalRef <ecls end.
- jniCheck DeleteLocalRef <jstr
- jniCheck DeleteLocalRef <ccls
+ DeleteLocalRef <jstr
+ DeleteLocalRef <ccls
ExceptionClear''
z
catch.
@@ -664,9 +664,6 @@ rc
)
jniMethod=: 1 : 0
:
-if. (0 4 -.@e.~ 3!:0 y) +. 0-:y do.
- smoutput 'method signiture: ',m
-end.
assert. 0 4 e.~ 3!:0 y [ 'jniMethod'
assert. 0-.@-:y [ 'jniMethod'
jniCheck cls=. GetObjectClass_jni_ <y
@@ -679,7 +676,7 @@ rt=. }. (}.~ i.&')') proto
m=. method,' ',proto
rc=. m jniCall_jni_ (boxxopen x),~ 2 0 0;y;cls
-jniCheck DeleteLocalRef_jni_ <cls
+DeleteLocalRef_jni_ <cls
rc
)
jniStaticMethod=: 1 : 0
@@ -701,7 +698,7 @@ rt=. }. (}.~ i.&')') proto
m=. method,' ',proto
rc=. m jniCall_jni_ (boxxopen x),~ 2 1 0;y;cls
-jniCheck DeleteLocalRef_jni_ <cls
+DeleteLocalRef_jni_ <cls
rc
)
jniCall=: 4 : 0
@@ -711,15 +708,14 @@ rt=. '#'-.~ }. (}.~ i.&')') proto
'attr obj cls'=. 3{.y
'member static nonvirtual'=. attr
y=. 3}.y
-if. -. (+/'#'=sig) = #y do. smoutput 'jniCall : ',x end.
assert. (+/'#'=sig) = #y [ 'jniCall incorrect number of arguments'
str=. stri=. 0$0
jniCheck mid=. GetMethodID`GetStaticMethodID@.static cls;method;({.a.),~ proto-.'#'
if. 1 e. s1=. ((<'Ljava/lang/CharSequence;') = sig1) +. (<'Ljava/lang/String;') = sig1=. <;._1 sig do.
for_i. I. s1 do.
if. 2 131072 e.~ 3!:0 y1=. i{::y do.
- str=. str, <NewStringUTF < 8&u: ,y1
+ str=. str, <NewStringUTF < 8&u: y1
stri=. stri, i
end.
end.
@@ -738,7 +734,7 @@ else.
case. 'B' do. jniCheck rc=. ('c x x x ', jniSigx15 sig) ((static{ID_CallByteMethod,ID_CallStaticByteMethod) jniVararg) (obj ; mid), sig jniSigarg y
case. 'Z' do. jniCheck rc=. ('i x x x ', jniSigx15 sig) ((static{ID_CallBooleanMethod,ID_CallStaticBooleanMethod) jniVararg) (obj ; mid), sig jniSigarg y
case. 'I' do. jniCheck rc=. ('i x x x ', jniSigx15 sig) ((static{ID_CallIntMethod,ID_CallStaticIntMethod) jniVararg) (obj ; mid), sig jniSigarg y
- case. 'J' do. jniCheck rc=. ('x x x x ', jniSigx15 sig) ((static{ID_CallLongMethod,ID_CallStaticLongMethod) jniVararg) (obj ; mid), sig jniSigarg y
+ case. 'J' do. jniCheck rc=. ('l x x x ', jniSigx15 sig) ((static{ID_CallLongMethod,ID_CallStaticLongMethod) jniVararg) (obj ; mid), sig jniSigarg y
case. 'S' do. jniCheck rc=. ('s x x x ', jniSigx15 sig) ((static{ID_CallShortMethod,ID_CallStaticShortMethod) jniVararg) (obj ; mid), sig jniSigarg y
case. 'F' do. jniCheck rc=. ('f x x x ', jniSigx15 sig) ((static{ID_CallFloatMethod,ID_CallStaticFloatMethod) jniVararg) (obj ; mid), sig jniSigarg y
case. 'D' do. jniCheck rc=. ('d x x x ', jniSigx15 sig) ((static{ID_CallDoubleMethod,ID_CallStaticDoubleMethod) jniVararg) (obj ; mid), sig jniSigarg y
@@ -801,6 +797,7 @@ if. 3=4!:0<'jnhandler_debug' do.
try. x jnhandler_debug y catch. end.
end.
jn_fn=. x
+if. 'Android'-:UNAME do. log_d_ja_ 'JJNI';'jnhandler ',jn_fn end.
if. 13!:17'' do.
z=. jn_fn~ y
else.
@@ -821,6 +818,7 @@ else.
end.
jn_err=. LF,,LF,.}.;._2 jn_err
smoutput 'jnhandler error in: ',jn_fn,jn_err
+ if. 'Android'-:UNAME do. log_d_ja_ 'JJNI';'jnhandler error in: ',,jn_fn,jn_err end.
0
end.
end.
@@ -1,44 +0,0 @@
-cocurrent 'base'
-
-TO=: jpath '~addons/demos/isigraph/'
-FM=: jpath '~Addons/demos/isigraph/'
-
-mkdir_j_ TO
-
-f=. 3 : 0
-fl=. y,(-. '.' e. y) # '.ijs'
-to=. TO,fl
-fm=. FM,fl
-to fcopynew fm
-)
-
-f each cutopen (0 : 0)
-evolute1
-evolute2
-frieze1
-ifs1
-ifs2
-iscolor
-isdemo
-isedit
-isigraph.txt
-isview
-koch
-paint
-plasma1
-polygon
-polyhedr
-power
-siercar1
-siercar2
-siertri1
-siertri2
-siertri3
-siertri4
-sines
-solid
-smesser
-spinner
-spirals
-title
-)
@@ -1,11 +0,0 @@
-NB. evolute of integers up to 33,489 (=183^2)
-NB.
-NB. evolute defined in: system\packages\misc\evolute.ijs
-NB.
-NB. experiment with different values for f
-
-f=. ] NB. shows evolute
-f=. # @ q: NB. count (of prime factors)
-f=. (1:=#) @ q: NB. 1 if prime
-
-vmat f 1+evolute 183
@@ -1,11 +0,0 @@
-NB. patterns generated from evolute of
-NB. integers mod n
-NB.
-NB. evolute defined in: system\packages\misc\evolute.ijs
-NB.
-NB. try different values for numbers used, e.g.
-NB.
-NB. 8 | evolute 80
-NB. 39 | evolute 128
-
-vmat 11 | evolute 128
@@ -1,36 +0,0 @@
-NB. Frieze Patterns
-NB.
-NB.
-
-STEPS=: 100+i.20000
-STEPS=: 100+i.5000
-
-par=: 5 2 3$,".;._2 (0 : 0)
-_0.23 0 _0.41 0 _0.49 0
-0 _0.79 0 _0.46 0 0.83
-0.46 0 0.23 0 _0.35 0
-0 0.33 0 0.92 0 _0.15
-_0.78 0 _0.76 0 _0.69 0
-)
-
-sin2=: sin@+:
-cos2=: cos@+:
-mp=: +/ . *
-
-f1=: 1: , cos , cos2 , sin , sin2
-f2=: ^&(i.3)
-f3=: f1@{. mp par"_ mp f2@{:
-f4=: f3 + {.,0:
-fn=: 2p1 0&| @ f4 f.
-
-xy=: fn ^: STEPS 0.1 0.2
-
-shape=: 300 300
-min=: <./xy
-max=: >./xy
-XY=: <. (xy -"1 min) *"1 (shape-1) % max-min
-n=: ;/ ~.XY
-freq=: #/.~XY
-clr=: RGB 255 255 255,hueRGB int01 >./freq
-b=: |: freq n } shape$0
-clr vmat b,.b,.b
@@ -1,18 +0,0 @@
-NB. iterated function system
-
-S=: 4
-
-mid=. -: @ + "1
-nor=. 1 _1&* @: |.
-bump=. mid + (%:3r4)&* @ nor @: -
-bump1=. [ bump mid
-bump2=. mid bump ]
-tri=. 0 0, 1000 0,: 500 866
-segdiv=. [ , mid , bump1 , bump2 ,: mid
-refine=. ,/ @ (] segdiv"1 (1&|.))
-
-gclear 0 128 255
-dat=. 0 >. 1000 <. refine ^:4 tri
-dat=. ({."1 dat),.1000-{:"1 dat
-dat=. dat *"1 [ 2 3{GSIZE%1000
-YELLOW gpolygon ,dat
@@ -1,14 +0,0 @@
-NB. iterated function system
-NB.
-NB. uses matrix product on binary reps from 0 to 255
-NB. try the different examples f1 - f5
-
-X=: #: i. 256
-
-f1=. +/ . * |:
-f2=. >: @ (4&*)
-f3=. (*/ . + |:) @ (6&+)
-f4=. (*./ . + |:) @ (3&+)
-f5=. (+/ . * |:) @: >:
-
-vmat f1 X
@@ -1,23 +0,0 @@
-NB. iscolor - colors for isigraph demos
-
-rgb=. BGR`RGB@.RGBSEQ_j_
-
-STDCLR=: ".;._2 (0 : 0)
-AQUA=: rgb 0 255 255
-BLUE=: rgb 0 0 255
-BROWN=: rgb 192 128 0
-FUCHSIA=: rgb 255 0 255
-GRAY=: rgb 128 128 128
-GREEN=: rgb 0 128 0
-LIME=: rgb 0 255 0
-MAROON=: rgb 128 0 0
-NAVY=: rgb 0 0 128
-OLIVE=: rgb 128 128 0
-PURPLE=: rgb 128 0 128
-RED=: rgb 255 0 0
-SILVER=: rgb 192 192 192
-TEAL=: rgb 0 128 128
-YELLOW=: rgb 255 255 0
-BLACK=: rgb 0 0 0
-WHITE=: rgb 255 255 255
-)
@@ -1,10 +0,0 @@
-NB. isdemo.ijs
-
-require 'numeric rgb stats trig general/misc/font'
-
-ISDEMOPATH_z_=: jpath '~addons/demos/isigraph/'
-load ISDEMOPATH,'isview.ijs'
-load ISDEMOPATH,'isedit.ijs'
-
-isdemo_jigdemo_`start_droidwd_jigdemo_@.(('Android'-:UNAME)>IFQT) 'jigdemo'
-evtloop^:(-.IFJ6)''
@@ -1,94 +0,0 @@
-NB. edit isigraph definition
-
-coclass 'jigdemoedit'
-coinsert 'jigdemo wdbase'
-droidwd_run=: isedit_run
-
-ISEDFONTSZ=: ''
-ISEDTEXT=: ''
-
-ISEDIT=: 0 : 0
-pc isedit closeok;
-bin vh;
-xywh 0 0 17 10;cc minus button;cn "&<<";
-xywh 16 0 17 10;cc plus button;cn "&>>";
-bin s;
-xywh 131 0 34 10;cc redisplay button leftmove rightmove;cn "&Redisplay";
-xywh 165 0 34 10;cc cancel button leftmove rightmove;cn "&Cancel";
-bin z;
-xywh 0 9 200 100;cc graf editm ws_vscroll rightmove bottommove;
-bin z;
-pas 0 0;
-rem form end;
-)
-
-NB. argument is definition
-isedit_run=: 3 : 0
-y=. ISDEMODAT_jigdemo_
-if. 0=#ISEDFONTSZ do.
- getfontsize=. 13 : '{.1{._1 -.~ _1 ". y'
- ISEDFONT=: FIXFONT
- ISEDFONTSZ=: getfontsize ISEDFONT
-end.
-if. wdisparent 'isedit' do.
- wd 'psel isedit'
-else.
- wd ISEDIT
- wd 'setfont minus "MS Sans Serif" 8'
- wd 'setfont plus "MS Sans Serif" 8'
- wd 'setfont redisplay "MS Sans Serif" 8'
- wd 'setfont cancel "MS Sans Serif" 8'
- wd 'setfont graf ',ISEDFONT
-end.
-wd 'set graf *',y
-wd 'setfocus graf'
-wd 'pshow'
-)
-
-isedit_cancel_button=: 3 : 0
-ISEDTEXT_igdemo_=: graf
-wd 'pclose'
-try. wd 'psel isdemo' catch. end.
-)
-
-isedit_close=: isedit_cancel_button
-
-isedit_redisplay_button=: 3 : 0
-if. 'Android'-:UNAME do.
- sminfo 'J Graphics';'This demo is for desktop versions only' return.
-end.
-ISEDTEXT=: graf
-try.
- wd 'psel isdemo'
- isdemo_run1 graf
- ISDEMODAT=: graf
- wd 'psel isedit;setfocus graf'
-catch.
- sminfo 'error in graph definition'
- return.
-end.
-)
-
-isedit_minus_button=: 3 : 0
-1 >. ISEDFONTSZ=: <:ISEDFONTSZ
-ISEDFONT=: ISEDFONTSZ setfontsize ISEDFONT
-wd 'setfont graf ',":ISEDFONT
-)
-
-isedit_plus_button=: 3 : 0
-ISEDFONTSZ=: >:ISEDFONTSZ
-ISEDFONT=: ISEDFONTSZ setfontsize ISEDFONT
-wd 'setfont graf ',":ISEDFONT
-)
-
-isedit_rctrl_fkey=: 3 : 0
-if. 0=2 wdquery`0:@.(IFQT+.'Android'-:UNAME) 'isedit';'OK to recover definition?' do.
- wd 'set graf *',freads tolower ISDEMOPATH,ISDEMOSEL,'.ijs'
-end.
-)
-
-isedit_sctrl_fkey=: 3 : 0
-if. 0=2 wdquery`0:@.(IFQT+.'Android'-:UNAME) 'isedit';'OK to save definition?' do.
- graf fwrites tolower ISDEMOPATH,ISDEMOSEL,'.ijs'
-end.
-)
@@ -1,5 +0,0 @@
-NB. project: ~Addons/demos/isigraph
-NB.
-NB. defines list of source files.
-NB. path defaults to project directory.
-
Oops, something went wrong.

0 comments on commit d340ead

Please sign in to comment.