ruby-dcl 1.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +321 -0
- data/GenWrapper/Makefile +14 -0
- data/GenWrapper/cproto2init.rb +41 -0
- data/GenWrapper/dcl_narrayed_funcs.rb +181 -0
- data/GenWrapper/dcl_rb_footing +29 -0
- data/GenWrapper/dcl_rb_heading +129 -0
- data/GenWrapper/def.rb +20 -0
- data/GenWrapper/elim_ary_size.rb +398 -0
- data/GenWrapper/etc/Mk_proto +375 -0
- data/GenWrapper/etc/dcl_gen +13 -0
- data/GenWrapper/etc/p_header +63 -0
- data/GenWrapper/etc/p_init +410 -0
- data/GenWrapper/pparse.rb +137 -0
- data/GenWrapper/proto/Makefile +35 -0
- data/GenWrapper/proto/grph1_00 +17 -0
- data/GenWrapper/proto/grph1_csgi.fp +27 -0
- data/GenWrapper/proto/grph1_scpack.fp +442 -0
- data/GenWrapper/proto/grph1_sgpack.fp +1406 -0
- data/GenWrapper/proto/grph1_slpack.fp +316 -0
- data/GenWrapper/proto/grph1_stpack.fp +411 -0
- data/GenWrapper/proto/grph1_swpack.fp +746 -0
- data/GenWrapper/proto/grph2_00 +16 -0
- data/GenWrapper/proto/grph2_grpack.fp +139 -0
- data/GenWrapper/proto/grph2_ucpack.fp +522 -0
- data/GenWrapper/proto/grph2_udpack.fp +692 -0
- data/GenWrapper/proto/grph2_uepack.fp +601 -0
- data/GenWrapper/proto/grph2_ugpack.fp +436 -0
- data/GenWrapper/proto/grph2_uhpack.fp +246 -0
- data/GenWrapper/proto/grph2_ulpack.fp +516 -0
- data/GenWrapper/proto/grph2_umpack.fp +676 -0
- data/GenWrapper/proto/grph2_uspack.fp +989 -0
- data/GenWrapper/proto/grph2_uupack.fp +663 -0
- data/GenWrapper/proto/grph2_uvpack.fp +246 -0
- data/GenWrapper/proto/grph2_uwpack.fp +203 -0
- data/GenWrapper/proto/grph2_uxpack.fp +295 -0
- data/GenWrapper/proto/grph2_uypack.fp +295 -0
- data/GenWrapper/proto/grph2_uzpack.fp +574 -0
- data/GenWrapper/proto/math1_00 +12 -0
- data/GenWrapper/proto/math1_blklib.fp +58 -0
- data/GenWrapper/proto/math1_chrlib.fp +83 -0
- data/GenWrapper/proto/math1_fnclib.fp +79 -0
- data/GenWrapper/proto/math1_gnmlib.fp +118 -0
- data/GenWrapper/proto/math1_gt2dlib.fp +144 -0
- data/GenWrapper/proto/math1_ifalib.fp +123 -0
- data/GenWrapper/proto/math1_indxlib.fp +222 -0
- data/GenWrapper/proto/math1_intlib.fp +46 -0
- data/GenWrapper/proto/math1_lrllib.fp +276 -0
- data/GenWrapper/proto/math1_maplib.fp +24 -0
- data/GenWrapper/proto/math1_oslib.fp +28 -0
- data/GenWrapper/proto/math1_rfalib.fp +420 -0
- data/GenWrapper/proto/math1_rfblib.fp +51 -0
- data/GenWrapper/proto/math1_sublib.fp +60 -0
- data/GenWrapper/proto/math1_syslib.fp +767 -0
- data/GenWrapper/proto/math1_vialib.fp +339 -0
- data/GenWrapper/proto/math1_viblib.fp +264 -0
- data/GenWrapper/proto/math1_vralib.fp +339 -0
- data/GenWrapper/proto/math1_vrblib.fp +264 -0
- data/GenWrapper/proto/math1_xfclib.fp +68 -0
- data/GenWrapper/proto/math2_00 +12 -0
- data/GenWrapper/proto/math2_fftlib.fp +803 -0
- data/GenWrapper/proto/math2_intrlib.fp +32 -0
- data/GenWrapper/proto/math2_odelib.fp_notused +568 -0
- data/GenWrapper/proto/math2_rnmlib.fp +54 -0
- data/GenWrapper/proto/math2_shtlib.fp +1292 -0
- data/GenWrapper/proto/math2_shtlib.fp_old +1294 -0
- data/GenWrapper/proto/math2_vstlib.fp +84 -0
- data/GenWrapper/proto/misc1_00 +17 -0
- data/GenWrapper/proto/misc1_chnlib.fp +47 -0
- data/GenWrapper/proto/misc1_datelib.fp +352 -0
- data/GenWrapper/proto/misc1_fmtlib.fp +19 -0
- data/GenWrapper/proto/misc1_misclib.fp +26 -0
- data/GenWrapper/proto/misc1_randlib.fp +36 -0
- data/GenWrapper/proto/misc1_timelib.fp +151 -0
- data/GenWrapper/proto2c.rb +13 -0
- data/GenWrapper/prototype.rb +209 -0
- data/GenWrapper/util.rb +9 -0
- data/GenWrapper/variable.rb +671 -0
- data/README +29 -0
- data/Rakefile +44 -0
- data/ToDo +2 -0
- data/dcl_cary2obj.c +354 -0
- data/dcl_narrayed_funcs.c +518 -0
- data/dcl_obj2cary.c +512 -0
- data/dcl_rubydcloriginal.c +129 -0
- data/demo/gokuraku/hop/hop.rb +26 -0
- data/demo/gokuraku/jump/jump1.rb +64 -0
- data/demo/gokuraku/jump/jump2.rb +50 -0
- data/demo/gokuraku/layout/lay1.rb +46 -0
- data/demo/gokuraku/layout/lay2.rb +44 -0
- data/demo/gokuraku/step/step0.rb +34 -0
- data/demo/gokuraku/step/step1.rb +84 -0
- data/demo/gokuraku/step/step2.rb +62 -0
- data/demo/gokuraku/u1d/u1d1.rb +37 -0
- data/demo/gokuraku/u1d/u1d2.rb +50 -0
- data/demo/gokuraku/u2d/u2d1.rb +46 -0
- data/demo/gokuraku/u2d/u2d2.rb +49 -0
- data/demo/gokuraku/u2d/u2d3.rb +45 -0
- data/demo/gokuraku/u2d/u2d4.rb +61 -0
- data/demo/grph1/scpack/scpkt2.rb +40 -0
- data/demo/grph1/scpack/scpkt3.rb +102 -0
- data/demo/grph1/scpack/scpkt6.rb +84 -0
- data/demo/grph1/scpack/scpkt7.rb +59 -0
- data/demo/grph1/scpack/scpkt8.rb +60 -0
- data/demo/grph1/scpack/t810630.dat +296 -0
- data/demo/grph1/scpack/t811231.dat +296 -0
- data/demo/grph1/sgpack/sgfont.rb +52 -0
- data/demo/grph1/sgpack/sgfonz.rb +53 -0
- data/demo/grph1/sgpack/sgksx1.rb +44 -0
- data/demo/grph1/sgpack/sgksx2.rb +90 -0
- data/demo/grph1/sgpack/sgksx3.rb +75 -0
- data/demo/grph1/sgpack/sglidx.rb +40 -0
- data/demo/grph1/sgpack/sgltyp.rb +48 -0
- data/demo/grph1/sgpack/sgpk01.rb +39 -0
- data/demo/grph1/sgpack/sgpk02.rb +79 -0
- data/demo/grph1/sgpack/sgpk03.rb +107 -0
- data/demo/grph1/sgpack/sgpk04.rb +86 -0
- data/demo/grph1/sgpack/sgpk05.rb +66 -0
- data/demo/grph1/sgpack/sgpk06.rb +91 -0
- data/demo/grph1/sgpack/sgpk07.rb +66 -0
- data/demo/grph1/sgpack/sgpk08.rb +67 -0
- data/demo/grph1/sgpack/sgpk09.rb +61 -0
- data/demo/grph1/sgpack/sgpk10.rb +58 -0
- data/demo/grph1/sgpack/sgtclr.rb +59 -0
- data/demo/grph1/sgpack/sgtone.rb +70 -0
- data/demo/grph1/sgpack/sgtonz.rb +66 -0
- data/demo/grph1/slpack/slpk01.rb +37 -0
- data/demo/grph1/slpack/slpk02.rb +29 -0
- data/demo/grph1/slpack/slpk03.rb +36 -0
- data/demo/grph1/slpack/slpk04.rb +36 -0
- data/demo/grph2/g2pack/g2pk01.rb +78 -0
- data/demo/grph2/g2pack/g2pk02.rb +75 -0
- data/demo/grph2/grpack/grpk01.rb +65 -0
- data/demo/grph2/ucpack/ucpk01.rb +95 -0
- data/demo/grph2/ucpack/ucpk02.rb +95 -0
- data/demo/grph2/udegpk/u2df01.rb +50 -0
- data/demo/grph2/udegpk/u2df02.rb +76 -0
- data/demo/grph2/udegpk/u2df03.rb +80 -0
- data/demo/grph2/udegpk/u2df04.rb +52 -0
- data/demo/grph2/udegpk/u2df05.rb +70 -0
- data/demo/grph2/udegpk/u2df06.rb +59 -0
- data/demo/grph2/udegpk/u2df07.rb +68 -0
- data/demo/grph2/udegpk/u2df08.rb +91 -0
- data/demo/grph2/udegpk/u2df09b.rb +88 -0
- data/demo/grph2/udegpk/u2df09c.rb +89 -0
- data/demo/grph2/udegpk/u2df09e.rb +88 -0
- data/demo/grph2/udegpk/u2df09f.rb +89 -0
- data/demo/grph2/ulpack/ulpk01.rb +111 -0
- data/demo/grph2/ulpack/ulpk01n.rb +111 -0
- data/demo/grph2/ulpack/ulpk02.rb +111 -0
- data/demo/grph2/ulpack/ulpk02n.rb +111 -0
- data/demo/grph2/umpack/t811231.dat +296 -0
- data/demo/grph2/umpack/test01.rb +69 -0
- data/demo/grph2/umpack/test02.rb +64 -0
- data/demo/grph2/umpack/test03.rb +84 -0
- data/demo/grph2/umpack/test04.rb +54 -0
- data/demo/grph2/umpack/test05.rb +85 -0
- data/demo/grph2/umpack/test06.rb +44 -0
- data/demo/grph2/umpack/test07.rb +43 -0
- data/demo/grph2/umpack/test08.rb +37 -0
- data/demo/grph2/umpack/test09.rb +86 -0
- data/demo/grph2/umpack/test10.rb +52 -0
- data/demo/grph2/umpack/umpk01.rb +65 -0
- data/demo/grph2/umpack/umpk02.rb +54 -0
- data/demo/grph2/umpack/umpk03.rb +46 -0
- data/demo/grph2/umpack/umpk04.rb +65 -0
- data/demo/grph2/umpack/umpk05.rb +84 -0
- data/demo/grph2/uspack/uspk01.rb +39 -0
- data/demo/grph2/uspack/uspk02.rb +47 -0
- data/demo/grph2/uspack/uspk03.rb +38 -0
- data/demo/grph2/uspack/uspk04.rb +64 -0
- data/demo/grph2/uspack/uspk05.rb +68 -0
- data/demo/grph2/uspack/uspk06.rb +43 -0
- data/demo/grph2/uspack/uspk07.rb +62 -0
- data/demo/grph2/uspack/uspk08.rb +46 -0
- data/demo/grph2/uspack/uspk09.rb +89 -0
- data/demo/grph2/uspack/uspk10.rb +48 -0
- data/demo/grph2/uspack/uspk11.rb +71 -0
- data/demo/grph2/uspack/uspk12.rb +51 -0
- data/demo/grph2/uupack/uupk01.rb +50 -0
- data/demo/grph2/uupack/uupk02.rb +74 -0
- data/demo/grph2/uupack/uupk03.rb +56 -0
- data/demo/grph2/uupack/uupk04.rb +84 -0
- data/demo/grph2/uupack/uupk05.rb +74 -0
- data/demo/grph2/uupack/uupk06.rb +77 -0
- data/demo/grph2/uupack/uupk07.rb +88 -0
- data/demo/grph2/uxyzpk/uxyz01.rb +38 -0
- data/demo/grph2/uxyzpk/uxyz02.rb +36 -0
- data/demo/grph2/uxyzpk/uxyz03.rb +37 -0
- data/demo/grph2/uxyzpk/uxyz04.rb +54 -0
- data/demo/grph2/uxyzpk/uxyz05.rb +41 -0
- data/demo/grph2/uxyzpk/uxyz06.rb +42 -0
- data/demo/grph2/uxyzpk/uxyz07.rb +38 -0
- data/demo/grph2/uxyzpk/uxyz08.rb +60 -0
- data/demo/grph2/uxyzpk/uxyz09.rb +52 -0
- data/demo/grph2/uxyzpk/uxyz10.rb +57 -0
- data/demo/grph2/ximage/MEMO +23 -0
- data/demo/grph2/ximage/tomsclm.dat +1344 -0
- data/demo/grph2/ximage/ximg01.rb +145 -0
- data/demo/math1/gt2dlib/gt2d01.rb +33 -0
- data/demo/math2/fftlib/fftl01.rb +28 -0
- data/demo/math2/fftlib/fftl02.rb +224 -0
- data/demo/math2/intrlib/intr01.rb +22 -0
- data/demo/math2/rnmlib/rnml01.rb +21 -0
- data/demo/math2/vstlib/vstl01.rb +29 -0
- data/demo/math2/vstlib/vstl02.rb +38 -0
- data/demo/rakuraku/color/color1.rb +61 -0
- data/demo/rakuraku/color/color2.rb +57 -0
- data/demo/rakuraku/color/color3.rb +81 -0
- data/demo/rakuraku/kihon/kihon1.rb +39 -0
- data/demo/rakuraku/kihon/kihon2.rb +56 -0
- data/demo/rakuraku/kihon/kihon3.rb +57 -0
- data/demo/rakuraku/kihon/kihon4.rb +70 -0
- data/demo/rakuraku/kihon/kihon5.rb +56 -0
- data/demo/rakuraku/kihon/kihon6.rb +40 -0
- data/demo/rakuraku/kihon/kihon7.rb +98 -0
- data/demo/rakuraku/kihon/kihon8.rb +93 -0
- data/demo/rakuraku/kihon/kihon9.rb +77 -0
- data/demo/rakuraku/kihon/kihona.rb +123 -0
- data/demo/rakuraku/kihon/kihonb.rb +73 -0
- data/demo/rakuraku/kihon/kihonc.rb +110 -0
- data/demo/rakuraku/layout/lay1.rb +29 -0
- data/demo/rakuraku/layout/lay2.rb +28 -0
- data/demo/rakuraku/layout/lay3.rb +29 -0
- data/demo/rakuraku/map3d/map3d1.rb +68 -0
- data/demo/rakuraku/map3d/map3d2.rb +67 -0
- data/demo/rakuraku/map3d/map3d3.rb +66 -0
- data/demo/rakuraku/map3d/map3d4.rb +107 -0
- data/demo/rakuraku/map3d/map3d5.rb +118 -0
- data/demo/rakuraku/map3d/map3d6.rb +96 -0
- data/demo/rakuraku/map3d/map3d7.rb +98 -0
- data/demo/rakuraku/miss/miss1.rb +76 -0
- data/demo/rakuraku/miss/miss2.rb +60 -0
- data/demo/rakuraku/quick/quick1.rb +35 -0
- data/demo/rakuraku/quick/quick2.rb +33 -0
- data/demo/rakuraku/quick/quick3.rb +46 -0
- data/demo/rakuraku/quick/quick4.rb +47 -0
- data/demo/rakuraku/quick/quick5.rb +46 -0
- data/demo/rakuraku/u2d/u2d1.rb +50 -0
- data/demo/rakuraku/u2d/u2d2.rb +51 -0
- data/demo/rakuraku/u2d/u2d3.rb +70 -0
- data/demo/rakuraku/u2d/u2d4.rb +59 -0
- data/demo/rakuraku/u2d/u2d5.rb +61 -0
- data/demo/rakuraku/u2d/u2d6.rb +57 -0
- data/demo/rakuraku/u2d/u2d7.rb +103 -0
- data/demo/rakuraku/uspack/uspac1.rb +35 -0
- data/demo/rakuraku/uspack/uspac2.rb +66 -0
- data/demo/rakuraku/uspack/uspac3.rb +37 -0
- data/demo/rakuraku/uspack/uspac4.rb +49 -0
- data/demo/rakuraku/uxyz/uxyz1.rb +37 -0
- data/demo/rakuraku/uxyz/uxyz2.rb +35 -0
- data/demo/rakuraku/uxyz/uxyz3.rb +38 -0
- data/demo/rakuraku/uxyz/uxyz4.rb +36 -0
- data/demo/rakuraku/uxyz/uxyz5.rb +57 -0
- data/demo/rakuraku/uxyz/uxyz6.rb +43 -0
- data/demo/rakuraku/uxyz/uxyz7.rb +39 -0
- data/demo/rakuraku/uxyz/uxyz8.rb +56 -0
- data/demo/rubydcloriginal/uemrkz1.rb +37 -0
- data/dummy.c +9 -0
- data/extconf.rb +133 -0
- data/grph1_csgi.c +119 -0
- data/grph1_scpack.c +1388 -0
- data/grph1_sgpack.c +3876 -0
- data/grph1_slpack.c +432 -0
- data/grph1_stpack.c +1044 -0
- data/grph1_swpack.c +1922 -0
- data/grph1_zgpack.c.org +141 -0
- data/grph2_grpack.c +368 -0
- data/grph2_ucpack.c +1232 -0
- data/grph2_udpack.c +1404 -0
- data/grph2_uepack.c +1443 -0
- data/grph2_ugpack.c +1073 -0
- data/grph2_uhpack.c +943 -0
- data/grph2_ulpack.c +1304 -0
- data/grph2_umpack.c +1540 -0
- data/grph2_uspack.c +2481 -0
- data/grph2_uupack.c +1689 -0
- data/grph2_uvpack.c +943 -0
- data/grph2_uwpack.c +552 -0
- data/grph2_uxpack.c +555 -0
- data/grph2_uypack.c +555 -0
- data/grph2_uzpack.c +1455 -0
- data/init.c.default +187 -0
- data/init.c.gtk +189 -0
- data/lib/dcl.rb +5084 -0
- data/math1_blklib.c +227 -0
- data/math1_chrlib.c +239 -0
- data/math1_fnclib.c +254 -0
- data/math1_gnmlib.c +356 -0
- data/math1_gt2dlib.c +514 -0
- data/math1_ifalib.c +427 -0
- data/math1_indxlib.c +709 -0
- data/math1_intlib.c +167 -0
- data/math1_lrllib.c +817 -0
- data/math1_maplib.c +172 -0
- data/math1_oslib.c +111 -0
- data/math1_rfalib.c +1417 -0
- data/math1_rfblib.c +232 -0
- data/math1_sublib.c +221 -0
- data/math1_syslib.c +2025 -0
- data/math1_vialib.c +1156 -0
- data/math1_viblib.c +1027 -0
- data/math1_vralib.c +1156 -0
- data/math1_vrblib.c +1027 -0
- data/math1_xfclib.c +142 -0
- data/math2_fftlib.c +833 -0
- data/math2_intrlib.c +138 -0
- data/math2_rnmlib.c +226 -0
- data/math2_shtlib.c +1568 -0
- data/math2_vstlib.c +366 -0
- data/misc1_chnlib.c +179 -0
- data/misc1_datelib.c +953 -0
- data/misc1_fmtlib.c +99 -0
- data/misc1_misclib.c +118 -0
- data/misc1_randlib.c +142 -0
- data/misc1_timelib.c +380 -0
- data/obsolete/README +2 -0
- data/obsolete/dcl_ext.html +112 -0
- data/obsolete/dcl_ext.rb +313 -0
- metadata +433 -0
data/ChangeLog
ADDED
@@ -0,0 +1,321 @@
|
|
1
|
+
Thu Feb 24 2011 T Horinouchi
|
2
|
+
* ruby-dcl-1.6.2 released (cvs tag ruby-dcl-1_6_2)
|
3
|
+
because of a packaging miss of 1.6.1
|
4
|
+
Thu Feb 24 2011 T Horinouchi
|
5
|
+
* README: Updated (to leave the installation part to web page)
|
6
|
+
Thu Feb 24 2011 T Koshiro
|
7
|
+
* add a dot file .keepme to an empty directory lib/ (for "cvs export")
|
8
|
+
Thu Feb 24 2011 T Horinouchi
|
9
|
+
* ruby-dcl-1.6.1 released (cvs tag ruby-dcl-1_6_1)
|
10
|
+
Thu Feb 24 2011 T Koshiro
|
11
|
+
* demo/grph1/scpack/scpkt7.rb, demo/grph1/sgpack/sgpk02.rb: debug.
|
12
|
+
* GenWrapper/dcl_narrayed_funcs.rb, GenWrapper/etc/p_header:
|
13
|
+
correct prototype declarations of math1 functions:
|
14
|
+
doublereal -> real
|
15
|
+
* GenWrapper/elim_ary_size.rb, GenWrapper/etc/Mk_proto,
|
16
|
+
GenWrapper/etc/dcl_gen, GenWrapper/proto/Makefile:
|
17
|
+
change a directory name: src/ -> ../
|
18
|
+
(because CVS does not support symbolic links.)
|
19
|
+
Wed Feb 23 2011 T Koshiro
|
20
|
+
* GenWrapper/proto/grph2_uepack.fp: added a prototype definition of
|
21
|
+
uetonb; the change is made limited to #if DCLVER >= 534.
|
22
|
+
* demo/grph2/umpack/test10.rb, demo/grph2/udegpk/u2df09[bcef].rb:
|
23
|
+
created (for DCL 5.3.4).
|
24
|
+
* dcl_obj2cary.c: To use StringValue, RSTRING_PTR, and RSTRING_LEN
|
25
|
+
macros instead of rb_str2cstr for Ruby 1.8 or later.
|
26
|
+
Fri Feb 18 2011 T Horinouchi
|
27
|
+
* ruby-dcl-1.6.1 preview
|
28
|
+
Fri Feb 18 2011 T Horinouchi < T Koshiro [dennou-ruby: 003224] (2010-12-11)
|
29
|
+
* ruby-dcl-1.6.0-ruby1_9_2.patch
|
30
|
+
* Support ruby 1.9.2
|
31
|
+
* ruby-dcl-1.6.0-dcl_rb_GenWrapper.patch
|
32
|
+
* Moved a change in ruby-dcl-1.6.0, which was mistakenly
|
33
|
+
coded directly in lib/dcl.rb, into GenWrapper:
|
34
|
+
Added a new file dcl_rb_footing. dcl_rb_heading was modified too.
|
35
|
+
Thu Jul 17 2008 T Horinouchi
|
36
|
+
* ruby-dcl-1.6.0 released
|
37
|
+
Wed Jul 16 2008 T Horinouchi
|
38
|
+
* init.c.gtk,init.c.default : To use RARRAY_LEN and
|
39
|
+
RARRAY_PTR macros
|
40
|
+
Wed Jul 16 2008 T Horinouchi < M Otsuka [dennou-ruby: 002920]
|
41
|
+
* extconf.rb,dcl_obj2cary.c : applied a patch
|
42
|
+
Tue Jul 15 2008 T Horinouchi
|
43
|
+
* dcl_obj2cary.c : introduced RARRAY_PTR and RARRAY_LEN
|
44
|
+
* dcl_rubydcloriginal.c : created -- defined uemrkz
|
45
|
+
* lib/dcl.rb : uemrkz support
|
46
|
+
* demo/rubydcloriginal/uemrkz1.rb : created
|
47
|
+
* GenWrapper/dcl_narrayed_funcs.rb : created -- generator
|
48
|
+
of NArray versions of scalar functions such as stftrf.
|
49
|
+
( real,real -> real,real kind of subroutines in
|
50
|
+
stpack, maplib, ctlib functions )
|
51
|
+
NOTE: the remaining subprograms in stpack and maplib are
|
52
|
+
fully covered by *.fp, but prototypes of ctlib is
|
53
|
+
not made --- it's easy, you can directly use narray.
|
54
|
+
* dcl_narrayed_funcs.c : Automatically generated by
|
55
|
+
GenWrapper/dcl_narrayed_funcs.rb -- DO NOT EDIT IT.
|
56
|
+
* GenWrapper/proto/grph1_stpack.fp : commented out prototype
|
57
|
+
definitions of stftrf stitrf stfpr2 stipr2, which
|
58
|
+
are covered by dcl_narrayed_funcs.rb
|
59
|
+
* GenWrapper/proto/math1_maplib.fp : created to cover functions
|
60
|
+
in MAPLIB, which are not treated by dcl_narrayed_funcs.rb
|
61
|
+
* init.c.default, init.c.gtk : to call the initializer in
|
62
|
+
dcl_rubydcloriginal.c and dcl_narrayed_funcs.c
|
63
|
+
Mon Jul 14 2008 T Horinouchi < T Koshiro [dennou-ruby:002958]
|
64
|
+
* Debug in swp*
|
65
|
+
Tue Dec 5 2006 T Horinouchi
|
66
|
+
* ruby-dcl-1.5.3 re-released (sorry!)
|
67
|
+
* init.c.gtk,init.c.default: debug (insufficient alloc length)
|
68
|
+
Fri Dec 1 2006 T Horinouchi
|
69
|
+
* ruby-dcl-1.5.3 released
|
70
|
+
* extconf.rb, init.c.*: debug for cdcl 5.3.2
|
71
|
+
Thu Nov 30 2006 T Horinouchi
|
72
|
+
* Re-generated C source files and dcl.rb
|
73
|
+
% cd GenWrapper && make
|
74
|
+
* Changed to deal with DCL minor versions such as 5.3.2 etc
|
75
|
+
in adition to 5.3 etc. Changed files are:
|
76
|
+
extconf.rb, init.c.gtk, init.c.default,
|
77
|
+
GenWrapper/proto/grph1_sgpack.fp, GenWrapper/proto/grph1_stpack.fp
|
78
|
+
GenWrapper/proto/grph1_swpack.fp, GenWrapper/proto/grph2_grpack.fp,
|
79
|
+
GenWrapper/proto/grph2_umpack.fp, GenWrapper/proto/math1_gt2dlib.fp
|
80
|
+
* Patch ruby-dcl-1.5.2_arg.patch from [dennou-ruby:002548]
|
81
|
+
(by S Nishizawa) was adapted in a very different way
|
82
|
+
* init.c.gtk, init.c.default: added dcl_init_arg instead of
|
83
|
+
to math1_oslib.c. Also, changes are made limited to
|
84
|
+
#if DCLVER >= 532.
|
85
|
+
* GenWrapper/dcl_rb_heading: added
|
86
|
+
init_arg($0,ARGV) if DCLVERSION >= "5.3.2"
|
87
|
+
Thu Nov 30 2006 T Horinouchi < T Koshiro
|
88
|
+
* GenWrapper/dcl_rb_heading: /cygwin|mingw/ --> /cygwin|mingw|darwin/
|
89
|
+
Wed Nov 17 2005 T Horinouchi
|
90
|
+
* ruby-dcl-1.5.2 released
|
91
|
+
Mon Nov 14 2005 T Horinouchi < S Nishizawa
|
92
|
+
(patch, Message-Id: <20051111204153.c17a86f0.seiya@kugi.kyoto-u.ac.jp>)
|
93
|
+
* grph1_zgpack.c: added methods zgqdrw and zgqpmp to enable us to
|
94
|
+
extract Gtk objects made by DCL).
|
95
|
+
Tue Aug 2 17:24:48 JST 2005
|
96
|
+
* demo/rakuraku/kihon/kihonc.rb: debug
|
97
|
+
Fri May 13 2005 T Horinouchi
|
98
|
+
* ruby-dcl-1.5.1 released
|
99
|
+
Mon Apr 11 2005 Takeshi Horinouchi
|
100
|
+
* init.c.*: changed global variable mNumRu to file locale.
|
101
|
+
Thu Mar 31 2005 T Horinouchi
|
102
|
+
* GenWrapper/etc/p_header: added extern
|
103
|
+
Tue Dec 28 2004 T Horinouchi
|
104
|
+
* GenWrapper/dcl_rb_heading: added glib2 requirement for windows
|
105
|
+
(cygwin)
|
106
|
+
|
107
|
+
Thu Nov 11 2004 T Horinouchi
|
108
|
+
* ruby-dcl-1.5.0 released
|
109
|
+
* extconf.rb: added messaging on DCL version
|
110
|
+
* demo/grph2/umpack/test09.rb,demo/grph2/ulpack/ulpk0[12]n.f,
|
111
|
+
demo/math1/gt2dlib/gt2d01.rb: created (for DCL 5.3).
|
112
|
+
* demo/grph2/g2pack/g2pk0[12].rb: very minor update2]
|
113
|
+
Tue Nov 9 2004 T Horinouchi
|
114
|
+
* Revisions are made to support both dcl-5.2 and dcl-5.3:
|
115
|
+
* demo/grph2/g2pack/g2pk0[12].rb: created (equivalent to
|
116
|
+
g2pk0[12].f of the Fortran version)
|
117
|
+
* GenWrapper/proto/:
|
118
|
+
Makefile: minor improvement; math1_gt2dlib.fp: created
|
119
|
+
grph1_stpack.fp, grph1_swpack.fp, grph2_grpack.fp,
|
120
|
+
grph2_umpack.fp: updated for dcl-5.3
|
121
|
+
* GenWrapper/pparse.rb: to retain macros starting with /^#/.
|
122
|
+
* GenWrapper/cproto2init.rb: deal with /^#if *DCLVER/ .. /^#endif/
|
123
|
+
* GenWrapper/{variable.rb,prototype.rb,cproto2init.rb}:
|
124
|
+
updated for ruby 1.8 (and 1.6 as before).
|
125
|
+
* extconf.rb: to add -DDCLVER=52 (or 53 ..) in $CFLAGS
|
126
|
+
* init.c.{default|gtk}: added new constant NumRu::DCL::DCLVERSION
|
127
|
+
which is either "5.2" or "5.3", currently.
|
128
|
+
Thu Aug 04 2004 T Horinouchi < D Tsukahara
|
129
|
+
* lib/dcl.rb: debug for SHTLIB (Spherical Harmonics Transforpmation)
|
130
|
+
* GenWrapper/proto/math2_shtlib.fp: debug for SHTLIB
|
131
|
+
Thu Jul 15 2004 T Horinouchi < T Koshiro
|
132
|
+
* ruby-dcl-1.4.1 released
|
133
|
+
* lib/dcl.rb: dependent library updated only for cygwin & mingw.
|
134
|
+
Tue Jul 13 2004 T Horinouchi < T Koshiro
|
135
|
+
* extconf.rb: further minor update for cygwin & mingw.
|
136
|
+
Tue Jun 29 2004 T Horinouchi < T Koshiro
|
137
|
+
* extconf.rb: debug for cygwin & mingw.
|
138
|
+
Fri Mar 5 2004 T Horinouchi < S Nishizawa
|
139
|
+
* ruby-dcl-1.4.0 released
|
140
|
+
* extconf.rb,grph1_zgpack.c.org: modified to support gtk2
|
141
|
+
(dcl-5.2-C.3-gtk2-5.tar.gz).
|
142
|
+
gtk1 support stil remains, because dcl-5.2-C.3 supports gtk1.
|
143
|
+
Mon Jan 19 2004 T Horinouchi
|
144
|
+
* ruby-dcl-1.3.2 released
|
145
|
+
* Debug in GenWrapper/proto/math2_shtlib.fp
|
146
|
+
--> cd GenWrapper & make; Also did make dcl_rb and editting
|
147
|
+
of lib/dcl.rb by hand. Especially needed was to avoid
|
148
|
+
size checking of the "work" or "q" array initialized
|
149
|
+
by shtint because not all info on its size is provided
|
150
|
+
as array arguments (im, jm, or mm).
|
151
|
+
Wed Dec 10 2003 T Horinouchi < T Koshiro
|
152
|
+
* ruby-dcl-1.3.1 released
|
153
|
+
* dcl_obj2cary.c: minor debug for Cygwin (EXTERN -> extern)
|
154
|
+
Wed Oct 1 2003 T Horinouchi < S Nishizawa
|
155
|
+
* demo/rakuraku/map3d/map3d1.rb: debug
|
156
|
+
Tue Sep 23 2003 Takeshi Horinouchi < T Koshiro
|
157
|
+
* ruby-dcl-1.3.0 released
|
158
|
+
* dcl_obj2cary.c: support NArrayMiss
|
159
|
+
* lib/dcl.rb: modified not to exclude NArrayMiss
|
160
|
+
* GenWrapper/variable.c: modified not to exclude NArrayMiss
|
161
|
+
* GenWrapper/old/: eliminated
|
162
|
+
* extconf.rb: debug for windows (by T Koshiro)
|
163
|
+
Wed Aug 27 2003 Takeshi Horinouchi
|
164
|
+
* ruby-dcl-1.2.2 released
|
165
|
+
* Verified that demo programs work fine with Ruby 1.8.0. (not all
|
166
|
+
but so far all work fine)
|
167
|
+
* lib/dcl.rb: applied the gotoken patch (to eliminate unneccesary
|
168
|
+
spaces)
|
169
|
+
* init.c.default,init.c.gtk: Init_dcl: No longer asks whether NumRu
|
170
|
+
has been defined -- ok for Ruby 1.6.5 or so or later
|
171
|
+
* extconf.rb: do not edit "install:" anymore (for Ruby 1.8; works
|
172
|
+
with 1.6 too.)
|
173
|
+
|
174
|
+
Tue Jun 10 2003 T Horinouchi
|
175
|
+
* ruby-dcl-1.2.1 released
|
176
|
+
|
177
|
+
Tue Jun 10 2003 T Horinouchi thanks to S Nishizawa
|
178
|
+
* gtk handling by S Nishizawa was merged in.
|
179
|
+
added: ./grph1_zgpack.c.org ./init.c.gtk
|
180
|
+
modified: extconf.rb
|
181
|
+
(these are based on ruby-dcl-1.2.0-gtk-5.patch with some
|
182
|
+
modification --- file handling in extconf.rb and extern->EXTERN
|
183
|
+
in init.c.gtk)
|
184
|
+
|
185
|
+
Tue Jun 10 2003 T Horinouchi
|
186
|
+
* extconf.rb: added have_library("narray") (for windows)
|
187
|
+
* init.c: extern -> EXTERN (for windows)
|
188
|
+
* lib/dcl.rb: added (gl|sg|us|..)p(set|stx|get)
|
189
|
+
|
190
|
+
Sun Jun 8 2003 T Horinouchi
|
191
|
+
* directory structure reorganization -- to re-include the wrapper
|
192
|
+
generator etc in the tar ball. This time, the source generator
|
193
|
+
is put in the subdirectory GenWrapper, and ordinary users do not
|
194
|
+
have to generate the C sources.
|
195
|
+
* demo/ minor debug to add "DCL::" to where forgotten
|
196
|
+
* GenWrapper/proto/grph2_udpack.fp activated udlabl
|
197
|
+
|
198
|
+
Tue May 13 2003 T Horinouchi
|
199
|
+
* ruby-dcl-1.2.0 released
|
200
|
+
* directory structure reorganization: separeted the C source
|
201
|
+
generation from the distributed package.
|
202
|
+
- renamed src/ as ruby-dcl-1.1.3/
|
203
|
+
- move some files into (the old) src:
|
204
|
+
ChangeLog (this file)
|
205
|
+
- Wrote the new README file.`
|
206
|
+
|
207
|
+
Tue May 21 2002 T Horinouchi
|
208
|
+
* ruby-dcl-1.1.2 released
|
209
|
+
* elim_ary_size.rb: make old methods (such as __udcntr) private
|
210
|
+
* demo: minor refinement of some demo programs
|
211
|
+
|
212
|
+
Mon May 20 2002 S Nishizawa
|
213
|
+
* demo/*/*/*.rb: include only NumRu instead of NumRu::DCL
|
214
|
+
|
215
|
+
Mon May 20 2002 T Horinouchi
|
216
|
+
* demo/rakuraku/map3d/map3d7.rb: made from map3d6.rb (below)
|
217
|
+
-- wire frame with painting. great!
|
218
|
+
* demo/rakuraku/map3d/map3d6.rb: written based on map3d6.f
|
219
|
+
in dcl-5.2 (FORTRAN). Wire frame!
|
220
|
+
|
221
|
+
Mon May 20 2002 T Horinouchi
|
222
|
+
* ruby-dcl-1.1.1 released
|
223
|
+
* elim_ary_size.rb: debug: added calls of "module_fucntion" to the
|
224
|
+
top of the source file to generate (src/lib/dcl.rb).
|
225
|
+
* demo/gokuraku/*/*.rb: modified to use array expressions
|
226
|
+
(note: u2d/u2d[14].rb were rewritten only half way because of
|
227
|
+
a bug in NArray to support a[0..2,0..3]=b[0..2,1] type
|
228
|
+
substitution)
|
229
|
+
|
230
|
+
Sun May 19 2002 T Horinouchi
|
231
|
+
* demo/*/*/*.rb: downcased most constants (downcase_demos.rb)
|
232
|
+
|
233
|
+
Sat May 18 2002 T Horinouchi
|
234
|
+
* ruby-dcl-1.1.0 released
|
235
|
+
* src/dcl_cary2obj.c, variable.rb, etc/p_header:
|
236
|
+
modified to return NArray instead of Array
|
237
|
+
(it has long been supposed to do so, but it never worked)
|
238
|
+
|
239
|
+
Fri May 17 2002 T Horinouchi
|
240
|
+
* proto/misc1_(date|time)lib added protoypes of C functions,
|
241
|
+
but they are commented out so far. (anyway, these two libraries
|
242
|
+
are not very needed since RUby has date and time libs)
|
243
|
+
|
244
|
+
Mon May 13-15 2002 T Horinouchi
|
245
|
+
* MAJOR CHANGE: Arguments to represent array sizes are now
|
246
|
+
eliminated from all the methods. This is done as follows:
|
247
|
+
the original ruby-dcl library is renamed from dcl to dcl_raw,
|
248
|
+
and a new ruby source code, dcl.rb, is generated from the
|
249
|
+
prototype definitions in proto/*.fp by using the filter
|
250
|
+
elim_ary_size.rb (new).
|
251
|
+
* src/extconf.rb: rename dcl -> dcl_raw (dcl.so -> dcl_raw.so)
|
252
|
+
minor change to better handle the numru
|
253
|
+
directory
|
254
|
+
* src/init.c: rename Init_dcl -> Init_dcl_raw
|
255
|
+
* elim_ary_size.rb: created (filter to eliminate array size arguments)
|
256
|
+
* Makefile
|
257
|
+
|
258
|
+
Thu Dec 28 2001 T Horinouchi
|
259
|
+
* ruby-dcl-1.0.0 released
|
260
|
+
* proto_old/,demo_new_notworking/: moved to old/
|
261
|
+
* test/u2df01.rb: eliminated, since it is obsolete
|
262
|
+
* README: install instruction updated
|
263
|
+
* src/extconf.rb: set $sitearchdir as a default include path for
|
264
|
+
NArray headers. Also, made possible to alter it with
|
265
|
+
--with-narray-include=
|
266
|
+
Thu Dec 20 2001 T Horinouchi
|
267
|
+
* proto/*.fp: Commented out *P(SET|GET|PSTX) because the parameter
|
268
|
+
type they accept is not unique. Use instead *[RLC](SET|GET|STX)
|
269
|
+
(automatically done with ~horinout/davis/scripts/dclproto_comout.rb)
|
270
|
+
|
271
|
+
Thu Dec 13 2001 T Horinouchi
|
272
|
+
* src/init.c: the Dec 06 modification was made more robust
|
273
|
+
|
274
|
+
Thu Dec 06 2001 T Horinouchi
|
275
|
+
* ruby-dcl-1.beta.7 released
|
276
|
+
* src/init.c: rename mNum as mNumRu; initialize it only at first time
|
277
|
+
|
278
|
+
Thu Nov 06 2001 Naoki Kawanabe
|
279
|
+
|
280
|
+
* ruby-dcl-1.beta.6 released
|
281
|
+
* modified bug in make
|
282
|
+
|
283
|
+
Thu Nov 03 2001 Naoki Kawanabe & GOTO kentaro(gotoken@notwork.org)
|
284
|
+
* ruby-dcl-1.beta.5 released
|
285
|
+
* pparse.rb: does not depend on cpp(1).
|
286
|
+
* install directry changed (require 'dcl'-> require 'numru/dcl')
|
287
|
+
* added module 'NumRu'
|
288
|
+
* changed module name (DCL -> NumRu::DCL)
|
289
|
+
Thu Oct 23 2001 Takeshi Horinouchi
|
290
|
+
|
291
|
+
* ruby-dcl-1.beta.4 released
|
292
|
+
* src/extconf.rb: now install: is made equiv to site-install: in
|
293
|
+
src/Makefile (as well as in ./Makefile). Plus, the program was a
|
294
|
+
bit tidied up (no essential change).
|
295
|
+
* Makefile,proto/Makefile: add target distclean
|
296
|
+
* rename: demo_new --> demo_new_notworking
|
297
|
+
proto --> proto_old
|
298
|
+
proto_new --> proto
|
299
|
+
edited Makefile etc accordingly (esp. for proto_new proto)
|
300
|
+
* rbdcl is renamed to RubyDCL
|
301
|
+
|
302
|
+
Thu Sep 28 2001 Naoki Kawanbe
|
303
|
+
|
304
|
+
* rbdcl-1.beta.3 released
|
305
|
+
* dcl_obj2cary.c,dcl_cary2obj.c: include libtinyf2c.h insead of f2c.h
|
306
|
+
|
307
|
+
Thu Sep 13 2001 Takeshi Horinouchi
|
308
|
+
|
309
|
+
* rbdcl-1.beta.2 released
|
310
|
+
|
311
|
+
Thu Sep 12 2001 Takeshi Horinouchi
|
312
|
+
|
313
|
+
* updated: README
|
314
|
+
|
315
|
+
* debug: src/dcl_obj2cary.c
|
316
|
+
(integer coarcing / messages)
|
317
|
+
|
318
|
+
Thu Sep 12 2001 Takeshi Horinouchi
|
319
|
+
|
320
|
+
* rbdcl-1.beta.1 released
|
321
|
+
|
data/GenWrapper/Makefile
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Program: cproto2init.rb
|
2
|
+
# 2000/11/20 Takeshi Horinouchi
|
3
|
+
# Usage:
|
4
|
+
#
|
5
|
+
# % ruby cproto2init.rb cprotofile
|
6
|
+
#
|
7
|
+
# Here, cprotofile is the name of the C program obtained by,
|
8
|
+
# for example,
|
9
|
+
#
|
10
|
+
# ruby proto2c.rb grph2_grpack.fp > grph2_grpack.c
|
11
|
+
#
|
12
|
+
# The package name is determined from the file name such as
|
13
|
+
# 'grph2_grpack'.
|
14
|
+
|
15
|
+
package = $*[0].gsub(/.*\//,'').sub(/\..*/,'') # remove directory name
|
16
|
+
# and suffix
|
17
|
+
print("void\n","init_",package,"(mDCL)\n","VALUE mDCL;\n","{\n")
|
18
|
+
|
19
|
+
macro_dclver = false
|
20
|
+
|
21
|
+
while (line=gets)
|
22
|
+
case line
|
23
|
+
when /^static VALUE/
|
24
|
+
funcdef = gets.chop
|
25
|
+
func = funcdef.sub(/\(.*$/,'')
|
26
|
+
nargs = funcdef.delete('^,').length
|
27
|
+
method = func.sub(/dcl_/,'')
|
28
|
+
print(' rb_define_module_function(mDCL, "',method,
|
29
|
+
'", ',func,", ",nargs,");\n")
|
30
|
+
when /^#if *DCLVER/
|
31
|
+
macro_dclver = true
|
32
|
+
print line
|
33
|
+
when /^#endif/
|
34
|
+
if macro_dclver
|
35
|
+
print line
|
36
|
+
macro_dclver = false
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
print "}\n"
|
@@ -0,0 +1,181 @@
|
|
1
|
+
# -*- C -*-
|
2
|
+
# USAGE: ruby dcl_narray_funcs.rb
|
3
|
+
# --> creates ../dcl_narray_funcs.c
|
4
|
+
|
5
|
+
require "erb"
|
6
|
+
|
7
|
+
erbsrc = <<EOS
|
8
|
+
<% rr2rr_funcs = %w[ stftrf stitrf stfpr2 stipr2 mpfcyl mpicyl mpfmer mpimer mpfmwd mpimwd mpfmwl mpimwl mpfhmr mpihmr mpfek6 mpiek6 mpfktd mpiktd mpfcon mpicon mpfcoa mpicoa mpfcoc mpicoc mpfbon mpibon mpfotg mpiotg mpfpst mpipst mpfazm mpiazm mpfaza mpiaza ct2pc ct2cp ct2ec ct2bc ct2hc ct2ch ]
|
9
|
+
%>
|
10
|
+
/*
|
11
|
+
* Original methods of Ruby-DCL
|
12
|
+
*
|
13
|
+
* Alert: DO NOT EDIT THIS FILE!!!
|
14
|
+
* This file was automatically generated by GenWrapper/dcl_narray_funcs.rb
|
15
|
+
*/
|
16
|
+
|
17
|
+
#include <stdio.h>
|
18
|
+
#include "ruby.h"
|
19
|
+
#include "libtinyf2c.h"
|
20
|
+
#include "narray.h"
|
21
|
+
|
22
|
+
/* for compatibility with ruby 1.6 */
|
23
|
+
#ifndef RARRAY_LEN
|
24
|
+
#define RARRAY_LEN(a) (RARRAY(a)->len)
|
25
|
+
#endif
|
26
|
+
|
27
|
+
#define DFLT_SIZE 32
|
28
|
+
|
29
|
+
extern char *dcl_obj2ccharary(VALUE, int, int);
|
30
|
+
extern integer *dcl_obj2cintegerary(VALUE);
|
31
|
+
extern real *dcl_obj2crealary(VALUE);
|
32
|
+
extern complex *dcl_obj2ccomplexary(VALUE);
|
33
|
+
extern logical *dcl_obj2clogicalary(VALUE);
|
34
|
+
|
35
|
+
extern VALUE dcl_ccharary2obj(char *, int, int);
|
36
|
+
extern VALUE dcl_cintegerary2obj(integer *, int, int, int *);
|
37
|
+
extern VALUE dcl_crealary2obj(real *, int, int, int *);
|
38
|
+
extern VALUE dcl_ccomplexary2obj(complex *, int, char *);
|
39
|
+
extern VALUE dcl_clogicalary2obj(logical *, int, int, int *);
|
40
|
+
|
41
|
+
extern void dcl_freeccharary(char *);
|
42
|
+
extern void dcl_freecintegerary(integer *);
|
43
|
+
extern void dcl_freecrealary(real *);
|
44
|
+
extern void dcl_freeccomplexary(complex *);
|
45
|
+
extern void dcl_freeclogicalary(logical *);
|
46
|
+
|
47
|
+
/* for functions which return real */
|
48
|
+
/* fnclib */
|
49
|
+
extern real rd2r_(real *);
|
50
|
+
extern real rr2d_(real *);
|
51
|
+
extern real rexp_(real *, integer *, integer *);
|
52
|
+
extern real rfpi_(void);
|
53
|
+
extern real rmod_(real *, real *);
|
54
|
+
/* gnmlib */
|
55
|
+
extern real rgnlt_(real *);
|
56
|
+
extern real rgnle_(real *);
|
57
|
+
extern real rgngt_(real *);
|
58
|
+
extern real rgnge_(real *);
|
59
|
+
/* rfalib */
|
60
|
+
extern real rmax_(real *, integer *, integer *);
|
61
|
+
extern real rmin_(real *, integer *, integer *);
|
62
|
+
extern real rsum_(real *, integer *, integer *);
|
63
|
+
extern real rave_(real *, integer *, integer *);
|
64
|
+
extern real rvar_(real *, integer *, integer *);
|
65
|
+
extern real rstd_(real *, integer *, integer *);
|
66
|
+
extern real rrms_(real *, integer *, integer *);
|
67
|
+
extern real ramp_(real *, integer *, integer *);
|
68
|
+
/* rfblib */
|
69
|
+
extern real rprd_(real *, real *, integer *, integer *, integer *);
|
70
|
+
extern real rcov_(real *, real *, integer *, integer *, integer *);
|
71
|
+
extern real rcor_(real *, real *, integer *, integer *, integer *);
|
72
|
+
|
73
|
+
<% rr2rr_funcs.each do |func| %>
|
74
|
+
extern int <%= func%>_(real*,real*,real*,real*);
|
75
|
+
<% end %>
|
76
|
+
|
77
|
+
extern VALUE mDCL;
|
78
|
+
|
79
|
+
/* driver of real*2->real*2 functions such as STFTRF
|
80
|
+
*/
|
81
|
+
static VALUE
|
82
|
+
dcl_rr2rr_num(obj, ux, uy, func)
|
83
|
+
VALUE obj, ux, uy;
|
84
|
+
int (*func)(real*,real*,real*,real*);
|
85
|
+
{
|
86
|
+
real i_ux;
|
87
|
+
real i_uy;
|
88
|
+
real o_vx;
|
89
|
+
real o_vy;
|
90
|
+
VALUE vx;
|
91
|
+
VALUE vy;
|
92
|
+
|
93
|
+
if (TYPE(ux) != T_FLOAT) {
|
94
|
+
ux = rb_funcall(ux, rb_intern("to_f"), 0);
|
95
|
+
}
|
96
|
+
if (TYPE(uy) != T_FLOAT) {
|
97
|
+
uy = rb_funcall(uy, rb_intern("to_f"), 0);
|
98
|
+
}
|
99
|
+
|
100
|
+
i_ux = (real)NUM2DBL(ux);
|
101
|
+
i_uy = (real)NUM2DBL(uy);
|
102
|
+
|
103
|
+
|
104
|
+
(*func)(&i_ux, &i_uy, &o_vx, &o_vy);
|
105
|
+
|
106
|
+
vx = rb_float_new((double)o_vx);
|
107
|
+
vy = rb_float_new((double)o_vy);
|
108
|
+
|
109
|
+
|
110
|
+
return rb_ary_new3(2, vx, vy);
|
111
|
+
|
112
|
+
}
|
113
|
+
|
114
|
+
/* driver of real*2->real*2 functions such as STFTRF
|
115
|
+
*/
|
116
|
+
static VALUE
|
117
|
+
dcl_rr2rr_na(obj, p, q, func)
|
118
|
+
VALUE obj, p, q;
|
119
|
+
int (*func)(real*,real*,real*,real*);
|
120
|
+
{
|
121
|
+
VALUE r, s; // return value
|
122
|
+
real *i_p, *i_q;
|
123
|
+
real *i_r, *i_s;
|
124
|
+
size_t len,j,lenq;
|
125
|
+
|
126
|
+
i_p = dcl_obj2crealary(p);
|
127
|
+
i_q = dcl_obj2crealary(q);
|
128
|
+
len = (TYPE(p)==T_ARRAY) ? RARRAY_LEN(p) : NA_TOTAL(p) ;
|
129
|
+
lenq = (TYPE(q)==T_ARRAY) ? RARRAY_LEN(q) : NA_TOTAL(q) ;
|
130
|
+
if (len != lenq) {
|
131
|
+
rb_raise(rb_eArgError, "lengths of the 1st & 2nd args do not agree");
|
132
|
+
}
|
133
|
+
|
134
|
+
r = na_make_object(NA_SFLOAT, 1, &len, cNArray);
|
135
|
+
s = na_make_object(NA_SFLOAT, 1, &len, cNArray);
|
136
|
+
i_r = NA_PTR_TYPE(r,real*);
|
137
|
+
i_s = NA_PTR_TYPE(s,real*);
|
138
|
+
|
139
|
+
for(j=0; j<len; j++){
|
140
|
+
(*func)(i_p+j, i_q+j, i_r+j, i_s+j);
|
141
|
+
}
|
142
|
+
|
143
|
+
return rb_ary_new3(2, r, s);
|
144
|
+
}
|
145
|
+
|
146
|
+
static VALUE
|
147
|
+
dcl_rr2rr(obj, p, q, func)
|
148
|
+
VALUE obj, p, q;
|
149
|
+
int (*func)(real*,real*,real*,real*);
|
150
|
+
{
|
151
|
+
switch (TYPE(p)){
|
152
|
+
case T_DATA:
|
153
|
+
case T_ARRAY:
|
154
|
+
return( dcl_rr2rr_na(obj, p, q, func) );
|
155
|
+
default:
|
156
|
+
return( dcl_rr2rr_num(obj, p, q, func) );
|
157
|
+
}
|
158
|
+
}
|
159
|
+
|
160
|
+
|
161
|
+
<% rr2rr_funcs.each do |func| %>
|
162
|
+
static VALUE
|
163
|
+
dcl_<%= func%>(obj, p, q)
|
164
|
+
VALUE obj, p, q;
|
165
|
+
{ return( dcl_rr2rr(obj, p, q, &<%= func%>_) ); }
|
166
|
+
<% end %>
|
167
|
+
|
168
|
+
void
|
169
|
+
init_narrayed_funcs(mDCL)
|
170
|
+
VALUE mDCL;
|
171
|
+
{
|
172
|
+
<% rr2rr_funcs.each do |func| %>
|
173
|
+
rb_define_module_function(mDCL, "<%= func%>", dcl_<%= func%>, 2);
|
174
|
+
<% end %>
|
175
|
+
}
|
176
|
+
|
177
|
+
EOS
|
178
|
+
|
179
|
+
File.open('../dcl_narrayed_funcs.c','w'){|f| f.print(ERB.new(erbsrc).result)}
|
180
|
+
|
181
|
+
|