summaryrefslogtreecommitdiff
path: root/iup/srclua5
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 02:26:30 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 02:32:26 +0200
commit7505e88db66798b2b8fcdff2d92a7136cd826b5b (patch)
treeb6ced565318f8e8112e35cb0ad53abe4212ef8de /iup/srclua5
parente9a184546b18cf3b796bd560561f312934004c54 (diff)
Upgrading to IUP 3.2 - and cleaning up.
Diffstat (limited to 'iup/srclua5')
-rw-r--r--iup/srclua5/clua/dialog.clua52
-rw-r--r--iup/srclua5/clua/glcanvas.clua25
-rw-r--r--iup/srclua5/clua/image.clua213
-rw-r--r--iup/srclua5/clua/iuplua.clua104
-rw-r--r--iup/srclua5/clua/menu.clua139
-rw-r--r--iup/srclua5/clua/olecontrol.clua63
-rw-r--r--iup/srclua5/clua/radio.clua70
-rw-r--r--iup/srclua5/clua/tree.clua351
-rwxr-xr-xiup/srclua5/config.mak31
-rwxr-xr-xiup/srclua5/ctrl_template.lua4
-rwxr-xr-xiup/srclua5/dialog.lua1
-rwxr-xr-xiup/srclua5/generator.lua4
-rwxr-xr-xiup/srclua5/glcanvas.lua6
-rwxr-xr-xiup/srclua5/il.h7
-rwxr-xr-xiup/srclua5/il_canvas.c30
-rwxr-xr-xiup/srclua5/il_cells.c36
-rwxr-xr-xiup/srclua5/il_colorbar.c12
-rwxr-xr-xiup/srclua5/il_colorbrowser.c12
-rwxr-xr-xiup/srclua5/il_dialog.c67
-rwxr-xr-xiup/srclua5/il_getcolor.c10
-rwxr-xr-xiup/srclua5/il_getparam.c18
-rwxr-xr-xiup/srclua5/il_glcanvas.c10
-rwxr-xr-xiup/srclua5/il_image.c16
-rwxr-xr-xiup/srclua5/il_list.c10
-rwxr-xr-xiup/srclua5/il_matrix.c100
-rwxr-xr-xiup/srclua5/il_matrix_aux.c16
-rwxr-xr-xiup/srclua5/il_multiline.c2
-rwxr-xr-xiup/srclua5/il_olecontrol.c6
-rwxr-xr-xiup/srclua5/il_pplot.c18
-rwxr-xr-xiup/srclua5/il_scanf.c12
-rwxr-xr-xiup/srclua5/il_spin.c2
-rwxr-xr-xiup/srclua5/il_spinbox.c2
-rwxr-xr-xiup/srclua5/il_text.c8
-rwxr-xr-xiup/srclua5/il_toggle.c2
-rwxr-xr-xiup/srclua5/il_tree.c32
-rwxr-xr-xiup/srclua5/il_tree_aux.c40
-rwxr-xr-xiup/srclua5/image.lua16
-rwxr-xr-xiup/srclua5/iup_pplot.mak26
-rwxr-xr-xiup/srclua5/iupcd.mak21
-rwxr-xr-xiup/srclua5/iupcontrols.mak26
-rwxr-xr-xiup/srclua5/iupgl.mak27
-rwxr-xr-xiup/srclua5/iupim.mak17
-rwxr-xr-xiup/srclua5/iupimglib.mak17
-rwxr-xr-xiup/srclua5/iuplua.c126
-rwxr-xr-xiup/srclua5/iuplua.lua18
-rwxr-xr-xiup/srclua5/iuplua5.def26
-rwxr-xr-xiup/srclua5/iuplua_api.c71
-rwxr-xr-xiup/srclua5/iuplua_cd.c11
-rwxr-xr-xiup/srclua5/iuplua_controls.c5
-rwxr-xr-xiup/srclua5/iuplua_im.c5
-rwxr-xr-xiup/srclua5/iuplua_imglib.c4
-rwxr-xr-xiup/srclua5/iuplua_pplot.c17
-rwxr-xr-xiup/srclua5/iuplua_pplot5.def4
-rwxr-xr-xiup/srclua5/iupluacd5.def4
-rwxr-xr-xiup/srclua5/iupluacontrols5.def6
-rwxr-xr-xiup/srclua5/iupluagl5.def5
-rwxr-xr-xiup/srclua5/iupluaim5.def5
-rwxr-xr-xiup/srclua5/iupluaimglib5.def4
-rwxr-xr-xiup/srclua5/iupluaole5.def5
-rwxr-xr-xiup/srclua5/iupole.mak23
-rwxr-xr-xiup/srclua5/make_uname9
-rwxr-xr-xiup/srclua5/make_uname.bat11
-rwxr-xr-xiup/srclua5/menu.lua43
-rwxr-xr-xiup/srclua5/olecontrol.lua6
-rwxr-xr-xiup/srclua5/radio.lua1
-rwxr-xr-xiup/srclua5/tree.lua2
66 files changed, 936 insertions, 1156 deletions
diff --git a/iup/srclua5/clua/dialog.clua b/iup/srclua5/clua/dialog.clua
index 1af9ef1..9c1c277 100644
--- a/iup/srclua5/clua/dialog.clua
+++ b/iup/srclua5/clua/dialog.clua
@@ -24,31 +24,33 @@ static const unsigned char B1[] = {
0x20, 0x22, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x63, 0x62,
0x20, 0x3d, 0x20, 0x22, 0x6e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x6f, 0x76, 0x65,
0x5f, 0x63, 0x62, 0x20, 0x3d, 0x20, 0x22, 0x6e, 0x6e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x74, 0x72, 0x61, 0x79, 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x5f, 0x63, 0x62, 0x20, 0x3d, 0x20, 0x22,
- 0x6e, 0x6e, 0x6e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x64, 0x72, 0x6f, 0x70, 0x66, 0x69,
- 0x6c, 0x65, 0x73, 0x5f, 0x63, 0x62, 0x20, 0x3d, 0x20, 0x22, 0x73, 0x6e, 0x6e, 0x6e, 0x22, 0x2c,
- 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x7d, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d,
- 0x65, 0x6e, 0x74, 0x28, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d,
- 0x29, 0x0a, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e,
- 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x31, 0x5d, 0x29,
- 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63,
- 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x6f, 0x70, 0x75, 0x70, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65,
- 0x2c, 0x20, 0x78, 0x2c, 0x20, 0x79, 0x29, 0x0a, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x50, 0x6f,
- 0x70, 0x75, 0x70, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x78, 0x2c, 0x79, 0x29, 0x0a,
- 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x74,
- 0x72, 0x6c, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x78, 0x79, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65,
- 0x2c, 0x20, 0x78, 0x2c, 0x20, 0x79, 0x29, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x58, 0x59, 0x28, 0x68, 0x61, 0x6e, 0x64,
- 0x6c, 0x65, 0x2c, 0x20, 0x78, 0x2c, 0x20, 0x79, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x64, 0x65, 0x73,
- 0x74, 0x72, 0x6f, 0x79, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x72,
- 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f,
- 0x79, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x69,
- 0x75, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x69, 0x64, 0x67, 0x65,
- 0x74, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x29, 0x0a, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x43,
- 0x6c, 0x61, 0x73, 0x73, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x2c, 0x20, 0x22, 0x69, 0x75, 0x70, 0x20,
- 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x22, 0x29, 0x0a,
+ 0x63, 0x6f, 0x70, 0x79, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x62, 0x20, 0x3d, 0x20, 0x22, 0x73,
+ 0x6e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x74, 0x72, 0x61, 0x79, 0x63, 0x6c, 0x69, 0x63,
+ 0x6b, 0x5f, 0x63, 0x62, 0x20, 0x3d, 0x20, 0x22, 0x6e, 0x6e, 0x6e, 0x22, 0x2c, 0x0a, 0x20, 0x20,
+ 0x20, 0x20, 0x64, 0x72, 0x6f, 0x70, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x63, 0x62, 0x20, 0x3d,
+ 0x20, 0x22, 0x73, 0x6e, 0x6e, 0x6e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x7d, 0x0a, 0x0a,
+ 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x63, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x63, 0x6c, 0x61, 0x73,
+ 0x73, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74,
+ 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x28, 0x70,
+ 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x31, 0x5d, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75,
+ 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x6f, 0x70, 0x75,
+ 0x70, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x78, 0x2c, 0x20, 0x79, 0x29, 0x0a,
+ 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x50, 0x6f, 0x70, 0x75, 0x70, 0x28, 0x68, 0x61, 0x6e, 0x64,
+ 0x6c, 0x65, 0x2c, 0x78, 0x2c, 0x79, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x78,
+ 0x79, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x78, 0x2c, 0x20, 0x79, 0x29, 0x0a,
+ 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x68, 0x6f,
+ 0x77, 0x58, 0x59, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x78, 0x2c, 0x20, 0x79,
+ 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20,
+ 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x64, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x28, 0x68, 0x61, 0x6e,
+ 0x64, 0x6c, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75,
+ 0x70, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65,
+ 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x69, 0x75, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x65, 0x72, 0x57, 0x69, 0x64, 0x67, 0x65, 0x74, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x29, 0x0a,
+ 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x28, 0x63, 0x74, 0x72,
+ 0x6c, 0x2c, 0x20, 0x22, 0x69, 0x75, 0x70, 0x20, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x22, 0x29,
+ 0x0a,
};
if (luaL_loadbuffer(L, (const char *)B1, sizeof(B1), "dialog.lua") == 0) lua_call(L, 0, 0);
diff --git a/iup/srclua5/clua/glcanvas.clua b/iup/srclua5/clua/glcanvas.clua
index cb86316..e8f08ea 100644
--- a/iup/srclua5/clua/glcanvas.clua
+++ b/iup/srclua5/clua/glcanvas.clua
@@ -40,22 +40,15 @@ static const unsigned char B1[] = {
0x61, 0x67, 0x6c, 0x28, 0x6c, 0x75, 0x61, 0x5f, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2a, 0x20, 0x4c,
0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70,
0x67, 0x6c, 0x6c, 0x75, 0x61, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x4c, 0x29, 0x3b, 0x0a, 0x7d,
- 0x0a, 0x0a, 0x2f, 0x2a, 0x20, 0x6f, 0x62, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x79, 0x20,
- 0x74, 0x6f, 0x20, 0x75, 0x73, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x22, 0x69,
- 0x75, 0x70, 0x6c, 0x75, 0x61, 0x67, 0x6c, 0x35, 0x31, 0x22, 0x20, 0x2a, 0x2f, 0x0a, 0x69, 0x6e,
- 0x74, 0x20, 0x6c, 0x75, 0x61, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x75, 0x70, 0x6c, 0x75, 0x61,
- 0x67, 0x6c, 0x35, 0x31, 0x28, 0x6c, 0x75, 0x61, 0x5f, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2a, 0x20,
- 0x4c, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75,
- 0x70, 0x67, 0x6c, 0x6c, 0x75, 0x61, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x4c, 0x29, 0x3b, 0x0a,
- 0x7d, 0x0a, 0x0a, 0x5d, 0x5d, 0x0a, 0x7d, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65,
- 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61,
- 0x6d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70,
- 0x2e, 0x47, 0x4c, 0x43, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x28, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a,
- 0x0a, 0x69, 0x75, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x69, 0x64,
- 0x67, 0x65, 0x74, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x29, 0x0a, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65,
- 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x2c, 0x20, 0x22, 0x69, 0x75,
- 0x70, 0x20, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x22, 0x29, 0x0a,
+ 0x0a, 0x0a, 0x5d, 0x5d, 0x0a, 0x7d, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d,
+ 0x65, 0x6e, 0x74, 0x28, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d,
+ 0x29, 0x0a, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e,
+ 0x47, 0x4c, 0x43, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x28, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a,
+ 0x69, 0x75, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x69, 0x64, 0x67,
+ 0x65, 0x74, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x29, 0x0a, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74,
+ 0x43, 0x6c, 0x61, 0x73, 0x73, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x2c, 0x20, 0x22, 0x69, 0x75, 0x70,
+ 0x20, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x22, 0x29, 0x0a,
};
if (luaL_loadbuffer(L, (const char *)B1, sizeof(B1), "glcanvas.lua") == 0) lua_call(L, 0, 0);
diff --git a/iup/srclua5/clua/image.clua b/iup/srclua5/clua/image.clua
index c22bdb9..16add8e 100644
--- a/iup/srclua5/clua/image.clua
+++ b/iup/srclua5/clua/image.clua
@@ -31,113 +31,114 @@ static const unsigned char B1[] = {
0x0a, 0x20, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x2c, 0x20,
0x6a, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2a, 0x20, 0x67, 0x65, 0x74, 0x20, 0x74,
0x68, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x6c, 0x69, 0x6e,
- 0x65, 0x73, 0x20, 0x2a, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x20, 0x3d, 0x20, 0x6c, 0x75,
- 0x61, 0x4c, 0x5f, 0x67, 0x65, 0x74, 0x6e, 0x28, 0x4c, 0x2c, 0x20, 0x31, 0x29, 0x3b, 0x20, 0x20,
- 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2a, 0x20, 0x67, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65,
- 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6c, 0x75, 0x6d,
- 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20,
- 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x2a, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x75, 0x61, 0x5f,
- 0x70, 0x75, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x28, 0x4c, 0x2c, 0x20, 0x31, 0x29,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x75, 0x61, 0x5f, 0x67, 0x65, 0x74, 0x74, 0x61, 0x62,
- 0x6c, 0x65, 0x28, 0x4c, 0x2c, 0x20, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x77, 0x20,
- 0x3d, 0x20, 0x6c, 0x75, 0x61, 0x4c, 0x5f, 0x67, 0x65, 0x74, 0x6e, 0x28, 0x4c, 0x2c, 0x20, 0x2d,
- 0x31, 0x29, 0x3b, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x75, 0x61, 0x5f, 0x70, 0x6f,
- 0x70, 0x28, 0x4c, 0x2c, 0x20, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x20, 0x3d, 0x20, 0x28, 0x75, 0x6e, 0x73, 0x69,
- 0x67, 0x6e, 0x65, 0x64, 0x20, 0x63, 0x68, 0x61, 0x72, 0x20, 0x2a, 0x29, 0x20, 0x6d, 0x61, 0x6c,
- 0x6c, 0x6f, 0x63, 0x20, 0x28, 0x68, 0x2a, 0x77, 0x29, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x66, 0x6f, 0x72, 0x20, 0x28, 0x69, 0x3d, 0x31, 0x3b, 0x20, 0x69, 0x3c, 0x3d, 0x68, 0x3b, 0x20,
- 0x69, 0x2b, 0x2b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x6c, 0x75, 0x61, 0x5f, 0x70, 0x75, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x28,
- 0x4c, 0x2c, 0x20, 0x69, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x75, 0x61,
- 0x5f, 0x67, 0x65, 0x74, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x4c, 0x2c, 0x20, 0x31, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x6a, 0x3d, 0x31, 0x3b,
- 0x20, 0x6a, 0x3c, 0x3d, 0x77, 0x3b, 0x20, 0x6a, 0x2b, 0x2b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x20,
- 0x69, 0x64, 0x78, 0x20, 0x3d, 0x20, 0x28, 0x69, 0x2d, 0x31, 0x29, 0x2a, 0x77, 0x2b, 0x28, 0x6a,
- 0x2d, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x75, 0x61,
- 0x5f, 0x70, 0x75, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x28, 0x4c, 0x2c, 0x20, 0x6a,
- 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x75, 0x61, 0x5f, 0x67,
- 0x65, 0x74, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x4c, 0x2c, 0x20, 0x2d, 0x32, 0x29, 0x3b, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x5b, 0x69,
- 0x64, 0x78, 0x5d, 0x20, 0x3d, 0x20, 0x28, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20,
- 0x63, 0x68, 0x61, 0x72, 0x29, 0x6c, 0x75, 0x61, 0x5f, 0x74, 0x6f, 0x6e, 0x75, 0x6d, 0x62, 0x65,
- 0x72, 0x28, 0x4c, 0x2c, 0x20, 0x2d, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x6c, 0x75, 0x61, 0x5f, 0x70, 0x6f, 0x70, 0x28, 0x4c, 0x2c, 0x20, 0x31, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c,
+ 0x65, 0x73, 0x20, 0x2a, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x20, 0x3d, 0x20, 0x69, 0x75,
+ 0x70, 0x6c, 0x75, 0x61, 0x5f, 0x67, 0x65, 0x74, 0x6e, 0x28, 0x4c, 0x2c, 0x20, 0x31, 0x29, 0x3b,
+ 0x20, 0x20, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2a, 0x20, 0x67, 0x65, 0x74, 0x20, 0x74,
+ 0x68, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6c,
+ 0x75, 0x6d, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73,
+ 0x74, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x2a, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x75,
+ 0x61, 0x5f, 0x70, 0x75, 0x73, 0x68, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x28, 0x4c, 0x2c,
+ 0x20, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x75, 0x61, 0x5f, 0x67, 0x65, 0x74,
+ 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x4c, 0x2c, 0x20, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20,
+ 0x20, 0x77, 0x20, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x6c, 0x75, 0x61, 0x5f, 0x67, 0x65, 0x74, 0x6e,
+ 0x28, 0x4c, 0x2c, 0x20, 0x2d, 0x31, 0x29, 0x3b, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c,
0x75, 0x61, 0x5f, 0x70, 0x6f, 0x70, 0x28, 0x4c, 0x2c, 0x20, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x68, 0x20,
- 0x3d, 0x20, 0x49, 0x75, 0x70, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x28, 0x77, 0x2c, 0x68, 0x2c, 0x70,
- 0x69, 0x78, 0x65, 0x6c, 0x73, 0x29, 0x3b, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x72,
- 0x65, 0x65, 0x28, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x29, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x6c, 0x75,
- 0x61, 0x4c, 0x5f, 0x67, 0x65, 0x74, 0x6e, 0x28, 0x4c, 0x2c, 0x20, 0x32, 0x29, 0x3b, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x20, 0x3d, 0x20,
- 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x3e, 0x32, 0x35, 0x35, 0x3f, 0x20,
- 0x32, 0x35, 0x35, 0x3a, 0x20, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x28, 0x63, 0x3d, 0x31, 0x3b, 0x20, 0x63, 0x3c,
- 0x3d, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x3b, 0x20, 0x63, 0x2b, 0x2b,
- 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x75,
- 0x61, 0x5f, 0x72, 0x61, 0x77, 0x67, 0x65, 0x74, 0x69, 0x28, 0x4c, 0x2c, 0x20, 0x32, 0x2c, 0x20,
- 0x63, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x70, 0x72, 0x69, 0x6e, 0x74,
- 0x66, 0x28, 0x73, 0x74, 0x72, 0x2c, 0x20, 0x22, 0x25, 0x64, 0x22, 0x2c, 0x20, 0x63, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x49, 0x75, 0x70, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x41,
- 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x69, 0x68, 0x2c, 0x20, 0x73, 0x74, 0x72,
- 0x2c, 0x20, 0x6c, 0x75, 0x61, 0x5f, 0x74, 0x6f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x4c,
- 0x2c, 0x2d, 0x31, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x75, 0x61,
- 0x5f, 0x70, 0x6f, 0x70, 0x28, 0x4c, 0x2c, 0x20, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x7d, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x7b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x77, 0x20, 0x3d, 0x20, 0x6c, 0x75, 0x61, 0x4c, 0x5f, 0x63, 0x68,
- 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x74, 0x28, 0x4c, 0x2c, 0x20, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x68, 0x20, 0x3d, 0x20, 0x6c, 0x75, 0x61, 0x4c, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b,
- 0x69, 0x6e, 0x74, 0x28, 0x4c, 0x2c, 0x20, 0x32, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70,
- 0x69, 0x78, 0x65, 0x6c, 0x73, 0x20, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x6c, 0x75, 0x61, 0x5f, 0x63,
- 0x68, 0x65, 0x63, 0x6b, 0x75, 0x63, 0x68, 0x61, 0x72, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x28,
- 0x4c, 0x2c, 0x20, 0x33, 0x2c, 0x20, 0x77, 0x2a, 0x68, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x69, 0x68, 0x20, 0x3d, 0x20, 0x49, 0x75, 0x70, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x28, 0x77, 0x2c,
- 0x20, 0x68, 0x2c, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x66, 0x72, 0x65, 0x65, 0x28, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x29, 0x3b, 0x0a, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x20, 0x3d,
- 0x20, 0x6c, 0x75, 0x61, 0x4c, 0x5f, 0x67, 0x65, 0x74, 0x6e, 0x28, 0x4c, 0x2c, 0x20, 0x34, 0x29,
- 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73,
- 0x20, 0x3d, 0x20, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x3e, 0x32, 0x35,
- 0x36, 0x3f, 0x20, 0x32, 0x35, 0x36, 0x3a, 0x20, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6f,
- 0x72, 0x73, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x28, 0x63, 0x3d, 0x31, 0x3b,
- 0x20, 0x63, 0x3c, 0x3d, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x3b, 0x20,
- 0x63, 0x2b, 0x2b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x6c, 0x75, 0x61, 0x5f, 0x72, 0x61, 0x77, 0x67, 0x65, 0x74, 0x69, 0x28, 0x4c, 0x2c, 0x20,
- 0x34, 0x2c, 0x20, 0x63, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x70, 0x72,
- 0x69, 0x6e, 0x74, 0x66, 0x28, 0x73, 0x74, 0x72, 0x2c, 0x20, 0x22, 0x25, 0x64, 0x22, 0x2c, 0x20,
- 0x63, 0x2d, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x49, 0x75, 0x70, 0x53,
- 0x74, 0x6f, 0x72, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x69, 0x68,
- 0x2c, 0x20, 0x73, 0x74, 0x72, 0x2c, 0x20, 0x6c, 0x75, 0x61, 0x5f, 0x74, 0x6f, 0x73, 0x74, 0x72,
- 0x69, 0x6e, 0x67, 0x28, 0x4c, 0x2c, 0x2d, 0x31, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x6c, 0x75, 0x61, 0x5f, 0x70, 0x6f, 0x70, 0x28, 0x4c, 0x2c, 0x20, 0x31, 0x29, 0x3b,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x69, 0x75,
- 0x70, 0x6c, 0x75, 0x61, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x73, 0x74, 0x61, 0x74, 0x65, 0x28, 0x4c,
- 0x2c, 0x20, 0x69, 0x68, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x69, 0x75, 0x70, 0x6c, 0x75, 0x61, 0x5f,
- 0x70, 0x75, 0x73, 0x68, 0x69, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x72, 0x61, 0x77, 0x28,
- 0x4c, 0x2c, 0x20, 0x69, 0x68, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x20, 0x31, 0x3b, 0x0a, 0x7d, 0x20, 0x0a, 0x20, 0x0a, 0x5d, 0x5d, 0x0a, 0x7d, 0x0a, 0x0a, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x63, 0x72, 0x65,
- 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x63, 0x6c, 0x61, 0x73, 0x73,
- 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28,
- 0x70, 0x61, 0x72, 0x61, 0x6d, 0x2e, 0x77, 0x69, 0x64, 0x74, 0x68, 0x20, 0x61, 0x6e, 0x64, 0x20,
- 0x70, 0x61, 0x72, 0x61, 0x6d, 0x2e, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x20, 0x61, 0x6e, 0x64,
- 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x2e, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x29, 0x20, 0x74,
- 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
- 0x69, 0x75, 0x70, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x2e,
- 0x77, 0x69, 0x64, 0x74, 0x68, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x2e, 0x68, 0x65, 0x69,
- 0x67, 0x68, 0x74, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x2e, 0x70, 0x69, 0x78, 0x65, 0x6c,
- 0x73, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x29,
- 0x0a, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,
- 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x28, 0x70,
- 0x61, 0x72, 0x61, 0x6d, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6c, 0x6f,
- 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a,
- 0x69, 0x75, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x69, 0x64, 0x67,
- 0x65, 0x74, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x29, 0x0a, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74,
- 0x43, 0x6c, 0x61, 0x73, 0x73, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x2c, 0x20, 0x22, 0x69, 0x75, 0x70,
- 0x20, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x22, 0x29, 0x0a,
+ 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x20, 0x3d, 0x20,
+ 0x28, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x63, 0x68, 0x61, 0x72, 0x20, 0x2a,
+ 0x29, 0x20, 0x6d, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x20, 0x28, 0x68, 0x2a, 0x77, 0x29, 0x3b, 0x0a,
+ 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x69, 0x3d, 0x31, 0x3b, 0x20, 0x69,
+ 0x3c, 0x3d, 0x68, 0x3b, 0x20, 0x69, 0x2b, 0x2b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0a,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x75, 0x61, 0x5f, 0x70, 0x75, 0x73, 0x68, 0x69, 0x6e,
+ 0x74, 0x65, 0x67, 0x65, 0x72, 0x28, 0x4c, 0x2c, 0x20, 0x69, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x6c, 0x75, 0x61, 0x5f, 0x67, 0x65, 0x74, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28,
+ 0x4c, 0x2c, 0x20, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72,
+ 0x20, 0x28, 0x6a, 0x3d, 0x31, 0x3b, 0x20, 0x6a, 0x3c, 0x3d, 0x77, 0x3b, 0x20, 0x6a, 0x2b, 0x2b,
+ 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x64, 0x78, 0x20, 0x3d, 0x20, 0x28, 0x69, 0x2d, 0x31,
+ 0x29, 0x2a, 0x77, 0x2b, 0x28, 0x6a, 0x2d, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x6c, 0x75, 0x61, 0x5f, 0x70, 0x75, 0x73, 0x68, 0x69, 0x6e, 0x74, 0x65, 0x67,
+ 0x65, 0x72, 0x28, 0x4c, 0x2c, 0x20, 0x6a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x6c, 0x75, 0x61, 0x5f, 0x67, 0x65, 0x74, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x4c,
+ 0x2c, 0x20, 0x2d, 0x32, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70,
+ 0x69, 0x78, 0x65, 0x6c, 0x73, 0x5b, 0x69, 0x64, 0x78, 0x5d, 0x20, 0x3d, 0x20, 0x28, 0x75, 0x6e,
+ 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x63, 0x68, 0x61, 0x72, 0x29, 0x6c, 0x75, 0x61, 0x5f,
+ 0x74, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x28, 0x4c, 0x2c, 0x20, 0x2d, 0x31, 0x29,
+ 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x75, 0x61, 0x5f, 0x70, 0x6f,
+ 0x70, 0x28, 0x4c, 0x2c, 0x20, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d,
+ 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x75, 0x61, 0x5f, 0x70, 0x6f, 0x70, 0x28, 0x4c,
+ 0x2c, 0x20, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20,
+ 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x68, 0x20, 0x3d, 0x20, 0x49, 0x75, 0x70, 0x49, 0x6d, 0x61,
+ 0x67, 0x65, 0x28, 0x77, 0x2c, 0x68, 0x2c, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x29, 0x3b, 0x20,
+ 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x72, 0x65, 0x65, 0x28, 0x70, 0x69, 0x78, 0x65, 0x6c,
+ 0x73, 0x29, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6c,
+ 0x6f, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x6c, 0x75, 0x61, 0x5f, 0x67, 0x65, 0x74,
+ 0x6e, 0x28, 0x4c, 0x2c, 0x20, 0x32, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x75, 0x6d,
+ 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f,
+ 0x6c, 0x6f, 0x72, 0x73, 0x3e, 0x32, 0x35, 0x35, 0x3f, 0x20, 0x32, 0x35, 0x35, 0x3a, 0x20, 0x6e,
+ 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66,
+ 0x6f, 0x72, 0x28, 0x63, 0x3d, 0x31, 0x3b, 0x20, 0x63, 0x3c, 0x3d, 0x6e, 0x75, 0x6d, 0x5f, 0x63,
+ 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x3b, 0x20, 0x63, 0x2b, 0x2b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20,
+ 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x75, 0x61, 0x5f, 0x72, 0x61, 0x77, 0x67,
+ 0x65, 0x74, 0x69, 0x28, 0x4c, 0x2c, 0x20, 0x32, 0x2c, 0x20, 0x63, 0x29, 0x3b, 0x0a, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x73, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x66, 0x28, 0x73, 0x74, 0x72, 0x2c,
+ 0x20, 0x22, 0x25, 0x64, 0x22, 0x2c, 0x20, 0x63, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x49, 0x75, 0x70, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
+ 0x74, 0x65, 0x28, 0x69, 0x68, 0x2c, 0x20, 0x73, 0x74, 0x72, 0x2c, 0x20, 0x6c, 0x75, 0x61, 0x5f,
+ 0x74, 0x6f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x4c, 0x2c, 0x2d, 0x31, 0x29, 0x29, 0x3b,
+ 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x75, 0x61, 0x5f, 0x70, 0x6f, 0x70, 0x28, 0x4c,
+ 0x2c, 0x20, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x7d, 0x0a,
+ 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x77,
+ 0x20, 0x3d, 0x20, 0x6c, 0x75, 0x61, 0x4c, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x74,
+ 0x28, 0x4c, 0x2c, 0x20, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x20, 0x3d, 0x20,
+ 0x6c, 0x75, 0x61, 0x4c, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x74, 0x28, 0x4c, 0x2c,
+ 0x20, 0x32, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x20,
+ 0x3d, 0x20, 0x69, 0x75, 0x70, 0x6c, 0x75, 0x61, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x75, 0x63,
+ 0x68, 0x61, 0x72, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x28, 0x4c, 0x2c, 0x20, 0x33, 0x2c, 0x20,
+ 0x77, 0x2a, 0x68, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x68, 0x20, 0x3d, 0x20, 0x49,
+ 0x75, 0x70, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x28, 0x77, 0x2c, 0x20, 0x68, 0x2c, 0x20, 0x70, 0x69,
+ 0x78, 0x65, 0x6c, 0x73, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x72, 0x65, 0x65, 0x28,
+ 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x29, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x75,
+ 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x6c, 0x75,
+ 0x61, 0x5f, 0x67, 0x65, 0x74, 0x6e, 0x28, 0x4c, 0x2c, 0x20, 0x34, 0x29, 0x3b, 0x0a, 0x20, 0x20,
+ 0x20, 0x20, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x6e,
+ 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x3e, 0x32, 0x35, 0x36, 0x3f, 0x20, 0x32,
+ 0x35, 0x36, 0x3a, 0x20, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x3b, 0x0a,
+ 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x28, 0x63, 0x3d, 0x31, 0x3b, 0x20, 0x63, 0x3c, 0x3d,
+ 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x3b, 0x20, 0x63, 0x2b, 0x2b, 0x29,
+ 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x75, 0x61,
+ 0x5f, 0x72, 0x61, 0x77, 0x67, 0x65, 0x74, 0x69, 0x28, 0x4c, 0x2c, 0x20, 0x34, 0x2c, 0x20, 0x63,
+ 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x66,
+ 0x28, 0x73, 0x74, 0x72, 0x2c, 0x20, 0x22, 0x25, 0x64, 0x22, 0x2c, 0x20, 0x63, 0x2d, 0x31, 0x29,
+ 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x49, 0x75, 0x70, 0x53, 0x74, 0x6f, 0x72, 0x65,
+ 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x69, 0x68, 0x2c, 0x20, 0x73, 0x74,
+ 0x72, 0x2c, 0x20, 0x6c, 0x75, 0x61, 0x5f, 0x74, 0x6f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28,
+ 0x4c, 0x2c, 0x2d, 0x31, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x75,
+ 0x61, 0x5f, 0x70, 0x6f, 0x70, 0x28, 0x4c, 0x2c, 0x20, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20,
+ 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x69, 0x75, 0x70, 0x6c, 0x75, 0x61,
+ 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x73, 0x74, 0x61, 0x74, 0x65, 0x28, 0x4c, 0x2c, 0x20, 0x69, 0x68,
+ 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x69, 0x75, 0x70, 0x6c, 0x75, 0x61, 0x5f, 0x70, 0x75, 0x73, 0x68,
+ 0x69, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x72, 0x61, 0x77, 0x28, 0x4c, 0x2c, 0x20, 0x69,
+ 0x68, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x3b, 0x0a,
+ 0x7d, 0x20, 0x0a, 0x20, 0x0a, 0x5d, 0x5d, 0x0a, 0x7d, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45,
+ 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x2c, 0x20, 0x70, 0x61,
+ 0x72, 0x61, 0x6d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x70, 0x61, 0x72, 0x61,
+ 0x6d, 0x2e, 0x77, 0x69, 0x64, 0x74, 0x68, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x61, 0x72, 0x61,
+ 0x6d, 0x2e, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x61, 0x72,
+ 0x61, 0x6d, 0x2e, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e,
+ 0x49, 0x6d, 0x61, 0x67, 0x65, 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x2e, 0x77, 0x69, 0x64, 0x74,
+ 0x68, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x2e, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x2c,
+ 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x2e, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x73, 0x2c, 0x20, 0x70,
+ 0x61, 0x72, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20,
+ 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
+ 0x20, 0x69, 0x75, 0x70, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d,
+ 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x29, 0x0a,
+ 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x69, 0x75, 0x70, 0x2e,
+ 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x69, 0x64, 0x67, 0x65, 0x74, 0x28, 0x63,
+ 0x74, 0x72, 0x6c, 0x29, 0x0a, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73,
+ 0x73, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x2c, 0x20, 0x22, 0x69, 0x75, 0x70, 0x20, 0x77, 0x69, 0x64,
+ 0x67, 0x65, 0x74, 0x22, 0x29, 0x0a,
};
if (luaL_loadbuffer(L, (const char *)B1, sizeof(B1), "image.lua") == 0) lua_call(L, 0, 0);
diff --git a/iup/srclua5/clua/iuplua.clua b/iup/srclua5/clua/iuplua.clua
index 08a0333..3400402 100644
--- a/iup/srclua5/clua/iuplua.clua
+++ b/iup/srclua5/clua/iuplua.clua
@@ -418,14 +418,14 @@ static const unsigned char B1[] = {
0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x70, 0x75,
0x70, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x4d, 0x45, 0x53, 0x53,
- 0x41, 0x47, 0x45, 0x28, 0x65, 0x72, 0x72, 0x2c, 0x74, 0x72, 0x61, 0x63, 0x65, 0x62, 0x61, 0x63,
- 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x65, 0x72, 0x72, 0x2e, 0x2e,
+ 0x41, 0x47, 0x45, 0x28, 0x6d, 0x73, 0x67, 0x2c, 0x74, 0x72, 0x61, 0x63, 0x65, 0x62, 0x61, 0x63,
+ 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x6d, 0x73, 0x67, 0x20, 0x3d, 0x20, 0x6d, 0x73, 0x67, 0x2e, 0x2e,
0x28, 0x74, 0x72, 0x61, 0x63, 0x65, 0x62, 0x61, 0x63, 0x6b, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x22,
0x29, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x69, 0x75, 0x70, 0x2e, 0x65, 0x72, 0x72, 0x6f,
0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x70, 0x75, 0x70, 0x29,
0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x65, 0x72,
0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x70, 0x75,
- 0x70, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x65, 0x72, 0x72, 0x0a, 0x20, 0x20,
+ 0x70, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x6d, 0x73, 0x67, 0x0a, 0x20, 0x20,
0x65, 0x6c, 0x73, 0x65, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c,
0x20, 0x62, 0x74, 0x20, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e,
0x7b, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3d, 0x22, 0x4f, 0x6b, 0x22, 0x2c, 0x20, 0x73, 0x69, 0x7a,
@@ -437,7 +437,7 @@ static const unsigned char B1[] = {
0x20, 0x69, 0x75, 0x70, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6c, 0x69, 0x6e, 0x65, 0x7b, 0x65,
0x78, 0x70, 0x61, 0x6e, 0x64, 0x3d, 0x22, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x20, 0x72, 0x65, 0x61,
0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x3d, 0x22, 0x59, 0x45, 0x53, 0x22, 0x2c, 0x20, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x3d, 0x65, 0x72, 0x72, 0x2c, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x3d, 0x22, 0x33, 0x30,
+ 0x75, 0x65, 0x3d, 0x6d, 0x73, 0x67, 0x2c, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x3d, 0x22, 0x33, 0x30,
0x30, 0x78, 0x31, 0x35, 0x30, 0x22, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61,
0x6c, 0x20, 0x76, 0x62, 0x20, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x76, 0x62, 0x6f, 0x78, 0x7b,
0x6d, 0x6c, 0x2c, 0x20, 0x62, 0x74, 0x3b, 0x20, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e,
@@ -461,52 +461,56 @@ static const unsigned char B1[] = {
0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x2e, 0x2e, 0x2e, 0x29, 0x20, 0x72, 0x65,
0x74, 0x75, 0x72, 0x6e, 0x20, 0x7b, 0x2e, 0x2e, 0x2e, 0x7d, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a,
0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x28, 0x66, 0x2c, 0x20, 0x65,
- 0x72, 0x72, 0x29, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x66, 0x20, 0x74,
- 0x68, 0x65, 0x6e, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x5f, 0x45, 0x52,
- 0x52, 0x4f, 0x52, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x28, 0x65, 0x72, 0x72, 0x29, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x0a, 0x20, 0x20, 0x65, 0x6e,
- 0x64, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x74, 0x20, 0x3d, 0x20,
- 0x69, 0x75, 0x70, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x28, 0x70, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x66,
- 0x29, 0x29, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x74, 0x5b,
- 0x31, 0x5d, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70,
- 0x2e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x28, 0x72,
- 0x65, 0x74, 0x5b, 0x32, 0x5d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
- 0x6e, 0x0a, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x74,
- 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x28, 0x72, 0x65, 0x74, 0x2c,
- 0x20, 0x31, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x75,
- 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x28, 0x72, 0x65, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64,
- 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69,
- 0x75, 0x70, 0x2e, 0x64, 0x6f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x73, 0x29, 0x20, 0x72,
- 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63,
- 0x74, 0x65, 0x64, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x28, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x74, 0x72,
- 0x69, 0x6e, 0x67, 0x28, 0x73, 0x29, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x64, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x28,
- 0x66, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x28, 0x6c, 0x6f, 0x61,
- 0x64, 0x66, 0x69, 0x6c, 0x65, 0x28, 0x66, 0x29, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x52, 0x47, 0x42, 0x28,
- 0x72, 0x2c, 0x20, 0x67, 0x2c, 0x20, 0x62, 0x29, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
- 0x6e, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28,
- 0x22, 0x25, 0x64, 0x20, 0x25, 0x64, 0x20, 0x25, 0x64, 0x22, 0x2c, 0x20, 0x32, 0x35, 0x35, 0x2a,
- 0x72, 0x2c, 0x20, 0x32, 0x35, 0x35, 0x2a, 0x67, 0x2c, 0x20, 0x32, 0x35, 0x35, 0x2a, 0x62, 0x29,
- 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x77, 0x69,
- 0x6c, 0x6c, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x20, 0x62, 0x6f, 0x74, 0x68, 0x20, 0x6e, 0x61,
- 0x6d, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x69,
- 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,
- 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x2d, 0x2d, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x77,
- 0x69, 0x6c, 0x6c, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x20, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63,
- 0x20, 0x6c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6b,
- 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x0a, 0x69, 0x66,
- 0x20, 0x5f, 0x47, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e,
- 0x0a, 0x20, 0x20, 0x20, 0x5f, 0x47, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x6c,
- 0x6f, 0x61, 0x64, 0x65, 0x64, 0x5b, 0x22, 0x69, 0x75, 0x70, 0x6c, 0x75, 0x61, 0x22, 0x5d, 0x20,
- 0x3d, 0x20, 0x69, 0x75, 0x70, 0x0a, 0x20, 0x20, 0x20, 0x5f, 0x47, 0x2e, 0x70, 0x61, 0x63, 0x6b,
- 0x61, 0x67, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x5b, 0x22, 0x69, 0x75, 0x70, 0x6c,
- 0x75, 0x61, 0x35, 0x31, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x0a, 0x20, 0x20, 0x20,
- 0x69, 0x75, 0x70, 0x2e, 0x5f, 0x4d, 0x20, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x0a, 0x20, 0x20, 0x20,
- 0x69, 0x75, 0x70, 0x2e, 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x20, 0x3d, 0x20, 0x22,
- 0x69, 0x75, 0x70, 0x6c, 0x75, 0x61, 0x22, 0x0a, 0x65, 0x6e, 0x64, 0x0a,
+ 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x66, 0x2c, 0x20, 0x6d, 0x73,
+ 0x67, 0x29, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x66, 0x20, 0x74, 0x68,
+ 0x65, 0x6e, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x5f, 0x45, 0x52, 0x52,
+ 0x4f, 0x52, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x28, 0x6d, 0x73, 0x67, 0x29, 0x0a, 0x20,
+ 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64,
+ 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x69,
+ 0x75, 0x70, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x28, 0x70, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x66, 0x29,
+ 0x29, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x74, 0x5b, 0x31,
+ 0x5d, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e,
+ 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x28, 0x72, 0x65,
+ 0x74, 0x5b, 0x32, 0x5d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
+ 0x0a, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x74, 0x61,
+ 0x62, 0x6c, 0x65, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x28, 0x72, 0x65, 0x74, 0x2c, 0x20,
+ 0x31, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x75, 0x6e,
+ 0x70, 0x61, 0x63, 0x6b, 0x28, 0x72, 0x65, 0x74, 0x29, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x6d, 0x75,
+ 0x73, 0x74, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,
+ 0x62, 0x79, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x20,
+ 0x77, 0x68, 0x65, 0x6e, 0x20, 0x35, 0x2e, 0x31, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20,
+ 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a,
+ 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x75,
+ 0x70, 0x2e, 0x64, 0x6f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x73, 0x29, 0x20, 0x72, 0x65,
+ 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74,
+ 0x65, 0x64, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x74, 0x72, 0x69, 0x6e,
+ 0x67, 0x28, 0x73, 0x29, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x64, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x28, 0x66, 0x29,
+ 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x65, 0x63, 0x74, 0x65, 0x64, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x6c, 0x6f, 0x61, 0x64, 0x66, 0x69,
+ 0x6c, 0x65, 0x28, 0x66, 0x29, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x52, 0x47, 0x42, 0x28, 0x72, 0x2c, 0x20,
+ 0x67, 0x2c, 0x20, 0x62, 0x29, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73,
+ 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x22, 0x25, 0x64,
+ 0x20, 0x25, 0x64, 0x20, 0x25, 0x64, 0x22, 0x2c, 0x20, 0x32, 0x35, 0x35, 0x2a, 0x72, 0x2c, 0x20,
+ 0x32, 0x35, 0x35, 0x2a, 0x67, 0x2c, 0x20, 0x32, 0x35, 0x35, 0x2a, 0x62, 0x29, 0x0a, 0x65, 0x6e,
+ 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20,
+ 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x20, 0x62, 0x6f, 0x74, 0x68, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73,
+ 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74,
+ 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x0a, 0x2d, 0x2d, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x77, 0x69, 0x6c, 0x6c,
+ 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x20, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x20, 0x6c, 0x69,
+ 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x77, 0x69,
+ 0x74, 0x68, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x0a, 0x69, 0x66, 0x20, 0x5f, 0x47,
+ 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20,
+ 0x20, 0x5f, 0x47, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64,
+ 0x65, 0x64, 0x5b, 0x22, 0x69, 0x75, 0x70, 0x6c, 0x75, 0x61, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x69,
+ 0x75, 0x70, 0x0a, 0x20, 0x20, 0x20, 0x5f, 0x47, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65,
+ 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x5b, 0x22, 0x69, 0x75, 0x70, 0x6c, 0x75, 0x61, 0x35,
+ 0x31, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70,
+ 0x2e, 0x5f, 0x4d, 0x20, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70,
+ 0x2e, 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x20, 0x3d, 0x20, 0x22, 0x69, 0x75, 0x70,
+ 0x6c, 0x75, 0x61, 0x22, 0x0a, 0x65, 0x6e, 0x64, 0x0a,
};
if (luaL_loadbuffer(L, (const char *)B1, sizeof(B1), "iuplua.lua") == 0) lua_call(L, 0, 0);
diff --git a/iup/srclua5/clua/menu.clua b/iup/srclua5/clua/menu.clua
index 6d579a8..6d4a56d 100644
--- a/iup/srclua5/clua/menu.clua
+++ b/iup/srclua5/clua/menu.clua
@@ -14,6 +14,10 @@ static const unsigned char B1[] = {
0x61, 0x6c, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6e, 0x69,
0x63, 0x6b, 0x20, 0x3d, 0x20, 0x22, 0x6d, 0x65, 0x6e, 0x75, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x70,
0x61, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x42, 0x4f, 0x58, 0x2c,
+ 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x20,
+ 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69,
+ 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x20, 0x61, 0x66, 0x74,
+ 0x65, 0x72, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74,
0x0a, 0x20, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x2d,
0x22, 0x2c, 0x0a, 0x20, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x20, 0x3d, 0x20,
0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x63, 0x62, 0x20, 0x3d, 0x20,
@@ -28,63 +32,84 @@ static const unsigned char B1[] = {
0x65, 0x6c, 0x65, 0x6d, 0x29, 0x0a, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x41, 0x70, 0x70, 0x65,
0x6e, 0x64, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x29,
0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63,
- 0x74, 0x72, 0x6c, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
- 0x74, 0x28, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x29, 0x0a,
- 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6e, 0x20, 0x3d, 0x20, 0x23, 0x70, 0x61, 0x72,
- 0x61, 0x6d, 0x0a, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x3d, 0x31, 0x2c, 0x6e, 0x20, 0x64,
- 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x70, 0x61,
- 0x72, 0x61, 0x6d, 0x5b, 0x69, 0x5d, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x74, 0x61, 0x62, 0x6c,
- 0x65, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c,
- 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x72, 0x67, 0x20, 0x3d, 0x20, 0x7b,
- 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x75, 0x2c, 0x76, 0x20,
- 0x69, 0x6e, 0x20, 0x70, 0x61, 0x69, 0x72, 0x73, 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x69,
- 0x5d, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
- 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x75, 0x29, 0x20, 0x7e, 0x3d, 0x20, 0x22, 0x6e, 0x75, 0x6d,
- 0x62, 0x65, 0x72, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x72, 0x67, 0x5b, 0x75, 0x5d, 0x20, 0x3d,
- 0x20, 0x76, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69,
- 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x69, 0x5d, 0x5b,
- 0x31, 0x5d, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x20,
- 0x61, 0x6e, 0x64, 0x20, 0x28, 0x74, 0x79, 0x70, 0x65, 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b,
- 0x69, 0x5d, 0x5b, 0x32, 0x5d, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x66, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x6f, 0x72, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x70, 0x61, 0x72,
- 0x61, 0x6d, 0x5b, 0x69, 0x5d, 0x5b, 0x32, 0x5d, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x73, 0x74,
- 0x72, 0x69, 0x6e, 0x67, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x72, 0x67, 0x2e, 0x74, 0x69, 0x74, 0x6c,
- 0x65, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x69, 0x5d, 0x5b, 0x31, 0x5d, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x72, 0x67, 0x2e,
- 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x69,
- 0x5d, 0x5b, 0x32, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x72,
- 0x61, 0x6d, 0x5b, 0x69, 0x5d, 0x20, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x69, 0x74, 0x65, 0x6d,
- 0x28, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x72, 0x67, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x70, 0x61, 0x72, 0x61,
- 0x6d, 0x5b, 0x69, 0x5d, 0x5b, 0x31, 0x5d, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x73, 0x74, 0x72,
- 0x69, 0x6e, 0x67, 0x22, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x70, 0x61,
- 0x72, 0x61, 0x6d, 0x5b, 0x69, 0x5d, 0x5b, 0x32, 0x5d, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x75,
- 0x73, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x72, 0x67, 0x5b, 0x31, 0x5d,
- 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x69, 0x5d, 0x5b, 0x32, 0x5d, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x72, 0x67, 0x2e, 0x74,
- 0x69, 0x74, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x69, 0x5d, 0x5b,
- 0x31, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d,
- 0x5b, 0x69, 0x5d, 0x20, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x73, 0x75, 0x62, 0x6d, 0x65, 0x6e,
- 0x75, 0x28, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x72, 0x67, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x65,
- 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e,
- 0x4d, 0x65, 0x6e, 0x75, 0x28, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x78, 0x79,
- 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x78, 0x2c, 0x20, 0x79, 0x29, 0x0a, 0x20,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x68, 0x6f, 0x77,
- 0x58, 0x59, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x78, 0x2c, 0x20, 0x79, 0x29,
- 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63,
- 0x74, 0x72, 0x6c, 0x2e, 0x64, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x28, 0x68, 0x61, 0x6e, 0x64,
- 0x6c, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70,
- 0x2e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x29,
- 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x69, 0x75, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
- 0x65, 0x72, 0x57, 0x69, 0x64, 0x67, 0x65, 0x74, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x29, 0x0a, 0x69,
- 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x28, 0x63, 0x74, 0x72, 0x6c,
- 0x2c, 0x20, 0x22, 0x69, 0x75, 0x70, 0x20, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x22, 0x29, 0x0a,
+ 0x74, 0x72, 0x6c, 0x2e, 0x67, 0x65, 0x74, 0x61, 0x72, 0x67, 0x73, 0x28, 0x6d, 0x65, 0x6e, 0x75,
+ 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x29, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20,
+ 0x69, 0x74, 0x65, 0x6d, 0x61, 0x72, 0x67, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x2d,
+ 0x2d, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x64,
+ 0x20, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74,
+ 0x68, 0x65, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d,
+ 0x65, 0x74, 0x65, 0x72, 0x73, 0x0a, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x75, 0x2c, 0x76, 0x20,
+ 0x69, 0x6e, 0x20, 0x70, 0x61, 0x69, 0x72, 0x73, 0x28, 0x6d, 0x65, 0x6e, 0x75, 0x5f, 0x70, 0x61,
+ 0x72, 0x61, 0x6d, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74,
+ 0x79, 0x70, 0x65, 0x28, 0x75, 0x29, 0x20, 0x7e, 0x3d, 0x20, 0x22, 0x6e, 0x75, 0x6d, 0x62, 0x65,
+ 0x72, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x74,
+ 0x65, 0x6d, 0x61, 0x72, 0x67, 0x5b, 0x75, 0x5d, 0x20, 0x3d, 0x20, 0x76, 0x0a, 0x20, 0x20, 0x20,
+ 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74,
+ 0x75, 0x72, 0x6e, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x72, 0x67, 0x0a, 0x65, 0x6e, 0x64, 0x0a,
+ 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x63,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x63, 0x6c, 0x61,
+ 0x73, 0x73, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x29, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x63,
+ 0x61, 0x6c, 0x20, 0x6e, 0x20, 0x3d, 0x20, 0x23, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x0a, 0x20, 0x20,
+ 0x66, 0x6f, 0x72, 0x20, 0x69, 0x3d, 0x31, 0x2c, 0x6e, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20,
+ 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x65, 0x6e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61,
+ 0x6d, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x69, 0x5d, 0x0a, 0x20, 0x20, 0x20,
+ 0x20, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x6d, 0x65, 0x6e, 0x75, 0x5f, 0x70, 0x61,
+ 0x72, 0x61, 0x6d, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x20,
+ 0x74, 0x68, 0x65, 0x6e, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x72,
+ 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x69, 0x5d, 0x2c,
+ 0x20, 0x73, 0x6f, 0x20, 0x69, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x75,
+ 0x73, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x41, 0x70, 0x70, 0x65, 0x6e,
+ 0x64, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c,
+ 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x6f,
+ 0x74, 0x68, 0x65, 0x72, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x6c,
+ 0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x63, 0x61,
+ 0x6e, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x0a, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x6d, 0x65, 0x6e,
+ 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x31, 0x5d, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x6e,
+ 0x69, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x69, 0x5d, 0x20, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x73,
+ 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x6d, 0x65, 0x6e,
+ 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x31, 0x5d, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22,
+ 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x61,
+ 0x72, 0x67, 0x20, 0x3d, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x67, 0x65, 0x74, 0x61, 0x72, 0x67,
+ 0x73, 0x28, 0x6d, 0x65, 0x6e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x29, 0x0a, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x6d, 0x65,
+ 0x6e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x32, 0x5d, 0x29, 0x20, 0x3d, 0x3d, 0x20,
+ 0x22, 0x75, 0x73, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x72,
+ 0x67, 0x5b, 0x31, 0x5d, 0x20, 0x3d, 0x20, 0x6d, 0x65, 0x6e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61,
+ 0x6d, 0x5b, 0x32, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69,
+ 0x74, 0x65, 0x6d, 0x61, 0x72, 0x67, 0x2e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x6d,
+ 0x65, 0x6e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x31, 0x5d, 0x0a, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x69, 0x5d, 0x20,
+ 0x3d, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x73, 0x75, 0x62, 0x6d, 0x65, 0x6e, 0x75, 0x28, 0x69, 0x74,
+ 0x65, 0x6d, 0x61, 0x72, 0x67, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65,
+ 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x74,
+ 0x65, 0x6d, 0x61, 0x72, 0x67, 0x2e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x6d, 0x65,
+ 0x6e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x31, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x72, 0x67, 0x2e, 0x61, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x6d, 0x65, 0x6e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61,
+ 0x6d, 0x5b, 0x32, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70,
+ 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x69, 0x5d, 0x20, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x69, 0x74,
+ 0x65, 0x6d, 0x28, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x72, 0x67, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e,
+ 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a,
+ 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x4d, 0x65, 0x6e,
+ 0x75, 0x28, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x78, 0x79, 0x28, 0x68, 0x61,
+ 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x78, 0x2c, 0x20, 0x79, 0x29, 0x0a, 0x20, 0x20, 0x72, 0x65,
+ 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x58, 0x59, 0x28,
+ 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x78, 0x2c, 0x20, 0x79, 0x29, 0x0a, 0x65, 0x6e,
+ 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x74, 0x72, 0x6c,
+ 0x2e, 0x64, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x29,
+ 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x44, 0x65,
+ 0x73, 0x74, 0x72, 0x6f, 0x79, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x29, 0x0a, 0x65, 0x6e,
+ 0x64, 0x0a, 0x0a, 0x69, 0x75, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57,
+ 0x69, 0x64, 0x67, 0x65, 0x74, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x29, 0x0a, 0x69, 0x75, 0x70, 0x2e,
+ 0x53, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x2c, 0x20, 0x22,
+ 0x69, 0x75, 0x70, 0x20, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x22, 0x29, 0x0a,
};
if (luaL_loadbuffer(L, (const char *)B1, sizeof(B1), "menu.lua") == 0) lua_call(L, 0, 0);
diff --git a/iup/srclua5/clua/olecontrol.clua b/iup/srclua5/clua/olecontrol.clua
index 883b20b..7e2076c 100644
--- a/iup/srclua5/clua/olecontrol.clua
+++ b/iup/srclua5/clua/olecontrol.clua
@@ -38,41 +38,34 @@ static const unsigned char B1[] = {
0x65, 0x6e, 0x5f, 0x69, 0x75, 0x70, 0x6c, 0x75, 0x61, 0x6f, 0x6c, 0x65, 0x28, 0x6c, 0x75, 0x61,
0x5f, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2a, 0x20, 0x4c, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x72,
0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x6f, 0x6c, 0x65, 0x6c, 0x75, 0x61, 0x5f,
- 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x4c, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2a, 0x20, 0x6f,
- 0x62, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x75, 0x73, 0x65,
- 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x22, 0x69, 0x75, 0x70, 0x6c, 0x75, 0x61, 0x6f,
- 0x6c, 0x65, 0x35, 0x31, 0x22, 0x20, 0x2a, 0x2f, 0x0a, 0x69, 0x6e, 0x74, 0x20, 0x6c, 0x75, 0x61,
- 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x75, 0x70, 0x6c, 0x75, 0x61, 0x6f, 0x6c, 0x65, 0x35, 0x31,
- 0x28, 0x6c, 0x75, 0x61, 0x5f, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2a, 0x20, 0x4c, 0x29, 0x0a, 0x7b,
- 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x6f, 0x6c, 0x65,
- 0x6c, 0x75, 0x61, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x4c, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a,
- 0x5d, 0x5d, 0x0a, 0x7d, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63,
- 0x74, 0x72, 0x6c, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
- 0x74, 0x28, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x29, 0x0a,
- 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x4f, 0x6c, 0x65,
- 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x31, 0x5d,
- 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20,
- 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x75, 0x61, 0x43, 0x4f,
- 0x4d, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x69,
- 0x66, 0x20, 0x6c, 0x75, 0x61, 0x63, 0x6f, 0x6d, 0x20, 0x69, 0x73, 0x20, 0x6c, 0x6f, 0x61, 0x64,
- 0x65, 0x64, 0x2c, 0x20, 0x75, 0x73, 0x65, 0x20, 0x69, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63,
- 0x63, 0x65, 0x73, 0x73, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x20, 0x61, 0x6e, 0x64,
- 0x20, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x0a, 0x20, 0x20, 0x2d, 0x2d,
- 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x0a,
- 0x20, 0x20, 0x69, 0x66, 0x20, 0x6c, 0x75, 0x61, 0x63, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x6e,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x75, 0x6e, 0x6b, 0x20,
- 0x3d, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x69, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77,
- 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x75, 0x6e, 0x6b, 0x20, 0x74, 0x68,
- 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2e,
- 0x63, 0x6f, 0x6d, 0x20, 0x3d, 0x20, 0x6c, 0x75, 0x61, 0x63, 0x6f, 0x6d, 0x2e, 0x43, 0x72, 0x65,
- 0x61, 0x74, 0x65, 0x4c, 0x75, 0x61, 0x43, 0x4f, 0x4d, 0x28, 0x6c, 0x75, 0x61, 0x63, 0x6f, 0x6d,
- 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x28,
- 0x70, 0x75, 0x6e, 0x6b, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x69,
- 0x75, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x69, 0x64, 0x67, 0x65,
- 0x74, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x29, 0x0a, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x43,
- 0x6c, 0x61, 0x73, 0x73, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x2c, 0x20, 0x22, 0x69, 0x75, 0x70, 0x20,
- 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x22, 0x29, 0x0a,
+ 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x4c, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x5d, 0x5d, 0x0a, 0x7d,
+ 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e,
+ 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x63, 0x6c,
+ 0x61, 0x73, 0x73, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x29, 0x0a, 0x20, 0x20, 0x72, 0x65,
+ 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x4f, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74,
+ 0x72, 0x6f, 0x6c, 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x31, 0x5d, 0x29, 0x0a, 0x65, 0x6e,
+ 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x74, 0x72, 0x6c,
+ 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x75, 0x61, 0x43, 0x4f, 0x4d, 0x28, 0x68, 0x61,
+ 0x6e, 0x64, 0x6c, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x69, 0x66, 0x20, 0x6c, 0x75,
+ 0x61, 0x63, 0x6f, 0x6d, 0x20, 0x69, 0x73, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x2c, 0x20,
+ 0x75, 0x73, 0x65, 0x20, 0x69, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73,
+ 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x0a, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x6f, 0x66, 0x20,
+ 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x0a, 0x20, 0x20, 0x69, 0x66,
+ 0x20, 0x6c, 0x75, 0x61, 0x63, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20,
+ 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x75, 0x6e, 0x6b, 0x20, 0x3d, 0x20, 0x68, 0x61,
+ 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x69, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x0a, 0x20, 0x20,
+ 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x75, 0x6e, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x20,
+ 0x3d, 0x20, 0x6c, 0x75, 0x61, 0x63, 0x6f, 0x6d, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c,
+ 0x75, 0x61, 0x43, 0x4f, 0x4d, 0x28, 0x6c, 0x75, 0x61, 0x63, 0x6f, 0x6d, 0x2e, 0x49, 0x6d, 0x70,
+ 0x6f, 0x72, 0x74, 0x49, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x28, 0x70, 0x75, 0x6e, 0x6b,
+ 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a,
+ 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x69, 0x75, 0x70, 0x2e, 0x52,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x69, 0x64, 0x67, 0x65, 0x74, 0x28, 0x63, 0x74,
+ 0x72, 0x6c, 0x29, 0x0a, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73,
+ 0x28, 0x63, 0x74, 0x72, 0x6c, 0x2c, 0x20, 0x22, 0x69, 0x75, 0x70, 0x20, 0x77, 0x69, 0x64, 0x67,
+ 0x65, 0x74, 0x22, 0x29, 0x0a,
};
if (luaL_loadbuffer(L, (const char *)B1, sizeof(B1), "olecontrol.lua") == 0) lua_call(L, 0, 0);
diff --git a/iup/srclua5/clua/radio.clua b/iup/srclua5/clua/radio.clua
index d781c3d..93827a2 100644
--- a/iup/srclua5/clua/radio.clua
+++ b/iup/srclua5/clua/radio.clua
@@ -16,39 +16,43 @@ static const unsigned char B1[] = {
0x20, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x57, 0x49,
0x44, 0x47, 0x45, 0x54, 0x2c, 0x0a, 0x20, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x20, 0x3d, 0x20, 0x22, 0x49, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61,
- 0x63, 0x6b, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x7d, 0x20, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x68, 0x69,
- 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x0a,
- 0x20, 0x20, 0x69, 0x66, 0x20, 0x6f, 0x62, 0x6a, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x69, 0x66, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2e,
- 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x42, 0x4f,
- 0x58, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63,
- 0x61, 0x6c, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x77,
- 0x68, 0x69, 0x6c, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x5b, 0x69, 0x5d, 0x20, 0x64, 0x6f, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x43,
- 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x28, 0x6f, 0x62,
- 0x6a, 0x5b, 0x69, 0x5d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x20,
- 0x3d, 0x20, 0x69, 0x2b, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x70,
- 0x61, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x46, 0x52, 0x41,
- 0x4d, 0x45, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x74,
- 0x72, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x4e, 0x61,
- 0x6d, 0x65, 0x73, 0x20, 0x28, 0x6f, 0x62, 0x6a, 0x5b, 0x31, 0x5d, 0x29, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e,
- 0x53, 0x65, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x28, 0x6f, 0x62,
- 0x6a, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64,
- 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63,
- 0x74, 0x72, 0x6c, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
- 0x74, 0x28, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x29, 0x0a,
- 0x20, 0x20, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64,
- 0x72, 0x65, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x31,
- 0x5d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70,
- 0x2e, 0x52, 0x61, 0x64, 0x69, 0x6f, 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x31, 0x5d, 0x29,
- 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x0a, 0x69, 0x75, 0x70, 0x2e, 0x52, 0x65, 0x67,
- 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x69, 0x64, 0x67, 0x65, 0x74, 0x28, 0x63, 0x74, 0x72, 0x6c,
- 0x29, 0x0a, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x28, 0x63,
- 0x74, 0x72, 0x6c, 0x2c, 0x20, 0x22, 0x69, 0x75, 0x70, 0x20, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74,
- 0x22, 0x29, 0x0a,
+ 0x63, 0x6b, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x7d, 0x20, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x54,
+ 0x4f, 0x44, 0x4f, 0x3a, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73,
+ 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x75, 0x74,
+ 0x75, 0x72, 0x65, 0x2c, 0x20, 0x69, 0x74, 0x20, 0x73, 0x65, 0x65, 0x6d, 0x73, 0x20, 0x74, 0x6f,
+ 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x69,
+ 0x6e, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72,
+ 0x65, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x0a, 0x20, 0x20, 0x69,
+ 0x66, 0x20, 0x6f, 0x62, 0x6a, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69,
+ 0x66, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x61, 0x72,
+ 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x42, 0x4f, 0x58, 0x20, 0x74,
+ 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20,
+ 0x69, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x77, 0x68, 0x69, 0x6c,
+ 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x5b, 0x69, 0x5d, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c,
+ 0x64, 0x72, 0x65, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x28, 0x6f, 0x62, 0x6a, 0x5b, 0x69,
+ 0x5d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x69,
+ 0x2b, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20,
+ 0x20, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x6f, 0x62, 0x6a, 0x2e, 0x70, 0x61, 0x72, 0x65,
+ 0x6e, 0x74, 0x20, 0x3d, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x46, 0x52, 0x41, 0x4d, 0x45, 0x20,
+ 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e,
+ 0x53, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73,
+ 0x20, 0x28, 0x6f, 0x62, 0x6a, 0x5b, 0x31, 0x5d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c,
+ 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74,
+ 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x28, 0x6f, 0x62, 0x6a, 0x29, 0x0a,
+ 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e,
+ 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x74, 0x72, 0x6c,
+ 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x63,
+ 0x6c, 0x61, 0x73, 0x73, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x29, 0x0a, 0x20, 0x20, 0x20,
+ 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e,
+ 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x31, 0x5d, 0x29, 0x0a,
+ 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x52, 0x61,
+ 0x64, 0x69, 0x6f, 0x28, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5b, 0x31, 0x5d, 0x29, 0x0a, 0x65, 0x6e,
+ 0x64, 0x0a, 0x20, 0x20, 0x20, 0x0a, 0x69, 0x75, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x65, 0x72, 0x57, 0x69, 0x64, 0x67, 0x65, 0x74, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x29, 0x0a, 0x69,
+ 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x28, 0x63, 0x74, 0x72, 0x6c,
+ 0x2c, 0x20, 0x22, 0x69, 0x75, 0x70, 0x20, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x22, 0x29, 0x0a,
};
if (luaL_loadbuffer(L, (const char *)B1, sizeof(B1), "radio.lua") == 0) lua_call(L, 0, 0);
diff --git a/iup/srclua5/clua/tree.clua b/iup/srclua5/clua/tree.clua
index 42d4736..da9d391 100644
--- a/iup/srclua5/clua/tree.clua
+++ b/iup/srclua5/clua/tree.clua
@@ -46,186 +46,187 @@ static const unsigned char B1[] = {
0x20, 0x20, 0x20, 0x64, 0x72, 0x61, 0x67, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x63, 0x62, 0x20, 0x3d,
0x20, 0x22, 0x6e, 0x6e, 0x6e, 0x6e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x7d, 0x2c, 0x0a, 0x20, 0x20,
0x65, 0x78, 0x74, 0x72, 0x61, 0x66, 0x75, 0x6e, 0x63, 0x73, 0x20, 0x3d, 0x20, 0x31, 0x2c, 0x0a,
- 0x7d, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e,
+ 0x7d, 0x0a, 0x0a, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x52, 0x45, 0x45, 0x52, 0x45, 0x46, 0x54, 0x41,
+ 0x42, 0x4c, 0x45, 0x3d, 0x7b, 0x7d, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65,
+ 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c,
+ 0x65, 0x2c, 0x20, 0x69, 0x64, 0x2c, 0x20, 0x61, 0x74, 0x74, 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20,
+ 0x66, 0x6f, 0x72, 0x20, 0x61, 0x74, 0x74, 0x72, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x20, 0x69, 0x6e,
+ 0x20, 0x70, 0x61, 0x69, 0x72, 0x73, 0x28, 0x61, 0x74, 0x74, 0x72, 0x73, 0x29, 0x20, 0x64, 0x6f,
+ 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x5b, 0x61, 0x74, 0x74, 0x72,
+ 0x2e, 0x2e, 0x69, 0x64, 0x5d, 0x20, 0x3d, 0x20, 0x76, 0x61, 0x6c, 0x0a, 0x20, 0x20, 0x65, 0x6e,
+ 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20,
+ 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73,
+ 0x74, 0x6f, 0x72, 0x73, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x28, 0x68,
+ 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x69, 0x2c, 0x20, 0x61, 0x74, 0x74, 0x72,
+ 0x73, 0x29, 0x0a, 0x20, 0x20, 0x69, 0x6e, 0x69, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c,
+ 0x65, 0x5b, 0x22, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x22, 0x2e, 0x2e, 0x69, 0x6e, 0x69, 0x5d,
+ 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x20, 0x3d,
+ 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x69, 0x6e,
+ 0x69, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65,
+ 0x2e, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x28, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2c, 0x20, 0x31,
+ 0x2c, 0x20, 0x69, 0x6e, 0x69, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x69,
+ 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x5b, 0x22, 0x70, 0x61, 0x72, 0x65, 0x6e,
+ 0x74, 0x22, 0x2e, 0x2e, 0x69, 0x6e, 0x69, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64,
+ 0x0a, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x31, 0x2c, 0x20, 0x23, 0x73,
+ 0x74, 0x61, 0x63, 0x6b, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e,
0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69,
- 0x62, 0x75, 0x74, 0x65, 0x73, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x69, 0x64,
- 0x2c, 0x20, 0x61, 0x74, 0x74, 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61,
- 0x74, 0x74, 0x72, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x20, 0x70, 0x61, 0x69, 0x72,
- 0x73, 0x28, 0x61, 0x74, 0x74, 0x72, 0x73, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20,
- 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x2e, 0x2e, 0x69, 0x64, 0x5d,
- 0x20, 0x3d, 0x20, 0x76, 0x61, 0x6c, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64,
- 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54,
- 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x41,
- 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65,
- 0x2c, 0x20, 0x69, 0x6e, 0x69, 0x2c, 0x20, 0x61, 0x74, 0x74, 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20,
- 0x69, 0x6e, 0x69, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x5b, 0x22, 0x70, 0x61,
- 0x72, 0x65, 0x6e, 0x74, 0x22, 0x2e, 0x2e, 0x69, 0x6e, 0x69, 0x5d, 0x0a, 0x20, 0x20, 0x6c, 0x6f,
- 0x63, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x69, 0x6e, 0x69, 0x20, 0x64, 0x6f, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x69, 0x6e, 0x73, 0x65,
- 0x72, 0x74, 0x28, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2c, 0x20, 0x31, 0x2c, 0x20, 0x69, 0x6e, 0x69,
- 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x69, 0x20, 0x3d, 0x20, 0x68, 0x61,
- 0x6e, 0x64, 0x6c, 0x65, 0x5b, 0x22, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x22, 0x2e, 0x2e, 0x69,
- 0x6e, 0x69, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x66, 0x6f,
- 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x31, 0x2c, 0x20, 0x23, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x20,
- 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53,
- 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73,
- 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5b, 0x69,
- 0x5d, 0x2c, 0x20, 0x61, 0x74, 0x74, 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a,
+ 0x62, 0x75, 0x74, 0x65, 0x73, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x73, 0x74,
+ 0x61, 0x63, 0x6b, 0x5b, 0x69, 0x5d, 0x2c, 0x20, 0x61, 0x74, 0x74, 0x72, 0x73, 0x29, 0x0a, 0x20,
+ 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65,
+ 0x73, 0x63, 0x65, 0x6e, 0x74, 0x73, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73,
+ 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x69, 0x2c, 0x20, 0x61, 0x74,
+ 0x74, 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x69, 0x64, 0x20,
+ 0x3d, 0x20, 0x69, 0x6e, 0x69, 0x0a, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20,
+ 0x31, 0x2c, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x5b, 0x22, 0x63, 0x68, 0x69, 0x6c, 0x64,
+ 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2e, 0x2e, 0x69, 0x6e, 0x69, 0x5d, 0x20, 0x64, 0x6f, 0x0a,
+ 0x20, 0x20, 0x20, 0x20, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x69, 0x64, 0x2b, 0x31, 0x0a, 0x20, 0x20,
+ 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64,
+ 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x28, 0x68, 0x61, 0x6e, 0x64,
+ 0x6c, 0x65, 0x2c, 0x20, 0x69, 0x64, 0x2c, 0x20, 0x61, 0x74, 0x74, 0x72, 0x73, 0x29, 0x0a, 0x20,
+ 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x5b, 0x22, 0x6b, 0x69,
+ 0x6e, 0x64, 0x22, 0x2e, 0x2e, 0x69, 0x64, 0x5d, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x42, 0x52, 0x41,
+ 0x4e, 0x43, 0x48, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x69, 0x64, 0x20, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74,
+ 0x44, 0x65, 0x73, 0x63, 0x65, 0x6e, 0x74, 0x73, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x73, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x69, 0x64, 0x2c, 0x20, 0x61,
+ 0x74, 0x74, 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20,
+ 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x64, 0x0a,
0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x75,
- 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x73, 0x63, 0x65, 0x6e, 0x74,
- 0x73, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x28, 0x68, 0x61, 0x6e, 0x64,
- 0x6c, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x69, 0x2c, 0x20, 0x61, 0x74, 0x74, 0x72, 0x73, 0x29, 0x0a,
- 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x69,
- 0x0a, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x31, 0x2c, 0x20, 0x68, 0x61,
- 0x6e, 0x64, 0x6c, 0x65, 0x5b, 0x22, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x63, 0x6f, 0x75, 0x6e, 0x74,
- 0x22, 0x2e, 0x2e, 0x69, 0x6e, 0x69, 0x5d, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69,
- 0x64, 0x20, 0x3d, 0x20, 0x69, 0x64, 0x2b, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70,
- 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x72,
- 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x69,
- 0x64, 0x2c, 0x20, 0x61, 0x74, 0x74, 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
- 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x5b, 0x22, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x2e, 0x2e,
- 0x69, 0x64, 0x5d, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x22, 0x20,
- 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x64, 0x20, 0x3d, 0x20,
- 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x73, 0x63, 0x65,
- 0x6e, 0x74, 0x73, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x28, 0x68, 0x61,
- 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x69, 0x64, 0x2c, 0x20, 0x61, 0x74, 0x74, 0x72, 0x73, 0x29,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20,
- 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65,
- 0x65, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x48, 0x61, 0x6e,
- 0x64, 0x6c, 0x65, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x6e, 0x61, 0x6d, 0x65,
- 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x69,
- 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x28, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x69, 0x75, 0x70, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c,
- 0x65, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20,
- 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d,
- 0x65, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20,
- 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
- 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x6d, 0x75,
- 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20,
- 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x20, 0x68, 0x61, 0x73, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x73,
- 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72,
- 0x65, 0x65, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c,
- 0x65, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x64, 0x29, 0x0a, 0x20, 0x20,
- 0x69, 0x66, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x74,
- 0x68, 0x65, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69,
- 0x62, 0x75, 0x74, 0x65, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x22, 0x53, 0x54,
- 0x41, 0x54, 0x45, 0x22, 0x2e, 0x2e, 0x69, 0x64, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e,
- 0x73, 0x74, 0x61, 0x74, 0x65, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65,
- 0x65, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x28, 0x68,
- 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x64,
- 0x29, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x6f, 0x6c,
- 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x41,
- 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c,
- 0x20, 0x22, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x22, 0x2e, 0x2e, 0x69, 0x64, 0x2c, 0x20, 0x74, 0x6e,
- 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20,
- 0x20, 0x69, 0x66, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x66,
- 0x6f, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74,
- 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65,
- 0x2c, 0x20, 0x22, 0x54, 0x49, 0x54, 0x4c, 0x45, 0x46, 0x4f, 0x4e, 0x54, 0x22, 0x2e, 0x2e, 0x69,
- 0x64, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x66, 0x6f,
- 0x6e, 0x74, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x6e, 0x6f,
- 0x64, 0x65, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x69,
- 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28,
- 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x22, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x44, 0x22,
- 0x2e, 0x2e, 0x69, 0x64, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6d, 0x61, 0x72, 0x6b,
- 0x65, 0x64, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x6e, 0x6f,
- 0x64, 0x65, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x69, 0x75,
0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c,
- 0x20, 0x22, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x22, 0x2e, 0x2e, 0x69, 0x64, 0x2c, 0x20, 0x74, 0x6e,
- 0x6f, 0x64, 0x65, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20,
- 0x20, 0x69, 0x66, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x65,
- 0x78, 0x70, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x69, 0x75, 0x70,
- 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
- 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20,
- 0x22, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x45, 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x22, 0x2e,
- 0x2e, 0x69, 0x64, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65,
- 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20,
- 0x69, 0x66, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x20,
- 0x74, 0x68, 0x65, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74,
- 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x69,
- 0x64, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x29,
- 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x41, 0x64, 0x64, 0x4e, 0x6f,
- 0x64, 0x65, 0x73, 0x52, 0x65, 0x63, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x74,
- 0x2c, 0x20, 0x69, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x20, 0x3d, 0x3d, 0x20,
- 0x6e, 0x69, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
- 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x6e, 0x74,
- 0x20, 0x3d, 0x20, 0x23, 0x74, 0x0a, 0x20, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x63, 0x6f,
- 0x6e, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x30, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c,
- 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x74, 0x5b, 0x63,
- 0x6f, 0x6e, 0x74, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65,
- 0x28, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x74, 0x61, 0x62, 0x6c,
- 0x65, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
- 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x6e, 0x61, 0x6d,
- 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69,
- 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28,
- 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x22, 0x41, 0x44, 0x44, 0x42, 0x52, 0x41, 0x4e,
- 0x43, 0x48, 0x22, 0x2e, 0x2e, 0x69, 0x64, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x62,
- 0x72, 0x61, 0x6e, 0x63, 0x68, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x4e, 0x6f,
- 0x64, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c,
- 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x64, 0x2b, 0x31, 0x29, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x41, 0x64,
- 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x63, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65,
- 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x64, 0x2b, 0x31, 0x29, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53,
- 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20,
- 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x64, 0x2b, 0x31, 0x29, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e,
- 0x6c, 0x65, 0x61, 0x66, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74,
- 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x22,
- 0x41, 0x44, 0x44, 0x4c, 0x45, 0x41, 0x46, 0x22, 0x2e, 0x2e, 0x69, 0x64, 0x2c, 0x20, 0x74, 0x6e,
- 0x6f, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x61, 0x66, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65,
- 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x28, 0x68, 0x61, 0x6e, 0x64,
- 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x64, 0x2b, 0x31, 0x29,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65,
- 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x6e, 0x6f,
- 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
- 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x22, 0x41, 0x44, 0x44, 0x4c, 0x45, 0x41,
- 0x46, 0x22, 0x2e, 0x2e, 0x69, 0x64, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x29, 0x0a, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64,
- 0x0a, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x63, 0x6f, 0x6e, 0x74,
- 0x20, 0x2d, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a,
- 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72,
- 0x65, 0x65, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c,
- 0x65, 0x2c, 0x20, 0x74, 0x2c, 0x20, 0x69, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28,
- 0x6e, 0x6f, 0x74, 0x20, 0x69, 0x64, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20,
- 0x20, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x30, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x64, 0x65, 0x66, 0x61,
- 0x75, 0x6c, 0x74, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6f, 0x74, 0x0a,
- 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x2e, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x6e,
- 0x61, 0x6d, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x0a, 0x20, 0x20,
+ 0x20, 0x69, 0x66, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73,
+ 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x69, 0x75, 0x70, 0x20,
+ 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x20, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x48, 0x61, 0x6e, 0x64,
+ 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x20, 0x65, 0x6e,
+ 0x64, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72,
+ 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a,
+ 0x2d, 0x2d, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72,
+ 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x20, 0x68, 0x61, 0x73, 0x20,
+ 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69,
+ 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x28,
+ 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69,
+ 0x64, 0x29, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x73, 0x74,
+ 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74,
0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65,
- 0x2c, 0x20, 0x22, 0x54, 0x49, 0x54, 0x4c, 0x45, 0x30, 0x22, 0x2c, 0x20, 0x74, 0x2e, 0x62, 0x72,
- 0x61, 0x6e, 0x63, 0x68, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20,
- 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64,
- 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20,
- 0x74, 0x2c, 0x20, 0x30, 0x29, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x69, 0x75,
- 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65,
- 0x63, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x2c, 0x20, 0x69, 0x64, 0x29,
- 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x69, 0x64, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x29, 0x20,
- 0x74, 0x68, 0x65, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74,
- 0x53, 0x74, 0x61, 0x74, 0x65, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x2c,
- 0x20, 0x30, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20,
- 0x62, 0x61, 0x63, 0x6b, 0x77, 0x61, 0x72, 0x64, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69,
- 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x0a, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53,
- 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72,
- 0x65, 0x65, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
- 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x2c, 0x20, 0x70,
- 0x61, 0x72, 0x61, 0x6d, 0x29, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69,
- 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x28, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x69,
- 0x75, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x57, 0x69, 0x64, 0x67, 0x65,
- 0x74, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x29, 0x0a, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x43,
- 0x6c, 0x61, 0x73, 0x73, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x2c, 0x20, 0x22, 0x69, 0x75, 0x70, 0x20,
- 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x22, 0x29, 0x0a,
+ 0x2c, 0x20, 0x22, 0x53, 0x54, 0x41, 0x54, 0x45, 0x22, 0x2e, 0x2e, 0x69, 0x64, 0x2c, 0x20, 0x74,
+ 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a,
+ 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x75,
+ 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74,
+ 0x72, 0x69, 0x62, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64,
+ 0x65, 0x2c, 0x20, 0x69, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x6e, 0x6f, 0x64,
+ 0x65, 0x2e, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x69, 0x75, 0x70,
+ 0x2e, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x68, 0x61,
+ 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x22, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x22, 0x2e, 0x2e, 0x69,
+ 0x64, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x29, 0x20,
+ 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x74,
+ 0x69, 0x74, 0x6c, 0x65, 0x66, 0x6f, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x69, 0x75,
+ 0x70, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x68,
+ 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x22, 0x54, 0x49, 0x54, 0x4c, 0x45, 0x46, 0x4f, 0x4e,
+ 0x54, 0x22, 0x2e, 0x2e, 0x69, 0x64, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x74, 0x69,
+ 0x74, 0x6c, 0x65, 0x66, 0x6f, 0x6e, 0x74, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x69,
+ 0x66, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x64, 0x20, 0x74,
+ 0x68, 0x65, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69,
+ 0x62, 0x75, 0x74, 0x65, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x22, 0x4d, 0x41,
+ 0x52, 0x4b, 0x45, 0x44, 0x22, 0x2e, 0x2e, 0x69, 0x64, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65,
+ 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x64, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x69,
+ 0x66, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x20, 0x74, 0x68,
+ 0x65, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x41, 0x74,
+ 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x28, 0x68, 0x61,
+ 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x22, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x22, 0x2e, 0x2e, 0x69,
+ 0x64, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x29, 0x20,
+ 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x69,
+ 0x6d, 0x61, 0x67, 0x65, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65,
+ 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74,
+ 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x28, 0x68, 0x61, 0x6e,
+ 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x22, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x45, 0x58, 0x50, 0x41, 0x4e,
+ 0x44, 0x45, 0x44, 0x22, 0x2e, 0x2e, 0x69, 0x64, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e,
+ 0x69, 0x6d, 0x61, 0x67, 0x65, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x29, 0x20, 0x65,
+ 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x75, 0x73,
+ 0x65, 0x72, 0x69, 0x64, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72,
+ 0x65, 0x65, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x28, 0x68, 0x61, 0x6e, 0x64,
+ 0x6c, 0x65, 0x2c, 0x20, 0x69, 0x64, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x75, 0x73,
+ 0x65, 0x72, 0x69, 0x64, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66,
+ 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65,
+ 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x63, 0x28, 0x68, 0x61, 0x6e, 0x64,
+ 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x2c, 0x20, 0x69, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20,
+ 0x74, 0x20, 0x3d, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65,
+ 0x74, 0x75, 0x72, 0x6e, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c,
+ 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x23, 0x74, 0x0a, 0x20, 0x20, 0x77, 0x68, 0x69,
+ 0x6c, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x30, 0x20, 0x64, 0x6f, 0x0a,
+ 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x20,
+ 0x3d, 0x20, 0x74, 0x5b, 0x63, 0x6f, 0x6e, 0x74, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
+ 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x29, 0x20, 0x3d, 0x3d, 0x20,
+ 0x22, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x62, 0x72, 0x61, 0x6e,
+ 0x63, 0x68, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69,
+ 0x62, 0x75, 0x74, 0x65, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x22, 0x41, 0x44,
+ 0x44, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x22, 0x2e, 0x2e, 0x69, 0x64, 0x2c, 0x20, 0x74, 0x6e,
+ 0x6f, 0x64, 0x65, 0x2e, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65,
+ 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x28, 0x68, 0x61,
+ 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x64, 0x2b,
+ 0x31, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54,
+ 0x72, 0x65, 0x65, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x63, 0x28, 0x68,
+ 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x64,
+ 0x2b, 0x31, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e,
+ 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x28, 0x68, 0x61, 0x6e,
+ 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x64, 0x2b, 0x31,
+ 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x74,
+ 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x61, 0x66, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x74, 0x68,
+ 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x53,
+ 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x68, 0x61, 0x6e, 0x64,
+ 0x6c, 0x65, 0x2c, 0x20, 0x22, 0x41, 0x44, 0x44, 0x4c, 0x45, 0x41, 0x46, 0x22, 0x2e, 0x2e, 0x69,
+ 0x64, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x61, 0x66, 0x6e, 0x61, 0x6d,
+ 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54,
+ 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62,
+ 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x2c, 0x20,
+ 0x69, 0x64, 0x2b, 0x31, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a,
+ 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69,
+ 0x66, 0x20, 0x74, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72,
+ 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x22, 0x41,
+ 0x44, 0x44, 0x4c, 0x45, 0x41, 0x46, 0x22, 0x2e, 0x2e, 0x69, 0x64, 0x2c, 0x20, 0x74, 0x6e, 0x6f,
+ 0x64, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20,
+ 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x20, 0x3d,
+ 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x20, 0x2d, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64,
+ 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69,
+ 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x28,
+ 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x2c, 0x20, 0x69, 0x64, 0x29, 0x0a, 0x20,
+ 0x20, 0x69, 0x66, 0x20, 0x28, 0x6e, 0x6f, 0x74, 0x20, 0x69, 0x64, 0x29, 0x20, 0x74, 0x68, 0x65,
+ 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x30, 0x20, 0x20, 0x2d, 0x2d,
+ 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20,
+ 0x72, 0x6f, 0x6f, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x2e, 0x62, 0x72,
+ 0x61, 0x6e, 0x63, 0x68, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x69, 0x75,
+ 0x70, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x68,
+ 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x22, 0x54, 0x49, 0x54, 0x4c, 0x45, 0x30, 0x22, 0x2c,
+ 0x20, 0x74, 0x2e, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x20, 0x65,
+ 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53,
+ 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x28, 0x68, 0x61, 0x6e,
+ 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x2c, 0x20, 0x30, 0x29, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64,
+ 0x0a, 0x20, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x41, 0x64, 0x64, 0x4e, 0x6f,
+ 0x64, 0x65, 0x73, 0x52, 0x65, 0x63, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x74,
+ 0x2c, 0x20, 0x69, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x69, 0x64, 0x20, 0x3d,
+ 0x3d, 0x20, 0x30, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72,
+ 0x65, 0x65, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c,
+ 0x65, 0x2c, 0x20, 0x74, 0x2c, 0x20, 0x30, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64,
+ 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x77, 0x61, 0x72, 0x64, 0x20, 0x63, 0x6f,
+ 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x0a, 0x69, 0x75, 0x70, 0x2e,
+ 0x54, 0x72, 0x65, 0x65, 0x53, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x69,
+ 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x0a,
+ 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x63,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x63, 0x6c, 0x61,
+ 0x73, 0x73, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x29, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74,
+ 0x75, 0x72, 0x6e, 0x20, 0x69, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x28, 0x29, 0x0a, 0x65,
+ 0x6e, 0x64, 0x0a, 0x0a, 0x69, 0x75, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,
+ 0x57, 0x69, 0x64, 0x67, 0x65, 0x74, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x29, 0x0a, 0x69, 0x75, 0x70,
+ 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x28, 0x63, 0x74, 0x72, 0x6c, 0x2c, 0x20,
+ 0x22, 0x69, 0x75, 0x70, 0x20, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x22, 0x29, 0x0a,
};
if (luaL_loadbuffer(L, (const char *)B1, sizeof(B1), "tree.lua") == 0) lua_call(L, 0, 0);
diff --git a/iup/srclua5/config.mak b/iup/srclua5/config.mak
deleted file mode 100755
index 921aa29..0000000
--- a/iup/srclua5/config.mak
+++ /dev/null
@@ -1,31 +0,0 @@
-PROJNAME = iup
-LIBNAME = iuplua51
-OPT = YES
-DEF_FILE = iuplua5.def
-
-DEFINES = IUPLUA_USELOH
-
-USE_LUA51 = Yes
-NO_LUALINK = Yes
-
-INCLUDES = ../include ../src
-LDIR = ../lib/$(TEC_UNAME)
-LIBS = iup
-
-CTRLUA = button.lua canvas.lua dialog.lua colordlg.lua clipboard.lua \
- filedlg.lua fill.lua frame.lua hbox.lua normalizer.lua \
- item.lua image.lua imagergb.lua imagergba.lua label.lua \
- menu.lua multiline.lua list.lua separator.lua user.lua \
- submenu.lua text.lua toggle.lua vbox.lua zbox.lua timer.lua \
- sbox.lua split.lua spin.lua spinbox.lua cbox.lua messagedlg.lua \
- radio.lua val.lua tabs.lua fontdlg.lua tree.lua progressbar.lua
-
-GC := $(addsuffix .c, $(basename $(CTRLUA)))
-GC := $(addprefix il_, $(GC))
-SRCLUA = iuplua.lua constants.lua $(CTRLUA)
-LOHDIR = loh
-
-$(GC) : il_%.c : %.lua generator.lua
- $(LUABIN) generator.lua $<
-
-SRC = iuplua.c iuplua_api.c il_tree_aux.c il_scanf.c il_getparam.c il_getcolor.c $(GC)
diff --git a/iup/srclua5/ctrl_template.lua b/iup/srclua5/ctrl_template.lua
index d7f509e..0686a99 100755
--- a/iup/srclua5/ctrl_template.lua
+++ b/iup/srclua5/ctrl_template.lua
@@ -72,10 +72,6 @@ static int myControl (lua_State * L)
]]
extracode = [[ -- [optional] extra fucntions to be defined in C.
-int luaopen_iupluamycontrol51(lua_State* L)
-{
- return iupmycontrollua_open(L);
-}
]]
}
diff --git a/iup/srclua5/dialog.lua b/iup/srclua5/dialog.lua
index ac9b786..4dace61 100755
--- a/iup/srclua5/dialog.lua
+++ b/iup/srclua5/dialog.lua
@@ -12,6 +12,7 @@ local ctrl = {
close_cb = "",
show_cb = "n",
move_cb = "nn",
+ copydata_cb = "sn",
trayclick_cb = "nnn",
dropfiles_cb = "snnn",
}
diff --git a/iup/srclua5/generator.lua b/iup/srclua5/generator.lua
index efbab5a..ef12534 100755
--- a/iup/srclua5/generator.lua
+++ b/iup/srclua5/generator.lua
@@ -126,7 +126,9 @@ function write_callbacks(o, c)
io.write(' lua_State *L = iuplua_call_start(self, "', i, '");')
aux.n = 0
string.gsub(s, "(.)", function(p)
- if p == "n" or p == "f" or p == "d" or p == "c" then
+ if p == "n" or p == "c" then
+ io.write("\n lua_pushinteger(L, p"..aux.n..");")
+ elseif p == "f" or p == "d" then
io.write("\n lua_pushnumber(L, p"..aux.n..");")
elseif p == "s" then
io.write("\n lua_pushstring(L, p"..aux.n..");")
diff --git a/iup/srclua5/glcanvas.lua b/iup/srclua5/glcanvas.lua
index 6a3fe75..f8c8891 100755
--- a/iup/srclua5/glcanvas.lua
+++ b/iup/srclua5/glcanvas.lua
@@ -28,12 +28,6 @@ int luaopen_iupluagl(lua_State* L)
return iupgllua_open(L);
}
-/* obligatory to use require"iupluagl51" */
-int luaopen_iupluagl51(lua_State* L)
-{
- return iupgllua_open(L);
-}
-
]]
}
diff --git a/iup/srclua5/il.h b/iup/srclua5/il.h
index 5ef6b86..635d089 100755
--- a/iup/srclua5/il.h
+++ b/iup/srclua5/il.h
@@ -149,6 +149,13 @@ Ihandle *iuplua_checkihandleornil(lua_State *L, int pos);
*/
void iuplua_removeihandle(lua_State *L, Ihandle *ih);
+#if LUA_VERSION_NUM > 501
+#define iuplua_getn(L,i) ((int)lua_rawlen(L, i))
+#else
+#define LUA_OK 0
+#define iuplua_getn(L,i) ((int)lua_objlen(L, i))
+#endif
+
#ifdef __cplusplus
}
diff --git a/iup/srclua5/il_canvas.c b/iup/srclua5/il_canvas.c
index 85c1f14..c8a6025 100755
--- a/iup/srclua5/il_canvas.c
+++ b/iup/srclua5/il_canvas.c
@@ -29,8 +29,8 @@ static int canvas_leavewindow_cb(Ihandle *self)
static int canvas_resize_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "resize_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
@@ -38,8 +38,8 @@ static int canvas_wheel_cb(Ihandle *self, float p0, int p1, int p2, char * p3)
{
lua_State *L = iuplua_call_start(self, "wheel_cb");
lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
- lua_pushnumber(L, p2);
+ lua_pushinteger(L, p1);
+ lua_pushinteger(L, p2);
lua_pushstring(L, p3);
return iuplua_call(L, 4);
}
@@ -59,17 +59,17 @@ static int canvas_enterwindow_cb(Ihandle *self)
static int canvas_focus_cb(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "focus_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
return iuplua_call(L, 1);
}
static int canvas_button_cb(Ihandle *self, int p0, int p1, int p2, int p3, char * p4)
{
lua_State *L = iuplua_call_start(self, "button_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
- lua_pushnumber(L, p2);
- lua_pushnumber(L, p3);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
+ lua_pushinteger(L, p2);
+ lua_pushinteger(L, p3);
lua_pushstring(L, p4);
return iuplua_call(L, 5);
}
@@ -77,16 +77,16 @@ static int canvas_button_cb(Ihandle *self, int p0, int p1, int p2, int p3, char
static int canvas_keypress_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "keypress_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
static int canvas_motion_cb(Ihandle *self, int p0, int p1, char * p2)
{
lua_State *L = iuplua_call_start(self, "motion_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
lua_pushstring(L, p2);
return iuplua_call(L, 3);
}
@@ -94,14 +94,14 @@ static int canvas_motion_cb(Ihandle *self, int p0, int p1, char * p2)
static int canvas_wom_cb(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "wom_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
return iuplua_call(L, 1);
}
static int canvas_scroll_cb(Ihandle *self, int p0, float p1, float p2)
{
lua_State *L = iuplua_call_start(self, "scroll_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
lua_pushnumber(L, p1);
lua_pushnumber(L, p2);
return iuplua_call(L, 3);
diff --git a/iup/srclua5/il_cells.c b/iup/srclua5/il_cells.c
index 15ce5c9..ed0a368 100755
--- a/iup/srclua5/il_cells.c
+++ b/iup/srclua5/il_cells.c
@@ -16,17 +16,17 @@
static int cells_width_cb(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "width_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
return iuplua_call(L, 1);
}
static int cells_mousemotion_cb(Ihandle *self, int p0, int p1, int p2, int p3, char * p4)
{
lua_State *L = iuplua_call_start(self, "mousemotion_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
- lua_pushnumber(L, p2);
- lua_pushnumber(L, p3);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
+ lua_pushinteger(L, p2);
+ lua_pushinteger(L, p3);
lua_pushstring(L, p4);
return iuplua_call(L, 5);
}
@@ -34,12 +34,12 @@ static int cells_mousemotion_cb(Ihandle *self, int p0, int p1, int p2, int p3, c
static int cells_mouseclick_cb(Ihandle *self, int p0, int p1, int p2, int p3, int p4, int p5, char * p6)
{
lua_State *L = iuplua_call_start(self, "mouseclick_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
- lua_pushnumber(L, p2);
- lua_pushnumber(L, p3);
- lua_pushnumber(L, p4);
- lua_pushnumber(L, p5);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
+ lua_pushinteger(L, p2);
+ lua_pushinteger(L, p3);
+ lua_pushinteger(L, p4);
+ lua_pushinteger(L, p5);
lua_pushstring(L, p6);
return iuplua_call(L, 7);
}
@@ -59,31 +59,31 @@ static int cells_nlines_cb(Ihandle *self)
static int cells_scrolling_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "scrolling_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
static int cells_height_cb(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "height_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
return iuplua_call(L, 1);
}
static int cells_hspan_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "hspan_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
static int cells_vspan_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "vspan_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
diff --git a/iup/srclua5/il_colorbar.c b/iup/srclua5/il_colorbar.c
index d67608d..714c3a7 100755
--- a/iup/srclua5/il_colorbar.c
+++ b/iup/srclua5/il_colorbar.c
@@ -16,30 +16,30 @@
static int colorbar_switch_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "switch_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
static int colorbar_select_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "select_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
static char * colorbar_cell_cb(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "cell_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
return iuplua_call_rs(L, 1);
}
static int colorbar_extended_cb(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "extended_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
return iuplua_call(L, 1);
}
diff --git a/iup/srclua5/il_colorbrowser.c b/iup/srclua5/il_colorbrowser.c
index 601fac9..1a9243d 100755
--- a/iup/srclua5/il_colorbrowser.c
+++ b/iup/srclua5/il_colorbrowser.c
@@ -16,18 +16,18 @@
static int colorbrowser_drag_cb(Ihandle *self, unsigned char p0, unsigned char p1, unsigned char p2)
{
lua_State *L = iuplua_call_start(self, "drag_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
- lua_pushnumber(L, p2);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
+ lua_pushinteger(L, p2);
return iuplua_call(L, 3);
}
static int colorbrowser_change_cb(Ihandle *self, unsigned char p0, unsigned char p1, unsigned char p2)
{
lua_State *L = iuplua_call_start(self, "change_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
- lua_pushnumber(L, p2);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
+ lua_pushinteger(L, p2);
return iuplua_call(L, 3);
}
diff --git a/iup/srclua5/il_dialog.c b/iup/srclua5/il_dialog.c
index d3e8c29..09166f3 100755
--- a/iup/srclua5/il_dialog.c
+++ b/iup/srclua5/il_dialog.c
@@ -12,17 +12,29 @@
#include "il.h"
-static int dialog_map_cb(Ihandle *self)
+static int dialog_unmap_cb(Ihandle *self)
{
- lua_State *L = iuplua_call_start(self, "map_cb");
+ lua_State *L = iuplua_call_start(self, "unmap_cb");
+ return iuplua_call(L, 0);
+}
+
+static int dialog_destroy_cb(Ihandle *self)
+{
+ lua_State *L = iuplua_call_start(self, "destroy_cb");
+ return iuplua_call(L, 0);
+}
+
+static int dialog_close_cb(Ihandle *self)
+{
+ lua_State *L = iuplua_call_start(self, "close_cb");
return iuplua_call(L, 0);
}
static int dialog_move_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "move_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
@@ -30,43 +42,39 @@ static int dialog_dropfiles_cb(Ihandle *self, char * p0, int p1, int p2, int p3)
{
lua_State *L = iuplua_call_start(self, "dropfiles_cb");
lua_pushstring(L, p0);
- lua_pushnumber(L, p1);
- lua_pushnumber(L, p2);
- lua_pushnumber(L, p3);
+ lua_pushinteger(L, p1);
+ lua_pushinteger(L, p2);
+ lua_pushinteger(L, p3);
return iuplua_call(L, 4);
}
-static int dialog_unmap_cb(Ihandle *self)
-{
- lua_State *L = iuplua_call_start(self, "unmap_cb");
- return iuplua_call(L, 0);
-}
-
static int dialog_show_cb(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "show_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
return iuplua_call(L, 1);
}
-static int dialog_trayclick_cb(Ihandle *self, int p0, int p1, int p2)
+static int dialog_copydata_cb(Ihandle *self, char * p0, int p1)
{
- lua_State *L = iuplua_call_start(self, "trayclick_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
- lua_pushnumber(L, p2);
- return iuplua_call(L, 3);
+ lua_State *L = iuplua_call_start(self, "copydata_cb");
+ lua_pushstring(L, p0);
+ lua_pushinteger(L, p1);
+ return iuplua_call(L, 2);
}
-static int dialog_destroy_cb(Ihandle *self)
+static int dialog_trayclick_cb(Ihandle *self, int p0, int p1, int p2)
{
- lua_State *L = iuplua_call_start(self, "destroy_cb");
- return iuplua_call(L, 0);
+ lua_State *L = iuplua_call_start(self, "trayclick_cb");
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
+ lua_pushinteger(L, p2);
+ return iuplua_call(L, 3);
}
-static int dialog_close_cb(Ihandle *self)
+static int dialog_map_cb(Ihandle *self)
{
- lua_State *L = iuplua_call_start(self, "close_cb");
+ lua_State *L = iuplua_call_start(self, "map_cb");
return iuplua_call(L, 0);
}
@@ -82,14 +90,15 @@ int iupdialoglua_open(lua_State * L)
{
iuplua_register(L, Dialog, "Dialog");
- iuplua_register_cb(L, "MAP_CB", (lua_CFunction)dialog_map_cb, NULL);
+ iuplua_register_cb(L, "UNMAP_CB", (lua_CFunction)dialog_unmap_cb, NULL);
+ iuplua_register_cb(L, "DESTROY_CB", (lua_CFunction)dialog_destroy_cb, NULL);
+ iuplua_register_cb(L, "CLOSE_CB", (lua_CFunction)dialog_close_cb, NULL);
iuplua_register_cb(L, "MOVE_CB", (lua_CFunction)dialog_move_cb, NULL);
iuplua_register_cb(L, "DROPFILES_CB", (lua_CFunction)dialog_dropfiles_cb, NULL);
- iuplua_register_cb(L, "UNMAP_CB", (lua_CFunction)dialog_unmap_cb, NULL);
iuplua_register_cb(L, "SHOW_CB", (lua_CFunction)dialog_show_cb, NULL);
+ iuplua_register_cb(L, "COPYDATA_CB", (lua_CFunction)dialog_copydata_cb, NULL);
iuplua_register_cb(L, "TRAYCLICK_CB", (lua_CFunction)dialog_trayclick_cb, NULL);
- iuplua_register_cb(L, "DESTROY_CB", (lua_CFunction)dialog_destroy_cb, NULL);
- iuplua_register_cb(L, "CLOSE_CB", (lua_CFunction)dialog_close_cb, NULL);
+ iuplua_register_cb(L, "MAP_CB", (lua_CFunction)dialog_map_cb, NULL);
#include "clua/dialog.clua"
return 0;
diff --git a/iup/srclua5/il_getcolor.c b/iup/srclua5/il_getcolor.c
index 4d6cf71..e62e977 100755
--- a/iup/srclua5/il_getcolor.c
+++ b/iup/srclua5/il_getcolor.c
@@ -18,17 +18,17 @@
static int GetColor(lua_State *L)
{
- int x = (int)luaL_checknumber(L,1);
- int y = (int)luaL_checknumber(L,2);
+ int x = luaL_checkinteger(L,1);
+ int y = luaL_checkinteger(L,2);
unsigned char r = (unsigned char) luaL_optnumber(L,3,0);
unsigned char g = (unsigned char) luaL_optnumber(L,4,0);
unsigned char b = (unsigned char) luaL_optnumber(L,5,0);
int ret = IupGetColor(x,y,&r,&g,&b);
if (ret)
{
- lua_pushnumber(L, (int) r);
- lua_pushnumber(L, (int) g);
- lua_pushnumber(L, (int) b);
+ lua_pushinteger(L, r);
+ lua_pushinteger(L, g);
+ lua_pushinteger(L, b);
return 3;
}
else
diff --git a/iup/srclua5/il_getparam.c b/iup/srclua5/il_getparam.c
index 72c4303..0e05b9a 100755
--- a/iup/srclua5/il_getparam.c
+++ b/iup/srclua5/il_getparam.c
@@ -38,10 +38,10 @@ static int param_action(Ihandle* dialog, int param_index, void* user_data)
lua_State *L = gp->L;
lua_getref(L, gp->func_ref);
iuplua_pushihandle(L, dialog);
- lua_pushnumber(L, param_index);
+ lua_pushinteger(L, param_index);
if (iuplua_call_raw(L, 2, 1) != 0) /* 2 args, 1 return */
{
- ret = (int)lua_tonumber(L,-1);
+ ret = lua_tointeger(L,-1);
lua_pop(L, 1);
}
}
@@ -84,10 +84,18 @@ static int GetParam(lua_State *L)
switch(t)
{
case 'b':
+/* TO DO: add this code some day:
+ if (lua_isboolean(L, lua_param_start))
+ {
+ param_data[i] = malloc(sizeof(int));
+ *(int*)(param_data[i]) = lua_toboolean(L, lua_param_start); lua_param_start++;
+ break;
+ } */
+ /* else continuous and get an integer */
case 'i':
case 'l':
param_data[i] = malloc(sizeof(int));
- *(int*)(param_data[i]) = (int)luaL_checknumber(L, lua_param_start); lua_param_start++;
+ *(int*)(param_data[i]) = luaL_checkinteger(L, lua_param_start); lua_param_start++;
break;
case 'a':
case 'r':
@@ -132,7 +140,7 @@ static int GetParam(lua_State *L)
case 'b':
case 'i':
case 'l':
- lua_pushnumber(L, *(int*)(param_data[i]));
+ lua_pushinteger(L, *(int*)(param_data[i]));
break;
case 'a':
case 'r':
@@ -165,7 +173,7 @@ static int GetParam(lua_State *L)
static int GetParamParam(lua_State *L)
{
Ihandle *dialog = iuplua_checkihandle(L, 1);
- int param_index = (int)luaL_checknumber(L, 2);
+ int param_index = luaL_checkinteger(L, 2);
Ihandle* param;
char param_str[50];
sprintf(param_str, "PARAM%d", param_index);
diff --git a/iup/srclua5/il_glcanvas.c b/iup/srclua5/il_glcanvas.c
index 27f7277..933f06f 100755
--- a/iup/srclua5/il_glcanvas.c
+++ b/iup/srclua5/il_glcanvas.c
@@ -16,8 +16,8 @@
static int glcanvas_action(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "action");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
@@ -60,9 +60,3 @@ int luaopen_iupluagl(lua_State* L)
return iupgllua_open(L);
}
-/* obligatory to use require"iupluagl51" */
-int luaopen_iupluagl51(lua_State* L)
-{
- return iupgllua_open(L);
-}
-
diff --git a/iup/srclua5/il_image.c b/iup/srclua5/il_image.c
index 4be480d..382f17a 100755
--- a/iup/srclua5/il_image.c
+++ b/iup/srclua5/il_image.c
@@ -25,26 +25,26 @@ static int Image (lua_State * L)
int i, j;
/* get the number of lines */
- h = luaL_getn(L, 1);
+ h = iuplua_getn(L, 1);
/* get the number of columns of the first line */
- lua_pushnumber(L, 1);
+ lua_pushinteger(L, 1);
lua_gettable(L, 1);
- w = luaL_getn(L, -1);
+ w = iuplua_getn(L, -1);
lua_pop(L, 1);
pixels = (unsigned char *) malloc (h*w);
for (i=1; i<=h; i++)
{
- lua_pushnumber(L, i);
+ lua_pushinteger(L, i);
lua_gettable(L, 1);
for (j=1; j<=w; j++)
{
int idx = (i-1)*w+(j-1);
- lua_pushnumber(L, j);
+ lua_pushinteger(L, j);
lua_gettable(L, -2);
- pixels[idx] = (unsigned char)lua_tonumber(L, -1);
+ pixels[idx] = (unsigned char)lua_tointeger(L, -1);
lua_pop(L, 1);
}
lua_pop(L, 1);
@@ -53,7 +53,7 @@ static int Image (lua_State * L)
ih = IupImage(w,h,pixels);
free(pixels);
- num_colors = luaL_getn(L, 2);
+ num_colors = iuplua_getn(L, 2);
num_colors = num_colors>255? 255: num_colors;
for(c=1; c<=num_colors; c++)
{
@@ -71,7 +71,7 @@ static int Image (lua_State * L)
ih = IupImage(w, h, pixels);
free(pixels);
- num_colors = luaL_getn(L, 4);
+ num_colors = iuplua_getn(L, 4);
num_colors = num_colors>256? 256: num_colors;
for(c=1; c<=num_colors; c++)
{
diff --git a/iup/srclua5/il_list.c b/iup/srclua5/il_list.c
index cec844b..b212d87 100755
--- a/iup/srclua5/il_list.c
+++ b/iup/srclua5/il_list.c
@@ -15,7 +15,7 @@
static int list_dropdown_cb(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "dropdown_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
return iuplua_call(L, 1);
}
@@ -23,15 +23,15 @@ static int list_action(Ihandle *self, char * p0, int p1, int p2)
{
lua_State *L = iuplua_call_start(self, "action");
lua_pushstring(L, p0);
- lua_pushnumber(L, p1);
- lua_pushnumber(L, p2);
+ lua_pushinteger(L, p1);
+ lua_pushinteger(L, p2);
return iuplua_call(L, 3);
}
static int list_dblclick_cb(Ihandle *self, int p0, char * p1)
{
lua_State *L = iuplua_call_start(self, "dblclick_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
lua_pushstring(L, p1);
return iuplua_call(L, 2);
}
@@ -39,7 +39,7 @@ static int list_dblclick_cb(Ihandle *self, int p0, char * p1)
static int list_edit_cb(Ihandle *self, int p0, char * p1)
{
lua_State *L = iuplua_call_start(self, "edit_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
lua_pushstring(L, p1);
return iuplua_call(L, 2);
}
diff --git a/iup/srclua5/il_matrix.c b/iup/srclua5/il_matrix.c
index a0cb6fc..89895bd 100755
--- a/iup/srclua5/il_matrix.c
+++ b/iup/srclua5/il_matrix.c
@@ -16,76 +16,76 @@
static char * matrix_font_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "font_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call_rs(L, 2);
}
static int matrix_draw_cb(Ihandle *self, int p0, int p1, int p2, int p3, int p4, int p5, int p6)
{
lua_State *L = iuplua_call_start(self, "draw_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
- lua_pushnumber(L, p2);
- lua_pushnumber(L, p3);
- lua_pushnumber(L, p4);
- lua_pushnumber(L, p5);
- lua_pushnumber(L, p6);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
+ lua_pushinteger(L, p2);
+ lua_pushinteger(L, p3);
+ lua_pushinteger(L, p4);
+ lua_pushinteger(L, p5);
+ lua_pushinteger(L, p6);
return iuplua_call(L, 7);
}
static int matrix_edition_cb(Ihandle *self, int p0, int p1, int p2, int p3)
{
lua_State *L = iuplua_call_start(self, "edition_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
- lua_pushnumber(L, p2);
- lua_pushnumber(L, p3);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
+ lua_pushinteger(L, p2);
+ lua_pushinteger(L, p3);
return iuplua_call(L, 4);
}
static int matrix_mark_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "mark_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
static int matrix_markedit_cb(Ihandle *self, int p0, int p1, int p2)
{
lua_State *L = iuplua_call_start(self, "markedit_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
- lua_pushnumber(L, p2);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
+ lua_pushinteger(L, p2);
return iuplua_call(L, 3);
}
static int matrix_bgcolor_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "bgcolor_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
static char * matrix_value_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "value_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call_rs(L, 2);
}
static int matrix_dropselect_cb(Ihandle *self, int p0, int p1, Ihandle * p2, char * p3, int p4, int p5)
{
lua_State *L = iuplua_call_start(self, "dropselect_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
iuplua_pushihandle(L, p2);
lua_pushstring(L, p3);
- lua_pushnumber(L, p4);
- lua_pushnumber(L, p5);
+ lua_pushinteger(L, p4);
+ lua_pushinteger(L, p5);
return iuplua_call(L, 6);
}
@@ -93,26 +93,26 @@ static int matrix_drop_cb(Ihandle *self, Ihandle * p0, int p1, int p2)
{
lua_State *L = iuplua_call_start(self, "drop_cb");
iuplua_pushihandle(L, p0);
- lua_pushnumber(L, p1);
- lua_pushnumber(L, p2);
+ lua_pushinteger(L, p1);
+ lua_pushinteger(L, p2);
return iuplua_call(L, 3);
}
static int matrix_dropcheck_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "dropcheck_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
static int matrix_action_cb(Ihandle *self, int p0, int p1, int p2, int p3, char * p4)
{
lua_State *L = iuplua_call_start(self, "action_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
- lua_pushnumber(L, p2);
- lua_pushnumber(L, p3);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
+ lua_pushinteger(L, p2);
+ lua_pushinteger(L, p3);
lua_pushstring(L, p4);
return iuplua_call(L, 5);
}
@@ -120,40 +120,40 @@ static int matrix_action_cb(Ihandle *self, int p0, int p1, int p2, int p3, char
static int matrix_enteritem_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "enteritem_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
static int matrix_leaveitem_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "leaveitem_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
static int matrix_scrolltop_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "scrolltop_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
static int matrix_fgcolor_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "fgcolor_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
static int matrix_release_cb(Ihandle *self, int p0, int p1, char * p2)
{
lua_State *L = iuplua_call_start(self, "release_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
lua_pushstring(L, p2);
return iuplua_call(L, 3);
}
@@ -161,16 +161,16 @@ static int matrix_release_cb(Ihandle *self, int p0, int p1, char * p2)
static int matrix_mousemove_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "mousemove_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
static int matrix_value_edit_cb(Ihandle *self, int p0, int p1, char * p2)
{
lua_State *L = iuplua_call_start(self, "value_edit_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
lua_pushstring(L, p2);
return iuplua_call(L, 3);
}
@@ -178,8 +178,8 @@ static int matrix_value_edit_cb(Ihandle *self, int p0, int p1, char * p2)
static int matrix_click_cb(Ihandle *self, int p0, int p1, char * p2)
{
lua_State *L = iuplua_call_start(self, "click_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
lua_pushstring(L, p2);
return iuplua_call(L, 3);
}
diff --git a/iup/srclua5/il_matrix_aux.c b/iup/srclua5/il_matrix_aux.c
index 240c837..f9f83a7 100755
--- a/iup/srclua5/il_matrix_aux.c
+++ b/iup/srclua5/il_matrix_aux.c
@@ -38,7 +38,7 @@ static int matrix_bgcolor_cb(Ihandle *self, int p0, int p1, unsigned int *p2, un
ret = iuplua_call_raw(L, 2+2, LUA_MULTRET); /* 2 args + 2 args(errormsg, handle), variable number of returns */
if (ret || lua_isnil(L, -1))
return IUP_DEFAULT;
- ret = (int)lua_tonumber(L,-1);
+ ret = lua_tointeger(L,-1);
if (ret == IUP_IGNORE)
{
@@ -46,9 +46,9 @@ static int matrix_bgcolor_cb(Ihandle *self, int p0, int p1, unsigned int *p2, un
return IUP_IGNORE;
}
- *p2 = (unsigned int)lua_tonumber(L, -4);
- *p3 = (unsigned int)lua_tonumber(L, -3);
- *p4 = (unsigned int)lua_tonumber(L, -2);
+ *p2 = (unsigned int)lua_tointeger(L, -4);
+ *p3 = (unsigned int)lua_tointeger(L, -3);
+ *p4 = (unsigned int)lua_tointeger(L, -2);
lua_pop(L, 1);
return IUP_DEFAULT;
}
@@ -62,7 +62,7 @@ static int matrix_fgcolor_cb(Ihandle *self, int p0, int p1, unsigned int *p2, un
ret = iuplua_call_raw(L, 2+2, LUA_MULTRET); /* 2 args + 2 args(errormsg, handle), variable number of returns */
if (ret || lua_isnil(L, -1))
return IUP_DEFAULT;
- ret = (int)lua_tonumber(L,-1);
+ ret = lua_tointeger(L,-1);
if (ret == IUP_IGNORE)
{
@@ -70,9 +70,9 @@ static int matrix_fgcolor_cb(Ihandle *self, int p0, int p1, unsigned int *p2, un
return IUP_IGNORE;
}
- *p2 = (unsigned int)lua_tonumber(L, -4);
- *p3 = (unsigned int)lua_tonumber(L, -3);
- *p4 = (unsigned int)lua_tonumber(L, -2);
+ *p2 = (unsigned int)lua_tointeger(L, -4);
+ *p3 = (unsigned int)lua_tointeger(L, -3);
+ *p4 = (unsigned int)lua_tointeger(L, -2);
lua_pop(L, 1);
return IUP_DEFAULT;
}
diff --git a/iup/srclua5/il_multiline.c b/iup/srclua5/il_multiline.c
index a87f294..05f88d3 100755
--- a/iup/srclua5/il_multiline.c
+++ b/iup/srclua5/il_multiline.c
@@ -15,7 +15,7 @@
static int multiline_action(Ihandle *self, int p0, char * p1)
{
lua_State *L = iuplua_call_start(self, "action");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
lua_pushstring(L, p1);
return iuplua_call(L, 2);
}
diff --git a/iup/srclua5/il_olecontrol.c b/iup/srclua5/il_olecontrol.c
index 0878e96..0e3c6d4 100755
--- a/iup/srclua5/il_olecontrol.c
+++ b/iup/srclua5/il_olecontrol.c
@@ -47,9 +47,3 @@ int luaopen_iupluaole(lua_State* L)
return iupolelua_open(L);
}
-/* obligatory to use require"iupluaole51" */
-int luaopen_iupluaole51(lua_State* L)
-{
- return iupolelua_open(L);
-}
-
diff --git a/iup/srclua5/il_pplot.c b/iup/srclua5/il_pplot.c
index 67e4b07..6fee50f 100755
--- a/iup/srclua5/il_pplot.c
+++ b/iup/srclua5/il_pplot.c
@@ -16,8 +16,8 @@
static int pplot_edit_cb(Ihandle *self, int p0, int p1, float p2, float p3, float p4, float p5)
{
lua_State *L = iuplua_call_start(self, "edit_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
lua_pushnumber(L, p2);
lua_pushnumber(L, p3);
lua_pushnumber(L, p4);
@@ -40,15 +40,15 @@ static int pplot_selectbegin_cb(Ihandle *self)
static int pplot_postdraw_cb(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "postdraw_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
return iuplua_call(L, 1);
}
static int pplot_delete_cb(Ihandle *self, int p0, int p1, float p2, float p3)
{
lua_State *L = iuplua_call_start(self, "delete_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
lua_pushnumber(L, p2);
lua_pushnumber(L, p3);
return iuplua_call(L, 4);
@@ -57,7 +57,7 @@ static int pplot_delete_cb(Ihandle *self, int p0, int p1, float p2, float p3)
static int pplot_predraw_cb(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "predraw_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
return iuplua_call(L, 1);
}
@@ -70,11 +70,11 @@ static int pplot_selectend_cb(Ihandle *self)
static int pplot_select_cb(Ihandle *self, int p0, int p1, float p2, float p3, int p4)
{
lua_State *L = iuplua_call_start(self, "select_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
lua_pushnumber(L, p2);
lua_pushnumber(L, p3);
- lua_pushnumber(L, p4);
+ lua_pushinteger(L, p4);
return iuplua_call(L, 5);
}
diff --git a/iup/srclua5/il_scanf.c b/iup/srclua5/il_scanf.c
index 6f035a7..477ac9d 100755
--- a/iup/srclua5/il_scanf.c
+++ b/iup/srclua5/il_scanf.c
@@ -113,17 +113,17 @@ int iupluaScanf(lua_State *L)
if (s[-3] == 'l') {
long l = 0;
sscanf(text[i], "%ld", &l);
- lua_pushnumber(L, l);
+ lua_pushinteger(L, l);
total++;
} else if (s[-3] == 'h') {
short l = 0;
sscanf(text[i], "%hd", &l);
- lua_pushnumber(L, l);
+ lua_pushinteger(L, l);
total++;
} else {
int l = 0;
sscanf(text[i], "%d", &l);
- lua_pushnumber(L, l);
+ lua_pushinteger(L, l);
total++;
}
break;
@@ -134,17 +134,17 @@ int iupluaScanf(lua_State *L)
if (s[-3] == 'l') {
long l = 0;
sscanf(text[i], "%li", &l);
- lua_pushnumber(L, l);
+ lua_pushinteger(L, l);
total++;
} else if (s[-3] == 'h') {
short l = 0;
sscanf(text[i], "%hi", &l);
- lua_pushnumber(L, l);
+ lua_pushinteger(L, l);
total++;
} else {
int l = 0;
sscanf(text[i], "%i", &l);
- lua_pushnumber(L, l);
+ lua_pushinteger(L, l);
total++;
}
break;
diff --git a/iup/srclua5/il_spin.c b/iup/srclua5/il_spin.c
index 23e2603..8fde78b 100755
--- a/iup/srclua5/il_spin.c
+++ b/iup/srclua5/il_spin.c
@@ -15,7 +15,7 @@
static int spin_spin_cb(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "spin_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
return iuplua_call(L, 1);
}
diff --git a/iup/srclua5/il_spinbox.c b/iup/srclua5/il_spinbox.c
index 2f044fb..9a53574 100755
--- a/iup/srclua5/il_spinbox.c
+++ b/iup/srclua5/il_spinbox.c
@@ -15,7 +15,7 @@
static int spinbox_spin_cb(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "spin_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
return iuplua_call(L, 1);
}
diff --git a/iup/srclua5/il_text.c b/iup/srclua5/il_text.c
index f654d2c..c82f933 100755
--- a/iup/srclua5/il_text.c
+++ b/iup/srclua5/il_text.c
@@ -15,16 +15,16 @@
static int text_caret_cb(Ihandle *self, int p0, int p1, int p2)
{
lua_State *L = iuplua_call_start(self, "caret_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
- lua_pushnumber(L, p2);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
+ lua_pushinteger(L, p2);
return iuplua_call(L, 3);
}
static int text_action(Ihandle *self, int p0, char * p1)
{
lua_State *L = iuplua_call_start(self, "action");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
lua_pushstring(L, p1);
return iuplua_call(L, 2);
}
diff --git a/iup/srclua5/il_toggle.c b/iup/srclua5/il_toggle.c
index 45e3d93..e934f30 100755
--- a/iup/srclua5/il_toggle.c
+++ b/iup/srclua5/il_toggle.c
@@ -15,7 +15,7 @@
static int toggle_action(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "action");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
return iuplua_call(L, 1);
}
diff --git a/iup/srclua5/il_tree.c b/iup/srclua5/il_tree.c
index 4ddc1a4..9828397 100755
--- a/iup/srclua5/il_tree.c
+++ b/iup/srclua5/il_tree.c
@@ -15,32 +15,32 @@
static int tree_branchopen_cb(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "branchopen_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
return iuplua_call(L, 1);
}
static int tree_selection_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "selection_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
static int tree_dragdrop_cb(Ihandle *self, int p0, int p1, int p2, int p3)
{
lua_State *L = iuplua_call_start(self, "dragdrop_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
- lua_pushnumber(L, p2);
- lua_pushnumber(L, p3);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
+ lua_pushinteger(L, p2);
+ lua_pushinteger(L, p3);
return iuplua_call(L, 4);
}
static int tree_rename_cb(Ihandle *self, int p0, char * p1)
{
lua_State *L = iuplua_call_start(self, "rename_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
lua_pushstring(L, p1);
return iuplua_call(L, 2);
}
@@ -48,44 +48,44 @@ static int tree_rename_cb(Ihandle *self, int p0, char * p1)
static int tree_multiunselection_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "multiunselection_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
static int tree_rightclick_cb(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "rightclick_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
return iuplua_call(L, 1);
}
static int tree_multiselection_cb(Ihandle *self, int p0, int p1)
{
lua_State *L = iuplua_call_start(self, "multiselection_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
static int tree_branchclose_cb(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "branchclose_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
return iuplua_call(L, 1);
}
static int tree_executeleaf_cb(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "executeleaf_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
return iuplua_call(L, 1);
}
static int tree_showrename_cb(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "showrename_cb");
- lua_pushnumber(L, p0);
+ lua_pushinteger(L, p0);
return iuplua_call(L, 1);
}
diff --git a/iup/srclua5/il_tree_aux.c b/iup/srclua5/il_tree_aux.c
index 6ebaa09..439d897 100755
--- a/iup/srclua5/il_tree_aux.c
+++ b/iup/srclua5/il_tree_aux.c
@@ -19,33 +19,33 @@
Given an ID, to retreive a Lua object is quite simple.
But given a user_id to obtain the ID is more complicated.
- The IUPTREEREFTABLE is used to do this mapping.
+ The iup.TREEREFTABLE is used to do this mapping.
We use the object as the index to this table.
*/
-/* iup.IUPTREEREFTABLE[object at pos] = ref */
+/* iup.TREEREFTABLE[object at pos] = ref */
static void tree_settableref(lua_State *L, int pos, int ref)
{
lua_getglobal(L, "iup");
- lua_pushstring(L, "IUPTREEREFTABLE");
+ lua_pushstring(L, "TREEREFTABLE");
lua_gettable(L, -2);
- lua_remove(L, -2);
+ lua_remove(L, -2); /* remove "iup" from stack */
lua_pushvalue(L, pos);
if(ref == LUA_NOREF)
lua_pushnil(L);
else
- lua_pushnumber(L, ref);
+ lua_pushinteger(L, ref);
lua_settable(L, -3);
lua_pop(L, 1);
}
-/* ref = iup.IUPTREEREFTABLE[object at pos] */
+/* ref = iup.TREEREFTABLE[object at pos] */
static int tree_gettableref(lua_State *L, int pos)
{
lua_getglobal(L, "iup");
- lua_pushstring(L, "IUPTREEREFTABLE");
+ lua_pushstring(L, "TREEREFTABLE");
lua_gettable(L, -2);
- lua_remove(L, -2);
+ lua_remove(L, -2); /* remove "iup" from stack */
lua_pushvalue(L, pos);
lua_gettable(L, -2);
if (lua_isnil(L, -1))
@@ -55,7 +55,7 @@ static int tree_gettableref(lua_State *L, int pos)
}
else
{
- int ref = (int) lua_tonumber(L, -1);
+ int ref = lua_tointeger(L, -1);
lua_pop(L, 1);
return ref;
}
@@ -91,7 +91,7 @@ static int TreeGetId(lua_State *L)
if (id == -1)
lua_pushnil(L);
else
- lua_pushnumber(L, id);
+ lua_pushinteger(L, id);
}
return 1;
}
@@ -99,7 +99,7 @@ static int TreeGetId(lua_State *L)
static int TreeGetUserId(lua_State *L)
{
Ihandle *ih = iuplua_checkihandle(L,1);
- int id = (int)luaL_checknumber(L,2);
+ int id = luaL_checkinteger(L,2);
tree_push_userid(L, IupTreeGetUserId(ih, id));
return 1;
}
@@ -107,7 +107,7 @@ static int TreeGetUserId(lua_State *L)
static int TreeSetUserId(lua_State *L)
{
Ihandle *ih = iuplua_checkihandle(L,1);
- int id = (int)luaL_checknumber(L,2);
+ int id = luaL_checkinteger(L,2);
int ref = (int)IupTreeGetUserId(ih, id);
if (ref != 0) /* userid is not NULL */
{
@@ -130,7 +130,7 @@ static int TreeSetUserId(lua_State *L)
tree_settableref(L, 3, ref);
if (ref >= 0) ref++; /* only positive references are shifted */
- IupTreeSetUserId(ih, id, (char*)ref);
+ IupTreeSetUserId(ih, id, (void*)ref);
}
return 0;
@@ -143,11 +143,11 @@ static int tree_multiselection_cb(Ihandle *ih, int* ids, int p1)
lua_newtable(L);
for (i = 0; i < p1; i++)
{
- lua_pushnumber(L,i+1);
- lua_pushnumber(L,ids[i]);
+ lua_pushinteger(L,i+1);
+ lua_pushinteger(L,ids[i]);
lua_settable(L,-3);
}
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
@@ -158,11 +158,11 @@ static int tree_multiunselection_cb(Ihandle *ih, int* ids, int p1)
lua_newtable(L);
for (i = 0; i < p1; i++)
{
- lua_pushnumber(L,i+1);
- lua_pushnumber(L,ids[i]);
+ lua_pushinteger(L,i+1);
+ lua_pushinteger(L,ids[i]);
lua_settable(L,-3);
}
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p1);
return iuplua_call(L, 2);
}
@@ -175,8 +175,6 @@ static int tree_noderemoved_cb(Ihandle *ih, void* p1)
void iuplua_treefuncs_open (lua_State *L)
{
- iuplua_dostring(L, "IUPTREEREFTABLE={}", "");
-
iuplua_register_cb(L, "MULTISELECTION_CB", (lua_CFunction)tree_multiselection_cb, NULL);
iuplua_register_cb(L, "MULTIUNSELECTION_CB", (lua_CFunction)tree_multiunselection_cb, NULL);
iuplua_register_cb(L, "NODEREMOVED_CB", (lua_CFunction)tree_noderemoved_cb, NULL);
diff --git a/iup/srclua5/image.lua b/iup/srclua5/image.lua
index 3a82063..dffd8bd 100755
--- a/iup/srclua5/image.lua
+++ b/iup/srclua5/image.lua
@@ -19,26 +19,26 @@ static int Image (lua_State * L)
int i, j;
/* get the number of lines */
- h = luaL_getn(L, 1);
+ h = iuplua_getn(L, 1);
/* get the number of columns of the first line */
- lua_pushnumber(L, 1);
+ lua_pushinteger(L, 1);
lua_gettable(L, 1);
- w = luaL_getn(L, -1);
+ w = iuplua_getn(L, -1);
lua_pop(L, 1);
pixels = (unsigned char *) malloc (h*w);
for (i=1; i<=h; i++)
{
- lua_pushnumber(L, i);
+ lua_pushinteger(L, i);
lua_gettable(L, 1);
for (j=1; j<=w; j++)
{
int idx = (i-1)*w+(j-1);
- lua_pushnumber(L, j);
+ lua_pushinteger(L, j);
lua_gettable(L, -2);
- pixels[idx] = (unsigned char)lua_tonumber(L, -1);
+ pixels[idx] = (unsigned char)lua_tointeger(L, -1);
lua_pop(L, 1);
}
lua_pop(L, 1);
@@ -47,7 +47,7 @@ static int Image (lua_State * L)
ih = IupImage(w,h,pixels);
free(pixels);
- num_colors = luaL_getn(L, 2);
+ num_colors = iuplua_getn(L, 2);
num_colors = num_colors>255? 255: num_colors;
for(c=1; c<=num_colors; c++)
{
@@ -65,7 +65,7 @@ static int Image (lua_State * L)
ih = IupImage(w, h, pixels);
free(pixels);
- num_colors = luaL_getn(L, 4);
+ num_colors = iuplua_getn(L, 4);
num_colors = num_colors>256? 256: num_colors;
for(c=1; c<=num_colors; c++)
{
diff --git a/iup/srclua5/iup_pplot.mak b/iup/srclua5/iup_pplot.mak
deleted file mode 100755
index b353fe7..0000000
--- a/iup/srclua5/iup_pplot.mak
+++ /dev/null
@@ -1,26 +0,0 @@
-PROJNAME = iup
-LIBNAME = iuplua_pplot51
-OPT = YES
-DEF_FILE = iuplua_pplot5.def
-
-IUP := ..
-
-DEFINES = IUPLUA_USELOH
-
-USE_IUP3 = Yes
-USE_IUPLUA = Yes
-USE_CDLUA = Yes
-LIBS = iup_pplot
-
-USE_LUA51 = Yes
-NO_LUALINK = Yes
-
-LOHDIR = loh
-SRCLUA = pplot.lua
-GC := $(addsuffix .c, $(basename $(SRCLUA)))
-GC := $(addprefix il_, $(GC))
-
-$(GC) : il_%.c : %.lua generator.lua
- $(LUABIN) generator.lua $<
-
-SRC := iuplua_pplot.c $(GC)
diff --git a/iup/srclua5/iupcd.mak b/iup/srclua5/iupcd.mak
deleted file mode 100755
index 26cf9b8..0000000
--- a/iup/srclua5/iupcd.mak
+++ /dev/null
@@ -1,21 +0,0 @@
-PROJNAME = iup
-LIBNAME = iupluacd51
-OPT = YES
-
-DEFINES = CD_NO_OLD_INTERFACE
-SRC = iuplua_cd.c
-DEF_FILE = iupluacd5.def
-
-# Can not use USE_IUPLUA because Tecmake will include "iupluacd51" in linker
-
-INCLUDES = ../include
-LIBS = iuplua51
-LDIR = ../lib/$(TEC_UNAME)
-
-IUP := ..
-
-USE_CD = YES
-USE_IUP3 = YES
-USE_LUA51 = Yes
-NO_LUALINK = Yes
-USE_CDLUA = YES
diff --git a/iup/srclua5/iupcontrols.mak b/iup/srclua5/iupcontrols.mak
deleted file mode 100755
index ea1e59f..0000000
--- a/iup/srclua5/iupcontrols.mak
+++ /dev/null
@@ -1,26 +0,0 @@
-PROJNAME = iup
-LIBNAME = iupluacontrols51
-OPT = YES
-DEF_FILE = iupluacontrols5.def
-
-IUP := ..
-
-DEFINES = IUPLUA_USELOH
-
-USE_IUP3 = Yes
-USE_IUPLUA = Yes
-USE_CDLUA = Yes
-LIBS = iupcontrols
-
-USE_LUA51 = Yes
-NO_LUALINK = Yes
-
-LOHDIR = loh
-SRCLUA = dial.lua gauge.lua colorbrowser.lua colorbar.lua matrix.lua cells.lua
-GC := $(addsuffix .c, $(basename $(SRCLUA)))
-GC := $(addprefix il_, $(GC))
-
-$(GC) : il_%.c : %.lua generator.lua
- $(LUABIN) generator.lua $<
-
-SRC := iuplua_controls.c il_mask.c il_matrix_aux.c $(GC)
diff --git a/iup/srclua5/iupgl.mak b/iup/srclua5/iupgl.mak
deleted file mode 100755
index 6e9f45d..0000000
--- a/iup/srclua5/iupgl.mak
+++ /dev/null
@@ -1,27 +0,0 @@
-PROJNAME = iup
-LIBNAME = iupluagl51
-OPT = YES
-
-DEF_FILE = iupluagl5.def
-DEFINES = IUPLUA_USELOH
-
-IUP := ..
-
-# Can not use USE_IUPLUA because Tecmake will include "iupluagl51" in linker
-
-USE_IUP3 = Yes
-USE_OPENGL = Yes
-LIBS = iuplua51
-
-USE_LUA51 = Yes
-NO_LUALINK = Yes
-
-LOHDIR = loh
-SRCLUA = glcanvas.lua
-GC = $(addsuffix .c, $(basename $(SRCLUA)))
-GC := $(addprefix il_, $(GC))
-
-$(GC) : il_%.c : %.lua generator.lua
- $(LUABIN) generator.lua $<
-
-SRC = iuplua_glcanvas.c $(GC)
diff --git a/iup/srclua5/iupim.mak b/iup/srclua5/iupim.mak
deleted file mode 100755
index 1355c42..0000000
--- a/iup/srclua5/iupim.mak
+++ /dev/null
@@ -1,17 +0,0 @@
-PROJNAME = iup
-LIBNAME = iupluaim51
-OPT = YES
-
-DEF_FILE = iupluaim5.def
-SRC = iuplua_im.c
-
-INCLUDES = ../src
-LIBS = iupim
-
-IUP := ..
-
-USE_IUP3 = Yes
-USE_IUPLUA = Yes
-USE_IM = Yes
-USE_LUA51 = Yes
-NO_LUALINK = Yes
diff --git a/iup/srclua5/iupimglib.mak b/iup/srclua5/iupimglib.mak
deleted file mode 100755
index 5b74dfb..0000000
--- a/iup/srclua5/iupimglib.mak
+++ /dev/null
@@ -1,17 +0,0 @@
-PROJNAME = iup
-LIBNAME = iupluaimglib51
-OPT = YES
-
-SRC = iuplua_imglib.c
-DEF_FILE = iupluaimglib5.def
-
-INCLUDES = ../include
-LIBS = iupimglib
-LDIR = ../lib/$(TEC_UNAME)
-
-IUP := ..
-
-USE_IUP3 = Yes
-USE_IUPLUA = Yes
-USE_LUA51 = Yes
-NO_LUALINK = Yes
diff --git a/iup/srclua5/iuplua.c b/iup/srclua5/iuplua.c
index 4158990..240d599 100755
--- a/iup/srclua5/iuplua.c
+++ b/iup/srclua5/iuplua.c
@@ -26,12 +26,14 @@
/*************************************/
/* iuplua_dostring and iuplua_dofile */
+/* report, traceback and docall were adapted from "lua.c" */
+
static void error_message(lua_State *L, const char *msg, const char* traceback)
{
lua_getglobal(L, "iup");
lua_pushstring(L, "_ERRORMESSAGE");
lua_gettable(L, -2);
- lua_remove(L, -2);
+ lua_remove(L, -2); /* remove "iup" from stack */
if(lua_isnil(L, -1))
{
@@ -43,19 +45,18 @@ static void error_message(lua_State *L, const char *msg, const char* traceback)
fflush(stderr);
return;
}
+
lua_pushstring(L, msg);
lua_pushstring(L, traceback);
- lua_call(L, 2, 0);
+ lua_call(L, 2, 0); /* iup._ERRORMESSAGE(msg, traceback) */
}
static int report (lua_State *L, int status, int concat_traceback)
{
- if (status && !lua_isnil(L, -1))
+ if (status != LUA_OK && !lua_isnil(L, -1))
{
const char *msg = lua_tostring(L, -2);
-
-
const char *traceback;
if (msg == NULL) {
msg = "(error with no message)";
@@ -70,13 +71,14 @@ static int report (lua_State *L, int status, int concat_traceback)
traceback = lua_tostring(L, -1);
}
error_message(L, msg, traceback);
- lua_pop(L, 2);
+ lua_pop(L, 2); /* remove msg and traceback from stack */
}
return status;
}
-static int traceback (lua_State *L) {
- lua_getfield(L, LUA_GLOBALSINDEX, "debug");
+static int traceback (lua_State *L)
+{
+ lua_getglobal(L, "debug");
if (!lua_istable(L, -1)) {
lua_pop(L, 1);
return 1;
@@ -97,7 +99,7 @@ static int traceback (lua_State *L) {
lua_pushvalue(L, -3);
lua_settable(L, -3);
- lua_pop(L, 2);
+ lua_pop(L, 2); /* remove "iup" and "iup._LASTTRACEBACK" from stack */
return 1;
}
@@ -109,15 +111,17 @@ static int docall (lua_State *L, int narg, int nret)
lua_insert(L, base); /* put it under chunk and args */
status = lua_pcall(L, narg, nret, base);
lua_remove(L, base); /* remove traceback function */
- if (status != 0)
+ if (status != LUA_OK)
{
/* force a complete garbage collection in case of errors */
lua_gc(L, LUA_GCCOLLECT, 0);
+
/* put _LASTTRACEBACK at stack position 2 */
lua_getglobal(L, "iup");
lua_pushliteral(L, "_LASTTRACEBACK");
lua_gettable(L, -2);
- lua_remove(L, -2);
+ lua_remove(L, -2); /* remove "iup" from stack */
+
if (!lua_isstring(L, -1))
{
lua_pop(L, 1);
@@ -129,7 +133,7 @@ static int docall (lua_State *L, int narg, int nret)
lua_pushnil(L);
lua_settable(L, -3);
- lua_pop(L, 1);
+ lua_pop(L, 1); /* remove "iup" from stack */
}
}
return status;
@@ -138,15 +142,33 @@ static int docall (lua_State *L, int narg, int nret)
int iuplua_dofile(lua_State *L, const char *filename)
{
int status = luaL_loadfile(L, filename);
- if (status == 0)
+ if (status == LUA_OK)
status = docall(L, 0, 0);
+ else if (status == LUA_ERRFILE)
+ {
+ char *dir = getenv("IUPLUA_DIR");
+ if (dir)
+ {
+ char* full_name = iupStrFileMakeFileName(dir, filename);
+ if (full_name)
+ {
+ /* remove the error string from the stack, and try again */
+ lua_remove(L, -1);
+
+ status = luaL_loadfile(L, full_name);
+ free(full_name);
+ if (status == LUA_OK)
+ status = docall(L, 0, 0);
+ }
+ }
+ }
return report(L, status, 1);
}
int iuplua_dostring(lua_State *L, const char *s, const char *name)
{
int status = luaL_loadbuffer(L, s, strlen(s), name);
- if (status == 0)
+ if (status == LUA_OK)
status = docall(L, 0, 0);
return report(L, status, 1);
}
@@ -167,7 +189,7 @@ Ihandle *iuplua_checkihandle(lua_State *L, int pos)
lua_getmetatable(L, pos); /* t2 = metatable(stack(pos)) */
lua_pushstring(L, "iup handle");
lua_gettable(L, LUA_REGISTRYINDEX); /* t = registry["iup handle"] */
- if (lua_equal(L, -2, -1)) /* check (t2==t)? */
+ if (lua_rawequal(L, -2, -1)) /* check (t2==t)? */
{
lua_pop (L, 2);
return *(Ihandle**)lua_touserdata(L, pos);
@@ -198,17 +220,18 @@ void iuplua_pushihandle(lua_State *L, Ihandle *ih)
char* sref = IupGetAttribute(ih, "_IUPLUA_WIDGET_TABLE_REF");
if (!sref)
{
- lua_getglobal(L,"iup");
+ lua_getglobal(L, "iup");
lua_pushstring(L,"RegisterHandle");
- lua_gettable(L, -2); /* f = iup.RegisterHandle */
- lua_remove(L, -2);
- iuplua_pushihandle_raw(L, ih); /* push ih */
- lua_pushstring(L, IupGetClassName(ih)); /* push type */
- lua_call(L, 2, 1); /* call f(ih, type) */
+ lua_gettable(L, -2);
+ lua_remove(L, -2); /* remove "iup" from stack */
+
+ iuplua_pushihandle_raw(L, ih);
+ lua_pushstring(L, IupGetClassName(ih));
+ lua_call(L, 2, 1); /* iup.RegisterHandle(ih, type) */
}
else
{
- iuplua_pushihandle_raw(L, ih); /* push ih */
+ iuplua_pushihandle_raw(L, ih);
lua_pushstring(L, "iup handle");
lua_gettable(L, LUA_REGISTRYINDEX); /* t = registry["iup handle"] */
lua_setmetatable(L, -2); /* metatable(ih) = t */
@@ -254,11 +277,11 @@ char ** iuplua_checkstring_array(lua_State *L, int pos)
{
int i,n;
char **v;
- n = luaL_getn(L,pos);
+ n = iuplua_getn(L,pos);
v = (char **) malloc (n*sizeof(char *));
for(i=1; i<=n; i++)
{
- lua_pushnumber(L,i);
+ lua_pushinteger(L,i);
lua_gettable(L,pos);
v[i-1] = (char*)lua_tostring(L, -1);
lua_pop(L,1);
@@ -270,13 +293,13 @@ int * iuplua_checkint_array(lua_State *L, int pos)
{
int i,n;
int *v;
- n = luaL_getn(L,pos);
+ n = iuplua_getn(L,pos);
v = (int *) malloc (n*sizeof(int));
for(i=1; i<=n; i++)
{
- lua_pushnumber(L,i);
+ lua_pushinteger(L,i);
lua_gettable(L,pos);
- v[i-1] = (int)lua_tonumber(L, -1);
+ v[i-1] = lua_tointeger(L, -1);
lua_pop(L,1);
}
return v;
@@ -286,7 +309,7 @@ unsigned char* iuplua_checkuchar_array(lua_State *L, int pos, int count)
{
int i,n;
unsigned char *v;
- n = luaL_getn(L,pos);
+ n = iuplua_getn(L,pos);
if (n != count)
{
lua_pushstring(L, "invalid number of elements in array");
@@ -295,9 +318,9 @@ unsigned char* iuplua_checkuchar_array(lua_State *L, int pos, int count)
v = (unsigned char *) malloc (n*sizeof(unsigned char));
for(i=1; i<=n; i++)
{
- lua_pushnumber(L,i);
+ lua_pushinteger(L,i);
lua_gettable(L,pos);
- v[i-1] = (unsigned char)lua_tonumber(L, -1);
+ v[i-1] = (unsigned char)lua_tointeger(L, -1);
lua_pop(L,1);
}
return v;
@@ -306,11 +329,11 @@ unsigned char* iuplua_checkuchar_array(lua_State *L, int pos, int count)
Ihandle ** iuplua_checkihandle_array(lua_State *L, int pos)
{
Ihandle **v;
- int i, n = luaL_getn(L, pos);
+ int i, n = iuplua_getn(L, pos);
v = (Ihandle **) malloc ((n+1)*sizeof(Ihandle *));
for (i=1; i<=n; i++)
{
- lua_pushnumber(L,i);
+ lua_pushinteger(L,i);
lua_gettable(L,pos);
v[i-1] = iuplua_checkihandle(L, -1);
lua_pop(L,1);
@@ -337,10 +360,10 @@ lua_State* iuplua_call_start(Ihandle *ih, const char* name)
lua_State *L = iuplua_getstate(ih);
/* prepare to call iup.CallMethod(name, handle, ...) */
- lua_getglobal(L,"iup");
+ lua_getglobal(L, "iup");
lua_pushstring(L,"CallMethod");
lua_gettable(L, -2);
- lua_remove(L, -2);
+ lua_remove(L, -2); /* remove "iup" from stack */
lua_pushstring(L, name);
iuplua_pushihandle(L, ih);
@@ -352,7 +375,7 @@ int iuplua_call(lua_State* L, int nargs)
int status = docall(L, nargs+2, 1);
report(L, status, 0);
- if (status)
+ if (status != LUA_OK)
return IUP_DEFAULT;
else
{
@@ -367,7 +390,7 @@ char* iuplua_call_rs(lua_State *L, int nargs)
int status = docall(L, nargs+2, 1);
report(L, status, 0);
- if (status)
+ if (status != LUA_OK)
return NULL;
else
{
@@ -386,13 +409,15 @@ int iuplua_call_raw(lua_State* L, int nargs, int nresults)
void iuplua_register_cb(lua_State *L, const char* name, lua_CFunction func, const char* type)
{
- lua_getglobal(L,"iup");
+ lua_getglobal(L, "iup");
lua_pushstring(L,"RegisterCallback");
lua_gettable(L, -2);
+ lua_remove(L, -2); /* remove "iup" from stack */
+
lua_pushstring(L, name);
lua_pushcfunction(L, func);
lua_pushstring(L, type);
- lua_call(L, 3, 0);
+ lua_call(L, 3, 0); /* iup.RegisterCallback(name, func, type) */
}
/* iup.SetCallback(handle, name, func, value) */
@@ -563,7 +588,7 @@ int iuplua_opencall_internal(lua_State * L)
s = lua_tostring(L, -1);
if (s && strcmp(s, "INTERNAL")==0)
ret = 1;
- lua_pop(L,2);
+ lua_pop(L,2); /* remove "iup" and "iup._IUPOPEN_CALL" from stack */
return ret;
}
@@ -600,7 +625,7 @@ static int getfocus_cb(Ihandle *self)
static int k_any(Ihandle *self, int c)
{
lua_State *L = iuplua_call_start(self, "k_any");
- lua_pushnumber(L, c);
+ lua_pushinteger(L, c);
return iuplua_call(L, 1);
}
@@ -615,8 +640,8 @@ static int Idlecall(void)
int ret = 0;
lua_State *L = (lua_State *) IupGetGlobal("_IUP_LUA_DEFAULT_STATE");
lua_getglobal(L, "_IUP_LUA_IDLE_FUNC_");
- lua_call(L, 0, 1);
- ret = (int) lua_tonumber(L, -1);
+ lua_call(L, 0, 1); /* _IUP_LUA_IDLE_FUNC_() */
+ ret = lua_tointeger(L, -1);
lua_pop(L, 1);
return ret;
}
@@ -646,15 +671,15 @@ static int GetFromC(lua_State *L)
const char *a;
if (!lua_istable(L, -1))
{
- lua_pushstring(L, "IupGetFromC: wrong arguments to function");
+ lua_pushstring(L, "iup.GetFromC: wrong arguments to function");
lua_error(L);
return 0;
}
- lua_pushnumber(L, 1);
+ lua_pushinteger(L, 1);
lua_gettable(L, -2);
if (!lua_isstring(L, -1))
{
- lua_pushstring(L, "IupGetFromC: wrong arguments to function");
+ lua_pushstring(L, "iup.GetFromC: wrong arguments to function");
lua_error(L);
return 0;
}
@@ -676,7 +701,7 @@ static int GetFromC(lua_State *L)
static void register_key(char *name, int code, void* user_data)
{
lua_State *L = (lua_State*)user_data;
- lua_pushnumber(L, code);
+ lua_pushinteger(L, code);
lua_setfield(L, -2, name);
}
@@ -705,11 +730,11 @@ static int il_open(lua_State * L)
if (lua_istable(L, -1))
{
int i;
- argc = luaL_getn(L, -1);
+ argc = iuplua_getn(L, -1);
argv = malloc(sizeof(char*)*argc);
for(i=1; i<=argc; i++)
{
- lua_pushnumber(L,i);
+ lua_pushinteger(L,i);
lua_gettable(L,-2);
argv[i-1] = (char*)lua_tostring(L, -1);
lua_pop(L,1);
@@ -868,8 +893,3 @@ int luaopen_iuplua(lua_State* L)
return iuplua_open(L);
}
-/* obligatory to use require"iuplua51" */
-int luaopen_iuplua51(lua_State* L)
-{
- return iuplua_open(L);
-}
diff --git a/iup/srclua5/iuplua.lua b/iup/srclua5/iuplua.lua
index 01465d5..a58656f 100755
--- a/iup/srclua5/iuplua.lua
+++ b/iup/srclua5/iuplua.lua
@@ -236,13 +236,13 @@ iup.SetClass(iup.BOX, "iup widget")
iup.error_message_popup = nil
-function iup._ERRORMESSAGE(err,traceback)
- err = err..(traceback or "")
+function iup._ERRORMESSAGE(msg,traceback)
+ msg = msg..(traceback or "")
if (iup.error_message_popup) then
- iup.error_message_popup.value = err
+ iup.error_message_popup.value = msg
else
local bt = iup.button{title="Ok", size="60", action="iup.error_message_popup = nil; return iup.CLOSE"}
- local ml = iup.multiline{expand="YES", readonly="YES", value=err, size="300x150"}
+ local ml = iup.multiline{expand="YES", readonly="YES", value=msg, size="300x150"}
local vb = iup.vbox{ml, bt; alignment="ACENTER", margin="10x10", gap="10"}
local dg = iup.dialog{vb; title="Error Message",defaultesc=bt,defaultenter=bt,startfocus=bt}
iup.error_message_popup = ml
@@ -254,9 +254,9 @@ end
iup.pack = function (...) return {...} end
-function iup.protectedcall_(f, err)
+function iup.protectedcall(f, msg)
if not f then
- iup._ERRORMESSAGE(err)
+ iup._ERRORMESSAGE(msg)
return
end
local ret = iup.pack(pcall(f))
@@ -265,12 +265,12 @@ function iup.protectedcall_(f, err)
return
else
table.remove(ret, 1)
- return unpack(ret)
+ return unpack(ret) --must replace this by table.unpack when 5.1 is not supported
end
end
-function iup.dostring(s) return iup.protectedcall_(loadstring(s)) end
-function iup.dofile(f) return iup.protectedcall_(loadfile(f)) end
+function iup.dostring(s) return iup.protectedcall(loadstring(s)) end
+function iup.dofile(f) return iup.protectedcall(loadfile(f)) end
function iup.RGB(r, g, b)
return string.format("%d %d %d", 255*r, 255*g, 255*b)
diff --git a/iup/srclua5/iuplua5.def b/iup/srclua5/iuplua5.def
deleted file mode 100755
index 667f81d..0000000
--- a/iup/srclua5/iuplua5.def
+++ /dev/null
@@ -1,26 +0,0 @@
-EXPORTS
- iuplua_open
- iuplua_close
- iuplua_plugstate
- iuplua_getstate
- iuplua_checkihandle
- iuplua_checkihandle_array
- iuplua_call
- iuplua_call_rs
- iuplua_call_raw
- iuplua_get_env
- iuplua_pushihandle
- iuplua_pushihandle_raw
- iuplua_dofile
- iuplua_dostring
- iupkey_open
- iuplua_opencall_internal
- luaopen_iuplua
- luaopen_iuplua51
- iuplua_register
- iuplua_regstring
- iuplua_checkstring_array
- iuplua_checkint_array
- iuplua_call_start
- iuplua_register_cb
- \ No newline at end of file
diff --git a/iup/srclua5/iuplua_api.c b/iup/srclua5/iuplua_api.c
index adf5383..27adffe 100755
--- a/iup/srclua5/iuplua_api.c
+++ b/iup/srclua5/iuplua_api.c
@@ -35,8 +35,8 @@ static int SaveImageAsText(lua_State *L)
static int Reparent(lua_State *L)
{
- lua_pushnumber(L, IupReparent(iuplua_checkihandle(L,1),
- iuplua_checkihandle(L,2)));
+ lua_pushinteger(L, IupReparent(iuplua_checkihandle(L,1),
+ iuplua_checkihandle(L,2)));
return 1;
}
@@ -132,11 +132,11 @@ static int GetAllDialogs(lua_State *L)
lua_newtable(L);
for (i=0; i<n; i++)
{
- lua_pushnumber(L,i+1);
+ lua_pushinteger(L,i+1);
lua_pushstring(L,names[i]);
lua_settable(L,-3);
}
- lua_pushnumber(L,n);
+ lua_pushinteger(L,n);
free(names);
return 2;
}
@@ -149,11 +149,11 @@ static int GetAllNames(lua_State *L)
lua_newtable(L);
for (i=0; i<n; i++)
{
- lua_pushnumber(L,i+1);
+ lua_pushinteger(L,i+1);
lua_pushstring(L,names[i]);
lua_settable(L,-3);
}
- lua_pushnumber(L,n);
+ lua_pushinteger(L,n);
free(names);
return 2;
}
@@ -166,11 +166,11 @@ static int GetAllAttributes(lua_State *L)
lua_newtable(L);
for (i=0; i<n; i++)
{
- lua_pushnumber(L,i+1);
+ lua_pushinteger(L,i+1);
lua_pushstring(L,names[i]);
lua_settable(L,-3);
}
- lua_pushnumber(L,n);
+ lua_pushinteger(L,n);
free(names);
return 2;
}
@@ -190,11 +190,11 @@ static int GetClassAttributes(lua_State *L)
lua_newtable(L);
for (i=0; i<n; i++)
{
- lua_pushnumber(L,i+1);
+ lua_pushinteger(L,i+1);
lua_pushstring(L,names[i]);
lua_settable(L,-3);
}
- lua_pushnumber(L,n);
+ lua_pushinteger(L,n);
free(names);
return 2;
}
@@ -219,7 +219,7 @@ static int GetFile (lua_State *L)
iupStrCopyN(returned_fname, 10240, fname);
ret = IupGetFile(returned_fname);
lua_pushstring(L, returned_fname);
- lua_pushnumber(L, ret);
+ lua_pushinteger(L, ret);
return 2;
}
@@ -287,7 +287,7 @@ static int Help(lua_State *L)
static int Hide(lua_State *L)
{
Ihandle *ih = iuplua_checkihandle(L,1);
- lua_pushnumber(L, IupHide(ih));
+ lua_pushinteger(L, IupHide(ih));
return 1;
}
@@ -309,13 +309,13 @@ static int LoadBuffer(lua_State *L)
static int LoopStep(lua_State *L)
{
- lua_pushnumber(L,IupLoopStep());
+ lua_pushinteger(L,IupLoopStep());
return 1;
}
static int LoopStepWait(lua_State *L)
{
- lua_pushnumber(L,IupLoopStepWait());
+ lua_pushinteger(L,IupLoopStepWait());
return 1;
}
@@ -328,20 +328,20 @@ static int ExitLoop(lua_State *L)
static int MainLoop(lua_State *L)
{
- lua_pushnumber(L,IupMainLoop());
+ lua_pushinteger(L,IupMainLoop());
return 1;
}
static int MainLoopLevel(lua_State *L)
{
- lua_pushnumber(L,IupMainLoopLevel());
+ lua_pushinteger(L,IupMainLoopLevel());
return 1;
}
static int Map(lua_State *L)
{
Ihandle *ih = iuplua_checkihandle(L,1);
- lua_pushnumber(L, IupMap(ih));
+ lua_pushinteger(L, IupMap(ih));
return 1;
}
@@ -375,7 +375,7 @@ static int Alarm(lua_State *L)
luaL_checkstring(L, 3),
luaL_optstring(L, 4, NULL),
luaL_optstring(L, 5, NULL));
- lua_pushnumber(L, n);
+ lua_pushinteger(L, n);
return 1;
}
@@ -387,11 +387,11 @@ static int ListDialog(lua_State *L)
int* marks = lua_isnoneornil(L, 8)? NULL: iuplua_checkint_array(L,8);
int i, ret;
- if (size != luaL_getn(L, 4))
+ if (size != iuplua_getn(L, 4))
luaL_error(L, "invalid number of elements in the list.");
if (!marks && type==2)
luaL_error(L, "invalid marks, must not be nil.");
- if (marks && type==2 && size != luaL_getn(L, 8))
+ if (marks && type==2 && size != iuplua_getn(L, 8))
luaL_error(L, "invalid number of elements in the marks.");
ret = IupListDialog(type, luaL_checkstring(L, 2),
@@ -406,13 +406,13 @@ static int ListDialog(lua_State *L)
{
for (i=0; i<size; i++)
{
- lua_pushnumber(L, i+1);
- lua_pushnumber(L, marks[i]);
+ lua_pushinteger(L, i+1);
+ lua_pushinteger(L, marks[i]);
lua_settable(L, 8);
}
}
- lua_pushnumber(L, ret);
+ lua_pushinteger(L, ret);
if (marks) free(marks);
free(list);
@@ -455,21 +455,21 @@ static int Popup(lua_State *L)
Ihandle *ih = iuplua_checkihandle(L,1);
int x = luaL_optint(L,2, IUP_CURRENT);
int y = luaL_optint(L,3, IUP_CURRENT);
- lua_pushnumber(L,IupPopup(ih,x,y));
+ lua_pushinteger(L,IupPopup(ih,x,y));
return 1;
}
static int cf_isprint(lua_State *L)
{
int value = luaL_checkint(L, 1);
- lua_pushnumber(L, iup_isprint(value));
+ lua_pushinteger(L, iup_isprint(value));
return 1;
}
static int cf_xCODE(lua_State *L)
{
int value = luaL_checkint(L, 1);
- lua_pushnumber(L, IUPxCODE(value));
+ lua_pushinteger(L, IUPxCODE(value));
return 1;
}
@@ -588,7 +588,7 @@ static int GetParent(lua_State *L)
static int VersionNumber(lua_State *L)
{
- lua_pushnumber(L, IupVersionNumber());
+ lua_pushinteger(L, IupVersionNumber());
return 1;
}
@@ -605,7 +605,7 @@ static int GetChildPos(lua_State *L)
{
Ihandle* ih = iuplua_checkihandle(L,1);
Ihandle* child = iuplua_checkihandle(L,2);
- lua_pushnumber(L, IupGetChildPos(ih, child));
+ lua_pushinteger(L, IupGetChildPos(ih, child));
return 1;
}
@@ -691,13 +691,13 @@ static int SetLanguage(lua_State *L)
static int GetChildCount (lua_State *L)
{
- lua_pushnumber(L, IupGetChildCount(iuplua_checkihandle(L,1)));
+ lua_pushinteger(L, IupGetChildCount(iuplua_checkihandle(L,1)));
return 1;
}
static int Show (lua_State *L)
{
- lua_pushnumber(L, IupShow(iuplua_checkihandle(L,1)));
+ lua_pushinteger(L, IupShow(iuplua_checkihandle(L,1)));
return 1;
}
@@ -730,10 +730,18 @@ static int ShowXY(lua_State *L)
Ihandle *ih = iuplua_checkihandle(L,1);
int x = luaL_optint(L,2, IUP_CURRENT);
int y = luaL_optint(L,3, IUP_CURRENT);
- lua_pushnumber(L,IupShowXY(ih,x,y));
+ lua_pushinteger(L, IupShowXY(ih,x,y));
return 1;
}
+static int ResetAttribute(lua_State *L)
+{
+ Ihandle *ih = iuplua_checkihandle(L,1);
+ const char *a = luaL_checkstring(L,2);
+ IupResetAttribute(ih, a);
+ return 0;
+}
+
static int StoreAttribute(lua_State *L)
{
Ihandle *ih = iuplua_checkihandle(L,1);
@@ -826,6 +834,7 @@ void iupluaapi_open(lua_State * L)
{"NextField", NextField},
{"Popup", Popup},
{"PreviousField", PreviousField},
+ {"ResetAttribute", ResetAttribute},
{"SetAttribute", StoreAttribute},
{"SetAttributes", SetAttributes},
{"isbutton1", cf_isbutton1},
diff --git a/iup/srclua5/iuplua_cd.c b/iup/srclua5/iuplua_cd.c
index c14932a..184ef84 100755
--- a/iup/srclua5/iuplua_cd.c
+++ b/iup/srclua5/iuplua_cd.c
@@ -39,8 +39,13 @@ static cdluaContext cdluaiupctx =
int cdluaiup_open (lua_State *L)
{
cdluaLuaState* cdL = cdlua_getstate(L);
+ /* leave "cd" table at the top of the stack */
lua_pushstring(L, "cd");
- lua_gettable(L, LUA_GLOBALSINDEX); /* leave "cd" table at the top of the stack */
+#if LUA_VERSION_NUM > 501
+ lua_pushglobaltable(L);
+#else
+ lua_gettable(L, LUA_GLOBALSINDEX);
+#endif
cdlua_addcontext(L, cdL, &cdluaiupctx);
return 1;
}
@@ -50,7 +55,3 @@ int luaopen_iupluacd(lua_State* L)
return cdluaiup_open(L);
}
-int luaopen_iupluacd51(lua_State* L)
-{
- return cdluaiup_open(L);
-}
diff --git a/iup/srclua5/iuplua_controls.c b/iup/srclua5/iuplua_controls.c
index 22992f4..12b535b 100755
--- a/iup/srclua5/iuplua_controls.c
+++ b/iup/srclua5/iuplua_controls.c
@@ -46,8 +46,3 @@ int luaopen_iupluacontrols(lua_State* L)
return iupcontrolslua_open(L);
}
-/* obligatory to use require"iupluacontrols51" */
-int luaopen_iupluacontrols51(lua_State* L)
-{
- return iupcontrolslua_open(L);
-}
diff --git a/iup/srclua5/iuplua_im.c b/iup/srclua5/iuplua_im.c
index 0d9005d..10a2eda 100755
--- a/iup/srclua5/iuplua_im.c
+++ b/iup/srclua5/iuplua_im.c
@@ -46,8 +46,3 @@ int luaopen_iupluaim(lua_State* L)
return iupimlua_open(L);
}
-/* obligatory to use require"iupluaim51" */
-int luaopen_iupluaim51(lua_State* L)
-{
- return iupimlua_open(L);
-}
diff --git a/iup/srclua5/iuplua_imglib.c b/iup/srclua5/iuplua_imglib.c
index 9eb1123..f7b2755 100755
--- a/iup/srclua5/iuplua_imglib.c
+++ b/iup/srclua5/iuplua_imglib.c
@@ -37,7 +37,3 @@ int luaopen_iupluaimglib(lua_State* L)
return iupluaimglib_open(L);
}
-int luaopen_iupluaimglib51(lua_State* L)
-{
- return iupluaimglib_open(L);
-}
diff --git a/iup/srclua5/iuplua_pplot.c b/iup/srclua5/iuplua_pplot.c
index 21b5090..63248fc 100755
--- a/iup/srclua5/iuplua_pplot.c
+++ b/iup/srclua5/iuplua_pplot.c
@@ -22,14 +22,14 @@ static int pplot_edit_cb(Ihandle *self, int p0, int p1, float p2, float p3, floa
{
int ret;
lua_State *L = iuplua_call_start(self, "edit_cb");
- lua_pushnumber(L, p0);
- lua_pushnumber(L, p1);
+ lua_pushinteger(L, p0);
+ lua_pushinteger(L, p1);
lua_pushnumber(L, p2);
lua_pushnumber(L, p3);
ret = iuplua_call_raw(L, 4+2, LUA_MULTRET); /* 4 args + 2 args(errormsg, handle), variable number of returns */
if (ret || lua_isnil(L, -1))
return IUP_DEFAULT;
- ret = (int)lua_tonumber(L,-1);
+ ret = lua_tointeger(L,-1);
if (ret == IUP_IGNORE)
{
@@ -82,7 +82,7 @@ static int PPlotEnd(lua_State *L)
{
Ihandle *ih = iuplua_checkihandle(L,1);
int ret = IupPPlotEnd(ih);
- lua_pushnumber(L, ret);
+ lua_pushinteger(L, ret);
return 1;
}
@@ -105,8 +105,8 @@ static int PPlotTransform(lua_State *L)
Ihandle *ih = iuplua_checkihandle(L,1);
int ix, iy;
IupPPlotTransform(ih, (float)luaL_checknumber(L,2), (float)luaL_checknumber(L,3), &ix, &iy);
- lua_pushnumber(L, ix);
- lua_pushnumber(L, iy);
+ lua_pushinteger(L, ix);
+ lua_pushinteger(L, iy);
return 2;
}
@@ -151,8 +151,3 @@ int luaopen_iuplua_pplot(lua_State* L)
return iup_pplotlua_open(L);
}
-/* obligatory to use require"iuplua_pplot51" */
-int luaopen_iuplua_pplot51(lua_State* L)
-{
- return iup_pplotlua_open(L);
-}
diff --git a/iup/srclua5/iuplua_pplot5.def b/iup/srclua5/iuplua_pplot5.def
deleted file mode 100755
index 3b2ce41..0000000
--- a/iup/srclua5/iuplua_pplot5.def
+++ /dev/null
@@ -1,4 +0,0 @@
-EXPORTS
- iup_pplotlua_open
- luaopen_iuplua_pplot
- luaopen_iuplua_pplot51
diff --git a/iup/srclua5/iupluacd5.def b/iup/srclua5/iupluacd5.def
deleted file mode 100755
index c56c231..0000000
--- a/iup/srclua5/iupluacd5.def
+++ /dev/null
@@ -1,4 +0,0 @@
-EXPORTS
- cdluaiup_open
- luaopen_iupluacd
- luaopen_iupluacd51 \ No newline at end of file
diff --git a/iup/srclua5/iupluacontrols5.def b/iup/srclua5/iupluacontrols5.def
deleted file mode 100755
index 0317d30..0000000
--- a/iup/srclua5/iupluacontrols5.def
+++ /dev/null
@@ -1,6 +0,0 @@
-EXPORTS
- iupcontrolslua_open
- iupcontrolslua_close
- luaopen_iupluacontrols
- luaopen_iupluacontrols51
- \ No newline at end of file
diff --git a/iup/srclua5/iupluagl5.def b/iup/srclua5/iupluagl5.def
deleted file mode 100755
index 577d9cf..0000000
--- a/iup/srclua5/iupluagl5.def
+++ /dev/null
@@ -1,5 +0,0 @@
-EXPORTS
- iupgllua_open
- luaopen_iupluagl
- luaopen_iupluagl51
- \ No newline at end of file
diff --git a/iup/srclua5/iupluaim5.def b/iup/srclua5/iupluaim5.def
deleted file mode 100755
index 063df5a..0000000
--- a/iup/srclua5/iupluaim5.def
+++ /dev/null
@@ -1,5 +0,0 @@
-EXPORTS
- iupimlua_open
- luaopen_iupluaim
- luaopen_iupluaim51
- \ No newline at end of file
diff --git a/iup/srclua5/iupluaimglib5.def b/iup/srclua5/iupluaimglib5.def
deleted file mode 100755
index 134abb7..0000000
--- a/iup/srclua5/iupluaimglib5.def
+++ /dev/null
@@ -1,4 +0,0 @@
-EXPORTS
- luaopen_iupluaimglib
- luaopen_iupluaimglib51
- \ No newline at end of file
diff --git a/iup/srclua5/iupluaole5.def b/iup/srclua5/iupluaole5.def
deleted file mode 100755
index ab781ed..0000000
--- a/iup/srclua5/iupluaole5.def
+++ /dev/null
@@ -1,5 +0,0 @@
-EXPORTS
- iupolelua_open
- luaopen_iupluaole
- luaopen_iupluaole51
- \ No newline at end of file
diff --git a/iup/srclua5/iupole.mak b/iup/srclua5/iupole.mak
deleted file mode 100755
index 6a3f9ec..0000000
--- a/iup/srclua5/iupole.mak
+++ /dev/null
@@ -1,23 +0,0 @@
-PROJNAME = iup
-LIBNAME = iupluaole51
-OPT = YES
-DEF_FILE = iupluaole5.def
-
-IUP := ..
-
-DEFINES = IUPLUA_USELOH
-
-USE_IUPLUA = Yes
-LIBS = iupole
-USE_LUA51 = Yes
-NO_LUALINK = Yes
-
-LOHDIR = loh
-SRCLUA = olecontrol.lua
-GC = $(addsuffix .c, $(basename $(SRCLUA)))
-GC := $(addprefix il_, $(GC))
-
-$(GC) : il_%.c : %.lua generator.lua
- $(LUABIN) generator.lua $<
-
-SRC = $(GC)
diff --git a/iup/srclua5/make_uname b/iup/srclua5/make_uname
deleted file mode 100755
index 4e01bd9..0000000
--- a/iup/srclua5/make_uname
+++ /dev/null
@@ -1,9 +0,0 @@
-#This builds all the libraries of the folder for 1 uname
-
-tecmake $1 $2 $3 $4 $5 $6 $7 $8
-tecmake $1 MF=iupcd $2 $3 $4 $5 $6 $7 $8
-tecmake $1 MF=iupcontrols $2 $3 $4 $5 $6 $7 $8
-tecmake $1 MF=iup_pplot $2 $3 $4 $5 $6 $7 $8
-tecmake $1 MF=iupgl $2 $3 $4 $5 $6 $7 $8
-tecmake $1 MF=iupim $2 $3 $4 $5 $6 $7 $8
-tecmake $1 MF=iupimglib $2 $3 $4 $5 $6 $7 $8
diff --git a/iup/srclua5/make_uname.bat b/iup/srclua5/make_uname.bat
deleted file mode 100755
index ecf9de1..0000000
--- a/iup/srclua5/make_uname.bat
+++ /dev/null
@@ -1,11 +0,0 @@
-@echo off
-REM This builds all the libraries of the folder for 1 uname
-
-call tecmake %1 %2 %3 %4 %5 %6 %7 %8
-call tecmake %1 "MF=iupcd" %2 %3 %4 %5 %6 %7 %8
-call tecmake %1 "MF=iupcontrols" %2 %3 %4 %5 %6 %7 %8
-call tecmake %1 "MF=iup_pplot" %2 %3 %4 %5 %6 %7 %8
-call tecmake %1 "MF=iupgl" %2 %3 %4 %5 %6 %7 %8
-call tecmake %1 "MF=iupim" %2 %3 %4 %5 %6 %7 %8
-call tecmake %1 "MF=iupimglib" %2 %3 %4 %5 %6 %7 %8
-call tecmake %1 "MF=iupole" %2 %3 %4 %5 %6 %7 %8
diff --git a/iup/srclua5/menu.lua b/iup/srclua5/menu.lua
index 70be236..750494f 100755
--- a/iup/srclua5/menu.lua
+++ b/iup/srclua5/menu.lua
@@ -3,7 +3,7 @@
------------------------------------------------------------------------------
local ctrl = {
nick = "menu",
- parent = iup.BOX,
+ parent = iup.BOX, -- iup.Append will be automatically called after createElement
creation = "-",
callback = {
open_cb = "",
@@ -19,25 +19,38 @@ function ctrl.append(handle, elem)
iup.Append(handle, elem)
end
+function ctrl.getargs(menu_param)
+ local itemarg = {}
+ -- copy the named attributes to the element parameters
+ for u,v in pairs(menu_param) do
+ if type(u) ~= "number" then
+ itemarg[u] = v
+ end
+ end
+ return itemarg
+end
+
function ctrl.createElement(class, param)
local n = #param
for i=1,n do
- if type(param[i]) == "table" then
- local itemarg = {}
- for u,v in pairs(param[i]) do
- if type(u) ~= "number" then
- itemarg[u] = v
+ local menu_param = param[i]
+ if type(menu_param) == "table" then
+ -- replace param[i], so it will be used by iup.Append after createElement
+ -- other elements already created can also be used
+ if type(menu_param[1]) == nil then
+ param[i] = iup.separator()
+ elseif type(menu_param[1]) == "string" then
+ local itemarg = ctrl.getargs(menu_param)
+ if type(menu_param[2]) == "userdata" then
+ itemarg[1] = menu_param[2]
+ itemarg.title = menu_param[1]
+ param[i] = iup.submenu(itemarg)
+ else
+ itemarg.title = menu_param[1]
+ itemarg.action = menu_param[2]
+ param[i] = iup.item(itemarg)
end
end
- if type(param[i][1]) == "string" and (type(param[i][2]) == "function" or type(param[i][2]) == "string") then
- itemarg.title = param[i][1]
- itemarg.action = param[i][2]
- param[i] = iup.item(itemarg)
- elseif type(param[i][1]) == "string" and type(param[i][2]) == "userdata" then
- itemarg[1] = param[i][2]
- itemarg.title = param[i][1]
- param[i] = iup.submenu(itemarg)
- end
end
end
return iup.Menu()
diff --git a/iup/srclua5/olecontrol.lua b/iup/srclua5/olecontrol.lua
index ab7afd5..12c2ab8 100755
--- a/iup/srclua5/olecontrol.lua
+++ b/iup/srclua5/olecontrol.lua
@@ -25,12 +25,6 @@ int luaopen_iupluaole(lua_State* L)
return iupolelua_open(L);
}
-/* obligatory to use require"iupluaole51" */
-int luaopen_iupluaole51(lua_State* L)
-{
- return iupolelua_open(L);
-}
-
]]
}
diff --git a/iup/srclua5/radio.lua b/iup/srclua5/radio.lua
index 7af6540..0431e91 100755
--- a/iup/srclua5/radio.lua
+++ b/iup/srclua5/radio.lua
@@ -8,6 +8,7 @@ local ctrl = {
callback = {}
}
+-- TODO: remove this code in the future, it seems to be useless an incorrect
function ctrl.SetChildrenNames(obj)
if obj then
if obj.parent.parent == iup.BOX then
diff --git a/iup/srclua5/tree.lua b/iup/srclua5/tree.lua
index 5bd21c4..2e07940 100755
--- a/iup/srclua5/tree.lua
+++ b/iup/srclua5/tree.lua
@@ -21,6 +21,8 @@ local ctrl = {
extrafuncs = 1,
}
+iup.TREEREFTABLE={}
+
function iup.TreeSetNodeAttributes(handle, id, attrs)
for attr, val in pairs(attrs) do
handle[attr..id] = val