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/grph2_uzpack.c
ADDED
@@ -0,0 +1,1455 @@
|
|
1
|
+
/*
|
2
|
+
* $Id: p_header,v 1.2 2011-02-23 17:47:10 koshiro Exp $
|
3
|
+
*/
|
4
|
+
|
5
|
+
#include <stdio.h>
|
6
|
+
#include "ruby.h"
|
7
|
+
#include "libtinyf2c.h"
|
8
|
+
#include "narray.h"
|
9
|
+
|
10
|
+
/* for compatibility with ruby 1.6 */
|
11
|
+
#ifndef StringValuePtr
|
12
|
+
#define StringValuePtr(s) STR2CSTR(s)
|
13
|
+
#endif
|
14
|
+
|
15
|
+
#define DFLT_SIZE 32
|
16
|
+
|
17
|
+
extern char *dcl_obj2ccharary(VALUE, int, int);
|
18
|
+
extern integer *dcl_obj2cintegerary(VALUE);
|
19
|
+
extern real *dcl_obj2crealary(VALUE);
|
20
|
+
extern complex *dcl_obj2ccomplexary(VALUE);
|
21
|
+
extern logical *dcl_obj2clogicalary(VALUE);
|
22
|
+
|
23
|
+
extern VALUE dcl_ccharary2obj(char *, int, int);
|
24
|
+
extern VALUE dcl_cintegerary2obj(integer *, int, int, int *);
|
25
|
+
extern VALUE dcl_crealary2obj(real *, int, int, int *);
|
26
|
+
extern VALUE dcl_ccomplexary2obj(complex *, int, char *);
|
27
|
+
extern VALUE dcl_clogicalary2obj(logical *, int, int, int *);
|
28
|
+
|
29
|
+
extern void dcl_freeccharary(char *);
|
30
|
+
extern void dcl_freecintegerary(integer *);
|
31
|
+
extern void dcl_freecrealary(real *);
|
32
|
+
extern void dcl_freeccomplexary(complex *);
|
33
|
+
extern void dcl_freeclogicalary(logical *);
|
34
|
+
|
35
|
+
/* for functions which return real */
|
36
|
+
/* fnclib */
|
37
|
+
extern real rd2r_(real *);
|
38
|
+
extern real rr2d_(real *);
|
39
|
+
extern real rexp_(real *, integer *, integer *);
|
40
|
+
extern real rfpi_(void);
|
41
|
+
extern real rmod_(real *, real *);
|
42
|
+
/* gnmlib */
|
43
|
+
extern real rgnlt_(real *);
|
44
|
+
extern real rgnle_(real *);
|
45
|
+
extern real rgngt_(real *);
|
46
|
+
extern real rgnge_(real *);
|
47
|
+
/* rfalib */
|
48
|
+
extern real rmax_(real *, integer *, integer *);
|
49
|
+
extern real rmin_(real *, integer *, integer *);
|
50
|
+
extern real rsum_(real *, integer *, integer *);
|
51
|
+
extern real rave_(real *, integer *, integer *);
|
52
|
+
extern real rvar_(real *, integer *, integer *);
|
53
|
+
extern real rstd_(real *, integer *, integer *);
|
54
|
+
extern real rrms_(real *, integer *, integer *);
|
55
|
+
extern real ramp_(real *, integer *, integer *);
|
56
|
+
/* rfblib */
|
57
|
+
extern real rprd_(real *, real *, integer *, integer *, integer *);
|
58
|
+
extern real rcov_(real *, real *, integer *, integer *, integer *);
|
59
|
+
extern real rcor_(real *, real *, integer *, integer *, integer *);
|
60
|
+
|
61
|
+
|
62
|
+
extern VALUE mDCL;
|
63
|
+
|
64
|
+
static VALUE
|
65
|
+
dcl_uzpqnp(obj)
|
66
|
+
VALUE obj;
|
67
|
+
{
|
68
|
+
integer o_ncp;
|
69
|
+
VALUE ncp;
|
70
|
+
|
71
|
+
uzpqnp_(&o_ncp);
|
72
|
+
|
73
|
+
ncp = INT2NUM(o_ncp);
|
74
|
+
|
75
|
+
|
76
|
+
return ncp;
|
77
|
+
|
78
|
+
}
|
79
|
+
|
80
|
+
static VALUE
|
81
|
+
dcl_uzpqid(obj, cp)
|
82
|
+
VALUE obj, cp;
|
83
|
+
{
|
84
|
+
char *i_cp;
|
85
|
+
integer o_idx;
|
86
|
+
VALUE idx;
|
87
|
+
|
88
|
+
if (TYPE(cp) != T_STRING) {
|
89
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
90
|
+
}
|
91
|
+
|
92
|
+
i_cp = StringValuePtr(cp);
|
93
|
+
|
94
|
+
|
95
|
+
uzpqid_(i_cp, &o_idx, (ftnlen)strlen(i_cp));
|
96
|
+
|
97
|
+
idx = INT2NUM(o_idx);
|
98
|
+
|
99
|
+
|
100
|
+
return idx;
|
101
|
+
|
102
|
+
}
|
103
|
+
|
104
|
+
static VALUE
|
105
|
+
dcl_uzpqcp(obj, idx)
|
106
|
+
VALUE obj, idx;
|
107
|
+
{
|
108
|
+
integer i_idx;
|
109
|
+
char *o_cp;
|
110
|
+
VALUE cp;
|
111
|
+
|
112
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
113
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
114
|
+
}
|
115
|
+
|
116
|
+
i_idx = NUM2INT(idx);
|
117
|
+
|
118
|
+
o_cp= ALLOCA_N(char, (DFLT_SIZE+1));
|
119
|
+
memset(o_cp, '\0', DFLT_SIZE+1);
|
120
|
+
|
121
|
+
uzpqcp_(&i_idx, o_cp, (ftnlen)DFLT_SIZE);
|
122
|
+
|
123
|
+
cp = rb_str_new2(o_cp);
|
124
|
+
|
125
|
+
|
126
|
+
return cp;
|
127
|
+
|
128
|
+
}
|
129
|
+
|
130
|
+
static VALUE
|
131
|
+
dcl_uzpqcl(obj, idx)
|
132
|
+
VALUE obj, idx;
|
133
|
+
{
|
134
|
+
integer i_idx;
|
135
|
+
char *o_cp;
|
136
|
+
VALUE cp;
|
137
|
+
|
138
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
139
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
140
|
+
}
|
141
|
+
|
142
|
+
i_idx = NUM2INT(idx);
|
143
|
+
|
144
|
+
o_cp= ALLOCA_N(char, (DFLT_SIZE+1));
|
145
|
+
memset(o_cp, '\0', DFLT_SIZE+1);
|
146
|
+
|
147
|
+
uzpqcl_(&i_idx, o_cp, (ftnlen)DFLT_SIZE);
|
148
|
+
|
149
|
+
cp = rb_str_new2(o_cp);
|
150
|
+
|
151
|
+
|
152
|
+
return cp;
|
153
|
+
|
154
|
+
}
|
155
|
+
|
156
|
+
static VALUE
|
157
|
+
dcl_uzpqit(obj, idx)
|
158
|
+
VALUE obj, idx;
|
159
|
+
{
|
160
|
+
integer i_idx;
|
161
|
+
integer o_itp;
|
162
|
+
VALUE itp;
|
163
|
+
|
164
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
165
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
166
|
+
}
|
167
|
+
|
168
|
+
i_idx = NUM2INT(idx);
|
169
|
+
|
170
|
+
|
171
|
+
uzpqit_(&i_idx, &o_itp);
|
172
|
+
|
173
|
+
itp = INT2NUM(o_itp);
|
174
|
+
|
175
|
+
|
176
|
+
return itp;
|
177
|
+
|
178
|
+
}
|
179
|
+
|
180
|
+
static VALUE
|
181
|
+
dcl_uzpqvl(obj, idx)
|
182
|
+
VALUE obj, idx;
|
183
|
+
{
|
184
|
+
integer i_idx;
|
185
|
+
integer o_ipara;
|
186
|
+
VALUE ipara;
|
187
|
+
|
188
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
189
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
190
|
+
}
|
191
|
+
|
192
|
+
i_idx = NUM2INT(idx);
|
193
|
+
|
194
|
+
|
195
|
+
uzpqvl_(&i_idx, &o_ipara);
|
196
|
+
|
197
|
+
ipara = INT2NUM(o_ipara);
|
198
|
+
|
199
|
+
|
200
|
+
return ipara;
|
201
|
+
|
202
|
+
}
|
203
|
+
|
204
|
+
static VALUE
|
205
|
+
dcl_uzpsvl(obj, idx, ipara)
|
206
|
+
VALUE obj, idx, ipara;
|
207
|
+
{
|
208
|
+
integer i_idx;
|
209
|
+
integer i_ipara;
|
210
|
+
|
211
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
212
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
213
|
+
}
|
214
|
+
if ((TYPE(ipara) != T_BIGNUM) || (TYPE(ipara) != T_FIXNUM)) {
|
215
|
+
ipara = rb_funcall(ipara, rb_intern("to_i"), 0);
|
216
|
+
}
|
217
|
+
|
218
|
+
i_idx = NUM2INT(idx);
|
219
|
+
i_ipara = NUM2INT(ipara);
|
220
|
+
|
221
|
+
|
222
|
+
uzpsvl_(&i_idx, &i_ipara);
|
223
|
+
|
224
|
+
return Qnil;
|
225
|
+
|
226
|
+
}
|
227
|
+
|
228
|
+
static VALUE
|
229
|
+
dcl_uzpqin(obj, cp)
|
230
|
+
VALUE obj, cp;
|
231
|
+
{
|
232
|
+
char *i_cp;
|
233
|
+
integer o_in;
|
234
|
+
VALUE in;
|
235
|
+
|
236
|
+
if (TYPE(cp) != T_STRING) {
|
237
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
238
|
+
}
|
239
|
+
|
240
|
+
i_cp = StringValuePtr(cp);
|
241
|
+
|
242
|
+
|
243
|
+
uzpqin_(i_cp, &o_in, (ftnlen)strlen(i_cp));
|
244
|
+
|
245
|
+
in = INT2NUM(o_in);
|
246
|
+
|
247
|
+
|
248
|
+
return in;
|
249
|
+
|
250
|
+
}
|
251
|
+
|
252
|
+
static VALUE
|
253
|
+
dcl_uzinit(obj)
|
254
|
+
VALUE obj;
|
255
|
+
{
|
256
|
+
uzinit_();
|
257
|
+
|
258
|
+
return Qnil;
|
259
|
+
|
260
|
+
}
|
261
|
+
|
262
|
+
static VALUE
|
263
|
+
dcl_uzfact(obj, rfact)
|
264
|
+
VALUE obj, rfact;
|
265
|
+
{
|
266
|
+
real i_rfact;
|
267
|
+
|
268
|
+
if (TYPE(rfact) != T_FLOAT) {
|
269
|
+
rfact = rb_funcall(rfact, rb_intern("to_f"), 0);
|
270
|
+
}
|
271
|
+
|
272
|
+
i_rfact = (real)NUM2DBL(rfact);
|
273
|
+
|
274
|
+
|
275
|
+
uzfact_(&i_rfact);
|
276
|
+
|
277
|
+
return Qnil;
|
278
|
+
|
279
|
+
}
|
280
|
+
|
281
|
+
static VALUE
|
282
|
+
dcl_uzcget(obj, cp)
|
283
|
+
VALUE obj, cp;
|
284
|
+
{
|
285
|
+
char *i_cp;
|
286
|
+
char *o_cpara;
|
287
|
+
VALUE cpara;
|
288
|
+
|
289
|
+
if (TYPE(cp) != T_STRING) {
|
290
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
291
|
+
}
|
292
|
+
|
293
|
+
i_cp = StringValuePtr(cp);
|
294
|
+
|
295
|
+
o_cpara= ALLOCA_N(char, (DFLT_SIZE+1));
|
296
|
+
memset(o_cpara, '\0', DFLT_SIZE+1);
|
297
|
+
|
298
|
+
uzcget_(i_cp, o_cpara, (ftnlen)strlen(i_cp), (ftnlen)DFLT_SIZE);
|
299
|
+
|
300
|
+
cpara = rb_str_new2(o_cpara);
|
301
|
+
|
302
|
+
|
303
|
+
return cpara;
|
304
|
+
|
305
|
+
}
|
306
|
+
|
307
|
+
static VALUE
|
308
|
+
dcl_uzcset(obj, cp, cpara)
|
309
|
+
VALUE obj, cp, cpara;
|
310
|
+
{
|
311
|
+
char *i_cp;
|
312
|
+
char *i_cpara;
|
313
|
+
|
314
|
+
if (TYPE(cp) != T_STRING) {
|
315
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
316
|
+
}
|
317
|
+
if (TYPE(cpara) != T_STRING) {
|
318
|
+
cpara = rb_funcall(cpara, rb_intern("to_str"), 0);
|
319
|
+
}
|
320
|
+
|
321
|
+
i_cp = StringValuePtr(cp);
|
322
|
+
i_cpara = StringValuePtr(cpara);
|
323
|
+
|
324
|
+
|
325
|
+
uzcset_(i_cp, i_cpara, (ftnlen)strlen(i_cp), (ftnlen)strlen(i_cpara));
|
326
|
+
|
327
|
+
return Qnil;
|
328
|
+
|
329
|
+
}
|
330
|
+
|
331
|
+
static VALUE
|
332
|
+
dcl_uzcstx(obj, cp, cpara)
|
333
|
+
VALUE obj, cp, cpara;
|
334
|
+
{
|
335
|
+
char *i_cp;
|
336
|
+
char *i_cpara;
|
337
|
+
|
338
|
+
if (TYPE(cp) != T_STRING) {
|
339
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
340
|
+
}
|
341
|
+
if (TYPE(cpara) != T_STRING) {
|
342
|
+
cpara = rb_funcall(cpara, rb_intern("to_str"), 0);
|
343
|
+
}
|
344
|
+
|
345
|
+
i_cp = StringValuePtr(cp);
|
346
|
+
i_cpara = StringValuePtr(cpara);
|
347
|
+
|
348
|
+
|
349
|
+
uzcstx_(i_cp, i_cpara, (ftnlen)strlen(i_cp), (ftnlen)strlen(i_cpara));
|
350
|
+
|
351
|
+
return Qnil;
|
352
|
+
|
353
|
+
}
|
354
|
+
|
355
|
+
static VALUE
|
356
|
+
dcl_uzcqnp(obj)
|
357
|
+
VALUE obj;
|
358
|
+
{
|
359
|
+
integer o_ncp;
|
360
|
+
VALUE ncp;
|
361
|
+
|
362
|
+
uzcqnp_(&o_ncp);
|
363
|
+
|
364
|
+
ncp = INT2NUM(o_ncp);
|
365
|
+
|
366
|
+
|
367
|
+
return ncp;
|
368
|
+
|
369
|
+
}
|
370
|
+
|
371
|
+
static VALUE
|
372
|
+
dcl_uzcqid(obj, cp)
|
373
|
+
VALUE obj, cp;
|
374
|
+
{
|
375
|
+
char *i_cp;
|
376
|
+
integer o_idx;
|
377
|
+
VALUE idx;
|
378
|
+
|
379
|
+
if (TYPE(cp) != T_STRING) {
|
380
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
381
|
+
}
|
382
|
+
|
383
|
+
i_cp = StringValuePtr(cp);
|
384
|
+
|
385
|
+
|
386
|
+
uzcqid_(i_cp, &o_idx, (ftnlen)strlen(i_cp));
|
387
|
+
|
388
|
+
idx = INT2NUM(o_idx);
|
389
|
+
|
390
|
+
|
391
|
+
return idx;
|
392
|
+
|
393
|
+
}
|
394
|
+
|
395
|
+
static VALUE
|
396
|
+
dcl_uzcqcp(obj, idx)
|
397
|
+
VALUE obj, idx;
|
398
|
+
{
|
399
|
+
integer i_idx;
|
400
|
+
char *o_cp;
|
401
|
+
VALUE cp;
|
402
|
+
|
403
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
404
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
405
|
+
}
|
406
|
+
|
407
|
+
i_idx = NUM2INT(idx);
|
408
|
+
|
409
|
+
o_cp= ALLOCA_N(char, (DFLT_SIZE+1));
|
410
|
+
memset(o_cp, '\0', DFLT_SIZE+1);
|
411
|
+
|
412
|
+
uzcqcp_(&i_idx, o_cp, (ftnlen)DFLT_SIZE);
|
413
|
+
|
414
|
+
cp = rb_str_new2(o_cp);
|
415
|
+
|
416
|
+
|
417
|
+
return cp;
|
418
|
+
|
419
|
+
}
|
420
|
+
|
421
|
+
static VALUE
|
422
|
+
dcl_uzcqcl(obj, idx)
|
423
|
+
VALUE obj, idx;
|
424
|
+
{
|
425
|
+
integer i_idx;
|
426
|
+
char *o_cp;
|
427
|
+
VALUE cp;
|
428
|
+
|
429
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
430
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
431
|
+
}
|
432
|
+
|
433
|
+
i_idx = NUM2INT(idx);
|
434
|
+
|
435
|
+
o_cp= ALLOCA_N(char, (DFLT_SIZE+1));
|
436
|
+
memset(o_cp, '\0', DFLT_SIZE+1);
|
437
|
+
|
438
|
+
uzcqcl_(&i_idx, o_cp, (ftnlen)DFLT_SIZE);
|
439
|
+
|
440
|
+
cp = rb_str_new2(o_cp);
|
441
|
+
|
442
|
+
|
443
|
+
return cp;
|
444
|
+
|
445
|
+
}
|
446
|
+
|
447
|
+
static VALUE
|
448
|
+
dcl_uzcqvl(obj, idx)
|
449
|
+
VALUE obj, idx;
|
450
|
+
{
|
451
|
+
integer i_idx;
|
452
|
+
char *o_cval;
|
453
|
+
VALUE cval;
|
454
|
+
|
455
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
456
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
457
|
+
}
|
458
|
+
|
459
|
+
i_idx = NUM2INT(idx);
|
460
|
+
|
461
|
+
o_cval= ALLOCA_N(char, (DFLT_SIZE+1));
|
462
|
+
memset(o_cval, '\0', DFLT_SIZE+1);
|
463
|
+
|
464
|
+
uzcqvl_(&i_idx, o_cval, (ftnlen)DFLT_SIZE);
|
465
|
+
|
466
|
+
cval = rb_str_new2(o_cval);
|
467
|
+
|
468
|
+
|
469
|
+
return cval;
|
470
|
+
|
471
|
+
}
|
472
|
+
|
473
|
+
static VALUE
|
474
|
+
dcl_uzcsvl(obj, idx, cval)
|
475
|
+
VALUE obj, idx, cval;
|
476
|
+
{
|
477
|
+
integer i_idx;
|
478
|
+
char *i_cval;
|
479
|
+
|
480
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
481
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
482
|
+
}
|
483
|
+
if (TYPE(cval) != T_STRING) {
|
484
|
+
cval = rb_funcall(cval, rb_intern("to_str"), 0);
|
485
|
+
}
|
486
|
+
|
487
|
+
i_idx = NUM2INT(idx);
|
488
|
+
i_cval = StringValuePtr(cval);
|
489
|
+
|
490
|
+
|
491
|
+
uzcsvl_(&i_idx, i_cval, (ftnlen)strlen(i_cval));
|
492
|
+
|
493
|
+
return Qnil;
|
494
|
+
|
495
|
+
}
|
496
|
+
|
497
|
+
static VALUE
|
498
|
+
dcl_uzcqin(obj, cp)
|
499
|
+
VALUE obj, cp;
|
500
|
+
{
|
501
|
+
char *i_cp;
|
502
|
+
integer o_in;
|
503
|
+
VALUE in;
|
504
|
+
|
505
|
+
if (TYPE(cp) != T_STRING) {
|
506
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
507
|
+
}
|
508
|
+
|
509
|
+
i_cp = StringValuePtr(cp);
|
510
|
+
|
511
|
+
|
512
|
+
uzcqin_(i_cp, &o_in, (ftnlen)strlen(i_cp));
|
513
|
+
|
514
|
+
in = INT2NUM(o_in);
|
515
|
+
|
516
|
+
|
517
|
+
return in;
|
518
|
+
|
519
|
+
}
|
520
|
+
|
521
|
+
static VALUE
|
522
|
+
dcl_uzcsav(obj, iu)
|
523
|
+
VALUE obj, iu;
|
524
|
+
{
|
525
|
+
integer i_iu;
|
526
|
+
|
527
|
+
if ((TYPE(iu) != T_BIGNUM) || (TYPE(iu) != T_FIXNUM)) {
|
528
|
+
iu = rb_funcall(iu, rb_intern("to_i"), 0);
|
529
|
+
}
|
530
|
+
|
531
|
+
i_iu = NUM2INT(iu);
|
532
|
+
|
533
|
+
|
534
|
+
uzcsav_(&i_iu);
|
535
|
+
|
536
|
+
return Qnil;
|
537
|
+
|
538
|
+
}
|
539
|
+
|
540
|
+
static VALUE
|
541
|
+
dcl_uzcrst(obj, iu)
|
542
|
+
VALUE obj, iu;
|
543
|
+
{
|
544
|
+
integer i_iu;
|
545
|
+
|
546
|
+
if ((TYPE(iu) != T_BIGNUM) || (TYPE(iu) != T_FIXNUM)) {
|
547
|
+
iu = rb_funcall(iu, rb_intern("to_i"), 0);
|
548
|
+
}
|
549
|
+
|
550
|
+
i_iu = NUM2INT(iu);
|
551
|
+
|
552
|
+
|
553
|
+
uzcrst_(&i_iu);
|
554
|
+
|
555
|
+
return Qnil;
|
556
|
+
|
557
|
+
}
|
558
|
+
|
559
|
+
static VALUE
|
560
|
+
dcl_uziget(obj, cp)
|
561
|
+
VALUE obj, cp;
|
562
|
+
{
|
563
|
+
char *i_cp;
|
564
|
+
integer o_ipara;
|
565
|
+
VALUE ipara;
|
566
|
+
|
567
|
+
if (TYPE(cp) != T_STRING) {
|
568
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
569
|
+
}
|
570
|
+
|
571
|
+
i_cp = StringValuePtr(cp);
|
572
|
+
|
573
|
+
|
574
|
+
uziget_(i_cp, &o_ipara, (ftnlen)strlen(i_cp));
|
575
|
+
|
576
|
+
ipara = INT2NUM(o_ipara);
|
577
|
+
|
578
|
+
|
579
|
+
return ipara;
|
580
|
+
|
581
|
+
}
|
582
|
+
|
583
|
+
static VALUE
|
584
|
+
dcl_uziset(obj, cp, ipara)
|
585
|
+
VALUE obj, cp, ipara;
|
586
|
+
{
|
587
|
+
char *i_cp;
|
588
|
+
integer i_ipara;
|
589
|
+
|
590
|
+
if (TYPE(cp) != T_STRING) {
|
591
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
592
|
+
}
|
593
|
+
if ((TYPE(ipara) != T_BIGNUM) || (TYPE(ipara) != T_FIXNUM)) {
|
594
|
+
ipara = rb_funcall(ipara, rb_intern("to_i"), 0);
|
595
|
+
}
|
596
|
+
|
597
|
+
i_cp = StringValuePtr(cp);
|
598
|
+
i_ipara = NUM2INT(ipara);
|
599
|
+
|
600
|
+
|
601
|
+
uziset_(i_cp, &i_ipara, (ftnlen)strlen(i_cp));
|
602
|
+
|
603
|
+
return Qnil;
|
604
|
+
|
605
|
+
}
|
606
|
+
|
607
|
+
static VALUE
|
608
|
+
dcl_uzistx(obj, cp, ipara)
|
609
|
+
VALUE obj, cp, ipara;
|
610
|
+
{
|
611
|
+
char *i_cp;
|
612
|
+
integer i_ipara;
|
613
|
+
|
614
|
+
if (TYPE(cp) != T_STRING) {
|
615
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
616
|
+
}
|
617
|
+
if ((TYPE(ipara) != T_BIGNUM) || (TYPE(ipara) != T_FIXNUM)) {
|
618
|
+
ipara = rb_funcall(ipara, rb_intern("to_i"), 0);
|
619
|
+
}
|
620
|
+
|
621
|
+
i_cp = StringValuePtr(cp);
|
622
|
+
i_ipara = NUM2INT(ipara);
|
623
|
+
|
624
|
+
|
625
|
+
uzistx_(i_cp, &i_ipara, (ftnlen)strlen(i_cp));
|
626
|
+
|
627
|
+
return Qnil;
|
628
|
+
|
629
|
+
}
|
630
|
+
|
631
|
+
static VALUE
|
632
|
+
dcl_uziqnp(obj)
|
633
|
+
VALUE obj;
|
634
|
+
{
|
635
|
+
integer o_ncp;
|
636
|
+
VALUE ncp;
|
637
|
+
|
638
|
+
uziqnp_(&o_ncp);
|
639
|
+
|
640
|
+
ncp = INT2NUM(o_ncp);
|
641
|
+
|
642
|
+
|
643
|
+
return ncp;
|
644
|
+
|
645
|
+
}
|
646
|
+
|
647
|
+
static VALUE
|
648
|
+
dcl_uziqid(obj, cp)
|
649
|
+
VALUE obj, cp;
|
650
|
+
{
|
651
|
+
char *i_cp;
|
652
|
+
integer o_idx;
|
653
|
+
VALUE idx;
|
654
|
+
|
655
|
+
if (TYPE(cp) != T_STRING) {
|
656
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
657
|
+
}
|
658
|
+
|
659
|
+
i_cp = StringValuePtr(cp);
|
660
|
+
|
661
|
+
|
662
|
+
uziqid_(i_cp, &o_idx, (ftnlen)strlen(i_cp));
|
663
|
+
|
664
|
+
idx = INT2NUM(o_idx);
|
665
|
+
|
666
|
+
|
667
|
+
return idx;
|
668
|
+
|
669
|
+
}
|
670
|
+
|
671
|
+
static VALUE
|
672
|
+
dcl_uziqcp(obj, idx)
|
673
|
+
VALUE obj, idx;
|
674
|
+
{
|
675
|
+
integer i_idx;
|
676
|
+
char *o_cp;
|
677
|
+
VALUE cp;
|
678
|
+
|
679
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
680
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
681
|
+
}
|
682
|
+
|
683
|
+
i_idx = NUM2INT(idx);
|
684
|
+
|
685
|
+
o_cp= ALLOCA_N(char, (DFLT_SIZE+1));
|
686
|
+
memset(o_cp, '\0', DFLT_SIZE+1);
|
687
|
+
|
688
|
+
uziqcp_(&i_idx, o_cp, (ftnlen)DFLT_SIZE);
|
689
|
+
|
690
|
+
cp = rb_str_new2(o_cp);
|
691
|
+
|
692
|
+
|
693
|
+
return cp;
|
694
|
+
|
695
|
+
}
|
696
|
+
|
697
|
+
static VALUE
|
698
|
+
dcl_uziqcl(obj, idx)
|
699
|
+
VALUE obj, idx;
|
700
|
+
{
|
701
|
+
integer i_idx;
|
702
|
+
char *o_cp;
|
703
|
+
VALUE cp;
|
704
|
+
|
705
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
706
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
707
|
+
}
|
708
|
+
|
709
|
+
i_idx = NUM2INT(idx);
|
710
|
+
|
711
|
+
o_cp= ALLOCA_N(char, (DFLT_SIZE+1));
|
712
|
+
memset(o_cp, '\0', DFLT_SIZE+1);
|
713
|
+
|
714
|
+
uziqcl_(&i_idx, o_cp, (ftnlen)DFLT_SIZE);
|
715
|
+
|
716
|
+
cp = rb_str_new2(o_cp);
|
717
|
+
|
718
|
+
|
719
|
+
return cp;
|
720
|
+
|
721
|
+
}
|
722
|
+
|
723
|
+
static VALUE
|
724
|
+
dcl_uziqvl(obj, idx)
|
725
|
+
VALUE obj, idx;
|
726
|
+
{
|
727
|
+
integer i_idx;
|
728
|
+
integer o_ipara;
|
729
|
+
VALUE ipara;
|
730
|
+
|
731
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
732
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
733
|
+
}
|
734
|
+
|
735
|
+
i_idx = NUM2INT(idx);
|
736
|
+
|
737
|
+
|
738
|
+
uziqvl_(&i_idx, &o_ipara);
|
739
|
+
|
740
|
+
ipara = INT2NUM(o_ipara);
|
741
|
+
|
742
|
+
|
743
|
+
return ipara;
|
744
|
+
|
745
|
+
}
|
746
|
+
|
747
|
+
static VALUE
|
748
|
+
dcl_uzisvl(obj, idx, ipara)
|
749
|
+
VALUE obj, idx, ipara;
|
750
|
+
{
|
751
|
+
integer i_idx;
|
752
|
+
integer i_ipara;
|
753
|
+
|
754
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
755
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
756
|
+
}
|
757
|
+
if ((TYPE(ipara) != T_BIGNUM) || (TYPE(ipara) != T_FIXNUM)) {
|
758
|
+
ipara = rb_funcall(ipara, rb_intern("to_i"), 0);
|
759
|
+
}
|
760
|
+
|
761
|
+
i_idx = NUM2INT(idx);
|
762
|
+
i_ipara = NUM2INT(ipara);
|
763
|
+
|
764
|
+
|
765
|
+
uzisvl_(&i_idx, &i_ipara);
|
766
|
+
|
767
|
+
return Qnil;
|
768
|
+
|
769
|
+
}
|
770
|
+
|
771
|
+
static VALUE
|
772
|
+
dcl_uziqin(obj, cp)
|
773
|
+
VALUE obj, cp;
|
774
|
+
{
|
775
|
+
char *i_cp;
|
776
|
+
integer o_in;
|
777
|
+
VALUE in;
|
778
|
+
|
779
|
+
if (TYPE(cp) != T_STRING) {
|
780
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
781
|
+
}
|
782
|
+
|
783
|
+
i_cp = StringValuePtr(cp);
|
784
|
+
|
785
|
+
|
786
|
+
uziqin_(i_cp, &o_in, (ftnlen)strlen(i_cp));
|
787
|
+
|
788
|
+
in = INT2NUM(o_in);
|
789
|
+
|
790
|
+
|
791
|
+
return in;
|
792
|
+
|
793
|
+
}
|
794
|
+
|
795
|
+
static VALUE
|
796
|
+
dcl_uzisav(obj, iu)
|
797
|
+
VALUE obj, iu;
|
798
|
+
{
|
799
|
+
integer i_iu;
|
800
|
+
|
801
|
+
if ((TYPE(iu) != T_BIGNUM) || (TYPE(iu) != T_FIXNUM)) {
|
802
|
+
iu = rb_funcall(iu, rb_intern("to_i"), 0);
|
803
|
+
}
|
804
|
+
|
805
|
+
i_iu = NUM2INT(iu);
|
806
|
+
|
807
|
+
|
808
|
+
uzisav_(&i_iu);
|
809
|
+
|
810
|
+
return Qnil;
|
811
|
+
|
812
|
+
}
|
813
|
+
|
814
|
+
static VALUE
|
815
|
+
dcl_uzirst(obj, iu)
|
816
|
+
VALUE obj, iu;
|
817
|
+
{
|
818
|
+
integer i_iu;
|
819
|
+
|
820
|
+
if ((TYPE(iu) != T_BIGNUM) || (TYPE(iu) != T_FIXNUM)) {
|
821
|
+
iu = rb_funcall(iu, rb_intern("to_i"), 0);
|
822
|
+
}
|
823
|
+
|
824
|
+
i_iu = NUM2INT(iu);
|
825
|
+
|
826
|
+
|
827
|
+
uzirst_(&i_iu);
|
828
|
+
|
829
|
+
return Qnil;
|
830
|
+
|
831
|
+
}
|
832
|
+
|
833
|
+
static VALUE
|
834
|
+
dcl_uzlget(obj, cp)
|
835
|
+
VALUE obj, cp;
|
836
|
+
{
|
837
|
+
char *i_cp;
|
838
|
+
logical o_lpara;
|
839
|
+
VALUE lpara;
|
840
|
+
|
841
|
+
if (TYPE(cp) != T_STRING) {
|
842
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
843
|
+
}
|
844
|
+
|
845
|
+
i_cp = StringValuePtr(cp);
|
846
|
+
|
847
|
+
|
848
|
+
uzlget_(i_cp, &o_lpara, (ftnlen)strlen(i_cp));
|
849
|
+
|
850
|
+
lpara = (o_lpara == FALSE_) ? Qfalse : Qtrue;
|
851
|
+
|
852
|
+
|
853
|
+
return lpara;
|
854
|
+
|
855
|
+
}
|
856
|
+
|
857
|
+
static VALUE
|
858
|
+
dcl_uzlset(obj, cp, lpara)
|
859
|
+
VALUE obj, cp, lpara;
|
860
|
+
{
|
861
|
+
char *i_cp;
|
862
|
+
logical i_lpara;
|
863
|
+
|
864
|
+
if (TYPE(cp) != T_STRING) {
|
865
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
866
|
+
}
|
867
|
+
|
868
|
+
i_cp = StringValuePtr(cp);
|
869
|
+
i_lpara = ((lpara == Qnil)||(lpara == Qfalse)) ? FALSE_ : TRUE_;
|
870
|
+
|
871
|
+
|
872
|
+
uzlset_(i_cp, &i_lpara, (ftnlen)strlen(i_cp));
|
873
|
+
|
874
|
+
return Qnil;
|
875
|
+
|
876
|
+
}
|
877
|
+
|
878
|
+
static VALUE
|
879
|
+
dcl_uzlstx(obj, cp, lpara)
|
880
|
+
VALUE obj, cp, lpara;
|
881
|
+
{
|
882
|
+
char *i_cp;
|
883
|
+
logical i_lpara;
|
884
|
+
|
885
|
+
if (TYPE(cp) != T_STRING) {
|
886
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
887
|
+
}
|
888
|
+
|
889
|
+
i_cp = StringValuePtr(cp);
|
890
|
+
i_lpara = ((lpara == Qnil)||(lpara == Qfalse)) ? FALSE_ : TRUE_;
|
891
|
+
|
892
|
+
|
893
|
+
uzlstx_(i_cp, &i_lpara, (ftnlen)strlen(i_cp));
|
894
|
+
|
895
|
+
return Qnil;
|
896
|
+
|
897
|
+
}
|
898
|
+
|
899
|
+
static VALUE
|
900
|
+
dcl_uzlqnp(obj)
|
901
|
+
VALUE obj;
|
902
|
+
{
|
903
|
+
integer o_ncp;
|
904
|
+
VALUE ncp;
|
905
|
+
|
906
|
+
uzlqnp_(&o_ncp);
|
907
|
+
|
908
|
+
ncp = INT2NUM(o_ncp);
|
909
|
+
|
910
|
+
|
911
|
+
return ncp;
|
912
|
+
|
913
|
+
}
|
914
|
+
|
915
|
+
static VALUE
|
916
|
+
dcl_uzlqid(obj, cp)
|
917
|
+
VALUE obj, cp;
|
918
|
+
{
|
919
|
+
char *i_cp;
|
920
|
+
integer o_idx;
|
921
|
+
VALUE idx;
|
922
|
+
|
923
|
+
if (TYPE(cp) != T_STRING) {
|
924
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
925
|
+
}
|
926
|
+
|
927
|
+
i_cp = StringValuePtr(cp);
|
928
|
+
|
929
|
+
|
930
|
+
uzlqid_(i_cp, &o_idx, (ftnlen)strlen(i_cp));
|
931
|
+
|
932
|
+
idx = INT2NUM(o_idx);
|
933
|
+
|
934
|
+
|
935
|
+
return idx;
|
936
|
+
|
937
|
+
}
|
938
|
+
|
939
|
+
static VALUE
|
940
|
+
dcl_uzlqcp(obj, idx)
|
941
|
+
VALUE obj, idx;
|
942
|
+
{
|
943
|
+
integer i_idx;
|
944
|
+
char *o_cp;
|
945
|
+
VALUE cp;
|
946
|
+
|
947
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
948
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
949
|
+
}
|
950
|
+
|
951
|
+
i_idx = NUM2INT(idx);
|
952
|
+
|
953
|
+
o_cp= ALLOCA_N(char, (DFLT_SIZE+1));
|
954
|
+
memset(o_cp, '\0', DFLT_SIZE+1);
|
955
|
+
|
956
|
+
uzlqcp_(&i_idx, o_cp, (ftnlen)DFLT_SIZE);
|
957
|
+
|
958
|
+
cp = rb_str_new2(o_cp);
|
959
|
+
|
960
|
+
|
961
|
+
return cp;
|
962
|
+
|
963
|
+
}
|
964
|
+
|
965
|
+
static VALUE
|
966
|
+
dcl_uzlqcl(obj, idx)
|
967
|
+
VALUE obj, idx;
|
968
|
+
{
|
969
|
+
integer i_idx;
|
970
|
+
char *o_cp;
|
971
|
+
VALUE cp;
|
972
|
+
|
973
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
974
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
975
|
+
}
|
976
|
+
|
977
|
+
i_idx = NUM2INT(idx);
|
978
|
+
|
979
|
+
o_cp= ALLOCA_N(char, (DFLT_SIZE+1));
|
980
|
+
memset(o_cp, '\0', DFLT_SIZE+1);
|
981
|
+
|
982
|
+
uzlqcl_(&i_idx, o_cp, (ftnlen)DFLT_SIZE);
|
983
|
+
|
984
|
+
cp = rb_str_new2(o_cp);
|
985
|
+
|
986
|
+
|
987
|
+
return cp;
|
988
|
+
|
989
|
+
}
|
990
|
+
|
991
|
+
static VALUE
|
992
|
+
dcl_uzlqvl(obj, idx)
|
993
|
+
VALUE obj, idx;
|
994
|
+
{
|
995
|
+
integer i_idx;
|
996
|
+
logical o_lpara;
|
997
|
+
VALUE lpara;
|
998
|
+
|
999
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
1000
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
1001
|
+
}
|
1002
|
+
|
1003
|
+
i_idx = NUM2INT(idx);
|
1004
|
+
|
1005
|
+
|
1006
|
+
uzlqvl_(&i_idx, &o_lpara);
|
1007
|
+
|
1008
|
+
lpara = (o_lpara == FALSE_) ? Qfalse : Qtrue;
|
1009
|
+
|
1010
|
+
|
1011
|
+
return lpara;
|
1012
|
+
|
1013
|
+
}
|
1014
|
+
|
1015
|
+
static VALUE
|
1016
|
+
dcl_uzlsvl(obj, idx, lpara)
|
1017
|
+
VALUE obj, idx, lpara;
|
1018
|
+
{
|
1019
|
+
integer i_idx;
|
1020
|
+
logical i_lpara;
|
1021
|
+
|
1022
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
1023
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
1024
|
+
}
|
1025
|
+
|
1026
|
+
i_idx = NUM2INT(idx);
|
1027
|
+
i_lpara = ((lpara == Qnil)||(lpara == Qfalse)) ? FALSE_ : TRUE_;
|
1028
|
+
|
1029
|
+
|
1030
|
+
uzlsvl_(&i_idx, &i_lpara);
|
1031
|
+
|
1032
|
+
return Qnil;
|
1033
|
+
|
1034
|
+
}
|
1035
|
+
|
1036
|
+
static VALUE
|
1037
|
+
dcl_uzlqin(obj, cp)
|
1038
|
+
VALUE obj, cp;
|
1039
|
+
{
|
1040
|
+
char *i_cp;
|
1041
|
+
integer o_in;
|
1042
|
+
VALUE in;
|
1043
|
+
|
1044
|
+
if (TYPE(cp) != T_STRING) {
|
1045
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
1046
|
+
}
|
1047
|
+
|
1048
|
+
i_cp = StringValuePtr(cp);
|
1049
|
+
|
1050
|
+
|
1051
|
+
uzlqin_(i_cp, &o_in, (ftnlen)strlen(i_cp));
|
1052
|
+
|
1053
|
+
in = INT2NUM(o_in);
|
1054
|
+
|
1055
|
+
|
1056
|
+
return in;
|
1057
|
+
|
1058
|
+
}
|
1059
|
+
|
1060
|
+
static VALUE
|
1061
|
+
dcl_uzlsav(obj, iu)
|
1062
|
+
VALUE obj, iu;
|
1063
|
+
{
|
1064
|
+
integer i_iu;
|
1065
|
+
|
1066
|
+
if ((TYPE(iu) != T_BIGNUM) || (TYPE(iu) != T_FIXNUM)) {
|
1067
|
+
iu = rb_funcall(iu, rb_intern("to_i"), 0);
|
1068
|
+
}
|
1069
|
+
|
1070
|
+
i_iu = NUM2INT(iu);
|
1071
|
+
|
1072
|
+
|
1073
|
+
uzlsav_(&i_iu);
|
1074
|
+
|
1075
|
+
return Qnil;
|
1076
|
+
|
1077
|
+
}
|
1078
|
+
|
1079
|
+
static VALUE
|
1080
|
+
dcl_uzlrst(obj, iu)
|
1081
|
+
VALUE obj, iu;
|
1082
|
+
{
|
1083
|
+
integer i_iu;
|
1084
|
+
|
1085
|
+
if ((TYPE(iu) != T_BIGNUM) || (TYPE(iu) != T_FIXNUM)) {
|
1086
|
+
iu = rb_funcall(iu, rb_intern("to_i"), 0);
|
1087
|
+
}
|
1088
|
+
|
1089
|
+
i_iu = NUM2INT(iu);
|
1090
|
+
|
1091
|
+
|
1092
|
+
uzlrst_(&i_iu);
|
1093
|
+
|
1094
|
+
return Qnil;
|
1095
|
+
|
1096
|
+
}
|
1097
|
+
|
1098
|
+
static VALUE
|
1099
|
+
dcl_uzrget(obj, cp)
|
1100
|
+
VALUE obj, cp;
|
1101
|
+
{
|
1102
|
+
char *i_cp;
|
1103
|
+
real o_rpara;
|
1104
|
+
VALUE rpara;
|
1105
|
+
|
1106
|
+
if (TYPE(cp) != T_STRING) {
|
1107
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
1108
|
+
}
|
1109
|
+
|
1110
|
+
i_cp = StringValuePtr(cp);
|
1111
|
+
|
1112
|
+
|
1113
|
+
uzrget_(i_cp, &o_rpara, (ftnlen)strlen(i_cp));
|
1114
|
+
|
1115
|
+
rpara = rb_float_new((double)o_rpara);
|
1116
|
+
|
1117
|
+
|
1118
|
+
return rpara;
|
1119
|
+
|
1120
|
+
}
|
1121
|
+
|
1122
|
+
static VALUE
|
1123
|
+
dcl_uzrset(obj, cp, rpara)
|
1124
|
+
VALUE obj, cp, rpara;
|
1125
|
+
{
|
1126
|
+
char *i_cp;
|
1127
|
+
real i_rpara;
|
1128
|
+
|
1129
|
+
if (TYPE(cp) != T_STRING) {
|
1130
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
1131
|
+
}
|
1132
|
+
if (TYPE(rpara) != T_FLOAT) {
|
1133
|
+
rpara = rb_funcall(rpara, rb_intern("to_f"), 0);
|
1134
|
+
}
|
1135
|
+
|
1136
|
+
i_cp = StringValuePtr(cp);
|
1137
|
+
i_rpara = (real)NUM2DBL(rpara);
|
1138
|
+
|
1139
|
+
|
1140
|
+
uzrset_(i_cp, &i_rpara, (ftnlen)strlen(i_cp));
|
1141
|
+
|
1142
|
+
return Qnil;
|
1143
|
+
|
1144
|
+
}
|
1145
|
+
|
1146
|
+
static VALUE
|
1147
|
+
dcl_uzrstx(obj, cp, rpara)
|
1148
|
+
VALUE obj, cp, rpara;
|
1149
|
+
{
|
1150
|
+
char *i_cp;
|
1151
|
+
real i_rpara;
|
1152
|
+
|
1153
|
+
if (TYPE(cp) != T_STRING) {
|
1154
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
1155
|
+
}
|
1156
|
+
if (TYPE(rpara) != T_FLOAT) {
|
1157
|
+
rpara = rb_funcall(rpara, rb_intern("to_f"), 0);
|
1158
|
+
}
|
1159
|
+
|
1160
|
+
i_cp = StringValuePtr(cp);
|
1161
|
+
i_rpara = (real)NUM2DBL(rpara);
|
1162
|
+
|
1163
|
+
|
1164
|
+
uzrstx_(i_cp, &i_rpara, (ftnlen)strlen(i_cp));
|
1165
|
+
|
1166
|
+
return Qnil;
|
1167
|
+
|
1168
|
+
}
|
1169
|
+
|
1170
|
+
static VALUE
|
1171
|
+
dcl_uzrqnp(obj)
|
1172
|
+
VALUE obj;
|
1173
|
+
{
|
1174
|
+
integer o_ncp;
|
1175
|
+
VALUE ncp;
|
1176
|
+
|
1177
|
+
uzrqnp_(&o_ncp);
|
1178
|
+
|
1179
|
+
ncp = INT2NUM(o_ncp);
|
1180
|
+
|
1181
|
+
|
1182
|
+
return ncp;
|
1183
|
+
|
1184
|
+
}
|
1185
|
+
|
1186
|
+
static VALUE
|
1187
|
+
dcl_uzrqid(obj, cp)
|
1188
|
+
VALUE obj, cp;
|
1189
|
+
{
|
1190
|
+
char *i_cp;
|
1191
|
+
integer o_idx;
|
1192
|
+
VALUE idx;
|
1193
|
+
|
1194
|
+
if (TYPE(cp) != T_STRING) {
|
1195
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
1196
|
+
}
|
1197
|
+
|
1198
|
+
i_cp = StringValuePtr(cp);
|
1199
|
+
|
1200
|
+
|
1201
|
+
uzrqid_(i_cp, &o_idx, (ftnlen)strlen(i_cp));
|
1202
|
+
|
1203
|
+
idx = INT2NUM(o_idx);
|
1204
|
+
|
1205
|
+
|
1206
|
+
return idx;
|
1207
|
+
|
1208
|
+
}
|
1209
|
+
|
1210
|
+
static VALUE
|
1211
|
+
dcl_uzrqcp(obj, idx)
|
1212
|
+
VALUE obj, idx;
|
1213
|
+
{
|
1214
|
+
integer i_idx;
|
1215
|
+
char *o_cp;
|
1216
|
+
VALUE cp;
|
1217
|
+
|
1218
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
1219
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
1220
|
+
}
|
1221
|
+
|
1222
|
+
i_idx = NUM2INT(idx);
|
1223
|
+
|
1224
|
+
o_cp= ALLOCA_N(char, (DFLT_SIZE+1));
|
1225
|
+
memset(o_cp, '\0', DFLT_SIZE+1);
|
1226
|
+
|
1227
|
+
uzrqcp_(&i_idx, o_cp, (ftnlen)DFLT_SIZE);
|
1228
|
+
|
1229
|
+
cp = rb_str_new2(o_cp);
|
1230
|
+
|
1231
|
+
|
1232
|
+
return cp;
|
1233
|
+
|
1234
|
+
}
|
1235
|
+
|
1236
|
+
static VALUE
|
1237
|
+
dcl_uzrqcl(obj, idx)
|
1238
|
+
VALUE obj, idx;
|
1239
|
+
{
|
1240
|
+
integer i_idx;
|
1241
|
+
char *o_cp;
|
1242
|
+
VALUE cp;
|
1243
|
+
|
1244
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
1245
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
1246
|
+
}
|
1247
|
+
|
1248
|
+
i_idx = NUM2INT(idx);
|
1249
|
+
|
1250
|
+
o_cp= ALLOCA_N(char, (DFLT_SIZE+1));
|
1251
|
+
memset(o_cp, '\0', DFLT_SIZE+1);
|
1252
|
+
|
1253
|
+
uzrqcl_(&i_idx, o_cp, (ftnlen)DFLT_SIZE);
|
1254
|
+
|
1255
|
+
cp = rb_str_new2(o_cp);
|
1256
|
+
|
1257
|
+
|
1258
|
+
return cp;
|
1259
|
+
|
1260
|
+
}
|
1261
|
+
|
1262
|
+
static VALUE
|
1263
|
+
dcl_uzrqvl(obj, idx)
|
1264
|
+
VALUE obj, idx;
|
1265
|
+
{
|
1266
|
+
integer i_idx;
|
1267
|
+
real o_rpara;
|
1268
|
+
VALUE rpara;
|
1269
|
+
|
1270
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
1271
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
1272
|
+
}
|
1273
|
+
|
1274
|
+
i_idx = NUM2INT(idx);
|
1275
|
+
|
1276
|
+
|
1277
|
+
uzrqvl_(&i_idx, &o_rpara);
|
1278
|
+
|
1279
|
+
rpara = rb_float_new((double)o_rpara);
|
1280
|
+
|
1281
|
+
|
1282
|
+
return rpara;
|
1283
|
+
|
1284
|
+
}
|
1285
|
+
|
1286
|
+
static VALUE
|
1287
|
+
dcl_uzrsvl(obj, idx, rpara)
|
1288
|
+
VALUE obj, idx, rpara;
|
1289
|
+
{
|
1290
|
+
integer i_idx;
|
1291
|
+
real i_rpara;
|
1292
|
+
|
1293
|
+
if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
|
1294
|
+
idx = rb_funcall(idx, rb_intern("to_i"), 0);
|
1295
|
+
}
|
1296
|
+
if (TYPE(rpara) != T_FLOAT) {
|
1297
|
+
rpara = rb_funcall(rpara, rb_intern("to_f"), 0);
|
1298
|
+
}
|
1299
|
+
|
1300
|
+
i_idx = NUM2INT(idx);
|
1301
|
+
i_rpara = (real)NUM2DBL(rpara);
|
1302
|
+
|
1303
|
+
|
1304
|
+
uzrsvl_(&i_idx, &i_rpara);
|
1305
|
+
|
1306
|
+
return Qnil;
|
1307
|
+
|
1308
|
+
}
|
1309
|
+
|
1310
|
+
static VALUE
|
1311
|
+
dcl_uzrqin(obj, cp)
|
1312
|
+
VALUE obj, cp;
|
1313
|
+
{
|
1314
|
+
char *i_cp;
|
1315
|
+
integer o_in;
|
1316
|
+
VALUE in;
|
1317
|
+
|
1318
|
+
if (TYPE(cp) != T_STRING) {
|
1319
|
+
cp = rb_funcall(cp, rb_intern("to_str"), 0);
|
1320
|
+
}
|
1321
|
+
|
1322
|
+
i_cp = StringValuePtr(cp);
|
1323
|
+
|
1324
|
+
|
1325
|
+
uzrqin_(i_cp, &o_in, (ftnlen)strlen(i_cp));
|
1326
|
+
|
1327
|
+
in = INT2NUM(o_in);
|
1328
|
+
|
1329
|
+
|
1330
|
+
return in;
|
1331
|
+
|
1332
|
+
}
|
1333
|
+
|
1334
|
+
static VALUE
|
1335
|
+
dcl_uzrsav(obj, iu)
|
1336
|
+
VALUE obj, iu;
|
1337
|
+
{
|
1338
|
+
integer i_iu;
|
1339
|
+
|
1340
|
+
if ((TYPE(iu) != T_BIGNUM) || (TYPE(iu) != T_FIXNUM)) {
|
1341
|
+
iu = rb_funcall(iu, rb_intern("to_i"), 0);
|
1342
|
+
}
|
1343
|
+
|
1344
|
+
i_iu = NUM2INT(iu);
|
1345
|
+
|
1346
|
+
|
1347
|
+
uzrsav_(&i_iu);
|
1348
|
+
|
1349
|
+
return Qnil;
|
1350
|
+
|
1351
|
+
}
|
1352
|
+
|
1353
|
+
static VALUE
|
1354
|
+
dcl_uzrrst(obj, iu)
|
1355
|
+
VALUE obj, iu;
|
1356
|
+
{
|
1357
|
+
integer i_iu;
|
1358
|
+
|
1359
|
+
if ((TYPE(iu) != T_BIGNUM) || (TYPE(iu) != T_FIXNUM)) {
|
1360
|
+
iu = rb_funcall(iu, rb_intern("to_i"), 0);
|
1361
|
+
}
|
1362
|
+
|
1363
|
+
i_iu = NUM2INT(iu);
|
1364
|
+
|
1365
|
+
|
1366
|
+
uzrrst_(&i_iu);
|
1367
|
+
|
1368
|
+
return Qnil;
|
1369
|
+
|
1370
|
+
}
|
1371
|
+
|
1372
|
+
static VALUE
|
1373
|
+
dcl_uzpsav(obj)
|
1374
|
+
VALUE obj;
|
1375
|
+
{
|
1376
|
+
uzpsav_();
|
1377
|
+
|
1378
|
+
return Qnil;
|
1379
|
+
|
1380
|
+
}
|
1381
|
+
|
1382
|
+
static VALUE
|
1383
|
+
dcl_uzprst(obj)
|
1384
|
+
VALUE obj;
|
1385
|
+
{
|
1386
|
+
uzprst_();
|
1387
|
+
|
1388
|
+
return Qnil;
|
1389
|
+
|
1390
|
+
}
|
1391
|
+
void
|
1392
|
+
init_grph2_uzpack(mDCL)
|
1393
|
+
VALUE mDCL;
|
1394
|
+
{
|
1395
|
+
rb_define_module_function(mDCL, "uzpqnp", dcl_uzpqnp, 0);
|
1396
|
+
rb_define_module_function(mDCL, "uzpqid", dcl_uzpqid, 1);
|
1397
|
+
rb_define_module_function(mDCL, "uzpqcp", dcl_uzpqcp, 1);
|
1398
|
+
rb_define_module_function(mDCL, "uzpqcl", dcl_uzpqcl, 1);
|
1399
|
+
rb_define_module_function(mDCL, "uzpqit", dcl_uzpqit, 1);
|
1400
|
+
rb_define_module_function(mDCL, "uzpqvl", dcl_uzpqvl, 1);
|
1401
|
+
rb_define_module_function(mDCL, "uzpsvl", dcl_uzpsvl, 2);
|
1402
|
+
rb_define_module_function(mDCL, "uzpqin", dcl_uzpqin, 1);
|
1403
|
+
rb_define_module_function(mDCL, "uzinit", dcl_uzinit, 0);
|
1404
|
+
rb_define_module_function(mDCL, "uzfact", dcl_uzfact, 1);
|
1405
|
+
rb_define_module_function(mDCL, "uzcget", dcl_uzcget, 1);
|
1406
|
+
rb_define_module_function(mDCL, "uzcset", dcl_uzcset, 2);
|
1407
|
+
rb_define_module_function(mDCL, "uzcstx", dcl_uzcstx, 2);
|
1408
|
+
rb_define_module_function(mDCL, "uzcqnp", dcl_uzcqnp, 0);
|
1409
|
+
rb_define_module_function(mDCL, "uzcqid", dcl_uzcqid, 1);
|
1410
|
+
rb_define_module_function(mDCL, "uzcqcp", dcl_uzcqcp, 1);
|
1411
|
+
rb_define_module_function(mDCL, "uzcqcl", dcl_uzcqcl, 1);
|
1412
|
+
rb_define_module_function(mDCL, "uzcqvl", dcl_uzcqvl, 1);
|
1413
|
+
rb_define_module_function(mDCL, "uzcsvl", dcl_uzcsvl, 2);
|
1414
|
+
rb_define_module_function(mDCL, "uzcqin", dcl_uzcqin, 1);
|
1415
|
+
rb_define_module_function(mDCL, "uzcsav", dcl_uzcsav, 1);
|
1416
|
+
rb_define_module_function(mDCL, "uzcrst", dcl_uzcrst, 1);
|
1417
|
+
rb_define_module_function(mDCL, "uziget", dcl_uziget, 1);
|
1418
|
+
rb_define_module_function(mDCL, "uziset", dcl_uziset, 2);
|
1419
|
+
rb_define_module_function(mDCL, "uzistx", dcl_uzistx, 2);
|
1420
|
+
rb_define_module_function(mDCL, "uziqnp", dcl_uziqnp, 0);
|
1421
|
+
rb_define_module_function(mDCL, "uziqid", dcl_uziqid, 1);
|
1422
|
+
rb_define_module_function(mDCL, "uziqcp", dcl_uziqcp, 1);
|
1423
|
+
rb_define_module_function(mDCL, "uziqcl", dcl_uziqcl, 1);
|
1424
|
+
rb_define_module_function(mDCL, "uziqvl", dcl_uziqvl, 1);
|
1425
|
+
rb_define_module_function(mDCL, "uzisvl", dcl_uzisvl, 2);
|
1426
|
+
rb_define_module_function(mDCL, "uziqin", dcl_uziqin, 1);
|
1427
|
+
rb_define_module_function(mDCL, "uzisav", dcl_uzisav, 1);
|
1428
|
+
rb_define_module_function(mDCL, "uzirst", dcl_uzirst, 1);
|
1429
|
+
rb_define_module_function(mDCL, "uzlget", dcl_uzlget, 1);
|
1430
|
+
rb_define_module_function(mDCL, "uzlset", dcl_uzlset, 2);
|
1431
|
+
rb_define_module_function(mDCL, "uzlstx", dcl_uzlstx, 2);
|
1432
|
+
rb_define_module_function(mDCL, "uzlqnp", dcl_uzlqnp, 0);
|
1433
|
+
rb_define_module_function(mDCL, "uzlqid", dcl_uzlqid, 1);
|
1434
|
+
rb_define_module_function(mDCL, "uzlqcp", dcl_uzlqcp, 1);
|
1435
|
+
rb_define_module_function(mDCL, "uzlqcl", dcl_uzlqcl, 1);
|
1436
|
+
rb_define_module_function(mDCL, "uzlqvl", dcl_uzlqvl, 1);
|
1437
|
+
rb_define_module_function(mDCL, "uzlsvl", dcl_uzlsvl, 2);
|
1438
|
+
rb_define_module_function(mDCL, "uzlqin", dcl_uzlqin, 1);
|
1439
|
+
rb_define_module_function(mDCL, "uzlsav", dcl_uzlsav, 1);
|
1440
|
+
rb_define_module_function(mDCL, "uzlrst", dcl_uzlrst, 1);
|
1441
|
+
rb_define_module_function(mDCL, "uzrget", dcl_uzrget, 1);
|
1442
|
+
rb_define_module_function(mDCL, "uzrset", dcl_uzrset, 2);
|
1443
|
+
rb_define_module_function(mDCL, "uzrstx", dcl_uzrstx, 2);
|
1444
|
+
rb_define_module_function(mDCL, "uzrqnp", dcl_uzrqnp, 0);
|
1445
|
+
rb_define_module_function(mDCL, "uzrqid", dcl_uzrqid, 1);
|
1446
|
+
rb_define_module_function(mDCL, "uzrqcp", dcl_uzrqcp, 1);
|
1447
|
+
rb_define_module_function(mDCL, "uzrqcl", dcl_uzrqcl, 1);
|
1448
|
+
rb_define_module_function(mDCL, "uzrqvl", dcl_uzrqvl, 1);
|
1449
|
+
rb_define_module_function(mDCL, "uzrsvl", dcl_uzrsvl, 2);
|
1450
|
+
rb_define_module_function(mDCL, "uzrqin", dcl_uzrqin, 1);
|
1451
|
+
rb_define_module_function(mDCL, "uzrsav", dcl_uzrsav, 1);
|
1452
|
+
rb_define_module_function(mDCL, "uzrrst", dcl_uzrrst, 1);
|
1453
|
+
rb_define_module_function(mDCL, "uzpsav", dcl_uzpsav, 0);
|
1454
|
+
rb_define_module_function(mDCL, "uzprst", dcl_uzprst, 0);
|
1455
|
+
}
|