ruby-dcl 1.7.1 → 1.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/ChangeLog +1149 -365
- data/LICENSE.txt +1 -1
- data/Rakefile +7 -11
- data/demo/gokuraku/hop/hop.rb +1 -2
- data/demo/gokuraku/jump/jump1.rb +1 -2
- data/demo/gokuraku/jump/jump2.rb +2 -3
- data/demo/gokuraku/layout/lay1.rb +1 -2
- data/demo/gokuraku/layout/lay2.rb +1 -2
- data/demo/gokuraku/step/step0.rb +1 -2
- data/demo/gokuraku/step/step1.rb +1 -2
- data/demo/gokuraku/step/step2.rb +1 -2
- data/demo/gokuraku/u1d/u1d1.rb +1 -2
- data/demo/gokuraku/u1d/u1d2.rb +1 -2
- data/demo/gokuraku/u2d/u2d1.rb +1 -2
- data/demo/gokuraku/u2d/u2d2.rb +1 -2
- data/demo/gokuraku/u2d/u2d3.rb +1 -2
- data/demo/gokuraku/u2d/u2d4.rb +1 -2
- data/demo/grph1/scpack/scpkt2.rb +1 -2
- data/demo/grph1/scpack/scpkt3.rb +1 -2
- data/demo/grph1/scpack/scpkt6.rb +1 -2
- data/demo/grph1/scpack/scpkt7.rb +1 -2
- data/demo/grph1/scpack/scpkt8.rb +1 -2
- data/demo/grph1/sgpack/sgfont.rb +2 -3
- data/demo/grph1/sgpack/sgfonz.rb +2 -3
- data/demo/grph1/sgpack/sgksx1.rb +1 -2
- data/demo/grph1/sgpack/sgksx2.rb +1 -2
- data/demo/grph1/sgpack/sgksx3.rb +1 -2
- data/demo/grph1/sgpack/sglidx.rb +1 -2
- data/demo/grph1/sgpack/sgltyp.rb +1 -2
- data/demo/grph1/sgpack/sgpk01.rb +1 -2
- data/demo/grph1/sgpack/sgpk02.rb +1 -2
- data/demo/grph1/sgpack/sgpk03.rb +1 -2
- data/demo/grph1/sgpack/sgpk04.rb +1 -2
- data/demo/grph1/sgpack/sgpk05.rb +1 -2
- data/demo/grph1/sgpack/sgpk06.rb +1 -2
- data/demo/grph1/sgpack/sgpk07.rb +9 -8
- data/demo/grph1/sgpack/sgpk08.rb +1 -2
- data/demo/grph1/sgpack/sgpk09.rb +1 -2
- data/demo/grph1/sgpack/sgpk10.rb +1 -2
- data/demo/grph1/sgpack/sgtclr.rb +1 -2
- data/demo/grph1/sgpack/sgtone.rb +1 -2
- data/demo/grph1/sgpack/sgtonz.rb +1 -2
- data/demo/grph1/slpack/slpk01.rb +1 -2
- data/demo/grph1/slpack/slpk02.rb +1 -2
- data/demo/grph1/slpack/slpk03.rb +1 -2
- data/demo/grph1/slpack/slpk04.rb +2 -3
- data/demo/grph2/grpack/grpk01.rb +1 -2
- data/demo/grph2/ucpack/ucpk01.rb +1 -2
- data/demo/grph2/ucpack/ucpk02.rb +1 -2
- data/demo/grph2/udegpk/u2df01.rb +1 -2
- data/demo/grph2/udegpk/u2df02.rb +1 -2
- data/demo/grph2/udegpk/u2df03.rb +3 -4
- data/demo/grph2/udegpk/u2df04.rb +1 -2
- data/demo/grph2/udegpk/u2df05.rb +1 -2
- data/demo/grph2/udegpk/u2df06.rb +1 -2
- data/demo/grph2/udegpk/u2df07.rb +1 -2
- data/demo/grph2/udegpk/u2df08.rb +1 -2
- data/demo/grph2/udegpk/u2df09b.rb +0 -1
- data/demo/grph2/udegpk/u2df09c.rb +0 -1
- data/demo/grph2/udegpk/u2df09e.rb +0 -1
- data/demo/grph2/udegpk/u2df09f.rb +0 -1
- data/demo/grph2/uipack/uipk01.rb +1 -2
- data/demo/grph2/uipack/uipk02.rb +26 -18
- data/demo/grph2/uipack/uipk03.rb +50 -0
- data/demo/grph2/ulpack/ulpk01.rb +1 -2
- data/demo/grph2/ulpack/ulpk01n.rb +1 -2
- data/demo/grph2/ulpack/ulpk02.rb +1 -2
- data/demo/grph2/ulpack/ulpk02n.rb +1 -2
- data/demo/grph2/umpack/test01.rb +1 -2
- data/demo/grph2/umpack/test02.rb +1 -2
- data/demo/grph2/umpack/test03.rb +1 -2
- data/demo/grph2/umpack/test04.rb +2 -3
- data/demo/grph2/umpack/test05.rb +1 -2
- data/demo/grph2/umpack/test05r.rb +86 -0
- data/demo/grph2/umpack/test06.rb +1 -2
- data/demo/grph2/umpack/test07.rb +1 -2
- data/demo/grph2/umpack/test08.rb +1 -2
- data/demo/grph2/umpack/test10.rb +0 -1
- data/demo/grph2/umpack/umpk01.rb +1 -2
- data/demo/grph2/umpack/umpk02.rb +1 -2
- data/demo/grph2/umpack/umpk03.rb +1 -2
- data/demo/grph2/umpack/umpk04.rb +1 -2
- data/demo/grph2/umpack/umpk05.rb +1 -2
- data/demo/grph2/uspack/uspk01.rb +1 -2
- data/demo/grph2/uspack/uspk02.rb +1 -2
- data/demo/grph2/uspack/uspk03.rb +1 -2
- data/demo/grph2/uspack/uspk04.rb +1 -2
- data/demo/grph2/uspack/uspk05.rb +1 -2
- data/demo/grph2/uspack/uspk06.rb +2 -3
- data/demo/grph2/uspack/uspk07.rb +1 -2
- data/demo/grph2/uspack/uspk08.rb +2 -3
- data/demo/grph2/uspack/uspk09.rb +1 -2
- data/demo/grph2/uspack/uspk10.rb +1 -2
- data/demo/grph2/uspack/uspk11.rb +1 -2
- data/demo/grph2/uspack/uspk12.rb +1 -2
- data/demo/grph2/uupack/uupk01.rb +1 -2
- data/demo/grph2/uupack/uupk02.rb +1 -2
- data/demo/grph2/uupack/uupk03.rb +1 -2
- data/demo/grph2/uupack/uupk04.rb +1 -2
- data/demo/grph2/uupack/uupk05.rb +1 -2
- data/demo/grph2/uupack/uupk06.rb +1 -2
- data/demo/grph2/uupack/uupk07.rb +1 -2
- data/demo/grph2/uxyzpk/uxyz01.rb +1 -2
- data/demo/grph2/uxyzpk/uxyz02.rb +1 -2
- data/demo/grph2/uxyzpk/uxyz03.rb +1 -2
- data/demo/grph2/uxyzpk/uxyz04.rb +1 -2
- data/demo/grph2/uxyzpk/uxyz05.rb +1 -2
- data/demo/grph2/uxyzpk/uxyz06.rb +1 -2
- data/demo/grph2/uxyzpk/uxyz07.rb +1 -2
- data/demo/grph2/uxyzpk/uxyz08.rb +1 -2
- data/demo/grph2/uxyzpk/uxyz09.rb +1 -2
- data/demo/grph2/uxyzpk/uxyz10.rb +1 -2
- data/demo/grph2/ximage/ximg01.rb +2 -3
- data/demo/math1/clsplib/cslb01.rb +1 -2
- data/demo/math2/fftlib/fftl01.rb +1 -2
- data/demo/math2/fftlib/fftl02.rb +1 -2
- data/demo/math2/intrlib/intr01.rb +1 -2
- data/demo/math2/rnmlib/rnml01.rb +1 -2
- data/demo/math2/vstlib/vstl01.rb +1 -2
- data/demo/math2/vstlib/vstl02.rb +1 -2
- data/demo/misc2/tmpack/tmpk01.rb +46 -0
- data/demo/misc2/tmpack/tmpk02.rb +58 -0
- data/demo/misc2/tmpack/tmpk03.rb +56 -0
- data/demo/rakuraku/color/color1.rb +1 -2
- data/demo/rakuraku/color/color2.rb +5 -5
- data/demo/rakuraku/color/color3.rb +1 -2
- data/demo/rakuraku/kihon/kihon1.rb +1 -2
- data/demo/rakuraku/kihon/kihon2.rb +1 -2
- data/demo/rakuraku/kihon/kihon3.rb +1 -2
- data/demo/rakuraku/kihon/kihon4.rb +1 -2
- data/demo/rakuraku/kihon/kihon5.rb +1 -2
- data/demo/rakuraku/kihon/kihon6.rb +1 -2
- data/demo/rakuraku/kihon/kihon7.rb +10 -5
- data/demo/rakuraku/kihon/kihon8.rb +1 -2
- data/demo/rakuraku/kihon/kihon9.rb +1 -2
- data/demo/rakuraku/kihon/kihona.rb +1 -2
- data/demo/rakuraku/kihon/kihonb.rb +12 -11
- data/demo/rakuraku/kihon/kihonc.rb +1 -2
- data/demo/rakuraku/layout/lay1.rb +1 -2
- data/demo/rakuraku/layout/lay2.rb +1 -2
- data/demo/rakuraku/layout/lay3.rb +1 -2
- data/demo/rakuraku/map3d/map3d1.rb +1 -2
- data/demo/rakuraku/map3d/map3d2.rb +1 -2
- data/demo/rakuraku/map3d/map3d3.rb +1 -2
- data/demo/rakuraku/map3d/map3d4.rb +1 -2
- data/demo/rakuraku/map3d/map3d5.rb +1 -2
- data/demo/rakuraku/map3d/map3d6.rb +0 -1
- data/demo/rakuraku/map3d/map3d7.rb +0 -1
- data/demo/rakuraku/miss/miss1.rb +1 -2
- data/demo/rakuraku/miss/miss2.rb +1 -2
- data/demo/rakuraku/quick/quick1.rb +1 -2
- data/demo/rakuraku/quick/quick2.rb +1 -2
- data/demo/rakuraku/quick/quick3.rb +1 -2
- data/demo/rakuraku/quick/quick4.rb +1 -2
- data/demo/rakuraku/quick/quick5.rb +1 -2
- data/demo/rakuraku/u2d/u2d1.rb +1 -2
- data/demo/rakuraku/u2d/u2d2.rb +1 -2
- data/demo/rakuraku/u2d/u2d3.rb +1 -2
- data/demo/rakuraku/u2d/u2d4.rb +1 -2
- data/demo/rakuraku/u2d/u2d5.rb +1 -2
- data/demo/rakuraku/u2d/u2d6.rb +1 -2
- data/demo/rakuraku/u2d/u2d7.rb +1 -2
- data/demo/rakuraku/uspack/uspac1.rb +2 -3
- data/demo/rakuraku/uspack/uspac2.rb +1 -2
- data/demo/rakuraku/uspack/uspac3.rb +2 -3
- data/demo/rakuraku/uspack/uspac4.rb +1 -2
- data/demo/rakuraku/uxyz/uxyz1.rb +1 -2
- data/demo/rakuraku/uxyz/uxyz2.rb +1 -2
- data/demo/rakuraku/uxyz/uxyz3.rb +1 -2
- data/demo/rakuraku/uxyz/uxyz4.rb +1 -2
- data/demo/rakuraku/uxyz/uxyz5.rb +1 -2
- data/demo/rakuraku/uxyz/uxyz6.rb +1 -2
- data/demo/rakuraku/uxyz/uxyz7.rb +1 -2
- data/demo/rakuraku/uxyz/uxyz8.rb +1 -2
- data/demo/rubydcloriginal/uemrkz1.rb +0 -1
- data/ext/numru/dcl_cary2obj.c +29 -24
- data/ext/numru/dcl_narrayed_funcs.c +21 -21
- data/ext/numru/dcl_obj2cary.c +9 -5
- data/ext/numru/dcl_rubydcloriginal.c +14 -5
- data/ext/numru/extconf.rb +73 -61
- data/ext/numru/grph1_csgi.c +38 -8
- data/ext/numru/grph1_scpack.c +49 -46
- data/ext/numru/grph1_sgpack.c +167 -164
- data/ext/numru/grph1_slpack.c +23 -20
- data/ext/numru/grph1_stpack.c +44 -41
- data/ext/numru/grph1_swpack.c +155 -92
- data/ext/numru/grph2_grpack.c +22 -19
- data/ext/numru/grph2_ucpack.c +55 -52
- data/ext/numru/grph2_udpack.c +61 -58
- data/ext/numru/grph2_uepack.c +60 -57
- data/ext/numru/grph2_ugpack.c +49 -46
- data/ext/numru/grph2_uhpack.c +25 -22
- data/ext/numru/grph2_uipack.c +57 -54
- data/ext/numru/grph2_ulpack.c +59 -56
- data/ext/numru/grph2_umpack.c +75 -72
- data/ext/numru/grph2_uspack.c +97 -94
- data/ext/numru/grph2_uupack.c +78 -75
- data/ext/numru/grph2_uvpack.c +25 -22
- data/ext/numru/grph2_uwpack.c +30 -27
- data/ext/numru/grph2_uxpack.c +23 -20
- data/ext/numru/grph2_uypack.c +23 -20
- data/ext/numru/grph2_uzpack.c +69 -66
- data/ext/numru/init.c.default +6 -2
- data/ext/numru/math1_blklib.c +13 -10
- data/ext/numru/math1_chrlib.c +16 -13
- data/ext/numru/math1_clsplib.c +13 -10
- data/ext/numru/math1_fnclib.c +16 -13
- data/ext/numru/math1_gnmlib.c +21 -18
- data/ext/numru/math1_gt2dlib.c +18 -15
- data/ext/numru/math1_ifalib.c +18 -15
- data/ext/numru/math1_indxlib.c +24 -21
- data/ext/numru/math1_intlib.c +13 -10
- data/ext/numru/math1_lrllib.c +33 -30
- data/ext/numru/math1_maplib.c +14 -11
- data/ext/numru/math1_oslib.c +11 -8
- data/ext/numru/math1_rfalib.c +39 -36
- data/ext/numru/math1_rfblib.c +12 -9
- data/ext/numru/math1_sublib.c +13 -10
- data/ext/numru/math1_syslib.c +82 -79
- data/ext/numru/math1_vialib.c +31 -28
- data/ext/numru/math1_viblib.c +24 -21
- data/ext/numru/math1_vralib.c +31 -28
- data/ext/numru/math1_vrblib.c +24 -21
- data/ext/numru/math1_xfclib.c +12 -9
- data/ext/numru/math2_fftlib.c +28 -25
- data/ext/numru/math2_intrlib.c +11 -8
- data/ext/numru/math2_rnmlib.c +12 -9
- data/ext/numru/math2_shtlib.c +34 -31
- data/ext/numru/math2_vstlib.c +15 -12
- data/ext/numru/misc1_chnlib.c +12 -9
- data/ext/numru/misc1_datelib.c +36 -33
- data/ext/numru/misc1_fmtlib.c +10 -7
- data/ext/numru/misc1_misclib.c +11 -8
- data/ext/numru/misc1_randlib.c +13 -10
- data/ext/numru/misc1_timelib.c +20 -17
- data/ext/numru/misc2_tmpack.c +1200 -0
- data/lib/numru/dcl/dcl.rb +5676 -0
- data/lib/numru/dcl/version.rb +5 -0
- data/lib/numru/dcl.rb +6 -5580
- data/ruby-dcl.gemspec +13 -9
- metadata +25 -99
- data/.gitignore +0 -13
- data/.rspec +0 -2
- data/.travis.yml +0 -3
- data/GenWrapper/Makefile +0 -15
- data/GenWrapper/cproto2init.rb +0 -41
- data/GenWrapper/dcl_narrayed_funcs.rb +0 -181
- data/GenWrapper/dcl_rb_footing +0 -29
- data/GenWrapper/dcl_rb_heading +0 -123
- data/GenWrapper/def.rb +0 -20
- data/GenWrapper/elim_ary_size.rb +0 -398
- data/GenWrapper/etc/p_header +0 -64
- data/GenWrapper/pparse.rb +0 -137
- data/GenWrapper/proto/Makefile +0 -36
- data/GenWrapper/proto/grph1_00 +0 -17
- data/GenWrapper/proto/grph1_csgi.fp +0 -27
- data/GenWrapper/proto/grph1_scpack.fp +0 -442
- data/GenWrapper/proto/grph1_sgpack.fp +0 -1772
- data/GenWrapper/proto/grph1_slpack.fp +0 -316
- data/GenWrapper/proto/grph1_stpack.fp +0 -455
- data/GenWrapper/proto/grph1_swpack.fp +0 -826
- data/GenWrapper/proto/grph2_00 +0 -16
- data/GenWrapper/proto/grph2_grpack.fp +0 -139
- data/GenWrapper/proto/grph2_ucpack.fp +0 -522
- data/GenWrapper/proto/grph2_udpack.fp +0 -692
- data/GenWrapper/proto/grph2_uepack.fp +0 -601
- data/GenWrapper/proto/grph2_ugpack.fp +0 -436
- data/GenWrapper/proto/grph2_uhpack.fp +0 -246
- data/GenWrapper/proto/grph2_uipack.fp +0 -508
- data/GenWrapper/proto/grph2_ulpack.fp +0 -516
- data/GenWrapper/proto/grph2_umpack.fp +0 -676
- data/GenWrapper/proto/grph2_uspack.fp +0 -989
- data/GenWrapper/proto/grph2_uupack.fp +0 -663
- data/GenWrapper/proto/grph2_uvpack.fp +0 -246
- data/GenWrapper/proto/grph2_uwpack.fp +0 -203
- data/GenWrapper/proto/grph2_uxpack.fp +0 -295
- data/GenWrapper/proto/grph2_uypack.fp +0 -295
- data/GenWrapper/proto/grph2_uzpack.fp +0 -574
- data/GenWrapper/proto/math1_00 +0 -12
- data/GenWrapper/proto/math1_blklib.fp +0 -58
- data/GenWrapper/proto/math1_chrlib.fp +0 -83
- data/GenWrapper/proto/math1_clsplib.fp +0 -74
- data/GenWrapper/proto/math1_fnclib.fp +0 -79
- data/GenWrapper/proto/math1_gnmlib.fp +0 -118
- data/GenWrapper/proto/math1_gt2dlib.fp +0 -144
- data/GenWrapper/proto/math1_ifalib.fp +0 -123
- data/GenWrapper/proto/math1_indxlib.fp +0 -222
- data/GenWrapper/proto/math1_intlib.fp +0 -46
- data/GenWrapper/proto/math1_lrllib.fp +0 -276
- data/GenWrapper/proto/math1_maplib.fp +0 -24
- data/GenWrapper/proto/math1_oslib.fp +0 -28
- data/GenWrapper/proto/math1_rfalib.fp +0 -420
- data/GenWrapper/proto/math1_rfblib.fp +0 -51
- data/GenWrapper/proto/math1_sublib.fp +0 -60
- data/GenWrapper/proto/math1_syslib.fp +0 -767
- data/GenWrapper/proto/math1_vialib.fp +0 -339
- data/GenWrapper/proto/math1_viblib.fp +0 -264
- data/GenWrapper/proto/math1_vralib.fp +0 -339
- data/GenWrapper/proto/math1_vrblib.fp +0 -264
- data/GenWrapper/proto/math1_xfclib.fp +0 -68
- data/GenWrapper/proto/math2_00 +0 -12
- data/GenWrapper/proto/math2_fftlib.fp +0 -803
- data/GenWrapper/proto/math2_intrlib.fp +0 -32
- data/GenWrapper/proto/math2_odelib.fp_notused +0 -568
- data/GenWrapper/proto/math2_rnmlib.fp +0 -54
- data/GenWrapper/proto/math2_shtlib.fp +0 -1292
- data/GenWrapper/proto/math2_vstlib.fp +0 -84
- data/GenWrapper/proto/misc1_00 +0 -17
- data/GenWrapper/proto/misc1_chnlib.fp +0 -47
- data/GenWrapper/proto/misc1_datelib.fp +0 -352
- data/GenWrapper/proto/misc1_fmtlib.fp +0 -19
- data/GenWrapper/proto/misc1_misclib.fp +0 -26
- data/GenWrapper/proto/misc1_randlib.fp +0 -50
- data/GenWrapper/proto/misc1_timelib.fp +0 -151
- data/GenWrapper/proto2c.rb +0 -13
- data/GenWrapper/prototype.rb +0 -209
- data/GenWrapper/util.rb +0 -9
- data/GenWrapper/variable.rb +0 -671
- data/README +0 -29
- data/ToDo +0 -2
- data/bin/console +0 -14
- data/bin/setup +0 -7
- data/demo/grph2/ximage/MEMO +0 -23
- data/obsolete/README +0 -2
- data/obsolete/dcl_ext.html +0 -112
- data/obsolete/dcl_ext.rb +0 -313
data/ext/numru/math2_shtlib.c
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
/*
|
2
|
-
* $Id
|
2
|
+
* $Id$
|
3
3
|
*/
|
4
4
|
|
5
5
|
#include <stdio.h>
|
6
6
|
#include "ruby.h"
|
7
|
-
#include "libtinyf2c.h"
|
8
7
|
#include "narray.h"
|
9
8
|
#include "cdcl.h"
|
10
9
|
|
@@ -15,6 +14,10 @@
|
|
15
14
|
|
16
15
|
#define DFLT_SIZE 32
|
17
16
|
|
17
|
+
#ifndef NARRAY_BIGMEM
|
18
|
+
typedef int na_shape_t;
|
19
|
+
#endif
|
20
|
+
|
18
21
|
extern char *dcl_obj2ccharary(VALUE, int, int);
|
19
22
|
extern integer *dcl_obj2cintegerary(VALUE);
|
20
23
|
extern real *dcl_obj2crealary(VALUE);
|
@@ -22,10 +25,10 @@ extern complex *dcl_obj2ccomplexary(VALUE);
|
|
22
25
|
extern logical *dcl_obj2clogicalary(VALUE);
|
23
26
|
|
24
27
|
extern VALUE dcl_ccharary2obj(char *, int, int);
|
25
|
-
extern VALUE dcl_cintegerary2obj(integer *,
|
26
|
-
extern VALUE dcl_crealary2obj(real *,
|
27
|
-
extern VALUE dcl_ccomplexary2obj(complex *, int, char *);
|
28
|
-
extern VALUE dcl_clogicalary2obj(logical *,
|
28
|
+
extern VALUE dcl_cintegerary2obj(integer *, na_shape_t, int, na_shape_t *);
|
29
|
+
extern VALUE dcl_crealary2obj(real *, na_shape_t, int, na_shape_t *);
|
30
|
+
/* extern VALUE dcl_ccomplexary2obj(complex *, int, char *); */
|
31
|
+
extern VALUE dcl_clogicalary2obj(logical *, na_shape_t, int, na_shape_t *);
|
29
32
|
|
30
33
|
extern void dcl_freeccharary(char *);
|
31
34
|
extern void dcl_freecintegerary(integer *);
|
@@ -66,7 +69,7 @@ static VALUE
|
|
66
69
|
dcl_shtlib(obj)
|
67
70
|
VALUE obj;
|
68
71
|
{
|
69
|
-
|
72
|
+
shtlib__();
|
70
73
|
|
71
74
|
return Qnil;
|
72
75
|
|
@@ -98,7 +101,7 @@ dcl_shtint(obj, mm, jm, im)
|
|
98
101
|
|
99
102
|
o_work= ALLOCA_N(real, (i_jm+1)*(4*i_jm+5*i_mm+14)+(i_mm+1)*(i_mm+1)+i_mm+2+6*i_im+15);
|
100
103
|
|
101
|
-
|
104
|
+
shtint__(&i_mm, &i_jm, &i_im, o_work);
|
102
105
|
|
103
106
|
{int array_shape[1] = {(i_jm+1)*(4*i_jm+5*i_mm+14)+(i_mm+1)*(i_mm+1)+i_mm+2+6*i_im+15};
|
104
107
|
work = dcl_crealary2obj(o_work, (i_jm+1)*(4*i_jm+5*i_mm+14)+(i_mm+1)*(i_mm+1)+i_mm+2+6*i_im+15, 1, array_shape);
|
@@ -139,7 +142,7 @@ dcl_shtlap(obj, mm, ind, a)
|
|
139
142
|
|
140
143
|
o_b= ALLOCA_N(real, (i_mm+1)*(i_mm+1));
|
141
144
|
|
142
|
-
|
145
|
+
shtlap__(&i_mm, &i_ind, i_a, o_b);
|
143
146
|
|
144
147
|
{int array_shape[1] = {(i_mm+1)*(i_mm+1)};
|
145
148
|
b = dcl_crealary2obj(o_b, (i_mm+1)*(i_mm+1), 1, array_shape);
|
@@ -178,7 +181,7 @@ dcl_shtnml(obj, mm, n, m)
|
|
178
181
|
i_m = NUM2INT(m);
|
179
182
|
|
180
183
|
|
181
|
-
|
184
|
+
shtnml__(&i_mm, &i_n, &i_m, &o_lr, &o_li);
|
182
185
|
|
183
186
|
lr = INT2NUM(o_lr);
|
184
187
|
li = INT2NUM(o_li);
|
@@ -223,7 +226,7 @@ dcl_shtfun(obj, mm, jm, m, work)
|
|
223
226
|
|
224
227
|
o_fun= ALLOCA_N(real, ((2*i_jm+1)*(i_mm-i_m+1)));
|
225
228
|
|
226
|
-
|
229
|
+
shtfun__(&i_mm, &i_jm, &i_m, o_fun, i_work);
|
227
230
|
|
228
231
|
{int array_shape[2] = {(2*i_jm+1), (i_mm-i_m+1)};
|
229
232
|
fun = dcl_crealary2obj(o_fun, ((2*i_jm+1)*(i_mm-i_m+1)), 2, array_shape);
|
@@ -284,7 +287,7 @@ dcl_shtlfw(obj, mm, jm, m, isw, wm, work)
|
|
284
287
|
|
285
288
|
o_sm= ALLOCA_N(real, (i_mm-i_m+1));
|
286
289
|
|
287
|
-
|
290
|
+
shtlfw__(&i_mm, &i_jm, &i_m, &i_isw, i_wm, o_sm, i_work);
|
288
291
|
|
289
292
|
{int array_shape[1] = {i_mm-i_m+1};
|
290
293
|
sm = dcl_crealary2obj(o_sm, (i_mm-i_m+1), 1, array_shape);
|
@@ -346,7 +349,7 @@ dcl_shtlbw(obj, mm, jm, m, isw, sm, work)
|
|
346
349
|
|
347
350
|
o_wm= ALLOCA_N(real, (2*i_jm+1));
|
348
351
|
|
349
|
-
|
352
|
+
shtlbw__(&i_mm, &i_jm, &i_m, &i_isw, i_sm, o_wm, i_work);
|
350
353
|
|
351
354
|
{int array_shape[1] = {2*i_jm+1};
|
352
355
|
wm = dcl_crealary2obj(o_wm, (2*i_jm+1), 1, array_shape);
|
@@ -403,7 +406,7 @@ dcl_shts2w(obj, mm, jm, isw, s, work)
|
|
403
406
|
|
404
407
|
o_w= ALLOCA_N(real, ((2*i_jm+1)*(2*i_mm+1)));
|
405
408
|
|
406
|
-
|
409
|
+
shts2w__(&i_mm, &i_jm, &i_isw, i_s, o_w, i_work);
|
407
410
|
|
408
411
|
{int array_shape[2] = {(2*i_jm+1), (2*i_mm+1)};
|
409
412
|
w = dcl_crealary2obj(o_w, ((2*i_jm+1)*(2*i_mm+1)), 2, array_shape);
|
@@ -470,7 +473,7 @@ dcl_shtswa(obj, mm, jm, isw, m1, m2, s, work)
|
|
470
473
|
|
471
474
|
o_w= ALLOCA_N(real, ((2*i_jm+1)*(2*i_mm+1)));
|
472
475
|
|
473
|
-
|
476
|
+
shtswa__(&i_mm, &i_jm, &i_isw, &i_m1, &i_m2, i_s, o_w, i_work);
|
474
477
|
|
475
478
|
{int array_shape[2] = {(2*i_jm+1), (2*i_mm+1)};
|
476
479
|
w = dcl_crealary2obj(o_w, ((2*i_jm+1)*(2*i_mm+1)), 2, array_shape);
|
@@ -527,7 +530,7 @@ dcl_shtswz(obj, mm, jm, isw, s, work)
|
|
527
530
|
|
528
531
|
o_wz= ALLOCA_N(real, (2*i_jm+1));
|
529
532
|
|
530
|
-
|
533
|
+
shtswz__(&i_mm, &i_jm, &i_isw, i_s, o_wz, i_work);
|
531
534
|
|
532
535
|
{int array_shape[1] = {2*i_jm+1};
|
533
536
|
wz = dcl_crealary2obj(o_wz, (2*i_jm+1), 1, array_shape);
|
@@ -592,7 +595,7 @@ dcl_shtswm(obj, mm, jm, m, isw, s, work)
|
|
592
595
|
o_wr= ALLOCA_N(real, (2*i_jm+1));
|
593
596
|
o_wi= ALLOCA_N(real, (2*i_jm+1));
|
594
597
|
|
595
|
-
|
598
|
+
shtswm__(&i_mm, &i_jm, &i_m, &i_isw, i_s, o_wr, o_wi, i_work);
|
596
599
|
|
597
600
|
{int array_shape[1] = {2*i_jm+1};
|
598
601
|
wr = dcl_crealary2obj(o_wr, (2*i_jm+1), 1, array_shape);
|
@@ -667,7 +670,7 @@ dcl_shtswj(obj, mm, jm, isw, j, m1, m2, s, work)
|
|
667
670
|
|
668
671
|
o_wj= ALLOCA_N(real, (2*i_mm+1));
|
669
672
|
|
670
|
-
|
673
|
+
shtswj__(&i_mm, &i_jm, &i_isw, &i_j, &i_m1, &i_m2, i_s, o_wj, i_work);
|
671
674
|
|
672
675
|
{int array_shape[1] = {2*i_mm+1};
|
673
676
|
wj = dcl_crealary2obj(o_wj, (2*i_mm+1), 1, array_shape);
|
@@ -724,7 +727,7 @@ dcl_shtw2s(obj, mm, jm, isw, s, work)
|
|
724
727
|
|
725
728
|
o_w= ALLOCA_N(real, ((i_mm+1)*(i_mm+1)));
|
726
729
|
|
727
|
-
|
730
|
+
shtw2s__(&i_mm, &i_jm, &i_isw, i_s, o_w, i_work);
|
728
731
|
|
729
732
|
{int array_shape[2] = {(i_mm+1), (i_mm+1)};
|
730
733
|
w = dcl_crealary2obj(o_w, ((i_mm+1)*(i_mm+1)), 2, array_shape);
|
@@ -781,7 +784,7 @@ dcl_shtw2g(obj, mm, jm, im, w, work)
|
|
781
784
|
|
782
785
|
o_g= ALLOCA_N(real, ((2*i_im+1)*(2*i_jm+1)));
|
783
786
|
|
784
|
-
|
787
|
+
shtw2g__(&i_mm, &i_jm, &i_im, i_w, o_g, i_work);
|
785
788
|
|
786
789
|
{int array_shape[2] = {(2*i_im+1), (2*i_jm+1)};
|
787
790
|
g = dcl_crealary2obj(o_g, ((2*i_im+1)*(2*i_jm+1)), 2, array_shape);
|
@@ -848,7 +851,7 @@ dcl_shtwga(obj, mm, jm, im, m1, m2, w, work)
|
|
848
851
|
|
849
852
|
o_g= ALLOCA_N(real, ((2*i_im+1)*(2*i_jm+1)));
|
850
853
|
|
851
|
-
|
854
|
+
shtwga__(&i_mm, &i_jm, &i_im, &i_m1, &i_m2, i_w, o_g, i_work);
|
852
855
|
|
853
856
|
{int array_shape[2] = {(2*i_im+1), (2*i_jm+1)};
|
854
857
|
g = dcl_crealary2obj(o_g, ((2*i_im+1)*(2*i_jm+1)), 2, array_shape);
|
@@ -919,7 +922,7 @@ dcl_shtwgm(obj, mm, jm, im, m, wr, wi, work)
|
|
919
922
|
|
920
923
|
o_g= ALLOCA_N(real, ((2*i_im+1)*(2*i_jm+1)));
|
921
924
|
|
922
|
-
|
925
|
+
shtwgm__(&i_mm, &i_jm, &i_im, &i_m, i_wr, i_wi, o_g, i_work);
|
923
926
|
|
924
927
|
{int array_shape[2] = {(2*i_im+1), (2*i_jm+1)};
|
925
928
|
g = dcl_crealary2obj(o_g, ((2*i_im+1)*(2*i_jm+1)), 2, array_shape);
|
@@ -963,7 +966,7 @@ dcl_shtwgz(obj, jm, im, wz)
|
|
963
966
|
|
964
967
|
o_g= ALLOCA_N(real, ((2*i_im+1)*(2*i_jm+1)));
|
965
968
|
|
966
|
-
|
969
|
+
shtwgz__(&i_jm, &i_im, i_wz, o_g);
|
967
970
|
|
968
971
|
{int array_shape[2] = {(2*i_im+1), (2*i_jm+1)};
|
969
972
|
g = dcl_crealary2obj(o_g, ((2*i_im+1)*(2*i_jm+1)), 2, array_shape);
|
@@ -1024,7 +1027,7 @@ dcl_shtwgj(obj, mm, im, m1, m2, wj, work)
|
|
1024
1027
|
|
1025
1028
|
o_gj= ALLOCA_N(real, (2*i_im+1));
|
1026
1029
|
|
1027
|
-
|
1030
|
+
shtwgj__(&i_mm, &i_im, &i_m1, &i_m2, i_wj, o_gj, i_work);
|
1028
1031
|
|
1029
1032
|
{int array_shape[1] = {2*i_im+1};
|
1030
1033
|
gj = dcl_crealary2obj(o_gj, (2*i_im+1), 1, array_shape);
|
@@ -1081,7 +1084,7 @@ dcl_shtg2w(obj, mm, jm, im, g, work)
|
|
1081
1084
|
|
1082
1085
|
o_w= ALLOCA_N(real, ((2*i_jm+1)*(2*i_mm+1)));
|
1083
1086
|
|
1084
|
-
|
1087
|
+
shtg2w__(&i_mm, &i_jm, &i_im, i_g, o_w, i_work);
|
1085
1088
|
|
1086
1089
|
{int array_shape[2] = {(2*i_jm+1), (2*i_mm+1)};
|
1087
1090
|
w = dcl_crealary2obj(o_w, ((2*i_jm+1)*(2*i_mm+1)), 2, array_shape);
|
@@ -1146,7 +1149,7 @@ dcl_shts2g(obj, mm, jm, im, isw, s, work)
|
|
1146
1149
|
o_w= ALLOCA_N(real, ((2*i_jm+1)*(2*i_mm+1)));
|
1147
1150
|
o_g= ALLOCA_N(real, ((2*i_im+1)*(2*i_jm+1)));
|
1148
1151
|
|
1149
|
-
|
1152
|
+
shts2g__(&i_mm, &i_jm, &i_im, &i_isw, i_s, o_w, o_g, i_work);
|
1150
1153
|
|
1151
1154
|
{int array_shape[2] = {(2*i_jm+1), (2*i_mm+1)};
|
1152
1155
|
w = dcl_crealary2obj(o_w, ((2*i_jm+1)*(2*i_mm+1)), 2, array_shape);
|
@@ -1224,7 +1227,7 @@ dcl_shtsga(obj, mm, jm, im, isw, m1, m2, s, work)
|
|
1224
1227
|
o_w= ALLOCA_N(real, ((2*i_jm+1)*(2*i_mm+1)));
|
1225
1228
|
o_g= ALLOCA_N(real, ((2*i_im+1)*(2*i_jm+1)));
|
1226
1229
|
|
1227
|
-
|
1230
|
+
shtsga__(&i_mm, &i_jm, &i_im, &i_isw, &i_m1, &i_m2, i_s, o_w, o_g, i_work);
|
1228
1231
|
|
1229
1232
|
{int array_shape[2] = {(2*i_jm+1), (2*i_mm+1)};
|
1230
1233
|
w = dcl_crealary2obj(o_w, ((2*i_jm+1)*(2*i_mm+1)), 2, array_shape);
|
@@ -1292,7 +1295,7 @@ dcl_shtsgz(obj, mm, jm, im, isw, s, work)
|
|
1292
1295
|
o_wz= ALLOCA_N(real, (2*i_jm+1));
|
1293
1296
|
o_g= ALLOCA_N(real, ((2*i_im+1)*(2*i_jm+1)));
|
1294
1297
|
|
1295
|
-
|
1298
|
+
shtsgz__(&i_mm, &i_jm, &i_im, &i_isw, i_s, o_wz, o_g, i_work);
|
1296
1299
|
|
1297
1300
|
{int array_shape[1] = {2*i_jm+1};
|
1298
1301
|
wz = dcl_crealary2obj(o_wz, (2*i_jm+1), 1, array_shape);
|
@@ -1368,7 +1371,7 @@ dcl_shtsgm(obj, mm, jm, im, m, isw, s, work)
|
|
1368
1371
|
o_wi= ALLOCA_N(real, (2*i_jm+1));
|
1369
1372
|
o_g= ALLOCA_N(real, ((2*i_im+1)*(2*i_jm+1)));
|
1370
1373
|
|
1371
|
-
|
1374
|
+
shtsgm__(&i_mm, &i_jm, &i_im, &i_m, &i_isw, i_s, o_wr, o_wi, o_g, i_work);
|
1372
1375
|
|
1373
1376
|
{int array_shape[1] = {2*i_jm+1};
|
1374
1377
|
wr = dcl_crealary2obj(o_wr, (2*i_jm+1), 1, array_shape);
|
@@ -1454,7 +1457,7 @@ dcl_shtsgj(obj, mm, jm, im, isw, j, m1, m2, s, work)
|
|
1454
1457
|
o_wj= ALLOCA_N(real, (2*i_mm+1));
|
1455
1458
|
o_gj= ALLOCA_N(real, (2*i_im+1));
|
1456
1459
|
|
1457
|
-
|
1460
|
+
shtsgj__(&i_mm, &i_jm, &i_im, &i_isw, &i_j, &i_m1, &i_m2, i_s, o_wj, o_gj, i_work);
|
1458
1461
|
|
1459
1462
|
{int array_shape[1] = {2*i_mm+1};
|
1460
1463
|
wj = dcl_crealary2obj(o_wj, (2*i_mm+1), 1, array_shape);
|
@@ -1522,7 +1525,7 @@ dcl_shtg2s(obj, mm, jm, im, isw, g, work)
|
|
1522
1525
|
o_w= ALLOCA_N(real, ((2*i_jm+1)*(2*i_mm+1)));
|
1523
1526
|
o_s= ALLOCA_N(real, (i_mm+1)*(i_mm+1));
|
1524
1527
|
|
1525
|
-
|
1528
|
+
shtg2s__(&i_mm, &i_jm, &i_im, &i_isw, i_g, o_w, o_s, i_work);
|
1526
1529
|
|
1527
1530
|
{int array_shape[2] = {(2*i_jm+1), (2*i_mm+1)};
|
1528
1531
|
w = dcl_crealary2obj(o_w, ((2*i_jm+1)*(2*i_mm+1)), 2, array_shape);
|
data/ext/numru/math2_vstlib.c
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
/*
|
2
|
-
* $Id
|
2
|
+
* $Id$
|
3
3
|
*/
|
4
4
|
|
5
5
|
#include <stdio.h>
|
6
6
|
#include "ruby.h"
|
7
|
-
#include "libtinyf2c.h"
|
8
7
|
#include "narray.h"
|
9
8
|
#include "cdcl.h"
|
10
9
|
|
@@ -15,6 +14,10 @@
|
|
15
14
|
|
16
15
|
#define DFLT_SIZE 32
|
17
16
|
|
17
|
+
#ifndef NARRAY_BIGMEM
|
18
|
+
typedef int na_shape_t;
|
19
|
+
#endif
|
20
|
+
|
18
21
|
extern char *dcl_obj2ccharary(VALUE, int, int);
|
19
22
|
extern integer *dcl_obj2cintegerary(VALUE);
|
20
23
|
extern real *dcl_obj2crealary(VALUE);
|
@@ -22,10 +25,10 @@ extern complex *dcl_obj2ccomplexary(VALUE);
|
|
22
25
|
extern logical *dcl_obj2clogicalary(VALUE);
|
23
26
|
|
24
27
|
extern VALUE dcl_ccharary2obj(char *, int, int);
|
25
|
-
extern VALUE dcl_cintegerary2obj(integer *,
|
26
|
-
extern VALUE dcl_crealary2obj(real *,
|
27
|
-
extern VALUE dcl_ccomplexary2obj(complex *, int, char *);
|
28
|
-
extern VALUE dcl_clogicalary2obj(logical *,
|
28
|
+
extern VALUE dcl_cintegerary2obj(integer *, na_shape_t, int, na_shape_t *);
|
29
|
+
extern VALUE dcl_crealary2obj(real *, na_shape_t, int, na_shape_t *);
|
30
|
+
/* extern VALUE dcl_ccomplexary2obj(complex *, int, char *); */
|
31
|
+
extern VALUE dcl_clogicalary2obj(logical *, na_shape_t, int, na_shape_t *);
|
29
32
|
|
30
33
|
extern void dcl_freeccharary(char *);
|
31
34
|
extern void dcl_freecintegerary(integer *);
|
@@ -81,7 +84,7 @@ dcl_vs1int(obj, ix)
|
|
81
84
|
o_wz= ALLOCA_N(real, (i_ix*2));
|
82
85
|
o_nw= ALLOCA_N(integer, (i_ix));
|
83
86
|
|
84
|
-
|
87
|
+
vs1int__(o_wz, o_nw, &i_ix);
|
85
88
|
|
86
89
|
{int array_shape[2] = {i_ix, 2};
|
87
90
|
wz = dcl_crealary2obj(o_wz, (i_ix*2), 2, array_shape);
|
@@ -135,7 +138,7 @@ dcl_vs1din(obj, wz, nw, ix, x)
|
|
135
138
|
i_x = dcl_obj2crealary(x);
|
136
139
|
|
137
140
|
|
138
|
-
|
141
|
+
vs1din__(io_wz, io_nw, &i_ix, i_x);
|
139
142
|
|
140
143
|
{int array_shape[2] = {i_ix, 2};
|
141
144
|
wz = dcl_crealary2obj(io_wz, (i_ix*2), 2, array_shape);
|
@@ -183,7 +186,7 @@ dcl_vs1out(obj, wz, nw, ix)
|
|
183
186
|
i_nw = dcl_obj2cintegerary(nw);
|
184
187
|
|
185
188
|
|
186
|
-
|
189
|
+
vs1out__(io_wz, i_nw, &i_ix);
|
187
190
|
|
188
191
|
{int array_shape[2] = {i_ix, 2};
|
189
192
|
wz = dcl_crealary2obj(io_wz, (i_ix*2), 2, array_shape);
|
@@ -220,7 +223,7 @@ dcl_vs2int(obj, ix, iy)
|
|
220
223
|
o_wz= ALLOCA_N(real, (i_ix*i_iy*5));
|
221
224
|
o_nw= ALLOCA_N(integer, (i_ix*i_iy));
|
222
225
|
|
223
|
-
|
226
|
+
vs2int__(o_wz, o_nw, &i_ix, &i_iy);
|
224
227
|
|
225
228
|
{int array_shape[3] = {i_ix, i_iy, 5};
|
226
229
|
wz = dcl_crealary2obj(o_wz, (i_ix*i_iy*5), 3, array_shape);
|
@@ -288,7 +291,7 @@ dcl_vs2din(obj, wz, nw, ix, iy, x, y)
|
|
288
291
|
i_y = dcl_obj2crealary(y);
|
289
292
|
|
290
293
|
|
291
|
-
|
294
|
+
vs2din__(io_wz, io_nw, &i_ix, &i_iy, i_x, i_y);
|
292
295
|
|
293
296
|
{int array_shape[3] = {i_ix, i_iy, 5};
|
294
297
|
wz = dcl_crealary2obj(io_wz, (i_ix*i_iy*5), 3, array_shape);
|
@@ -342,7 +345,7 @@ dcl_vs2out(obj, wz, nw, ix, iy)
|
|
342
345
|
i_nw = dcl_obj2cintegerary(nw);
|
343
346
|
|
344
347
|
|
345
|
-
|
348
|
+
vs2out__(io_wz, i_nw, &i_ix, &i_iy);
|
346
349
|
|
347
350
|
{int array_shape[3] = {i_ix, i_iy, 5};
|
348
351
|
wz = dcl_crealary2obj(io_wz, (i_ix*i_iy*5), 3, array_shape);
|
data/ext/numru/misc1_chnlib.c
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
/*
|
2
|
-
* $Id
|
2
|
+
* $Id$
|
3
3
|
*/
|
4
4
|
|
5
5
|
#include <stdio.h>
|
6
6
|
#include "ruby.h"
|
7
|
-
#include "libtinyf2c.h"
|
8
7
|
#include "narray.h"
|
9
8
|
#include "cdcl.h"
|
10
9
|
|
@@ -15,6 +14,10 @@
|
|
15
14
|
|
16
15
|
#define DFLT_SIZE 32
|
17
16
|
|
17
|
+
#ifndef NARRAY_BIGMEM
|
18
|
+
typedef int na_shape_t;
|
19
|
+
#endif
|
20
|
+
|
18
21
|
extern char *dcl_obj2ccharary(VALUE, int, int);
|
19
22
|
extern integer *dcl_obj2cintegerary(VALUE);
|
20
23
|
extern real *dcl_obj2crealary(VALUE);
|
@@ -22,10 +25,10 @@ extern complex *dcl_obj2ccomplexary(VALUE);
|
|
22
25
|
extern logical *dcl_obj2clogicalary(VALUE);
|
23
26
|
|
24
27
|
extern VALUE dcl_ccharary2obj(char *, int, int);
|
25
|
-
extern VALUE dcl_cintegerary2obj(integer *,
|
26
|
-
extern VALUE dcl_crealary2obj(real *,
|
27
|
-
extern VALUE dcl_ccomplexary2obj(complex *, int, char *);
|
28
|
-
extern VALUE dcl_clogicalary2obj(logical *,
|
28
|
+
extern VALUE dcl_cintegerary2obj(integer *, na_shape_t, int, na_shape_t *);
|
29
|
+
extern VALUE dcl_crealary2obj(real *, na_shape_t, int, na_shape_t *);
|
30
|
+
/* extern VALUE dcl_ccomplexary2obj(complex *, int, char *); */
|
31
|
+
extern VALUE dcl_clogicalary2obj(logical *, na_shape_t, int, na_shape_t *);
|
29
32
|
|
30
33
|
extern void dcl_freeccharary(char *);
|
31
34
|
extern void dcl_freecintegerary(integer *);
|
@@ -86,7 +89,7 @@ dcl_chngc(obj, ch, ca, cb)
|
|
86
89
|
i_cb = StringValuePtr(cb);
|
87
90
|
|
88
91
|
|
89
|
-
|
92
|
+
chngc__(io_ch, i_ca, i_cb, (ftnlen)strlen(io_ch), (ftnlen)strlen(i_ca), (ftnlen)strlen(i_cb));
|
90
93
|
|
91
94
|
ch = rb_str_new2(io_ch);
|
92
95
|
|
@@ -124,7 +127,7 @@ dcl_chngi(obj, ch, ca, ii, cfmt)
|
|
124
127
|
i_cfmt = StringValuePtr(cfmt);
|
125
128
|
|
126
129
|
|
127
|
-
|
130
|
+
chngi__(io_ch, i_ca, &i_ii, i_cfmt, (ftnlen)strlen(io_ch), (ftnlen)strlen(i_ca), (ftnlen)strlen(i_cfmt));
|
128
131
|
|
129
132
|
ch = rb_str_new2(io_ch);
|
130
133
|
|
@@ -162,7 +165,7 @@ dcl_chngr(obj, ch, ca, rr, cfmt)
|
|
162
165
|
i_cfmt = StringValuePtr(cfmt);
|
163
166
|
|
164
167
|
|
165
|
-
|
168
|
+
chngr__(io_ch, i_ca, &i_rr, i_cfmt, (ftnlen)strlen(io_ch), (ftnlen)strlen(i_ca), (ftnlen)strlen(i_cfmt));
|
166
169
|
|
167
170
|
ch = rb_str_new2(io_ch);
|
168
171
|
|
data/ext/numru/misc1_datelib.c
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
/*
|
2
|
-
* $Id
|
2
|
+
* $Id$
|
3
3
|
*/
|
4
4
|
|
5
5
|
#include <stdio.h>
|
6
6
|
#include "ruby.h"
|
7
|
-
#include "libtinyf2c.h"
|
8
7
|
#include "narray.h"
|
9
8
|
#include "cdcl.h"
|
10
9
|
|
@@ -15,6 +14,10 @@
|
|
15
14
|
|
16
15
|
#define DFLT_SIZE 32
|
17
16
|
|
17
|
+
#ifndef NARRAY_BIGMEM
|
18
|
+
typedef int na_shape_t;
|
19
|
+
#endif
|
20
|
+
|
18
21
|
extern char *dcl_obj2ccharary(VALUE, int, int);
|
19
22
|
extern integer *dcl_obj2cintegerary(VALUE);
|
20
23
|
extern real *dcl_obj2crealary(VALUE);
|
@@ -22,10 +25,10 @@ extern complex *dcl_obj2ccomplexary(VALUE);
|
|
22
25
|
extern logical *dcl_obj2clogicalary(VALUE);
|
23
26
|
|
24
27
|
extern VALUE dcl_ccharary2obj(char *, int, int);
|
25
|
-
extern VALUE dcl_cintegerary2obj(integer *,
|
26
|
-
extern VALUE dcl_crealary2obj(real *,
|
27
|
-
extern VALUE dcl_ccomplexary2obj(complex *, int, char *);
|
28
|
-
extern VALUE dcl_clogicalary2obj(logical *,
|
28
|
+
extern VALUE dcl_cintegerary2obj(integer *, na_shape_t, int, na_shape_t *);
|
29
|
+
extern VALUE dcl_crealary2obj(real *, na_shape_t, int, na_shape_t *);
|
30
|
+
/* extern VALUE dcl_ccomplexary2obj(complex *, int, char *); */
|
31
|
+
extern VALUE dcl_clogicalary2obj(logical *, na_shape_t, int, na_shape_t *);
|
29
32
|
|
30
33
|
extern void dcl_freeccharary(char *);
|
31
34
|
extern void dcl_freecintegerary(integer *);
|
@@ -79,7 +82,7 @@ dcl_date12(obj, idate)
|
|
79
82
|
i_idate = NUM2INT(idate);
|
80
83
|
|
81
84
|
|
82
|
-
|
85
|
+
date12__(&i_idate, &o_iy, &o_itd);
|
83
86
|
|
84
87
|
iy = INT2NUM(o_iy);
|
85
88
|
itd = INT2NUM(o_itd);
|
@@ -108,7 +111,7 @@ dcl_date13(obj, idate)
|
|
108
111
|
i_idate = NUM2INT(idate);
|
109
112
|
|
110
113
|
|
111
|
-
|
114
|
+
date13__(&i_idate, &o_iy, &o_im, &o_id);
|
112
115
|
|
113
116
|
iy = INT2NUM(o_iy);
|
114
117
|
im = INT2NUM(o_im);
|
@@ -139,7 +142,7 @@ dcl_date21(obj, iy, itd)
|
|
139
142
|
i_itd = NUM2INT(itd);
|
140
143
|
|
141
144
|
|
142
|
-
|
145
|
+
date21__(&o_idate, &i_iy, &i_itd);
|
143
146
|
|
144
147
|
idate = INT2NUM(o_idate);
|
145
148
|
|
@@ -170,7 +173,7 @@ dcl_date23(obj, iy, itd)
|
|
170
173
|
i_itd = NUM2INT(itd);
|
171
174
|
|
172
175
|
|
173
|
-
|
176
|
+
date23__(&io_iy, &o_im, &o_id, &i_itd);
|
174
177
|
|
175
178
|
iy = INT2NUM(io_iy);
|
176
179
|
im = INT2NUM(o_im);
|
@@ -206,7 +209,7 @@ dcl_date31(obj, iy, im, id)
|
|
206
209
|
i_id = NUM2INT(id);
|
207
210
|
|
208
211
|
|
209
|
-
|
212
|
+
date31__(&o_idate, &i_iy, &i_im, &i_id);
|
210
213
|
|
211
214
|
idate = INT2NUM(o_idate);
|
212
215
|
|
@@ -240,7 +243,7 @@ dcl_date32(obj, iy, im, id)
|
|
240
243
|
i_id = NUM2INT(id);
|
241
244
|
|
242
245
|
|
243
|
-
|
246
|
+
date32__(&io_iy, &i_im, &i_id, &o_itd);
|
244
247
|
|
245
248
|
iy = INT2NUM(io_iy);
|
246
249
|
itd = INT2NUM(o_itd);
|
@@ -270,7 +273,7 @@ dcl_datef1(obj, n, idate)
|
|
270
273
|
i_idate = NUM2INT(idate);
|
271
274
|
|
272
275
|
|
273
|
-
|
276
|
+
datef1__(&i_n, &i_idate, &o_ndate);
|
274
277
|
|
275
278
|
ndate = INT2NUM(o_ndate);
|
276
279
|
|
@@ -306,7 +309,7 @@ dcl_datef2(obj, n, iy, itd)
|
|
306
309
|
i_itd = NUM2INT(itd);
|
307
310
|
|
308
311
|
|
309
|
-
|
312
|
+
datef2__(&i_n, &i_iy, &i_itd, &o_ny, &o_ntd);
|
310
313
|
|
311
314
|
ny = INT2NUM(o_ny);
|
312
315
|
ntd = INT2NUM(o_ntd);
|
@@ -350,7 +353,7 @@ dcl_datef3(obj, n, iy, im, id)
|
|
350
353
|
i_id = NUM2INT(id);
|
351
354
|
|
352
355
|
|
353
|
-
|
356
|
+
datef3__(&i_n, &i_iy, &i_im, &i_id, &o_ny, &o_nm, &o_nd);
|
354
357
|
|
355
358
|
ny = INT2NUM(o_ny);
|
356
359
|
nm = INT2NUM(o_nm);
|
@@ -381,7 +384,7 @@ dcl_dateg1(obj, idate, ndate)
|
|
381
384
|
i_ndate = NUM2INT(ndate);
|
382
385
|
|
383
386
|
|
384
|
-
|
387
|
+
dateg1__(&o_n, &i_idate, &i_ndate);
|
385
388
|
|
386
389
|
n = INT2NUM(o_n);
|
387
390
|
|
@@ -420,7 +423,7 @@ dcl_dateg2(obj, iy, itd, ny, ntd)
|
|
420
423
|
i_ntd = NUM2INT(ntd);
|
421
424
|
|
422
425
|
|
423
|
-
|
426
|
+
dateg2__(&o_n, &i_iy, &i_itd, &i_ny, &i_ntd);
|
424
427
|
|
425
428
|
n = INT2NUM(o_n);
|
426
429
|
|
@@ -469,7 +472,7 @@ dcl_dateg3(obj, iy, im, id, ny, nm, nd)
|
|
469
472
|
i_nd = NUM2INT(nd);
|
470
473
|
|
471
474
|
|
472
|
-
|
475
|
+
dateg3__(&o_n, &i_iy, &i_im, &i_id, &i_ny, &i_nm, &i_nd);
|
473
476
|
|
474
477
|
n = INT2NUM(o_n);
|
475
478
|
|
@@ -498,7 +501,7 @@ dcl_ndate1(obj, idate, ndate)
|
|
498
501
|
i_ndate = NUM2INT(ndate);
|
499
502
|
|
500
503
|
|
501
|
-
o_rtn_val =
|
504
|
+
o_rtn_val = ndate1__(&i_idate, &i_ndate);
|
502
505
|
|
503
506
|
rtn_val = INT2NUM(o_rtn_val);
|
504
507
|
|
@@ -537,7 +540,7 @@ dcl_ndate2(obj, iy, itd, ny, ntd)
|
|
537
540
|
i_ntd = NUM2INT(ntd);
|
538
541
|
|
539
542
|
|
540
|
-
o_rtn_val =
|
543
|
+
o_rtn_val = ndate2__(&i_iy, &i_itd, &i_ny, &i_ntd);
|
541
544
|
|
542
545
|
rtn_val = INT2NUM(o_rtn_val);
|
543
546
|
|
@@ -586,7 +589,7 @@ dcl_ndate3(obj, iy, im, id, ny, nm, nd)
|
|
586
589
|
i_nd = NUM2INT(nd);
|
587
590
|
|
588
591
|
|
589
|
-
o_rtn_val =
|
592
|
+
o_rtn_val = ndate3__(&i_iy, &i_im, &i_id, &i_ny, &i_nm, &i_nd);
|
590
593
|
|
591
594
|
rtn_val = INT2NUM(o_rtn_val);
|
592
595
|
|
@@ -614,7 +617,7 @@ dcl_datec1(obj, cform, idate)
|
|
614
617
|
i_idate = NUM2INT(idate);
|
615
618
|
|
616
619
|
|
617
|
-
|
620
|
+
datec1__(io_cform, &i_idate, (ftnlen)strlen(io_cform));
|
618
621
|
|
619
622
|
cform = rb_str_new2(io_cform);
|
620
623
|
|
@@ -647,7 +650,7 @@ dcl_datec2(obj, cform, iy, itd)
|
|
647
650
|
i_itd = NUM2INT(itd);
|
648
651
|
|
649
652
|
|
650
|
-
|
653
|
+
datec2__(io_cform, &i_iy, &i_itd, (ftnlen)strlen(io_cform));
|
651
654
|
|
652
655
|
cform = rb_str_new2(io_cform);
|
653
656
|
|
@@ -685,7 +688,7 @@ dcl_datec3(obj, cform, iy, im, id)
|
|
685
688
|
i_id = NUM2INT(id);
|
686
689
|
|
687
690
|
|
688
|
-
|
691
|
+
datec3__(io_cform, &i_iy, &i_im, &i_id, (ftnlen)strlen(io_cform));
|
689
692
|
|
690
693
|
cform = rb_str_new2(io_cform);
|
691
694
|
|
@@ -701,7 +704,7 @@ dcl_dateq1(obj)
|
|
701
704
|
integer o_idate;
|
702
705
|
VALUE idate;
|
703
706
|
|
704
|
-
|
707
|
+
dateq1__(&o_idate);
|
705
708
|
|
706
709
|
idate = INT2NUM(o_idate);
|
707
710
|
|
@@ -730,7 +733,7 @@ dcl_ndmon(obj, iy, im)
|
|
730
733
|
i_im = NUM2INT(im);
|
731
734
|
|
732
735
|
|
733
|
-
o_rtn_val =
|
736
|
+
o_rtn_val = ndmon__(&i_iy, &i_im);
|
734
737
|
|
735
738
|
rtn_val = INT2NUM(o_rtn_val);
|
736
739
|
|
@@ -748,7 +751,7 @@ dcl_dateq2(obj)
|
|
748
751
|
VALUE iy;
|
749
752
|
VALUE itd;
|
750
753
|
|
751
|
-
|
754
|
+
dateq2__(&o_iy, &o_itd);
|
752
755
|
|
753
756
|
iy = INT2NUM(o_iy);
|
754
757
|
itd = INT2NUM(o_itd);
|
@@ -775,7 +778,7 @@ dcl_cmon(obj, im)
|
|
775
778
|
o_rtn_val= ALLOCA_N(char, (DFLT_SIZE+1));
|
776
779
|
memset(o_rtn_val, '\0', DFLT_SIZE+1);
|
777
780
|
|
778
|
-
|
781
|
+
cmon__(o_rtn_val, (ftnlen)DFLT_SIZE, &i_im);
|
779
782
|
|
780
783
|
rtn_val = rb_str_new2(o_rtn_val);
|
781
784
|
|
@@ -801,7 +804,7 @@ dcl_cweek(obj, iw)
|
|
801
804
|
o_rtn_val= ALLOCA_N(char, (DFLT_SIZE+1));
|
802
805
|
memset(o_rtn_val, '\0', DFLT_SIZE+1);
|
803
806
|
|
804
|
-
|
807
|
+
cweek__(o_rtn_val, (ftnlen)DFLT_SIZE, &i_iw);
|
805
808
|
|
806
809
|
rtn_val = rb_str_new2(o_rtn_val);
|
807
810
|
|
@@ -825,7 +828,7 @@ dcl_iweek1(obj, idate)
|
|
825
828
|
i_idate = NUM2INT(idate);
|
826
829
|
|
827
830
|
|
828
|
-
o_rtn_val =
|
831
|
+
o_rtn_val = iweek1__(&i_idate);
|
829
832
|
|
830
833
|
rtn_val = INT2NUM(o_rtn_val);
|
831
834
|
|
@@ -854,7 +857,7 @@ dcl_iweek2(obj, iy, itd)
|
|
854
857
|
i_itd = NUM2INT(itd);
|
855
858
|
|
856
859
|
|
857
|
-
o_rtn_val =
|
860
|
+
o_rtn_val = iweek2__(&i_iy, &i_itd);
|
858
861
|
|
859
862
|
rtn_val = INT2NUM(o_rtn_val);
|
860
863
|
|
@@ -888,7 +891,7 @@ dcl_iweek3(obj, iy, im, id)
|
|
888
891
|
i_id = NUM2INT(id);
|
889
892
|
|
890
893
|
|
891
|
-
o_rtn_val =
|
894
|
+
o_rtn_val = iweek3__(&i_iy, &i_im, &i_id);
|
892
895
|
|
893
896
|
rtn_val = INT2NUM(o_rtn_val);
|
894
897
|
|
@@ -912,7 +915,7 @@ dcl_ndyear(obj, iy)
|
|
912
915
|
i_iy = NUM2INT(iy);
|
913
916
|
|
914
917
|
|
915
|
-
o_rtn_val =
|
918
|
+
o_rtn_val = ndyear__(&i_iy);
|
916
919
|
|
917
920
|
rtn_val = INT2NUM(o_rtn_val);
|
918
921
|
|