ruby-dcl 1.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (319) hide show
  1. data/ChangeLog +321 -0
  2. data/GenWrapper/Makefile +14 -0
  3. data/GenWrapper/cproto2init.rb +41 -0
  4. data/GenWrapper/dcl_narrayed_funcs.rb +181 -0
  5. data/GenWrapper/dcl_rb_footing +29 -0
  6. data/GenWrapper/dcl_rb_heading +129 -0
  7. data/GenWrapper/def.rb +20 -0
  8. data/GenWrapper/elim_ary_size.rb +398 -0
  9. data/GenWrapper/etc/Mk_proto +375 -0
  10. data/GenWrapper/etc/dcl_gen +13 -0
  11. data/GenWrapper/etc/p_header +63 -0
  12. data/GenWrapper/etc/p_init +410 -0
  13. data/GenWrapper/pparse.rb +137 -0
  14. data/GenWrapper/proto/Makefile +35 -0
  15. data/GenWrapper/proto/grph1_00 +17 -0
  16. data/GenWrapper/proto/grph1_csgi.fp +27 -0
  17. data/GenWrapper/proto/grph1_scpack.fp +442 -0
  18. data/GenWrapper/proto/grph1_sgpack.fp +1406 -0
  19. data/GenWrapper/proto/grph1_slpack.fp +316 -0
  20. data/GenWrapper/proto/grph1_stpack.fp +411 -0
  21. data/GenWrapper/proto/grph1_swpack.fp +746 -0
  22. data/GenWrapper/proto/grph2_00 +16 -0
  23. data/GenWrapper/proto/grph2_grpack.fp +139 -0
  24. data/GenWrapper/proto/grph2_ucpack.fp +522 -0
  25. data/GenWrapper/proto/grph2_udpack.fp +692 -0
  26. data/GenWrapper/proto/grph2_uepack.fp +601 -0
  27. data/GenWrapper/proto/grph2_ugpack.fp +436 -0
  28. data/GenWrapper/proto/grph2_uhpack.fp +246 -0
  29. data/GenWrapper/proto/grph2_ulpack.fp +516 -0
  30. data/GenWrapper/proto/grph2_umpack.fp +676 -0
  31. data/GenWrapper/proto/grph2_uspack.fp +989 -0
  32. data/GenWrapper/proto/grph2_uupack.fp +663 -0
  33. data/GenWrapper/proto/grph2_uvpack.fp +246 -0
  34. data/GenWrapper/proto/grph2_uwpack.fp +203 -0
  35. data/GenWrapper/proto/grph2_uxpack.fp +295 -0
  36. data/GenWrapper/proto/grph2_uypack.fp +295 -0
  37. data/GenWrapper/proto/grph2_uzpack.fp +574 -0
  38. data/GenWrapper/proto/math1_00 +12 -0
  39. data/GenWrapper/proto/math1_blklib.fp +58 -0
  40. data/GenWrapper/proto/math1_chrlib.fp +83 -0
  41. data/GenWrapper/proto/math1_fnclib.fp +79 -0
  42. data/GenWrapper/proto/math1_gnmlib.fp +118 -0
  43. data/GenWrapper/proto/math1_gt2dlib.fp +144 -0
  44. data/GenWrapper/proto/math1_ifalib.fp +123 -0
  45. data/GenWrapper/proto/math1_indxlib.fp +222 -0
  46. data/GenWrapper/proto/math1_intlib.fp +46 -0
  47. data/GenWrapper/proto/math1_lrllib.fp +276 -0
  48. data/GenWrapper/proto/math1_maplib.fp +24 -0
  49. data/GenWrapper/proto/math1_oslib.fp +28 -0
  50. data/GenWrapper/proto/math1_rfalib.fp +420 -0
  51. data/GenWrapper/proto/math1_rfblib.fp +51 -0
  52. data/GenWrapper/proto/math1_sublib.fp +60 -0
  53. data/GenWrapper/proto/math1_syslib.fp +767 -0
  54. data/GenWrapper/proto/math1_vialib.fp +339 -0
  55. data/GenWrapper/proto/math1_viblib.fp +264 -0
  56. data/GenWrapper/proto/math1_vralib.fp +339 -0
  57. data/GenWrapper/proto/math1_vrblib.fp +264 -0
  58. data/GenWrapper/proto/math1_xfclib.fp +68 -0
  59. data/GenWrapper/proto/math2_00 +12 -0
  60. data/GenWrapper/proto/math2_fftlib.fp +803 -0
  61. data/GenWrapper/proto/math2_intrlib.fp +32 -0
  62. data/GenWrapper/proto/math2_odelib.fp_notused +568 -0
  63. data/GenWrapper/proto/math2_rnmlib.fp +54 -0
  64. data/GenWrapper/proto/math2_shtlib.fp +1292 -0
  65. data/GenWrapper/proto/math2_shtlib.fp_old +1294 -0
  66. data/GenWrapper/proto/math2_vstlib.fp +84 -0
  67. data/GenWrapper/proto/misc1_00 +17 -0
  68. data/GenWrapper/proto/misc1_chnlib.fp +47 -0
  69. data/GenWrapper/proto/misc1_datelib.fp +352 -0
  70. data/GenWrapper/proto/misc1_fmtlib.fp +19 -0
  71. data/GenWrapper/proto/misc1_misclib.fp +26 -0
  72. data/GenWrapper/proto/misc1_randlib.fp +36 -0
  73. data/GenWrapper/proto/misc1_timelib.fp +151 -0
  74. data/GenWrapper/proto2c.rb +13 -0
  75. data/GenWrapper/prototype.rb +209 -0
  76. data/GenWrapper/util.rb +9 -0
  77. data/GenWrapper/variable.rb +671 -0
  78. data/README +29 -0
  79. data/Rakefile +44 -0
  80. data/ToDo +2 -0
  81. data/dcl_cary2obj.c +354 -0
  82. data/dcl_narrayed_funcs.c +518 -0
  83. data/dcl_obj2cary.c +512 -0
  84. data/dcl_rubydcloriginal.c +129 -0
  85. data/demo/gokuraku/hop/hop.rb +26 -0
  86. data/demo/gokuraku/jump/jump1.rb +64 -0
  87. data/demo/gokuraku/jump/jump2.rb +50 -0
  88. data/demo/gokuraku/layout/lay1.rb +46 -0
  89. data/demo/gokuraku/layout/lay2.rb +44 -0
  90. data/demo/gokuraku/step/step0.rb +34 -0
  91. data/demo/gokuraku/step/step1.rb +84 -0
  92. data/demo/gokuraku/step/step2.rb +62 -0
  93. data/demo/gokuraku/u1d/u1d1.rb +37 -0
  94. data/demo/gokuraku/u1d/u1d2.rb +50 -0
  95. data/demo/gokuraku/u2d/u2d1.rb +46 -0
  96. data/demo/gokuraku/u2d/u2d2.rb +49 -0
  97. data/demo/gokuraku/u2d/u2d3.rb +45 -0
  98. data/demo/gokuraku/u2d/u2d4.rb +61 -0
  99. data/demo/grph1/scpack/scpkt2.rb +40 -0
  100. data/demo/grph1/scpack/scpkt3.rb +102 -0
  101. data/demo/grph1/scpack/scpkt6.rb +84 -0
  102. data/demo/grph1/scpack/scpkt7.rb +59 -0
  103. data/demo/grph1/scpack/scpkt8.rb +60 -0
  104. data/demo/grph1/scpack/t810630.dat +296 -0
  105. data/demo/grph1/scpack/t811231.dat +296 -0
  106. data/demo/grph1/sgpack/sgfont.rb +52 -0
  107. data/demo/grph1/sgpack/sgfonz.rb +53 -0
  108. data/demo/grph1/sgpack/sgksx1.rb +44 -0
  109. data/demo/grph1/sgpack/sgksx2.rb +90 -0
  110. data/demo/grph1/sgpack/sgksx3.rb +75 -0
  111. data/demo/grph1/sgpack/sglidx.rb +40 -0
  112. data/demo/grph1/sgpack/sgltyp.rb +48 -0
  113. data/demo/grph1/sgpack/sgpk01.rb +39 -0
  114. data/demo/grph1/sgpack/sgpk02.rb +79 -0
  115. data/demo/grph1/sgpack/sgpk03.rb +107 -0
  116. data/demo/grph1/sgpack/sgpk04.rb +86 -0
  117. data/demo/grph1/sgpack/sgpk05.rb +66 -0
  118. data/demo/grph1/sgpack/sgpk06.rb +91 -0
  119. data/demo/grph1/sgpack/sgpk07.rb +66 -0
  120. data/demo/grph1/sgpack/sgpk08.rb +67 -0
  121. data/demo/grph1/sgpack/sgpk09.rb +61 -0
  122. data/demo/grph1/sgpack/sgpk10.rb +58 -0
  123. data/demo/grph1/sgpack/sgtclr.rb +59 -0
  124. data/demo/grph1/sgpack/sgtone.rb +70 -0
  125. data/demo/grph1/sgpack/sgtonz.rb +66 -0
  126. data/demo/grph1/slpack/slpk01.rb +37 -0
  127. data/demo/grph1/slpack/slpk02.rb +29 -0
  128. data/demo/grph1/slpack/slpk03.rb +36 -0
  129. data/demo/grph1/slpack/slpk04.rb +36 -0
  130. data/demo/grph2/g2pack/g2pk01.rb +78 -0
  131. data/demo/grph2/g2pack/g2pk02.rb +75 -0
  132. data/demo/grph2/grpack/grpk01.rb +65 -0
  133. data/demo/grph2/ucpack/ucpk01.rb +95 -0
  134. data/demo/grph2/ucpack/ucpk02.rb +95 -0
  135. data/demo/grph2/udegpk/u2df01.rb +50 -0
  136. data/demo/grph2/udegpk/u2df02.rb +76 -0
  137. data/demo/grph2/udegpk/u2df03.rb +80 -0
  138. data/demo/grph2/udegpk/u2df04.rb +52 -0
  139. data/demo/grph2/udegpk/u2df05.rb +70 -0
  140. data/demo/grph2/udegpk/u2df06.rb +59 -0
  141. data/demo/grph2/udegpk/u2df07.rb +68 -0
  142. data/demo/grph2/udegpk/u2df08.rb +91 -0
  143. data/demo/grph2/udegpk/u2df09b.rb +88 -0
  144. data/demo/grph2/udegpk/u2df09c.rb +89 -0
  145. data/demo/grph2/udegpk/u2df09e.rb +88 -0
  146. data/demo/grph2/udegpk/u2df09f.rb +89 -0
  147. data/demo/grph2/ulpack/ulpk01.rb +111 -0
  148. data/demo/grph2/ulpack/ulpk01n.rb +111 -0
  149. data/demo/grph2/ulpack/ulpk02.rb +111 -0
  150. data/demo/grph2/ulpack/ulpk02n.rb +111 -0
  151. data/demo/grph2/umpack/t811231.dat +296 -0
  152. data/demo/grph2/umpack/test01.rb +69 -0
  153. data/demo/grph2/umpack/test02.rb +64 -0
  154. data/demo/grph2/umpack/test03.rb +84 -0
  155. data/demo/grph2/umpack/test04.rb +54 -0
  156. data/demo/grph2/umpack/test05.rb +85 -0
  157. data/demo/grph2/umpack/test06.rb +44 -0
  158. data/demo/grph2/umpack/test07.rb +43 -0
  159. data/demo/grph2/umpack/test08.rb +37 -0
  160. data/demo/grph2/umpack/test09.rb +86 -0
  161. data/demo/grph2/umpack/test10.rb +52 -0
  162. data/demo/grph2/umpack/umpk01.rb +65 -0
  163. data/demo/grph2/umpack/umpk02.rb +54 -0
  164. data/demo/grph2/umpack/umpk03.rb +46 -0
  165. data/demo/grph2/umpack/umpk04.rb +65 -0
  166. data/demo/grph2/umpack/umpk05.rb +84 -0
  167. data/demo/grph2/uspack/uspk01.rb +39 -0
  168. data/demo/grph2/uspack/uspk02.rb +47 -0
  169. data/demo/grph2/uspack/uspk03.rb +38 -0
  170. data/demo/grph2/uspack/uspk04.rb +64 -0
  171. data/demo/grph2/uspack/uspk05.rb +68 -0
  172. data/demo/grph2/uspack/uspk06.rb +43 -0
  173. data/demo/grph2/uspack/uspk07.rb +62 -0
  174. data/demo/grph2/uspack/uspk08.rb +46 -0
  175. data/demo/grph2/uspack/uspk09.rb +89 -0
  176. data/demo/grph2/uspack/uspk10.rb +48 -0
  177. data/demo/grph2/uspack/uspk11.rb +71 -0
  178. data/demo/grph2/uspack/uspk12.rb +51 -0
  179. data/demo/grph2/uupack/uupk01.rb +50 -0
  180. data/demo/grph2/uupack/uupk02.rb +74 -0
  181. data/demo/grph2/uupack/uupk03.rb +56 -0
  182. data/demo/grph2/uupack/uupk04.rb +84 -0
  183. data/demo/grph2/uupack/uupk05.rb +74 -0
  184. data/demo/grph2/uupack/uupk06.rb +77 -0
  185. data/demo/grph2/uupack/uupk07.rb +88 -0
  186. data/demo/grph2/uxyzpk/uxyz01.rb +38 -0
  187. data/demo/grph2/uxyzpk/uxyz02.rb +36 -0
  188. data/demo/grph2/uxyzpk/uxyz03.rb +37 -0
  189. data/demo/grph2/uxyzpk/uxyz04.rb +54 -0
  190. data/demo/grph2/uxyzpk/uxyz05.rb +41 -0
  191. data/demo/grph2/uxyzpk/uxyz06.rb +42 -0
  192. data/demo/grph2/uxyzpk/uxyz07.rb +38 -0
  193. data/demo/grph2/uxyzpk/uxyz08.rb +60 -0
  194. data/demo/grph2/uxyzpk/uxyz09.rb +52 -0
  195. data/demo/grph2/uxyzpk/uxyz10.rb +57 -0
  196. data/demo/grph2/ximage/MEMO +23 -0
  197. data/demo/grph2/ximage/tomsclm.dat +1344 -0
  198. data/demo/grph2/ximage/ximg01.rb +145 -0
  199. data/demo/math1/gt2dlib/gt2d01.rb +33 -0
  200. data/demo/math2/fftlib/fftl01.rb +28 -0
  201. data/demo/math2/fftlib/fftl02.rb +224 -0
  202. data/demo/math2/intrlib/intr01.rb +22 -0
  203. data/demo/math2/rnmlib/rnml01.rb +21 -0
  204. data/demo/math2/vstlib/vstl01.rb +29 -0
  205. data/demo/math2/vstlib/vstl02.rb +38 -0
  206. data/demo/rakuraku/color/color1.rb +61 -0
  207. data/demo/rakuraku/color/color2.rb +57 -0
  208. data/demo/rakuraku/color/color3.rb +81 -0
  209. data/demo/rakuraku/kihon/kihon1.rb +39 -0
  210. data/demo/rakuraku/kihon/kihon2.rb +56 -0
  211. data/demo/rakuraku/kihon/kihon3.rb +57 -0
  212. data/demo/rakuraku/kihon/kihon4.rb +70 -0
  213. data/demo/rakuraku/kihon/kihon5.rb +56 -0
  214. data/demo/rakuraku/kihon/kihon6.rb +40 -0
  215. data/demo/rakuraku/kihon/kihon7.rb +98 -0
  216. data/demo/rakuraku/kihon/kihon8.rb +93 -0
  217. data/demo/rakuraku/kihon/kihon9.rb +77 -0
  218. data/demo/rakuraku/kihon/kihona.rb +123 -0
  219. data/demo/rakuraku/kihon/kihonb.rb +73 -0
  220. data/demo/rakuraku/kihon/kihonc.rb +110 -0
  221. data/demo/rakuraku/layout/lay1.rb +29 -0
  222. data/demo/rakuraku/layout/lay2.rb +28 -0
  223. data/demo/rakuraku/layout/lay3.rb +29 -0
  224. data/demo/rakuraku/map3d/map3d1.rb +68 -0
  225. data/demo/rakuraku/map3d/map3d2.rb +67 -0
  226. data/demo/rakuraku/map3d/map3d3.rb +66 -0
  227. data/demo/rakuraku/map3d/map3d4.rb +107 -0
  228. data/demo/rakuraku/map3d/map3d5.rb +118 -0
  229. data/demo/rakuraku/map3d/map3d6.rb +96 -0
  230. data/demo/rakuraku/map3d/map3d7.rb +98 -0
  231. data/demo/rakuraku/miss/miss1.rb +76 -0
  232. data/demo/rakuraku/miss/miss2.rb +60 -0
  233. data/demo/rakuraku/quick/quick1.rb +35 -0
  234. data/demo/rakuraku/quick/quick2.rb +33 -0
  235. data/demo/rakuraku/quick/quick3.rb +46 -0
  236. data/demo/rakuraku/quick/quick4.rb +47 -0
  237. data/demo/rakuraku/quick/quick5.rb +46 -0
  238. data/demo/rakuraku/u2d/u2d1.rb +50 -0
  239. data/demo/rakuraku/u2d/u2d2.rb +51 -0
  240. data/demo/rakuraku/u2d/u2d3.rb +70 -0
  241. data/demo/rakuraku/u2d/u2d4.rb +59 -0
  242. data/demo/rakuraku/u2d/u2d5.rb +61 -0
  243. data/demo/rakuraku/u2d/u2d6.rb +57 -0
  244. data/demo/rakuraku/u2d/u2d7.rb +103 -0
  245. data/demo/rakuraku/uspack/uspac1.rb +35 -0
  246. data/demo/rakuraku/uspack/uspac2.rb +66 -0
  247. data/demo/rakuraku/uspack/uspac3.rb +37 -0
  248. data/demo/rakuraku/uspack/uspac4.rb +49 -0
  249. data/demo/rakuraku/uxyz/uxyz1.rb +37 -0
  250. data/demo/rakuraku/uxyz/uxyz2.rb +35 -0
  251. data/demo/rakuraku/uxyz/uxyz3.rb +38 -0
  252. data/demo/rakuraku/uxyz/uxyz4.rb +36 -0
  253. data/demo/rakuraku/uxyz/uxyz5.rb +57 -0
  254. data/demo/rakuraku/uxyz/uxyz6.rb +43 -0
  255. data/demo/rakuraku/uxyz/uxyz7.rb +39 -0
  256. data/demo/rakuraku/uxyz/uxyz8.rb +56 -0
  257. data/demo/rubydcloriginal/uemrkz1.rb +37 -0
  258. data/dummy.c +9 -0
  259. data/extconf.rb +133 -0
  260. data/grph1_csgi.c +119 -0
  261. data/grph1_scpack.c +1388 -0
  262. data/grph1_sgpack.c +3876 -0
  263. data/grph1_slpack.c +432 -0
  264. data/grph1_stpack.c +1044 -0
  265. data/grph1_swpack.c +1922 -0
  266. data/grph1_zgpack.c.org +141 -0
  267. data/grph2_grpack.c +368 -0
  268. data/grph2_ucpack.c +1232 -0
  269. data/grph2_udpack.c +1404 -0
  270. data/grph2_uepack.c +1443 -0
  271. data/grph2_ugpack.c +1073 -0
  272. data/grph2_uhpack.c +943 -0
  273. data/grph2_ulpack.c +1304 -0
  274. data/grph2_umpack.c +1540 -0
  275. data/grph2_uspack.c +2481 -0
  276. data/grph2_uupack.c +1689 -0
  277. data/grph2_uvpack.c +943 -0
  278. data/grph2_uwpack.c +552 -0
  279. data/grph2_uxpack.c +555 -0
  280. data/grph2_uypack.c +555 -0
  281. data/grph2_uzpack.c +1455 -0
  282. data/init.c.default +187 -0
  283. data/init.c.gtk +189 -0
  284. data/lib/dcl.rb +5084 -0
  285. data/math1_blklib.c +227 -0
  286. data/math1_chrlib.c +239 -0
  287. data/math1_fnclib.c +254 -0
  288. data/math1_gnmlib.c +356 -0
  289. data/math1_gt2dlib.c +514 -0
  290. data/math1_ifalib.c +427 -0
  291. data/math1_indxlib.c +709 -0
  292. data/math1_intlib.c +167 -0
  293. data/math1_lrllib.c +817 -0
  294. data/math1_maplib.c +172 -0
  295. data/math1_oslib.c +111 -0
  296. data/math1_rfalib.c +1417 -0
  297. data/math1_rfblib.c +232 -0
  298. data/math1_sublib.c +221 -0
  299. data/math1_syslib.c +2025 -0
  300. data/math1_vialib.c +1156 -0
  301. data/math1_viblib.c +1027 -0
  302. data/math1_vralib.c +1156 -0
  303. data/math1_vrblib.c +1027 -0
  304. data/math1_xfclib.c +142 -0
  305. data/math2_fftlib.c +833 -0
  306. data/math2_intrlib.c +138 -0
  307. data/math2_rnmlib.c +226 -0
  308. data/math2_shtlib.c +1568 -0
  309. data/math2_vstlib.c +366 -0
  310. data/misc1_chnlib.c +179 -0
  311. data/misc1_datelib.c +953 -0
  312. data/misc1_fmtlib.c +99 -0
  313. data/misc1_misclib.c +118 -0
  314. data/misc1_randlib.c +142 -0
  315. data/misc1_timelib.c +380 -0
  316. data/obsolete/README +2 -0
  317. data/obsolete/dcl_ext.html +112 -0
  318. data/obsolete/dcl_ext.rb +313 -0
  319. metadata +433 -0
data/grph1_sgpack.c ADDED
@@ -0,0 +1,3876 @@
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_sgopn(obj, iws)
66
+ VALUE obj, iws;
67
+ {
68
+ integer i_iws;
69
+
70
+ if ((TYPE(iws) != T_BIGNUM) || (TYPE(iws) != T_FIXNUM)) {
71
+ iws = rb_funcall(iws, rb_intern("to_i"), 0);
72
+ }
73
+
74
+ i_iws = NUM2INT(iws);
75
+
76
+
77
+ sgopn_(&i_iws);
78
+
79
+ return Qnil;
80
+
81
+ }
82
+
83
+ static VALUE
84
+ dcl_sgfrm(obj)
85
+ VALUE obj;
86
+ {
87
+ sgfrm_();
88
+
89
+ return Qnil;
90
+
91
+ }
92
+
93
+ static VALUE
94
+ dcl_sgcls(obj)
95
+ VALUE obj;
96
+ {
97
+ sgcls_();
98
+
99
+ return Qnil;
100
+
101
+ }
102
+
103
+ static VALUE
104
+ dcl_sgpqnp(obj)
105
+ VALUE obj;
106
+ {
107
+ integer o_ncp;
108
+ VALUE ncp;
109
+
110
+ sgpqnp_(&o_ncp);
111
+
112
+ ncp = INT2NUM(o_ncp);
113
+
114
+
115
+ return ncp;
116
+
117
+ }
118
+
119
+ static VALUE
120
+ dcl_sgpqid(obj, cp)
121
+ VALUE obj, cp;
122
+ {
123
+ char *i_cp;
124
+ integer o_idx;
125
+ VALUE idx;
126
+
127
+ if (TYPE(cp) != T_STRING) {
128
+ cp = rb_funcall(cp, rb_intern("to_str"), 0);
129
+ }
130
+
131
+ i_cp = StringValuePtr(cp);
132
+
133
+
134
+ sgpqid_(i_cp, &o_idx, (ftnlen)strlen(i_cp));
135
+
136
+ idx = INT2NUM(o_idx);
137
+
138
+
139
+ return idx;
140
+
141
+ }
142
+
143
+ static VALUE
144
+ dcl_sgpqcp(obj, idx)
145
+ VALUE obj, idx;
146
+ {
147
+ integer i_idx;
148
+ char *o_cp;
149
+ VALUE cp;
150
+
151
+ if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
152
+ idx = rb_funcall(idx, rb_intern("to_i"), 0);
153
+ }
154
+
155
+ i_idx = NUM2INT(idx);
156
+
157
+ o_cp= ALLOCA_N(char, (DFLT_SIZE+1));
158
+ memset(o_cp, '\0', DFLT_SIZE+1);
159
+
160
+ sgpqcp_(&i_idx, o_cp, (ftnlen)DFLT_SIZE);
161
+
162
+ cp = rb_str_new2(o_cp);
163
+
164
+
165
+ return cp;
166
+
167
+ }
168
+
169
+ static VALUE
170
+ dcl_sgpqcl(obj, idx)
171
+ VALUE obj, idx;
172
+ {
173
+ integer i_idx;
174
+ char *o_cp;
175
+ VALUE cp;
176
+
177
+ if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
178
+ idx = rb_funcall(idx, rb_intern("to_i"), 0);
179
+ }
180
+
181
+ i_idx = NUM2INT(idx);
182
+
183
+ o_cp= ALLOCA_N(char, (DFLT_SIZE+1));
184
+ memset(o_cp, '\0', DFLT_SIZE+1);
185
+
186
+ sgpqcl_(&i_idx, o_cp, (ftnlen)DFLT_SIZE);
187
+
188
+ cp = rb_str_new2(o_cp);
189
+
190
+
191
+ return cp;
192
+
193
+ }
194
+
195
+ static VALUE
196
+ dcl_sgpqit(obj, idx)
197
+ VALUE obj, idx;
198
+ {
199
+ integer i_idx;
200
+ integer o_itp;
201
+ VALUE itp;
202
+
203
+ if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
204
+ idx = rb_funcall(idx, rb_intern("to_i"), 0);
205
+ }
206
+
207
+ i_idx = NUM2INT(idx);
208
+
209
+
210
+ sgpqit_(&i_idx, &o_itp);
211
+
212
+ itp = INT2NUM(o_itp);
213
+
214
+
215
+ return itp;
216
+
217
+ }
218
+
219
+ static VALUE
220
+ dcl_sgpqvl(obj, idx)
221
+ VALUE obj, idx;
222
+ {
223
+ integer i_idx;
224
+ integer o_ipara;
225
+ VALUE ipara;
226
+
227
+ if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
228
+ idx = rb_funcall(idx, rb_intern("to_i"), 0);
229
+ }
230
+
231
+ i_idx = NUM2INT(idx);
232
+
233
+
234
+ sgpqvl_(&i_idx, &o_ipara);
235
+
236
+ ipara = INT2NUM(o_ipara);
237
+
238
+
239
+ return ipara;
240
+
241
+ }
242
+
243
+ static VALUE
244
+ dcl_sgpsvl(obj, idx, ipara)
245
+ VALUE obj, idx, ipara;
246
+ {
247
+ integer i_idx;
248
+ integer i_ipara;
249
+
250
+ if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
251
+ idx = rb_funcall(idx, rb_intern("to_i"), 0);
252
+ }
253
+ if ((TYPE(ipara) != T_BIGNUM) || (TYPE(ipara) != T_FIXNUM)) {
254
+ ipara = rb_funcall(ipara, rb_intern("to_i"), 0);
255
+ }
256
+
257
+ i_idx = NUM2INT(idx);
258
+ i_ipara = NUM2INT(ipara);
259
+
260
+
261
+ sgpsvl_(&i_idx, &i_ipara);
262
+
263
+ return Qnil;
264
+
265
+ }
266
+
267
+ static VALUE
268
+ dcl_sgpqin(obj, cp)
269
+ VALUE obj, cp;
270
+ {
271
+ char *i_cp;
272
+ integer o_in;
273
+ VALUE in;
274
+
275
+ if (TYPE(cp) != T_STRING) {
276
+ cp = rb_funcall(cp, rb_intern("to_str"), 0);
277
+ }
278
+
279
+ i_cp = StringValuePtr(cp);
280
+
281
+
282
+ sgpqin_(i_cp, &o_in, (ftnlen)strlen(i_cp));
283
+
284
+ in = INT2NUM(o_in);
285
+
286
+
287
+ return in;
288
+
289
+ }
290
+
291
+ static VALUE
292
+ dcl_sgpwsn(obj)
293
+ VALUE obj;
294
+ {
295
+ sgpwsn_();
296
+
297
+ return Qnil;
298
+
299
+ }
300
+
301
+ static VALUE
302
+ dcl_sgsvpt(obj, vxmin, vxmax, vymin, vymax)
303
+ VALUE obj, vxmin, vxmax, vymin, vymax;
304
+ {
305
+ real i_vxmin;
306
+ real i_vxmax;
307
+ real i_vymin;
308
+ real i_vymax;
309
+
310
+ if (TYPE(vxmin) != T_FLOAT) {
311
+ vxmin = rb_funcall(vxmin, rb_intern("to_f"), 0);
312
+ }
313
+ if (TYPE(vxmax) != T_FLOAT) {
314
+ vxmax = rb_funcall(vxmax, rb_intern("to_f"), 0);
315
+ }
316
+ if (TYPE(vymin) != T_FLOAT) {
317
+ vymin = rb_funcall(vymin, rb_intern("to_f"), 0);
318
+ }
319
+ if (TYPE(vymax) != T_FLOAT) {
320
+ vymax = rb_funcall(vymax, rb_intern("to_f"), 0);
321
+ }
322
+
323
+ i_vxmin = (real)NUM2DBL(vxmin);
324
+ i_vxmax = (real)NUM2DBL(vxmax);
325
+ i_vymin = (real)NUM2DBL(vymin);
326
+ i_vymax = (real)NUM2DBL(vymax);
327
+
328
+
329
+ sgsvpt_(&i_vxmin, &i_vxmax, &i_vymin, &i_vymax);
330
+
331
+ return Qnil;
332
+
333
+ }
334
+
335
+ static VALUE
336
+ dcl_sgqvpt(obj)
337
+ VALUE obj;
338
+ {
339
+ real o_vxmin;
340
+ real o_vxmax;
341
+ real o_vymin;
342
+ real o_vymax;
343
+ VALUE vxmin;
344
+ VALUE vxmax;
345
+ VALUE vymin;
346
+ VALUE vymax;
347
+
348
+ sgqvpt_(&o_vxmin, &o_vxmax, &o_vymin, &o_vymax);
349
+
350
+ vxmin = rb_float_new((double)o_vxmin);
351
+ vxmax = rb_float_new((double)o_vxmax);
352
+ vymin = rb_float_new((double)o_vymin);
353
+ vymax = rb_float_new((double)o_vymax);
354
+
355
+
356
+ return rb_ary_new3(4, vxmin, vxmax, vymin, vymax);
357
+
358
+ }
359
+
360
+ static VALUE
361
+ dcl_sgswnd(obj, uxmin, uxmax, uymin, uymax)
362
+ VALUE obj, uxmin, uxmax, uymin, uymax;
363
+ {
364
+ real i_uxmin;
365
+ real i_uxmax;
366
+ real i_uymin;
367
+ real i_uymax;
368
+
369
+ if (TYPE(uxmin) != T_FLOAT) {
370
+ uxmin = rb_funcall(uxmin, rb_intern("to_f"), 0);
371
+ }
372
+ if (TYPE(uxmax) != T_FLOAT) {
373
+ uxmax = rb_funcall(uxmax, rb_intern("to_f"), 0);
374
+ }
375
+ if (TYPE(uymin) != T_FLOAT) {
376
+ uymin = rb_funcall(uymin, rb_intern("to_f"), 0);
377
+ }
378
+ if (TYPE(uymax) != T_FLOAT) {
379
+ uymax = rb_funcall(uymax, rb_intern("to_f"), 0);
380
+ }
381
+
382
+ i_uxmin = (real)NUM2DBL(uxmin);
383
+ i_uxmax = (real)NUM2DBL(uxmax);
384
+ i_uymin = (real)NUM2DBL(uymin);
385
+ i_uymax = (real)NUM2DBL(uymax);
386
+
387
+
388
+ sgswnd_(&i_uxmin, &i_uxmax, &i_uymin, &i_uymax);
389
+
390
+ return Qnil;
391
+
392
+ }
393
+
394
+ static VALUE
395
+ dcl_sgqwnd(obj)
396
+ VALUE obj;
397
+ {
398
+ real o_uxmin;
399
+ real o_uxmax;
400
+ real o_uymin;
401
+ real o_uymax;
402
+ VALUE uxmin;
403
+ VALUE uxmax;
404
+ VALUE uymin;
405
+ VALUE uymax;
406
+
407
+ sgqwnd_(&o_uxmin, &o_uxmax, &o_uymin, &o_uymax);
408
+
409
+ uxmin = rb_float_new((double)o_uxmin);
410
+ uxmax = rb_float_new((double)o_uxmax);
411
+ uymin = rb_float_new((double)o_uymin);
412
+ uymax = rb_float_new((double)o_uymax);
413
+
414
+
415
+ return rb_ary_new3(4, uxmin, uxmax, uymin, uymax);
416
+
417
+ }
418
+
419
+ static VALUE
420
+ dcl_sgssim(obj, simfac, vxoff, vyoff)
421
+ VALUE obj, simfac, vxoff, vyoff;
422
+ {
423
+ real i_simfac;
424
+ real i_vxoff;
425
+ real i_vyoff;
426
+
427
+ if (TYPE(simfac) != T_FLOAT) {
428
+ simfac = rb_funcall(simfac, rb_intern("to_f"), 0);
429
+ }
430
+ if (TYPE(vxoff) != T_FLOAT) {
431
+ vxoff = rb_funcall(vxoff, rb_intern("to_f"), 0);
432
+ }
433
+ if (TYPE(vyoff) != T_FLOAT) {
434
+ vyoff = rb_funcall(vyoff, rb_intern("to_f"), 0);
435
+ }
436
+
437
+ i_simfac = (real)NUM2DBL(simfac);
438
+ i_vxoff = (real)NUM2DBL(vxoff);
439
+ i_vyoff = (real)NUM2DBL(vyoff);
440
+
441
+
442
+ sgssim_(&i_simfac, &i_vxoff, &i_vyoff);
443
+
444
+ return Qnil;
445
+
446
+ }
447
+
448
+ static VALUE
449
+ dcl_sgqsim(obj)
450
+ VALUE obj;
451
+ {
452
+ real o_simfac;
453
+ real o_vxoff;
454
+ real o_vyoff;
455
+ VALUE simfac;
456
+ VALUE vxoff;
457
+ VALUE vyoff;
458
+
459
+ sgqsim_(&o_simfac, &o_vxoff, &o_vyoff);
460
+
461
+ simfac = rb_float_new((double)o_simfac);
462
+ vxoff = rb_float_new((double)o_vxoff);
463
+ vyoff = rb_float_new((double)o_vyoff);
464
+
465
+
466
+ return rb_ary_new3(3, simfac, vxoff, vyoff);
467
+
468
+ }
469
+
470
+ static VALUE
471
+ dcl_sgsmpl(obj, plx, ply, plrot)
472
+ VALUE obj, plx, ply, plrot;
473
+ {
474
+ real i_plx;
475
+ real i_ply;
476
+ real i_plrot;
477
+
478
+ if (TYPE(plx) != T_FLOAT) {
479
+ plx = rb_funcall(plx, rb_intern("to_f"), 0);
480
+ }
481
+ if (TYPE(ply) != T_FLOAT) {
482
+ ply = rb_funcall(ply, rb_intern("to_f"), 0);
483
+ }
484
+ if (TYPE(plrot) != T_FLOAT) {
485
+ plrot = rb_funcall(plrot, rb_intern("to_f"), 0);
486
+ }
487
+
488
+ i_plx = (real)NUM2DBL(plx);
489
+ i_ply = (real)NUM2DBL(ply);
490
+ i_plrot = (real)NUM2DBL(plrot);
491
+
492
+
493
+ sgsmpl_(&i_plx, &i_ply, &i_plrot);
494
+
495
+ return Qnil;
496
+
497
+ }
498
+
499
+ static VALUE
500
+ dcl_sgqmpl(obj)
501
+ VALUE obj;
502
+ {
503
+ real o_plx;
504
+ real o_ply;
505
+ real o_plrot;
506
+ VALUE plx;
507
+ VALUE ply;
508
+ VALUE plrot;
509
+
510
+ sgqmpl_(&o_plx, &o_ply, &o_plrot);
511
+
512
+ plx = rb_float_new((double)o_plx);
513
+ ply = rb_float_new((double)o_ply);
514
+ plrot = rb_float_new((double)o_plrot);
515
+
516
+
517
+ return rb_ary_new3(3, plx, ply, plrot);
518
+
519
+ }
520
+
521
+ static VALUE
522
+ dcl_sgstxy(obj, txmin, txmax, tymin, tymax)
523
+ VALUE obj, txmin, txmax, tymin, tymax;
524
+ {
525
+ real i_txmin;
526
+ real i_txmax;
527
+ real i_tymin;
528
+ real i_tymax;
529
+
530
+ if (TYPE(txmin) != T_FLOAT) {
531
+ txmin = rb_funcall(txmin, rb_intern("to_f"), 0);
532
+ }
533
+ if (TYPE(txmax) != T_FLOAT) {
534
+ txmax = rb_funcall(txmax, rb_intern("to_f"), 0);
535
+ }
536
+ if (TYPE(tymin) != T_FLOAT) {
537
+ tymin = rb_funcall(tymin, rb_intern("to_f"), 0);
538
+ }
539
+ if (TYPE(tymax) != T_FLOAT) {
540
+ tymax = rb_funcall(tymax, rb_intern("to_f"), 0);
541
+ }
542
+
543
+ i_txmin = (real)NUM2DBL(txmin);
544
+ i_txmax = (real)NUM2DBL(txmax);
545
+ i_tymin = (real)NUM2DBL(tymin);
546
+ i_tymax = (real)NUM2DBL(tymax);
547
+
548
+
549
+ sgstxy_(&i_txmin, &i_txmax, &i_tymin, &i_tymax);
550
+
551
+ return Qnil;
552
+
553
+ }
554
+
555
+ static VALUE
556
+ dcl_sgqtxy(obj)
557
+ VALUE obj;
558
+ {
559
+ real o_txmin;
560
+ real o_txmax;
561
+ real o_tymin;
562
+ real o_tymax;
563
+ VALUE txmin;
564
+ VALUE txmax;
565
+ VALUE tymin;
566
+ VALUE tymax;
567
+
568
+ sgqtxy_(&o_txmin, &o_txmax, &o_tymin, &o_tymax);
569
+
570
+ txmin = rb_float_new((double)o_txmin);
571
+ txmax = rb_float_new((double)o_txmax);
572
+ tymin = rb_float_new((double)o_tymin);
573
+ tymax = rb_float_new((double)o_tymax);
574
+
575
+
576
+ return rb_ary_new3(4, txmin, txmax, tymin, tymax);
577
+
578
+ }
579
+
580
+ static VALUE
581
+ dcl_sgstrn(obj, itr)
582
+ VALUE obj, itr;
583
+ {
584
+ integer i_itr;
585
+
586
+ if ((TYPE(itr) != T_BIGNUM) || (TYPE(itr) != T_FIXNUM)) {
587
+ itr = rb_funcall(itr, rb_intern("to_i"), 0);
588
+ }
589
+
590
+ i_itr = NUM2INT(itr);
591
+
592
+
593
+ sgstrn_(&i_itr);
594
+
595
+ return Qnil;
596
+
597
+ }
598
+
599
+ static VALUE
600
+ dcl_sgqtrn(obj)
601
+ VALUE obj;
602
+ {
603
+ integer o_itr;
604
+ VALUE itr;
605
+
606
+ sgqtrn_(&o_itr);
607
+
608
+ itr = INT2NUM(o_itr);
609
+
610
+
611
+ return itr;
612
+
613
+ }
614
+
615
+ static VALUE
616
+ dcl_sgstrf(obj)
617
+ VALUE obj;
618
+ {
619
+ sgstrf_();
620
+
621
+ return Qnil;
622
+
623
+ }
624
+
625
+ static VALUE
626
+ dcl_sgtrqf(obj, ntx)
627
+ VALUE obj, ntx;
628
+ {
629
+ integer i_ntx;
630
+ logical o_ltr;
631
+ VALUE ltr;
632
+
633
+ if ((TYPE(ntx) != T_BIGNUM) || (TYPE(ntx) != T_FIXNUM)) {
634
+ ntx = rb_funcall(ntx, rb_intern("to_i"), 0);
635
+ }
636
+
637
+ i_ntx = NUM2INT(ntx);
638
+
639
+
640
+ sgtrqf_(&i_ntx, &o_ltr);
641
+
642
+ ltr = (o_ltr == FALSE_) ? Qfalse : Qtrue;
643
+
644
+
645
+ return ltr;
646
+
647
+ }
648
+
649
+ static VALUE
650
+ dcl_sgtrsl(obj, cts)
651
+ VALUE obj, cts;
652
+ {
653
+ char *i_cts;
654
+ char *o_ctl;
655
+ VALUE ctl;
656
+
657
+ if (TYPE(cts) != T_STRING) {
658
+ cts = rb_funcall(cts, rb_intern("to_str"), 0);
659
+ }
660
+
661
+ i_cts = StringValuePtr(cts);
662
+
663
+ o_ctl= ALLOCA_N(char, (DFLT_SIZE+1));
664
+ memset(o_ctl, '\0', DFLT_SIZE+1);
665
+
666
+ sgtrsl_(i_cts, o_ctl, (ftnlen)strlen(i_cts), (ftnlen)DFLT_SIZE);
667
+
668
+ ctl = rb_str_new2(o_ctl);
669
+
670
+
671
+ return ctl;
672
+
673
+ }
674
+
675
+ static VALUE
676
+ dcl_sgtrsn(obj, cts)
677
+ VALUE obj, cts;
678
+ {
679
+ char *i_cts;
680
+ integer o_ntx;
681
+ VALUE ntx;
682
+
683
+ if (TYPE(cts) != T_STRING) {
684
+ cts = rb_funcall(cts, rb_intern("to_str"), 0);
685
+ }
686
+
687
+ i_cts = StringValuePtr(cts);
688
+
689
+
690
+ sgtrsn_(i_cts, &o_ntx, (ftnlen)strlen(i_cts));
691
+
692
+ ntx = INT2NUM(o_ntx);
693
+
694
+
695
+ return ntx;
696
+
697
+ }
698
+
699
+ static VALUE
700
+ dcl_sgtrls(obj, ctl)
701
+ VALUE obj, ctl;
702
+ {
703
+ char *i_ctl;
704
+ char *o_cts;
705
+ VALUE cts;
706
+
707
+ if (TYPE(ctl) != T_STRING) {
708
+ ctl = rb_funcall(ctl, rb_intern("to_str"), 0);
709
+ }
710
+
711
+ i_ctl = StringValuePtr(ctl);
712
+
713
+ o_cts= ALLOCA_N(char, (DFLT_SIZE+1));
714
+ memset(o_cts, '\0', DFLT_SIZE+1);
715
+
716
+ sgtrls_(i_ctl, o_cts, (ftnlen)strlen(i_ctl), (ftnlen)DFLT_SIZE);
717
+
718
+ cts = rb_str_new2(o_cts);
719
+
720
+
721
+ return cts;
722
+
723
+ }
724
+
725
+ static VALUE
726
+ dcl_sgtrln(obj, ctl)
727
+ VALUE obj, ctl;
728
+ {
729
+ char *i_ctl;
730
+ integer o_ntx;
731
+ VALUE ntx;
732
+
733
+ if (TYPE(ctl) != T_STRING) {
734
+ ctl = rb_funcall(ctl, rb_intern("to_str"), 0);
735
+ }
736
+
737
+ i_ctl = StringValuePtr(ctl);
738
+
739
+
740
+ sgtrln_(i_ctl, &o_ntx, (ftnlen)strlen(i_ctl));
741
+
742
+ ntx = INT2NUM(o_ntx);
743
+
744
+
745
+ return ntx;
746
+
747
+ }
748
+
749
+ static VALUE
750
+ dcl_sgtrns(obj, ntx)
751
+ VALUE obj, ntx;
752
+ {
753
+ integer i_ntx;
754
+ char *o_cts;
755
+ VALUE cts;
756
+
757
+ if ((TYPE(ntx) != T_BIGNUM) || (TYPE(ntx) != T_FIXNUM)) {
758
+ ntx = rb_funcall(ntx, rb_intern("to_i"), 0);
759
+ }
760
+
761
+ i_ntx = NUM2INT(ntx);
762
+
763
+ o_cts= ALLOCA_N(char, (DFLT_SIZE+1));
764
+ memset(o_cts, '\0', DFLT_SIZE+1);
765
+
766
+ sgtrns_(&i_ntx, o_cts, (ftnlen)DFLT_SIZE);
767
+
768
+ cts = rb_str_new2(o_cts);
769
+
770
+
771
+ return cts;
772
+
773
+ }
774
+
775
+ static VALUE
776
+ dcl_sgtrnl(obj, ntx)
777
+ VALUE obj, ntx;
778
+ {
779
+ integer i_ntx;
780
+ char *o_ctl;
781
+ VALUE ctl;
782
+
783
+ if ((TYPE(ntx) != T_BIGNUM) || (TYPE(ntx) != T_FIXNUM)) {
784
+ ntx = rb_funcall(ntx, rb_intern("to_i"), 0);
785
+ }
786
+
787
+ i_ntx = NUM2INT(ntx);
788
+
789
+ o_ctl= ALLOCA_N(char, (DFLT_SIZE+1));
790
+ memset(o_ctl, '\0', DFLT_SIZE+1);
791
+
792
+ sgtrnl_(&i_ntx, o_ctl, (ftnlen)DFLT_SIZE);
793
+
794
+ ctl = rb_str_new2(o_ctl);
795
+
796
+
797
+ return ctl;
798
+
799
+ }
800
+
801
+ static VALUE
802
+ dcl_isgtrc(obj, ctr)
803
+ VALUE obj, ctr;
804
+ {
805
+ char *i_ctr;
806
+ integer o_rtn_val;
807
+ VALUE rtn_val;
808
+
809
+ if (TYPE(ctr) != T_STRING) {
810
+ ctr = rb_funcall(ctr, rb_intern("to_str"), 0);
811
+ }
812
+
813
+ i_ctr = StringValuePtr(ctr);
814
+
815
+
816
+ o_rtn_val = isgtrc_(i_ctr, (ftnlen)strlen(i_ctr));
817
+
818
+ rtn_val = INT2NUM(o_rtn_val);
819
+
820
+
821
+ return rtn_val;
822
+
823
+ }
824
+
825
+ static VALUE
826
+ dcl_sgplu(obj, n, upx, upy)
827
+ VALUE obj, n, upx, upy;
828
+ {
829
+ integer i_n;
830
+ real *i_upx;
831
+ real *i_upy;
832
+
833
+ if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
834
+ n = rb_funcall(n, rb_intern("to_i"), 0);
835
+ }
836
+ if (TYPE(upx) == T_FLOAT) {
837
+ upx = rb_Array(upx);
838
+ }
839
+ /* if ((TYPE(upx) != T_ARRAY) &&
840
+ (rb_obj_is_kind_of(upx, cNArray) != Qtrue)) {
841
+ rb_raise(rb_eTypeError, "invalid type");
842
+ } -- no check since obj2c*ary will do that */
843
+ if (TYPE(upy) == T_FLOAT) {
844
+ upy = rb_Array(upy);
845
+ }
846
+ /* if ((TYPE(upy) != T_ARRAY) &&
847
+ (rb_obj_is_kind_of(upy, cNArray) != Qtrue)) {
848
+ rb_raise(rb_eTypeError, "invalid type");
849
+ } -- no check since obj2c*ary will do that */
850
+
851
+ i_n = NUM2INT(n);
852
+ i_upx = dcl_obj2crealary(upx);
853
+ i_upy = dcl_obj2crealary(upy);
854
+
855
+
856
+ sgplu_(&i_n, i_upx, i_upy);
857
+
858
+ dcl_freecrealary(i_upx);
859
+ dcl_freecrealary(i_upy);
860
+
861
+ return Qnil;
862
+
863
+ }
864
+
865
+ static VALUE
866
+ dcl_sgplv(obj, n, vpx, vpy)
867
+ VALUE obj, n, vpx, vpy;
868
+ {
869
+ integer i_n;
870
+ real *i_vpx;
871
+ real *i_vpy;
872
+
873
+ if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
874
+ n = rb_funcall(n, rb_intern("to_i"), 0);
875
+ }
876
+ if (TYPE(vpx) == T_FLOAT) {
877
+ vpx = rb_Array(vpx);
878
+ }
879
+ /* if ((TYPE(vpx) != T_ARRAY) &&
880
+ (rb_obj_is_kind_of(vpx, cNArray) != Qtrue)) {
881
+ rb_raise(rb_eTypeError, "invalid type");
882
+ } -- no check since obj2c*ary will do that */
883
+ if (TYPE(vpy) == T_FLOAT) {
884
+ vpy = rb_Array(vpy);
885
+ }
886
+ /* if ((TYPE(vpy) != T_ARRAY) &&
887
+ (rb_obj_is_kind_of(vpy, cNArray) != Qtrue)) {
888
+ rb_raise(rb_eTypeError, "invalid type");
889
+ } -- no check since obj2c*ary will do that */
890
+
891
+ i_n = NUM2INT(n);
892
+ i_vpx = dcl_obj2crealary(vpx);
893
+ i_vpy = dcl_obj2crealary(vpy);
894
+
895
+
896
+ sgplv_(&i_n, i_vpx, i_vpy);
897
+
898
+ dcl_freecrealary(i_vpx);
899
+ dcl_freecrealary(i_vpy);
900
+
901
+ return Qnil;
902
+
903
+ }
904
+
905
+ static VALUE
906
+ dcl_sgplr(obj, n, rpx, rpy)
907
+ VALUE obj, n, rpx, rpy;
908
+ {
909
+ integer i_n;
910
+ real *i_rpx;
911
+ real *i_rpy;
912
+
913
+ if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
914
+ n = rb_funcall(n, rb_intern("to_i"), 0);
915
+ }
916
+ if (TYPE(rpx) == T_FLOAT) {
917
+ rpx = rb_Array(rpx);
918
+ }
919
+ /* if ((TYPE(rpx) != T_ARRAY) &&
920
+ (rb_obj_is_kind_of(rpx, cNArray) != Qtrue)) {
921
+ rb_raise(rb_eTypeError, "invalid type");
922
+ } -- no check since obj2c*ary will do that */
923
+ if (TYPE(rpy) == T_FLOAT) {
924
+ rpy = rb_Array(rpy);
925
+ }
926
+ /* if ((TYPE(rpy) != T_ARRAY) &&
927
+ (rb_obj_is_kind_of(rpy, cNArray) != Qtrue)) {
928
+ rb_raise(rb_eTypeError, "invalid type");
929
+ } -- no check since obj2c*ary will do that */
930
+
931
+ i_n = NUM2INT(n);
932
+ i_rpx = dcl_obj2crealary(rpx);
933
+ i_rpy = dcl_obj2crealary(rpy);
934
+
935
+
936
+ sgplr_(&i_n, i_rpx, i_rpy);
937
+
938
+ dcl_freecrealary(i_rpx);
939
+ dcl_freecrealary(i_rpy);
940
+
941
+ return Qnil;
942
+
943
+ }
944
+
945
+ static VALUE
946
+ dcl_sgsplt(obj, itype)
947
+ VALUE obj, itype;
948
+ {
949
+ integer i_itype;
950
+
951
+ if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
952
+ itype = rb_funcall(itype, rb_intern("to_i"), 0);
953
+ }
954
+
955
+ i_itype = NUM2INT(itype);
956
+
957
+
958
+ sgsplt_(&i_itype);
959
+
960
+ return Qnil;
961
+
962
+ }
963
+
964
+ static VALUE
965
+ dcl_sgqplt(obj)
966
+ VALUE obj;
967
+ {
968
+ integer o_itype;
969
+ VALUE itype;
970
+
971
+ sgqplt_(&o_itype);
972
+
973
+ itype = INT2NUM(o_itype);
974
+
975
+
976
+ return itype;
977
+
978
+ }
979
+
980
+ static VALUE
981
+ dcl_sgspli(obj, index)
982
+ VALUE obj, index;
983
+ {
984
+ integer i_index;
985
+
986
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
987
+ index = rb_funcall(index, rb_intern("to_i"), 0);
988
+ }
989
+
990
+ i_index = NUM2INT(index);
991
+
992
+
993
+ sgspli_(&i_index);
994
+
995
+ return Qnil;
996
+
997
+ }
998
+
999
+ static VALUE
1000
+ dcl_sgqpli(obj)
1001
+ VALUE obj;
1002
+ {
1003
+ integer o_index;
1004
+ VALUE index;
1005
+
1006
+ sgqpli_(&o_index);
1007
+
1008
+ index = INT2NUM(o_index);
1009
+
1010
+
1011
+ return index;
1012
+
1013
+ }
1014
+
1015
+ static VALUE
1016
+ dcl_sgplzu(obj, n, upx, upy, itype, index)
1017
+ VALUE obj, n, upx, upy, itype, index;
1018
+ {
1019
+ integer i_n;
1020
+ real *i_upx;
1021
+ real *i_upy;
1022
+ integer i_itype;
1023
+ integer i_index;
1024
+
1025
+ if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
1026
+ n = rb_funcall(n, rb_intern("to_i"), 0);
1027
+ }
1028
+ if (TYPE(upx) == T_FLOAT) {
1029
+ upx = rb_Array(upx);
1030
+ }
1031
+ /* if ((TYPE(upx) != T_ARRAY) &&
1032
+ (rb_obj_is_kind_of(upx, cNArray) != Qtrue)) {
1033
+ rb_raise(rb_eTypeError, "invalid type");
1034
+ } -- no check since obj2c*ary will do that */
1035
+ if (TYPE(upy) == T_FLOAT) {
1036
+ upy = rb_Array(upy);
1037
+ }
1038
+ /* if ((TYPE(upy) != T_ARRAY) &&
1039
+ (rb_obj_is_kind_of(upy, cNArray) != Qtrue)) {
1040
+ rb_raise(rb_eTypeError, "invalid type");
1041
+ } -- no check since obj2c*ary will do that */
1042
+ if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
1043
+ itype = rb_funcall(itype, rb_intern("to_i"), 0);
1044
+ }
1045
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
1046
+ index = rb_funcall(index, rb_intern("to_i"), 0);
1047
+ }
1048
+
1049
+ i_n = NUM2INT(n);
1050
+ i_itype = NUM2INT(itype);
1051
+ i_index = NUM2INT(index);
1052
+ i_upx = dcl_obj2crealary(upx);
1053
+ i_upy = dcl_obj2crealary(upy);
1054
+
1055
+
1056
+ sgplzu_(&i_n, i_upx, i_upy, &i_itype, &i_index);
1057
+
1058
+ dcl_freecrealary(i_upx);
1059
+ dcl_freecrealary(i_upy);
1060
+
1061
+ return Qnil;
1062
+
1063
+ }
1064
+
1065
+ static VALUE
1066
+ dcl_sgplzv(obj, n, vpx, vpy, itype, index)
1067
+ VALUE obj, n, vpx, vpy, itype, index;
1068
+ {
1069
+ integer i_n;
1070
+ real *i_vpx;
1071
+ real *i_vpy;
1072
+ integer i_itype;
1073
+ integer i_index;
1074
+
1075
+ if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
1076
+ n = rb_funcall(n, rb_intern("to_i"), 0);
1077
+ }
1078
+ if (TYPE(vpx) == T_FLOAT) {
1079
+ vpx = rb_Array(vpx);
1080
+ }
1081
+ /* if ((TYPE(vpx) != T_ARRAY) &&
1082
+ (rb_obj_is_kind_of(vpx, cNArray) != Qtrue)) {
1083
+ rb_raise(rb_eTypeError, "invalid type");
1084
+ } -- no check since obj2c*ary will do that */
1085
+ if (TYPE(vpy) == T_FLOAT) {
1086
+ vpy = rb_Array(vpy);
1087
+ }
1088
+ /* if ((TYPE(vpy) != T_ARRAY) &&
1089
+ (rb_obj_is_kind_of(vpy, cNArray) != Qtrue)) {
1090
+ rb_raise(rb_eTypeError, "invalid type");
1091
+ } -- no check since obj2c*ary will do that */
1092
+ if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
1093
+ itype = rb_funcall(itype, rb_intern("to_i"), 0);
1094
+ }
1095
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
1096
+ index = rb_funcall(index, rb_intern("to_i"), 0);
1097
+ }
1098
+
1099
+ i_n = NUM2INT(n);
1100
+ i_itype = NUM2INT(itype);
1101
+ i_index = NUM2INT(index);
1102
+ i_vpx = dcl_obj2crealary(vpx);
1103
+ i_vpy = dcl_obj2crealary(vpy);
1104
+
1105
+
1106
+ sgplzv_(&i_n, i_vpx, i_vpy, &i_itype, &i_index);
1107
+
1108
+ dcl_freecrealary(i_vpx);
1109
+ dcl_freecrealary(i_vpy);
1110
+
1111
+ return Qnil;
1112
+
1113
+ }
1114
+
1115
+ static VALUE
1116
+ dcl_sgplzr(obj, n, rpx, rpy, itype, index)
1117
+ VALUE obj, n, rpx, rpy, itype, index;
1118
+ {
1119
+ integer i_n;
1120
+ real *i_rpx;
1121
+ real *i_rpy;
1122
+ integer i_itype;
1123
+ integer i_index;
1124
+
1125
+ if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
1126
+ n = rb_funcall(n, rb_intern("to_i"), 0);
1127
+ }
1128
+ if (TYPE(rpx) == T_FLOAT) {
1129
+ rpx = rb_Array(rpx);
1130
+ }
1131
+ /* if ((TYPE(rpx) != T_ARRAY) &&
1132
+ (rb_obj_is_kind_of(rpx, cNArray) != Qtrue)) {
1133
+ rb_raise(rb_eTypeError, "invalid type");
1134
+ } -- no check since obj2c*ary will do that */
1135
+ if (TYPE(rpy) == T_FLOAT) {
1136
+ rpy = rb_Array(rpy);
1137
+ }
1138
+ /* if ((TYPE(rpy) != T_ARRAY) &&
1139
+ (rb_obj_is_kind_of(rpy, cNArray) != Qtrue)) {
1140
+ rb_raise(rb_eTypeError, "invalid type");
1141
+ } -- no check since obj2c*ary will do that */
1142
+ if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
1143
+ itype = rb_funcall(itype, rb_intern("to_i"), 0);
1144
+ }
1145
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
1146
+ index = rb_funcall(index, rb_intern("to_i"), 0);
1147
+ }
1148
+
1149
+ i_n = NUM2INT(n);
1150
+ i_itype = NUM2INT(itype);
1151
+ i_index = NUM2INT(index);
1152
+ i_rpx = dcl_obj2crealary(rpx);
1153
+ i_rpy = dcl_obj2crealary(rpy);
1154
+
1155
+
1156
+ sgplzr_(&i_n, i_rpx, i_rpy, &i_itype, &i_index);
1157
+
1158
+ dcl_freecrealary(i_rpx);
1159
+ dcl_freecrealary(i_rpy);
1160
+
1161
+ return Qnil;
1162
+
1163
+ }
1164
+
1165
+ static VALUE
1166
+ dcl_sgpmu(obj, n, upx, upy)
1167
+ VALUE obj, n, upx, upy;
1168
+ {
1169
+ integer i_n;
1170
+ real *i_upx;
1171
+ real *i_upy;
1172
+
1173
+ if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
1174
+ n = rb_funcall(n, rb_intern("to_i"), 0);
1175
+ }
1176
+ if (TYPE(upx) == T_FLOAT) {
1177
+ upx = rb_Array(upx);
1178
+ }
1179
+ /* if ((TYPE(upx) != T_ARRAY) &&
1180
+ (rb_obj_is_kind_of(upx, cNArray) != Qtrue)) {
1181
+ rb_raise(rb_eTypeError, "invalid type");
1182
+ } -- no check since obj2c*ary will do that */
1183
+ if (TYPE(upy) == T_FLOAT) {
1184
+ upy = rb_Array(upy);
1185
+ }
1186
+ /* if ((TYPE(upy) != T_ARRAY) &&
1187
+ (rb_obj_is_kind_of(upy, cNArray) != Qtrue)) {
1188
+ rb_raise(rb_eTypeError, "invalid type");
1189
+ } -- no check since obj2c*ary will do that */
1190
+
1191
+ i_n = NUM2INT(n);
1192
+ i_upx = dcl_obj2crealary(upx);
1193
+ i_upy = dcl_obj2crealary(upy);
1194
+
1195
+
1196
+ sgpmu_(&i_n, i_upx, i_upy);
1197
+
1198
+ dcl_freecrealary(i_upx);
1199
+ dcl_freecrealary(i_upy);
1200
+
1201
+ return Qnil;
1202
+
1203
+ }
1204
+
1205
+ static VALUE
1206
+ dcl_sgpmv(obj, n, vpx, vpy)
1207
+ VALUE obj, n, vpx, vpy;
1208
+ {
1209
+ integer i_n;
1210
+ real *i_vpx;
1211
+ real *i_vpy;
1212
+
1213
+ if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
1214
+ n = rb_funcall(n, rb_intern("to_i"), 0);
1215
+ }
1216
+ if (TYPE(vpx) == T_FLOAT) {
1217
+ vpx = rb_Array(vpx);
1218
+ }
1219
+ /* if ((TYPE(vpx) != T_ARRAY) &&
1220
+ (rb_obj_is_kind_of(vpx, cNArray) != Qtrue)) {
1221
+ rb_raise(rb_eTypeError, "invalid type");
1222
+ } -- no check since obj2c*ary will do that */
1223
+ if (TYPE(vpy) == T_FLOAT) {
1224
+ vpy = rb_Array(vpy);
1225
+ }
1226
+ /* if ((TYPE(vpy) != T_ARRAY) &&
1227
+ (rb_obj_is_kind_of(vpy, cNArray) != Qtrue)) {
1228
+ rb_raise(rb_eTypeError, "invalid type");
1229
+ } -- no check since obj2c*ary will do that */
1230
+
1231
+ i_n = NUM2INT(n);
1232
+ i_vpx = dcl_obj2crealary(vpx);
1233
+ i_vpy = dcl_obj2crealary(vpy);
1234
+
1235
+
1236
+ sgpmv_(&i_n, i_vpx, i_vpy);
1237
+
1238
+ dcl_freecrealary(i_vpx);
1239
+ dcl_freecrealary(i_vpy);
1240
+
1241
+ return Qnil;
1242
+
1243
+ }
1244
+
1245
+ static VALUE
1246
+ dcl_sgpmr(obj, n, rpx, rpy)
1247
+ VALUE obj, n, rpx, rpy;
1248
+ {
1249
+ integer i_n;
1250
+ real *i_rpx;
1251
+ real *i_rpy;
1252
+
1253
+ if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
1254
+ n = rb_funcall(n, rb_intern("to_i"), 0);
1255
+ }
1256
+ if (TYPE(rpx) == T_FLOAT) {
1257
+ rpx = rb_Array(rpx);
1258
+ }
1259
+ /* if ((TYPE(rpx) != T_ARRAY) &&
1260
+ (rb_obj_is_kind_of(rpx, cNArray) != Qtrue)) {
1261
+ rb_raise(rb_eTypeError, "invalid type");
1262
+ } -- no check since obj2c*ary will do that */
1263
+ if (TYPE(rpy) == T_FLOAT) {
1264
+ rpy = rb_Array(rpy);
1265
+ }
1266
+ /* if ((TYPE(rpy) != T_ARRAY) &&
1267
+ (rb_obj_is_kind_of(rpy, cNArray) != Qtrue)) {
1268
+ rb_raise(rb_eTypeError, "invalid type");
1269
+ } -- no check since obj2c*ary will do that */
1270
+
1271
+ i_n = NUM2INT(n);
1272
+ i_rpx = dcl_obj2crealary(rpx);
1273
+ i_rpy = dcl_obj2crealary(rpy);
1274
+
1275
+
1276
+ sgpmr_(&i_n, i_rpx, i_rpy);
1277
+
1278
+ dcl_freecrealary(i_rpx);
1279
+ dcl_freecrealary(i_rpy);
1280
+
1281
+ return Qnil;
1282
+
1283
+ }
1284
+
1285
+ static VALUE
1286
+ dcl_sgspmt(obj, itype)
1287
+ VALUE obj, itype;
1288
+ {
1289
+ integer i_itype;
1290
+
1291
+ if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
1292
+ itype = rb_funcall(itype, rb_intern("to_i"), 0);
1293
+ }
1294
+
1295
+ i_itype = NUM2INT(itype);
1296
+
1297
+
1298
+ sgspmt_(&i_itype);
1299
+
1300
+ return Qnil;
1301
+
1302
+ }
1303
+
1304
+ static VALUE
1305
+ dcl_sgqpmt(obj)
1306
+ VALUE obj;
1307
+ {
1308
+ integer o_itype;
1309
+ VALUE itype;
1310
+
1311
+ sgqpmt_(&o_itype);
1312
+
1313
+ itype = INT2NUM(o_itype);
1314
+
1315
+
1316
+ return itype;
1317
+
1318
+ }
1319
+
1320
+ static VALUE
1321
+ dcl_sgspmi(obj, index)
1322
+ VALUE obj, index;
1323
+ {
1324
+ integer i_index;
1325
+
1326
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
1327
+ index = rb_funcall(index, rb_intern("to_i"), 0);
1328
+ }
1329
+
1330
+ i_index = NUM2INT(index);
1331
+
1332
+
1333
+ sgspmi_(&i_index);
1334
+
1335
+ return Qnil;
1336
+
1337
+ }
1338
+
1339
+ static VALUE
1340
+ dcl_sgqpmi(obj)
1341
+ VALUE obj;
1342
+ {
1343
+ integer o_index;
1344
+ VALUE index;
1345
+
1346
+ sgqpmi_(&o_index);
1347
+
1348
+ index = INT2NUM(o_index);
1349
+
1350
+
1351
+ return index;
1352
+
1353
+ }
1354
+
1355
+ static VALUE
1356
+ dcl_sgspms(obj, rsize)
1357
+ VALUE obj, rsize;
1358
+ {
1359
+ real i_rsize;
1360
+
1361
+ if (TYPE(rsize) != T_FLOAT) {
1362
+ rsize = rb_funcall(rsize, rb_intern("to_f"), 0);
1363
+ }
1364
+
1365
+ i_rsize = (real)NUM2DBL(rsize);
1366
+
1367
+
1368
+ sgspms_(&i_rsize);
1369
+
1370
+ return Qnil;
1371
+
1372
+ }
1373
+
1374
+ static VALUE
1375
+ dcl_sgqpms(obj)
1376
+ VALUE obj;
1377
+ {
1378
+ real o_rsize;
1379
+ VALUE rsize;
1380
+
1381
+ sgqpms_(&o_rsize);
1382
+
1383
+ rsize = rb_float_new((double)o_rsize);
1384
+
1385
+
1386
+ return rsize;
1387
+
1388
+ }
1389
+
1390
+ static VALUE
1391
+ dcl_sgtxu(obj, ux, uy, chars)
1392
+ VALUE obj, ux, uy, chars;
1393
+ {
1394
+ real i_ux;
1395
+ real i_uy;
1396
+ char *i_chars;
1397
+
1398
+ if (TYPE(ux) != T_FLOAT) {
1399
+ ux = rb_funcall(ux, rb_intern("to_f"), 0);
1400
+ }
1401
+ if (TYPE(uy) != T_FLOAT) {
1402
+ uy = rb_funcall(uy, rb_intern("to_f"), 0);
1403
+ }
1404
+ if (TYPE(chars) != T_STRING) {
1405
+ chars = rb_funcall(chars, rb_intern("to_str"), 0);
1406
+ }
1407
+
1408
+ i_ux = (real)NUM2DBL(ux);
1409
+ i_uy = (real)NUM2DBL(uy);
1410
+ i_chars = StringValuePtr(chars);
1411
+
1412
+
1413
+ sgtxu_(&i_ux, &i_uy, i_chars, (ftnlen)strlen(i_chars));
1414
+
1415
+ return Qnil;
1416
+
1417
+ }
1418
+
1419
+ static VALUE
1420
+ dcl_sgtxv(obj, vx, vy, chars)
1421
+ VALUE obj, vx, vy, chars;
1422
+ {
1423
+ real i_vx;
1424
+ real i_vy;
1425
+ char *i_chars;
1426
+
1427
+ if (TYPE(vx) != T_FLOAT) {
1428
+ vx = rb_funcall(vx, rb_intern("to_f"), 0);
1429
+ }
1430
+ if (TYPE(vy) != T_FLOAT) {
1431
+ vy = rb_funcall(vy, rb_intern("to_f"), 0);
1432
+ }
1433
+ if (TYPE(chars) != T_STRING) {
1434
+ chars = rb_funcall(chars, rb_intern("to_str"), 0);
1435
+ }
1436
+
1437
+ i_vx = (real)NUM2DBL(vx);
1438
+ i_vy = (real)NUM2DBL(vy);
1439
+ i_chars = StringValuePtr(chars);
1440
+
1441
+
1442
+ sgtxv_(&i_vx, &i_vy, i_chars, (ftnlen)strlen(i_chars));
1443
+
1444
+ return Qnil;
1445
+
1446
+ }
1447
+
1448
+ static VALUE
1449
+ dcl_sgtxr(obj, rx, ry, chars)
1450
+ VALUE obj, rx, ry, chars;
1451
+ {
1452
+ real i_rx;
1453
+ real i_ry;
1454
+ char *i_chars;
1455
+
1456
+ if (TYPE(rx) != T_FLOAT) {
1457
+ rx = rb_funcall(rx, rb_intern("to_f"), 0);
1458
+ }
1459
+ if (TYPE(ry) != T_FLOAT) {
1460
+ ry = rb_funcall(ry, rb_intern("to_f"), 0);
1461
+ }
1462
+ if (TYPE(chars) != T_STRING) {
1463
+ chars = rb_funcall(chars, rb_intern("to_str"), 0);
1464
+ }
1465
+
1466
+ i_rx = (real)NUM2DBL(rx);
1467
+ i_ry = (real)NUM2DBL(ry);
1468
+ i_chars = StringValuePtr(chars);
1469
+
1470
+
1471
+ sgtxr_(&i_rx, &i_ry, i_chars, (ftnlen)strlen(i_chars));
1472
+
1473
+ return Qnil;
1474
+
1475
+ }
1476
+
1477
+ static VALUE
1478
+ dcl_sgstxs(obj, rsize)
1479
+ VALUE obj, rsize;
1480
+ {
1481
+ real i_rsize;
1482
+
1483
+ if (TYPE(rsize) != T_FLOAT) {
1484
+ rsize = rb_funcall(rsize, rb_intern("to_f"), 0);
1485
+ }
1486
+
1487
+ i_rsize = (real)NUM2DBL(rsize);
1488
+
1489
+
1490
+ sgstxs_(&i_rsize);
1491
+
1492
+ return Qnil;
1493
+
1494
+ }
1495
+
1496
+ static VALUE
1497
+ dcl_sgqtxs(obj)
1498
+ VALUE obj;
1499
+ {
1500
+ real o_rsize;
1501
+ VALUE rsize;
1502
+
1503
+ sgqtxs_(&o_rsize);
1504
+
1505
+ rsize = rb_float_new((double)o_rsize);
1506
+
1507
+
1508
+ return rsize;
1509
+
1510
+ }
1511
+
1512
+ static VALUE
1513
+ dcl_sgstxr(obj, irota)
1514
+ VALUE obj, irota;
1515
+ {
1516
+ integer i_irota;
1517
+
1518
+ if ((TYPE(irota) != T_BIGNUM) || (TYPE(irota) != T_FIXNUM)) {
1519
+ irota = rb_funcall(irota, rb_intern("to_i"), 0);
1520
+ }
1521
+
1522
+ i_irota = NUM2INT(irota);
1523
+
1524
+
1525
+ sgstxr_(&i_irota);
1526
+
1527
+ return Qnil;
1528
+
1529
+ }
1530
+
1531
+ static VALUE
1532
+ dcl_sgqtxr(obj)
1533
+ VALUE obj;
1534
+ {
1535
+ integer o_irota;
1536
+ VALUE irota;
1537
+
1538
+ sgqtxr_(&o_irota);
1539
+
1540
+ irota = INT2NUM(o_irota);
1541
+
1542
+
1543
+ return irota;
1544
+
1545
+ }
1546
+
1547
+ static VALUE
1548
+ dcl_sgstxc(obj, icent)
1549
+ VALUE obj, icent;
1550
+ {
1551
+ integer i_icent;
1552
+
1553
+ if ((TYPE(icent) != T_BIGNUM) || (TYPE(icent) != T_FIXNUM)) {
1554
+ icent = rb_funcall(icent, rb_intern("to_i"), 0);
1555
+ }
1556
+
1557
+ i_icent = NUM2INT(icent);
1558
+
1559
+
1560
+ sgstxc_(&i_icent);
1561
+
1562
+ return Qnil;
1563
+
1564
+ }
1565
+
1566
+ static VALUE
1567
+ dcl_sgqtxc(obj)
1568
+ VALUE obj;
1569
+ {
1570
+ integer o_icent;
1571
+ VALUE icent;
1572
+
1573
+ sgqtxc_(&o_icent);
1574
+
1575
+ icent = INT2NUM(o_icent);
1576
+
1577
+
1578
+ return icent;
1579
+
1580
+ }
1581
+
1582
+ static VALUE
1583
+ dcl_sgstxi(obj, index)
1584
+ VALUE obj, index;
1585
+ {
1586
+ integer i_index;
1587
+
1588
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
1589
+ index = rb_funcall(index, rb_intern("to_i"), 0);
1590
+ }
1591
+
1592
+ i_index = NUM2INT(index);
1593
+
1594
+
1595
+ sgstxi_(&i_index);
1596
+
1597
+ return Qnil;
1598
+
1599
+ }
1600
+
1601
+ static VALUE
1602
+ dcl_sgqtxi(obj)
1603
+ VALUE obj;
1604
+ {
1605
+ integer o_index;
1606
+ VALUE index;
1607
+
1608
+ sgqtxi_(&o_index);
1609
+
1610
+ index = INT2NUM(o_index);
1611
+
1612
+
1613
+ return index;
1614
+
1615
+ }
1616
+
1617
+ static VALUE
1618
+ dcl_sgpmzu(obj, n, upx, upy, itype, index, rsize)
1619
+ VALUE obj, n, upx, upy, itype, index, rsize;
1620
+ {
1621
+ integer i_n;
1622
+ real *i_upx;
1623
+ real *i_upy;
1624
+ integer i_itype;
1625
+ integer i_index;
1626
+ real i_rsize;
1627
+
1628
+ if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
1629
+ n = rb_funcall(n, rb_intern("to_i"), 0);
1630
+ }
1631
+ if (TYPE(upx) == T_FLOAT) {
1632
+ upx = rb_Array(upx);
1633
+ }
1634
+ /* if ((TYPE(upx) != T_ARRAY) &&
1635
+ (rb_obj_is_kind_of(upx, cNArray) != Qtrue)) {
1636
+ rb_raise(rb_eTypeError, "invalid type");
1637
+ } -- no check since obj2c*ary will do that */
1638
+ if (TYPE(upy) == T_FLOAT) {
1639
+ upy = rb_Array(upy);
1640
+ }
1641
+ /* if ((TYPE(upy) != T_ARRAY) &&
1642
+ (rb_obj_is_kind_of(upy, cNArray) != Qtrue)) {
1643
+ rb_raise(rb_eTypeError, "invalid type");
1644
+ } -- no check since obj2c*ary will do that */
1645
+ if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
1646
+ itype = rb_funcall(itype, rb_intern("to_i"), 0);
1647
+ }
1648
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
1649
+ index = rb_funcall(index, rb_intern("to_i"), 0);
1650
+ }
1651
+ if (TYPE(rsize) != T_FLOAT) {
1652
+ rsize = rb_funcall(rsize, rb_intern("to_f"), 0);
1653
+ }
1654
+
1655
+ i_n = NUM2INT(n);
1656
+ i_itype = NUM2INT(itype);
1657
+ i_index = NUM2INT(index);
1658
+ i_rsize = (real)NUM2DBL(rsize);
1659
+ i_upx = dcl_obj2crealary(upx);
1660
+ i_upy = dcl_obj2crealary(upy);
1661
+
1662
+
1663
+ sgpmzu_(&i_n, i_upx, i_upy, &i_itype, &i_index, &i_rsize);
1664
+
1665
+ dcl_freecrealary(i_upx);
1666
+ dcl_freecrealary(i_upy);
1667
+
1668
+ return Qnil;
1669
+
1670
+ }
1671
+
1672
+ static VALUE
1673
+ dcl_sgpmzv(obj, n, vpx, vpy, itype, index, rsize)
1674
+ VALUE obj, n, vpx, vpy, itype, index, rsize;
1675
+ {
1676
+ integer i_n;
1677
+ real *i_vpx;
1678
+ real *i_vpy;
1679
+ integer i_itype;
1680
+ integer i_index;
1681
+ real i_rsize;
1682
+
1683
+ if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
1684
+ n = rb_funcall(n, rb_intern("to_i"), 0);
1685
+ }
1686
+ if (TYPE(vpx) == T_FLOAT) {
1687
+ vpx = rb_Array(vpx);
1688
+ }
1689
+ /* if ((TYPE(vpx) != T_ARRAY) &&
1690
+ (rb_obj_is_kind_of(vpx, cNArray) != Qtrue)) {
1691
+ rb_raise(rb_eTypeError, "invalid type");
1692
+ } -- no check since obj2c*ary will do that */
1693
+ if (TYPE(vpy) == T_FLOAT) {
1694
+ vpy = rb_Array(vpy);
1695
+ }
1696
+ /* if ((TYPE(vpy) != T_ARRAY) &&
1697
+ (rb_obj_is_kind_of(vpy, cNArray) != Qtrue)) {
1698
+ rb_raise(rb_eTypeError, "invalid type");
1699
+ } -- no check since obj2c*ary will do that */
1700
+ if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
1701
+ itype = rb_funcall(itype, rb_intern("to_i"), 0);
1702
+ }
1703
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
1704
+ index = rb_funcall(index, rb_intern("to_i"), 0);
1705
+ }
1706
+ if (TYPE(rsize) != T_FLOAT) {
1707
+ rsize = rb_funcall(rsize, rb_intern("to_f"), 0);
1708
+ }
1709
+
1710
+ i_n = NUM2INT(n);
1711
+ i_itype = NUM2INT(itype);
1712
+ i_index = NUM2INT(index);
1713
+ i_rsize = (real)NUM2DBL(rsize);
1714
+ i_vpx = dcl_obj2crealary(vpx);
1715
+ i_vpy = dcl_obj2crealary(vpy);
1716
+
1717
+
1718
+ sgpmzv_(&i_n, i_vpx, i_vpy, &i_itype, &i_index, &i_rsize);
1719
+
1720
+ dcl_freecrealary(i_vpx);
1721
+ dcl_freecrealary(i_vpy);
1722
+
1723
+ return Qnil;
1724
+
1725
+ }
1726
+
1727
+ static VALUE
1728
+ dcl_sgpmzr(obj, n, rpx, rpy, itype, index, rsize)
1729
+ VALUE obj, n, rpx, rpy, itype, index, rsize;
1730
+ {
1731
+ integer i_n;
1732
+ real *i_rpx;
1733
+ real *i_rpy;
1734
+ integer i_itype;
1735
+ integer i_index;
1736
+ real i_rsize;
1737
+
1738
+ if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
1739
+ n = rb_funcall(n, rb_intern("to_i"), 0);
1740
+ }
1741
+ if (TYPE(rpx) == T_FLOAT) {
1742
+ rpx = rb_Array(rpx);
1743
+ }
1744
+ /* if ((TYPE(rpx) != T_ARRAY) &&
1745
+ (rb_obj_is_kind_of(rpx, cNArray) != Qtrue)) {
1746
+ rb_raise(rb_eTypeError, "invalid type");
1747
+ } -- no check since obj2c*ary will do that */
1748
+ if (TYPE(rpy) == T_FLOAT) {
1749
+ rpy = rb_Array(rpy);
1750
+ }
1751
+ /* if ((TYPE(rpy) != T_ARRAY) &&
1752
+ (rb_obj_is_kind_of(rpy, cNArray) != Qtrue)) {
1753
+ rb_raise(rb_eTypeError, "invalid type");
1754
+ } -- no check since obj2c*ary will do that */
1755
+ if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
1756
+ itype = rb_funcall(itype, rb_intern("to_i"), 0);
1757
+ }
1758
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
1759
+ index = rb_funcall(index, rb_intern("to_i"), 0);
1760
+ }
1761
+ if (TYPE(rsize) != T_FLOAT) {
1762
+ rsize = rb_funcall(rsize, rb_intern("to_f"), 0);
1763
+ }
1764
+
1765
+ i_n = NUM2INT(n);
1766
+ i_itype = NUM2INT(itype);
1767
+ i_index = NUM2INT(index);
1768
+ i_rsize = (real)NUM2DBL(rsize);
1769
+ i_rpx = dcl_obj2crealary(rpx);
1770
+ i_rpy = dcl_obj2crealary(rpy);
1771
+
1772
+
1773
+ sgpmzr_(&i_n, i_rpx, i_rpy, &i_itype, &i_index, &i_rsize);
1774
+
1775
+ dcl_freecrealary(i_rpx);
1776
+ dcl_freecrealary(i_rpy);
1777
+
1778
+ return Qnil;
1779
+
1780
+ }
1781
+
1782
+ static VALUE
1783
+ dcl_sgtxzu(obj, ux, uy, chars, rsize, irota, icent, index)
1784
+ VALUE obj, ux, uy, chars, rsize, irota, icent, index;
1785
+ {
1786
+ real i_ux;
1787
+ real i_uy;
1788
+ char *i_chars;
1789
+ real i_rsize;
1790
+ integer i_irota;
1791
+ integer i_icent;
1792
+ integer i_index;
1793
+
1794
+ if (TYPE(ux) != T_FLOAT) {
1795
+ ux = rb_funcall(ux, rb_intern("to_f"), 0);
1796
+ }
1797
+ if (TYPE(uy) != T_FLOAT) {
1798
+ uy = rb_funcall(uy, rb_intern("to_f"), 0);
1799
+ }
1800
+ if (TYPE(chars) != T_STRING) {
1801
+ chars = rb_funcall(chars, rb_intern("to_str"), 0);
1802
+ }
1803
+ if (TYPE(rsize) != T_FLOAT) {
1804
+ rsize = rb_funcall(rsize, rb_intern("to_f"), 0);
1805
+ }
1806
+ if ((TYPE(irota) != T_BIGNUM) || (TYPE(irota) != T_FIXNUM)) {
1807
+ irota = rb_funcall(irota, rb_intern("to_i"), 0);
1808
+ }
1809
+ if ((TYPE(icent) != T_BIGNUM) || (TYPE(icent) != T_FIXNUM)) {
1810
+ icent = rb_funcall(icent, rb_intern("to_i"), 0);
1811
+ }
1812
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
1813
+ index = rb_funcall(index, rb_intern("to_i"), 0);
1814
+ }
1815
+
1816
+ i_ux = (real)NUM2DBL(ux);
1817
+ i_uy = (real)NUM2DBL(uy);
1818
+ i_chars = StringValuePtr(chars);
1819
+ i_rsize = (real)NUM2DBL(rsize);
1820
+ i_irota = NUM2INT(irota);
1821
+ i_icent = NUM2INT(icent);
1822
+ i_index = NUM2INT(index);
1823
+
1824
+
1825
+ sgtxzu_(&i_ux, &i_uy, i_chars, &i_rsize, &i_irota, &i_icent, &i_index, (ftnlen)strlen(i_chars));
1826
+
1827
+ return Qnil;
1828
+
1829
+ }
1830
+
1831
+ static VALUE
1832
+ dcl_sgtxzv(obj, vx, vy, chars, rsize, irota, icent, index)
1833
+ VALUE obj, vx, vy, chars, rsize, irota, icent, index;
1834
+ {
1835
+ real i_vx;
1836
+ real i_vy;
1837
+ char *i_chars;
1838
+ real i_rsize;
1839
+ integer i_irota;
1840
+ integer i_icent;
1841
+ integer i_index;
1842
+
1843
+ if (TYPE(vx) != T_FLOAT) {
1844
+ vx = rb_funcall(vx, rb_intern("to_f"), 0);
1845
+ }
1846
+ if (TYPE(vy) != T_FLOAT) {
1847
+ vy = rb_funcall(vy, rb_intern("to_f"), 0);
1848
+ }
1849
+ if (TYPE(chars) != T_STRING) {
1850
+ chars = rb_funcall(chars, rb_intern("to_str"), 0);
1851
+ }
1852
+ if (TYPE(rsize) != T_FLOAT) {
1853
+ rsize = rb_funcall(rsize, rb_intern("to_f"), 0);
1854
+ }
1855
+ if ((TYPE(irota) != T_BIGNUM) || (TYPE(irota) != T_FIXNUM)) {
1856
+ irota = rb_funcall(irota, rb_intern("to_i"), 0);
1857
+ }
1858
+ if ((TYPE(icent) != T_BIGNUM) || (TYPE(icent) != T_FIXNUM)) {
1859
+ icent = rb_funcall(icent, rb_intern("to_i"), 0);
1860
+ }
1861
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
1862
+ index = rb_funcall(index, rb_intern("to_i"), 0);
1863
+ }
1864
+
1865
+ i_vx = (real)NUM2DBL(vx);
1866
+ i_vy = (real)NUM2DBL(vy);
1867
+ i_chars = StringValuePtr(chars);
1868
+ i_rsize = (real)NUM2DBL(rsize);
1869
+ i_irota = NUM2INT(irota);
1870
+ i_icent = NUM2INT(icent);
1871
+ i_index = NUM2INT(index);
1872
+
1873
+
1874
+ sgtxzv_(&i_vx, &i_vy, i_chars, &i_rsize, &i_irota, &i_icent, &i_index, (ftnlen)strlen(i_chars));
1875
+
1876
+ return Qnil;
1877
+
1878
+ }
1879
+
1880
+ static VALUE
1881
+ dcl_sgtxzr(obj, rx, ry, chars, rsize, irota, icent, index)
1882
+ VALUE obj, rx, ry, chars, rsize, irota, icent, index;
1883
+ {
1884
+ real i_rx;
1885
+ real i_ry;
1886
+ char *i_chars;
1887
+ real i_rsize;
1888
+ integer i_irota;
1889
+ integer i_icent;
1890
+ integer i_index;
1891
+
1892
+ if (TYPE(rx) != T_FLOAT) {
1893
+ rx = rb_funcall(rx, rb_intern("to_f"), 0);
1894
+ }
1895
+ if (TYPE(ry) != T_FLOAT) {
1896
+ ry = rb_funcall(ry, rb_intern("to_f"), 0);
1897
+ }
1898
+ if (TYPE(chars) != T_STRING) {
1899
+ chars = rb_funcall(chars, rb_intern("to_str"), 0);
1900
+ }
1901
+ if (TYPE(rsize) != T_FLOAT) {
1902
+ rsize = rb_funcall(rsize, rb_intern("to_f"), 0);
1903
+ }
1904
+ if ((TYPE(irota) != T_BIGNUM) || (TYPE(irota) != T_FIXNUM)) {
1905
+ irota = rb_funcall(irota, rb_intern("to_i"), 0);
1906
+ }
1907
+ if ((TYPE(icent) != T_BIGNUM) || (TYPE(icent) != T_FIXNUM)) {
1908
+ icent = rb_funcall(icent, rb_intern("to_i"), 0);
1909
+ }
1910
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
1911
+ index = rb_funcall(index, rb_intern("to_i"), 0);
1912
+ }
1913
+
1914
+ i_rx = (real)NUM2DBL(rx);
1915
+ i_ry = (real)NUM2DBL(ry);
1916
+ i_chars = StringValuePtr(chars);
1917
+ i_rsize = (real)NUM2DBL(rsize);
1918
+ i_irota = NUM2INT(irota);
1919
+ i_icent = NUM2INT(icent);
1920
+ i_index = NUM2INT(index);
1921
+
1922
+
1923
+ sgtxzr_(&i_rx, &i_ry, i_chars, &i_rsize, &i_irota, &i_icent, &i_index, (ftnlen)strlen(i_chars));
1924
+
1925
+ return Qnil;
1926
+
1927
+ }
1928
+
1929
+ static VALUE
1930
+ dcl_sgtnu(obj, n, upx, upy)
1931
+ VALUE obj, n, upx, upy;
1932
+ {
1933
+ integer i_n;
1934
+ real *i_upx;
1935
+ real *i_upy;
1936
+
1937
+ if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
1938
+ n = rb_funcall(n, rb_intern("to_i"), 0);
1939
+ }
1940
+ if (TYPE(upx) == T_FLOAT) {
1941
+ upx = rb_Array(upx);
1942
+ }
1943
+ /* if ((TYPE(upx) != T_ARRAY) &&
1944
+ (rb_obj_is_kind_of(upx, cNArray) != Qtrue)) {
1945
+ rb_raise(rb_eTypeError, "invalid type");
1946
+ } -- no check since obj2c*ary will do that */
1947
+ if (TYPE(upy) == T_FLOAT) {
1948
+ upy = rb_Array(upy);
1949
+ }
1950
+ /* if ((TYPE(upy) != T_ARRAY) &&
1951
+ (rb_obj_is_kind_of(upy, cNArray) != Qtrue)) {
1952
+ rb_raise(rb_eTypeError, "invalid type");
1953
+ } -- no check since obj2c*ary will do that */
1954
+
1955
+ i_n = NUM2INT(n);
1956
+ i_upx = dcl_obj2crealary(upx);
1957
+ i_upy = dcl_obj2crealary(upy);
1958
+
1959
+
1960
+ sgtnu_(&i_n, i_upx, i_upy);
1961
+
1962
+ dcl_freecrealary(i_upx);
1963
+ dcl_freecrealary(i_upy);
1964
+
1965
+ return Qnil;
1966
+
1967
+ }
1968
+
1969
+ static VALUE
1970
+ dcl_sgtnv(obj, n, vpx, vpy)
1971
+ VALUE obj, n, vpx, vpy;
1972
+ {
1973
+ integer i_n;
1974
+ real *i_vpx;
1975
+ real *i_vpy;
1976
+
1977
+ if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
1978
+ n = rb_funcall(n, rb_intern("to_i"), 0);
1979
+ }
1980
+ if (TYPE(vpx) == T_FLOAT) {
1981
+ vpx = rb_Array(vpx);
1982
+ }
1983
+ /* if ((TYPE(vpx) != T_ARRAY) &&
1984
+ (rb_obj_is_kind_of(vpx, cNArray) != Qtrue)) {
1985
+ rb_raise(rb_eTypeError, "invalid type");
1986
+ } -- no check since obj2c*ary will do that */
1987
+ if (TYPE(vpy) == T_FLOAT) {
1988
+ vpy = rb_Array(vpy);
1989
+ }
1990
+ /* if ((TYPE(vpy) != T_ARRAY) &&
1991
+ (rb_obj_is_kind_of(vpy, cNArray) != Qtrue)) {
1992
+ rb_raise(rb_eTypeError, "invalid type");
1993
+ } -- no check since obj2c*ary will do that */
1994
+
1995
+ i_n = NUM2INT(n);
1996
+ i_vpx = dcl_obj2crealary(vpx);
1997
+ i_vpy = dcl_obj2crealary(vpy);
1998
+
1999
+
2000
+ sgtnv_(&i_n, i_vpx, i_vpy);
2001
+
2002
+ dcl_freecrealary(i_vpx);
2003
+ dcl_freecrealary(i_vpy);
2004
+
2005
+ return Qnil;
2006
+
2007
+ }
2008
+
2009
+ static VALUE
2010
+ dcl_sgtnr(obj, n, rpx, rpy)
2011
+ VALUE obj, n, rpx, rpy;
2012
+ {
2013
+ integer i_n;
2014
+ real *i_rpx;
2015
+ real *i_rpy;
2016
+
2017
+ if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
2018
+ n = rb_funcall(n, rb_intern("to_i"), 0);
2019
+ }
2020
+ if (TYPE(rpx) == T_FLOAT) {
2021
+ rpx = rb_Array(rpx);
2022
+ }
2023
+ /* if ((TYPE(rpx) != T_ARRAY) &&
2024
+ (rb_obj_is_kind_of(rpx, cNArray) != Qtrue)) {
2025
+ rb_raise(rb_eTypeError, "invalid type");
2026
+ } -- no check since obj2c*ary will do that */
2027
+ if (TYPE(rpy) == T_FLOAT) {
2028
+ rpy = rb_Array(rpy);
2029
+ }
2030
+ /* if ((TYPE(rpy) != T_ARRAY) &&
2031
+ (rb_obj_is_kind_of(rpy, cNArray) != Qtrue)) {
2032
+ rb_raise(rb_eTypeError, "invalid type");
2033
+ } -- no check since obj2c*ary will do that */
2034
+
2035
+ i_n = NUM2INT(n);
2036
+ i_rpx = dcl_obj2crealary(rpx);
2037
+ i_rpy = dcl_obj2crealary(rpy);
2038
+
2039
+
2040
+ sgtnr_(&i_n, i_rpx, i_rpy);
2041
+
2042
+ dcl_freecrealary(i_rpx);
2043
+ dcl_freecrealary(i_rpy);
2044
+
2045
+ return Qnil;
2046
+
2047
+ }
2048
+
2049
+ static VALUE
2050
+ dcl_sgstnp(obj, itpat)
2051
+ VALUE obj, itpat;
2052
+ {
2053
+ integer i_itpat;
2054
+
2055
+ if ((TYPE(itpat) != T_BIGNUM) || (TYPE(itpat) != T_FIXNUM)) {
2056
+ itpat = rb_funcall(itpat, rb_intern("to_i"), 0);
2057
+ }
2058
+
2059
+ i_itpat = NUM2INT(itpat);
2060
+
2061
+
2062
+ sgstnp_(&i_itpat);
2063
+
2064
+ return Qnil;
2065
+
2066
+ }
2067
+
2068
+ static VALUE
2069
+ dcl_sgqtnp(obj)
2070
+ VALUE obj;
2071
+ {
2072
+ integer o_itpat;
2073
+ VALUE itpat;
2074
+
2075
+ sgqtnp_(&o_itpat);
2076
+
2077
+ itpat = INT2NUM(o_itpat);
2078
+
2079
+
2080
+ return itpat;
2081
+
2082
+ }
2083
+
2084
+ static VALUE
2085
+ dcl_sgtnzu(obj, n, upx, upy, itpat)
2086
+ VALUE obj, n, upx, upy, itpat;
2087
+ {
2088
+ integer i_n;
2089
+ real *i_upx;
2090
+ real *i_upy;
2091
+ integer i_itpat;
2092
+
2093
+ if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
2094
+ n = rb_funcall(n, rb_intern("to_i"), 0);
2095
+ }
2096
+ if (TYPE(upx) == T_FLOAT) {
2097
+ upx = rb_Array(upx);
2098
+ }
2099
+ /* if ((TYPE(upx) != T_ARRAY) &&
2100
+ (rb_obj_is_kind_of(upx, cNArray) != Qtrue)) {
2101
+ rb_raise(rb_eTypeError, "invalid type");
2102
+ } -- no check since obj2c*ary will do that */
2103
+ if (TYPE(upy) == T_FLOAT) {
2104
+ upy = rb_Array(upy);
2105
+ }
2106
+ /* if ((TYPE(upy) != T_ARRAY) &&
2107
+ (rb_obj_is_kind_of(upy, cNArray) != Qtrue)) {
2108
+ rb_raise(rb_eTypeError, "invalid type");
2109
+ } -- no check since obj2c*ary will do that */
2110
+ if ((TYPE(itpat) != T_BIGNUM) || (TYPE(itpat) != T_FIXNUM)) {
2111
+ itpat = rb_funcall(itpat, rb_intern("to_i"), 0);
2112
+ }
2113
+
2114
+ i_n = NUM2INT(n);
2115
+ i_itpat = NUM2INT(itpat);
2116
+ i_upx = dcl_obj2crealary(upx);
2117
+ i_upy = dcl_obj2crealary(upy);
2118
+
2119
+
2120
+ sgtnzu_(&i_n, i_upx, i_upy, &i_itpat);
2121
+
2122
+ dcl_freecrealary(i_upx);
2123
+ dcl_freecrealary(i_upy);
2124
+
2125
+ return Qnil;
2126
+
2127
+ }
2128
+
2129
+ static VALUE
2130
+ dcl_sgtnzv(obj, n, vpx, vpy, itpat)
2131
+ VALUE obj, n, vpx, vpy, itpat;
2132
+ {
2133
+ integer i_n;
2134
+ real *i_vpx;
2135
+ real *i_vpy;
2136
+ integer i_itpat;
2137
+
2138
+ if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
2139
+ n = rb_funcall(n, rb_intern("to_i"), 0);
2140
+ }
2141
+ if (TYPE(vpx) == T_FLOAT) {
2142
+ vpx = rb_Array(vpx);
2143
+ }
2144
+ /* if ((TYPE(vpx) != T_ARRAY) &&
2145
+ (rb_obj_is_kind_of(vpx, cNArray) != Qtrue)) {
2146
+ rb_raise(rb_eTypeError, "invalid type");
2147
+ } -- no check since obj2c*ary will do that */
2148
+ if (TYPE(vpy) == T_FLOAT) {
2149
+ vpy = rb_Array(vpy);
2150
+ }
2151
+ /* if ((TYPE(vpy) != T_ARRAY) &&
2152
+ (rb_obj_is_kind_of(vpy, cNArray) != Qtrue)) {
2153
+ rb_raise(rb_eTypeError, "invalid type");
2154
+ } -- no check since obj2c*ary will do that */
2155
+ if ((TYPE(itpat) != T_BIGNUM) || (TYPE(itpat) != T_FIXNUM)) {
2156
+ itpat = rb_funcall(itpat, rb_intern("to_i"), 0);
2157
+ }
2158
+
2159
+ i_n = NUM2INT(n);
2160
+ i_itpat = NUM2INT(itpat);
2161
+ i_vpx = dcl_obj2crealary(vpx);
2162
+ i_vpy = dcl_obj2crealary(vpy);
2163
+
2164
+
2165
+ sgtnzv_(&i_n, i_vpx, i_vpy, &i_itpat);
2166
+
2167
+ dcl_freecrealary(i_vpx);
2168
+ dcl_freecrealary(i_vpy);
2169
+
2170
+ return Qnil;
2171
+
2172
+ }
2173
+
2174
+ static VALUE
2175
+ dcl_sgtnzr(obj, n, rpx, rpy, itpat)
2176
+ VALUE obj, n, rpx, rpy, itpat;
2177
+ {
2178
+ integer i_n;
2179
+ real *i_rpx;
2180
+ real *i_rpy;
2181
+ integer i_itpat;
2182
+
2183
+ if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
2184
+ n = rb_funcall(n, rb_intern("to_i"), 0);
2185
+ }
2186
+ if (TYPE(rpx) == T_FLOAT) {
2187
+ rpx = rb_Array(rpx);
2188
+ }
2189
+ /* if ((TYPE(rpx) != T_ARRAY) &&
2190
+ (rb_obj_is_kind_of(rpx, cNArray) != Qtrue)) {
2191
+ rb_raise(rb_eTypeError, "invalid type");
2192
+ } -- no check since obj2c*ary will do that */
2193
+ if (TYPE(rpy) == T_FLOAT) {
2194
+ rpy = rb_Array(rpy);
2195
+ }
2196
+ /* if ((TYPE(rpy) != T_ARRAY) &&
2197
+ (rb_obj_is_kind_of(rpy, cNArray) != Qtrue)) {
2198
+ rb_raise(rb_eTypeError, "invalid type");
2199
+ } -- no check since obj2c*ary will do that */
2200
+ if ((TYPE(itpat) != T_BIGNUM) || (TYPE(itpat) != T_FIXNUM)) {
2201
+ itpat = rb_funcall(itpat, rb_intern("to_i"), 0);
2202
+ }
2203
+
2204
+ i_n = NUM2INT(n);
2205
+ i_itpat = NUM2INT(itpat);
2206
+ i_rpx = dcl_obj2crealary(rpx);
2207
+ i_rpy = dcl_obj2crealary(rpy);
2208
+
2209
+
2210
+ sgtnzr_(&i_n, i_rpx, i_rpy, &i_itpat);
2211
+
2212
+ dcl_freecrealary(i_rpx);
2213
+ dcl_freecrealary(i_rpy);
2214
+
2215
+ return Qnil;
2216
+
2217
+ }
2218
+
2219
+ static VALUE
2220
+ dcl_sglnu(obj, ux1, uy1, ux2, uy2)
2221
+ VALUE obj, ux1, uy1, ux2, uy2;
2222
+ {
2223
+ real i_ux1;
2224
+ real i_uy1;
2225
+ real i_ux2;
2226
+ real i_uy2;
2227
+
2228
+ if (TYPE(ux1) != T_FLOAT) {
2229
+ ux1 = rb_funcall(ux1, rb_intern("to_f"), 0);
2230
+ }
2231
+ if (TYPE(uy1) != T_FLOAT) {
2232
+ uy1 = rb_funcall(uy1, rb_intern("to_f"), 0);
2233
+ }
2234
+ if (TYPE(ux2) != T_FLOAT) {
2235
+ ux2 = rb_funcall(ux2, rb_intern("to_f"), 0);
2236
+ }
2237
+ if (TYPE(uy2) != T_FLOAT) {
2238
+ uy2 = rb_funcall(uy2, rb_intern("to_f"), 0);
2239
+ }
2240
+
2241
+ i_ux1 = (real)NUM2DBL(ux1);
2242
+ i_uy1 = (real)NUM2DBL(uy1);
2243
+ i_ux2 = (real)NUM2DBL(ux2);
2244
+ i_uy2 = (real)NUM2DBL(uy2);
2245
+
2246
+
2247
+ sglnu_(&i_ux1, &i_uy1, &i_ux2, &i_uy2);
2248
+
2249
+ return Qnil;
2250
+
2251
+ }
2252
+
2253
+ static VALUE
2254
+ dcl_sglnv(obj, vx1, vy1, vx2, vy2)
2255
+ VALUE obj, vx1, vy1, vx2, vy2;
2256
+ {
2257
+ real i_vx1;
2258
+ real i_vy1;
2259
+ real i_vx2;
2260
+ real i_vy2;
2261
+
2262
+ if (TYPE(vx1) != T_FLOAT) {
2263
+ vx1 = rb_funcall(vx1, rb_intern("to_f"), 0);
2264
+ }
2265
+ if (TYPE(vy1) != T_FLOAT) {
2266
+ vy1 = rb_funcall(vy1, rb_intern("to_f"), 0);
2267
+ }
2268
+ if (TYPE(vx2) != T_FLOAT) {
2269
+ vx2 = rb_funcall(vx2, rb_intern("to_f"), 0);
2270
+ }
2271
+ if (TYPE(vy2) != T_FLOAT) {
2272
+ vy2 = rb_funcall(vy2, rb_intern("to_f"), 0);
2273
+ }
2274
+
2275
+ i_vx1 = (real)NUM2DBL(vx1);
2276
+ i_vy1 = (real)NUM2DBL(vy1);
2277
+ i_vx2 = (real)NUM2DBL(vx2);
2278
+ i_vy2 = (real)NUM2DBL(vy2);
2279
+
2280
+
2281
+ sglnv_(&i_vx1, &i_vy1, &i_vx2, &i_vy2);
2282
+
2283
+ return Qnil;
2284
+
2285
+ }
2286
+
2287
+ static VALUE
2288
+ dcl_sglnr(obj, rx1, ry1, rx2, ry2)
2289
+ VALUE obj, rx1, ry1, rx2, ry2;
2290
+ {
2291
+ real i_rx1;
2292
+ real i_ry1;
2293
+ real i_rx2;
2294
+ real i_ry2;
2295
+
2296
+ if (TYPE(rx1) != T_FLOAT) {
2297
+ rx1 = rb_funcall(rx1, rb_intern("to_f"), 0);
2298
+ }
2299
+ if (TYPE(ry1) != T_FLOAT) {
2300
+ ry1 = rb_funcall(ry1, rb_intern("to_f"), 0);
2301
+ }
2302
+ if (TYPE(rx2) != T_FLOAT) {
2303
+ rx2 = rb_funcall(rx2, rb_intern("to_f"), 0);
2304
+ }
2305
+ if (TYPE(ry2) != T_FLOAT) {
2306
+ ry2 = rb_funcall(ry2, rb_intern("to_f"), 0);
2307
+ }
2308
+
2309
+ i_rx1 = (real)NUM2DBL(rx1);
2310
+ i_ry1 = (real)NUM2DBL(ry1);
2311
+ i_rx2 = (real)NUM2DBL(rx2);
2312
+ i_ry2 = (real)NUM2DBL(ry2);
2313
+
2314
+
2315
+ sglnr_(&i_rx1, &i_ry1, &i_rx2, &i_ry2);
2316
+
2317
+ return Qnil;
2318
+
2319
+ }
2320
+
2321
+ static VALUE
2322
+ dcl_sgslni(obj, index)
2323
+ VALUE obj, index;
2324
+ {
2325
+ integer i_index;
2326
+
2327
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
2328
+ index = rb_funcall(index, rb_intern("to_i"), 0);
2329
+ }
2330
+
2331
+ i_index = NUM2INT(index);
2332
+
2333
+
2334
+ sgslni_(&i_index);
2335
+
2336
+ return Qnil;
2337
+
2338
+ }
2339
+
2340
+ static VALUE
2341
+ dcl_sgqlni(obj)
2342
+ VALUE obj;
2343
+ {
2344
+ integer o_index;
2345
+ VALUE index;
2346
+
2347
+ sgqlni_(&o_index);
2348
+
2349
+ index = INT2NUM(o_index);
2350
+
2351
+
2352
+ return index;
2353
+
2354
+ }
2355
+
2356
+ static VALUE
2357
+ dcl_sglnzu(obj, ux1, uy1, ux2, uy2, index)
2358
+ VALUE obj, ux1, uy1, ux2, uy2, index;
2359
+ {
2360
+ real i_ux1;
2361
+ real i_uy1;
2362
+ real i_ux2;
2363
+ real i_uy2;
2364
+ integer i_index;
2365
+
2366
+ if (TYPE(ux1) != T_FLOAT) {
2367
+ ux1 = rb_funcall(ux1, rb_intern("to_f"), 0);
2368
+ }
2369
+ if (TYPE(uy1) != T_FLOAT) {
2370
+ uy1 = rb_funcall(uy1, rb_intern("to_f"), 0);
2371
+ }
2372
+ if (TYPE(ux2) != T_FLOAT) {
2373
+ ux2 = rb_funcall(ux2, rb_intern("to_f"), 0);
2374
+ }
2375
+ if (TYPE(uy2) != T_FLOAT) {
2376
+ uy2 = rb_funcall(uy2, rb_intern("to_f"), 0);
2377
+ }
2378
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
2379
+ index = rb_funcall(index, rb_intern("to_i"), 0);
2380
+ }
2381
+
2382
+ i_ux1 = (real)NUM2DBL(ux1);
2383
+ i_uy1 = (real)NUM2DBL(uy1);
2384
+ i_ux2 = (real)NUM2DBL(ux2);
2385
+ i_uy2 = (real)NUM2DBL(uy2);
2386
+ i_index = NUM2INT(index);
2387
+
2388
+
2389
+ sglnzu_(&i_ux1, &i_uy1, &i_ux2, &i_uy2, &i_index);
2390
+
2391
+ return Qnil;
2392
+
2393
+ }
2394
+
2395
+ static VALUE
2396
+ dcl_sglnzv(obj, vx1, vy1, vx2, vy2, index)
2397
+ VALUE obj, vx1, vy1, vx2, vy2, index;
2398
+ {
2399
+ real i_vx1;
2400
+ real i_vy1;
2401
+ real i_vx2;
2402
+ real i_vy2;
2403
+ integer i_index;
2404
+
2405
+ if (TYPE(vx1) != T_FLOAT) {
2406
+ vx1 = rb_funcall(vx1, rb_intern("to_f"), 0);
2407
+ }
2408
+ if (TYPE(vy1) != T_FLOAT) {
2409
+ vy1 = rb_funcall(vy1, rb_intern("to_f"), 0);
2410
+ }
2411
+ if (TYPE(vx2) != T_FLOAT) {
2412
+ vx2 = rb_funcall(vx2, rb_intern("to_f"), 0);
2413
+ }
2414
+ if (TYPE(vy2) != T_FLOAT) {
2415
+ vy2 = rb_funcall(vy2, rb_intern("to_f"), 0);
2416
+ }
2417
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
2418
+ index = rb_funcall(index, rb_intern("to_i"), 0);
2419
+ }
2420
+
2421
+ i_vx1 = (real)NUM2DBL(vx1);
2422
+ i_vy1 = (real)NUM2DBL(vy1);
2423
+ i_vx2 = (real)NUM2DBL(vx2);
2424
+ i_vy2 = (real)NUM2DBL(vy2);
2425
+ i_index = NUM2INT(index);
2426
+
2427
+
2428
+ sglnzv_(&i_vx1, &i_vy1, &i_vx2, &i_vy2, &i_index);
2429
+
2430
+ return Qnil;
2431
+
2432
+ }
2433
+
2434
+ static VALUE
2435
+ dcl_sglnzr(obj, rx1, ry1, rx2, ry2, index)
2436
+ VALUE obj, rx1, ry1, rx2, ry2, index;
2437
+ {
2438
+ real i_rx1;
2439
+ real i_ry1;
2440
+ real i_rx2;
2441
+ real i_ry2;
2442
+ integer i_index;
2443
+
2444
+ if (TYPE(rx1) != T_FLOAT) {
2445
+ rx1 = rb_funcall(rx1, rb_intern("to_f"), 0);
2446
+ }
2447
+ if (TYPE(ry1) != T_FLOAT) {
2448
+ ry1 = rb_funcall(ry1, rb_intern("to_f"), 0);
2449
+ }
2450
+ if (TYPE(rx2) != T_FLOAT) {
2451
+ rx2 = rb_funcall(rx2, rb_intern("to_f"), 0);
2452
+ }
2453
+ if (TYPE(ry2) != T_FLOAT) {
2454
+ ry2 = rb_funcall(ry2, rb_intern("to_f"), 0);
2455
+ }
2456
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
2457
+ index = rb_funcall(index, rb_intern("to_i"), 0);
2458
+ }
2459
+
2460
+ i_rx1 = (real)NUM2DBL(rx1);
2461
+ i_ry1 = (real)NUM2DBL(ry1);
2462
+ i_rx2 = (real)NUM2DBL(rx2);
2463
+ i_ry2 = (real)NUM2DBL(ry2);
2464
+ i_index = NUM2INT(index);
2465
+
2466
+
2467
+ sglnzr_(&i_rx1, &i_ry1, &i_rx2, &i_ry2, &i_index);
2468
+
2469
+ return Qnil;
2470
+
2471
+ }
2472
+
2473
+ static VALUE
2474
+ dcl_sglau(obj, ux1, uy1, ux2, uy2)
2475
+ VALUE obj, ux1, uy1, ux2, uy2;
2476
+ {
2477
+ real i_ux1;
2478
+ real i_uy1;
2479
+ real i_ux2;
2480
+ real i_uy2;
2481
+
2482
+ if (TYPE(ux1) != T_FLOAT) {
2483
+ ux1 = rb_funcall(ux1, rb_intern("to_f"), 0);
2484
+ }
2485
+ if (TYPE(uy1) != T_FLOAT) {
2486
+ uy1 = rb_funcall(uy1, rb_intern("to_f"), 0);
2487
+ }
2488
+ if (TYPE(ux2) != T_FLOAT) {
2489
+ ux2 = rb_funcall(ux2, rb_intern("to_f"), 0);
2490
+ }
2491
+ if (TYPE(uy2) != T_FLOAT) {
2492
+ uy2 = rb_funcall(uy2, rb_intern("to_f"), 0);
2493
+ }
2494
+
2495
+ i_ux1 = (real)NUM2DBL(ux1);
2496
+ i_uy1 = (real)NUM2DBL(uy1);
2497
+ i_ux2 = (real)NUM2DBL(ux2);
2498
+ i_uy2 = (real)NUM2DBL(uy2);
2499
+
2500
+
2501
+ sglau_(&i_ux1, &i_uy1, &i_ux2, &i_uy2);
2502
+
2503
+ return Qnil;
2504
+
2505
+ }
2506
+
2507
+ static VALUE
2508
+ dcl_sglav(obj, vx1, vy1, vx2, vy2)
2509
+ VALUE obj, vx1, vy1, vx2, vy2;
2510
+ {
2511
+ real i_vx1;
2512
+ real i_vy1;
2513
+ real i_vx2;
2514
+ real i_vy2;
2515
+
2516
+ if (TYPE(vx1) != T_FLOAT) {
2517
+ vx1 = rb_funcall(vx1, rb_intern("to_f"), 0);
2518
+ }
2519
+ if (TYPE(vy1) != T_FLOAT) {
2520
+ vy1 = rb_funcall(vy1, rb_intern("to_f"), 0);
2521
+ }
2522
+ if (TYPE(vx2) != T_FLOAT) {
2523
+ vx2 = rb_funcall(vx2, rb_intern("to_f"), 0);
2524
+ }
2525
+ if (TYPE(vy2) != T_FLOAT) {
2526
+ vy2 = rb_funcall(vy2, rb_intern("to_f"), 0);
2527
+ }
2528
+
2529
+ i_vx1 = (real)NUM2DBL(vx1);
2530
+ i_vy1 = (real)NUM2DBL(vy1);
2531
+ i_vx2 = (real)NUM2DBL(vx2);
2532
+ i_vy2 = (real)NUM2DBL(vy2);
2533
+
2534
+
2535
+ sglav_(&i_vx1, &i_vy1, &i_vx2, &i_vy2);
2536
+
2537
+ return Qnil;
2538
+
2539
+ }
2540
+
2541
+ static VALUE
2542
+ dcl_sglar(obj, rx1, ry1, rx2, ry2)
2543
+ VALUE obj, rx1, ry1, rx2, ry2;
2544
+ {
2545
+ real i_rx1;
2546
+ real i_ry1;
2547
+ real i_rx2;
2548
+ real i_ry2;
2549
+
2550
+ if (TYPE(rx1) != T_FLOAT) {
2551
+ rx1 = rb_funcall(rx1, rb_intern("to_f"), 0);
2552
+ }
2553
+ if (TYPE(ry1) != T_FLOAT) {
2554
+ ry1 = rb_funcall(ry1, rb_intern("to_f"), 0);
2555
+ }
2556
+ if (TYPE(rx2) != T_FLOAT) {
2557
+ rx2 = rb_funcall(rx2, rb_intern("to_f"), 0);
2558
+ }
2559
+ if (TYPE(ry2) != T_FLOAT) {
2560
+ ry2 = rb_funcall(ry2, rb_intern("to_f"), 0);
2561
+ }
2562
+
2563
+ i_rx1 = (real)NUM2DBL(rx1);
2564
+ i_ry1 = (real)NUM2DBL(ry1);
2565
+ i_rx2 = (real)NUM2DBL(rx2);
2566
+ i_ry2 = (real)NUM2DBL(ry2);
2567
+
2568
+
2569
+ sglar_(&i_rx1, &i_ry1, &i_rx2, &i_ry2);
2570
+
2571
+ return Qnil;
2572
+
2573
+ }
2574
+
2575
+ static VALUE
2576
+ dcl_sgslat(obj, itype)
2577
+ VALUE obj, itype;
2578
+ {
2579
+ integer i_itype;
2580
+
2581
+ if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
2582
+ itype = rb_funcall(itype, rb_intern("to_i"), 0);
2583
+ }
2584
+
2585
+ i_itype = NUM2INT(itype);
2586
+
2587
+
2588
+ sgslat_(&i_itype);
2589
+
2590
+ return Qnil;
2591
+
2592
+ }
2593
+
2594
+ static VALUE
2595
+ dcl_sgqlat(obj)
2596
+ VALUE obj;
2597
+ {
2598
+ integer o_itype;
2599
+ VALUE itype;
2600
+
2601
+ sgqlat_(&o_itype);
2602
+
2603
+ itype = INT2NUM(o_itype);
2604
+
2605
+
2606
+ return itype;
2607
+
2608
+ }
2609
+
2610
+ static VALUE
2611
+ dcl_sgslai(obj, index)
2612
+ VALUE obj, index;
2613
+ {
2614
+ integer i_index;
2615
+
2616
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
2617
+ index = rb_funcall(index, rb_intern("to_i"), 0);
2618
+ }
2619
+
2620
+ i_index = NUM2INT(index);
2621
+
2622
+
2623
+ sgslai_(&i_index);
2624
+
2625
+ return Qnil;
2626
+
2627
+ }
2628
+
2629
+ static VALUE
2630
+ dcl_sgqlai(obj)
2631
+ VALUE obj;
2632
+ {
2633
+ integer o_index;
2634
+ VALUE index;
2635
+
2636
+ sgqlai_(&o_index);
2637
+
2638
+ index = INT2NUM(o_index);
2639
+
2640
+
2641
+ return index;
2642
+
2643
+ }
2644
+
2645
+ static VALUE
2646
+ dcl_sglazu(obj, ux1, uy1, ux2, uy2, itype, index)
2647
+ VALUE obj, ux1, uy1, ux2, uy2, itype, index;
2648
+ {
2649
+ real i_ux1;
2650
+ real i_uy1;
2651
+ real i_ux2;
2652
+ real i_uy2;
2653
+ integer i_itype;
2654
+ integer i_index;
2655
+
2656
+ if (TYPE(ux1) != T_FLOAT) {
2657
+ ux1 = rb_funcall(ux1, rb_intern("to_f"), 0);
2658
+ }
2659
+ if (TYPE(uy1) != T_FLOAT) {
2660
+ uy1 = rb_funcall(uy1, rb_intern("to_f"), 0);
2661
+ }
2662
+ if (TYPE(ux2) != T_FLOAT) {
2663
+ ux2 = rb_funcall(ux2, rb_intern("to_f"), 0);
2664
+ }
2665
+ if (TYPE(uy2) != T_FLOAT) {
2666
+ uy2 = rb_funcall(uy2, rb_intern("to_f"), 0);
2667
+ }
2668
+ if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
2669
+ itype = rb_funcall(itype, rb_intern("to_i"), 0);
2670
+ }
2671
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
2672
+ index = rb_funcall(index, rb_intern("to_i"), 0);
2673
+ }
2674
+
2675
+ i_ux1 = (real)NUM2DBL(ux1);
2676
+ i_uy1 = (real)NUM2DBL(uy1);
2677
+ i_ux2 = (real)NUM2DBL(ux2);
2678
+ i_uy2 = (real)NUM2DBL(uy2);
2679
+ i_itype = NUM2INT(itype);
2680
+ i_index = NUM2INT(index);
2681
+
2682
+
2683
+ sglazu_(&i_ux1, &i_uy1, &i_ux2, &i_uy2, &i_itype, &i_index);
2684
+
2685
+ return Qnil;
2686
+
2687
+ }
2688
+
2689
+ static VALUE
2690
+ dcl_sglazv(obj, vx1, vy1, vx2, vy2, itype, index)
2691
+ VALUE obj, vx1, vy1, vx2, vy2, itype, index;
2692
+ {
2693
+ real i_vx1;
2694
+ real i_vy1;
2695
+ real i_vx2;
2696
+ real i_vy2;
2697
+ integer i_itype;
2698
+ integer i_index;
2699
+
2700
+ if (TYPE(vx1) != T_FLOAT) {
2701
+ vx1 = rb_funcall(vx1, rb_intern("to_f"), 0);
2702
+ }
2703
+ if (TYPE(vy1) != T_FLOAT) {
2704
+ vy1 = rb_funcall(vy1, rb_intern("to_f"), 0);
2705
+ }
2706
+ if (TYPE(vx2) != T_FLOAT) {
2707
+ vx2 = rb_funcall(vx2, rb_intern("to_f"), 0);
2708
+ }
2709
+ if (TYPE(vy2) != T_FLOAT) {
2710
+ vy2 = rb_funcall(vy2, rb_intern("to_f"), 0);
2711
+ }
2712
+ if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
2713
+ itype = rb_funcall(itype, rb_intern("to_i"), 0);
2714
+ }
2715
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
2716
+ index = rb_funcall(index, rb_intern("to_i"), 0);
2717
+ }
2718
+
2719
+ i_vx1 = (real)NUM2DBL(vx1);
2720
+ i_vy1 = (real)NUM2DBL(vy1);
2721
+ i_vx2 = (real)NUM2DBL(vx2);
2722
+ i_vy2 = (real)NUM2DBL(vy2);
2723
+ i_itype = NUM2INT(itype);
2724
+ i_index = NUM2INT(index);
2725
+
2726
+
2727
+ sglazv_(&i_vx1, &i_vy1, &i_vx2, &i_vy2, &i_itype, &i_index);
2728
+
2729
+ return Qnil;
2730
+
2731
+ }
2732
+
2733
+ static VALUE
2734
+ dcl_sglazr(obj, rx1, ry1, rx2, ry2, itype, index)
2735
+ VALUE obj, rx1, ry1, rx2, ry2, itype, index;
2736
+ {
2737
+ real i_rx1;
2738
+ real i_ry1;
2739
+ real i_rx2;
2740
+ real i_ry2;
2741
+ integer i_itype;
2742
+ integer i_index;
2743
+
2744
+ if (TYPE(rx1) != T_FLOAT) {
2745
+ rx1 = rb_funcall(rx1, rb_intern("to_f"), 0);
2746
+ }
2747
+ if (TYPE(ry1) != T_FLOAT) {
2748
+ ry1 = rb_funcall(ry1, rb_intern("to_f"), 0);
2749
+ }
2750
+ if (TYPE(rx2) != T_FLOAT) {
2751
+ rx2 = rb_funcall(rx2, rb_intern("to_f"), 0);
2752
+ }
2753
+ if (TYPE(ry2) != T_FLOAT) {
2754
+ ry2 = rb_funcall(ry2, rb_intern("to_f"), 0);
2755
+ }
2756
+ if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
2757
+ itype = rb_funcall(itype, rb_intern("to_i"), 0);
2758
+ }
2759
+ if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
2760
+ index = rb_funcall(index, rb_intern("to_i"), 0);
2761
+ }
2762
+
2763
+ i_rx1 = (real)NUM2DBL(rx1);
2764
+ i_ry1 = (real)NUM2DBL(ry1);
2765
+ i_rx2 = (real)NUM2DBL(rx2);
2766
+ i_ry2 = (real)NUM2DBL(ry2);
2767
+ i_itype = NUM2INT(itype);
2768
+ i_index = NUM2INT(index);
2769
+
2770
+
2771
+ sglazr_(&i_rx1, &i_ry1, &i_rx2, &i_ry2, &i_itype, &i_index);
2772
+
2773
+ return Qnil;
2774
+
2775
+ }
2776
+
2777
+ static VALUE
2778
+ dcl_sgsplc(obj, charx)
2779
+ VALUE obj, charx;
2780
+ {
2781
+ char *i_charx;
2782
+
2783
+ if (TYPE(charx) != T_STRING) {
2784
+ charx = rb_funcall(charx, rb_intern("to_str"), 0);
2785
+ }
2786
+
2787
+ i_charx = StringValuePtr(charx);
2788
+
2789
+
2790
+ sgsplc_(i_charx, (ftnlen)strlen(i_charx));
2791
+
2792
+ return Qnil;
2793
+
2794
+ }
2795
+
2796
+ static VALUE
2797
+ dcl_sgqplc(obj)
2798
+ VALUE obj;
2799
+ {
2800
+ char *o_charx;
2801
+ VALUE charx;
2802
+
2803
+ o_charx= ALLOCA_N(char, (DFLT_SIZE+1));
2804
+ memset(o_charx, '\0', DFLT_SIZE+1);
2805
+
2806
+ sgqplc_(o_charx, (ftnlen)DFLT_SIZE);
2807
+
2808
+ charx = rb_str_new2(o_charx);
2809
+
2810
+
2811
+ return charx;
2812
+
2813
+ }
2814
+
2815
+ static VALUE
2816
+ dcl_sgspls(obj, rsize)
2817
+ VALUE obj, rsize;
2818
+ {
2819
+ real i_rsize;
2820
+
2821
+ if (TYPE(rsize) != T_FLOAT) {
2822
+ rsize = rb_funcall(rsize, rb_intern("to_f"), 0);
2823
+ }
2824
+
2825
+ i_rsize = (real)NUM2DBL(rsize);
2826
+
2827
+
2828
+ sgspls_(&i_rsize);
2829
+
2830
+ return Qnil;
2831
+
2832
+ }
2833
+
2834
+ static VALUE
2835
+ dcl_sgqpls(obj)
2836
+ VALUE obj;
2837
+ {
2838
+ real o_rsize;
2839
+ VALUE rsize;
2840
+
2841
+ sgqpls_(&o_rsize);
2842
+
2843
+ rsize = rb_float_new((double)o_rsize);
2844
+
2845
+
2846
+ return rsize;
2847
+
2848
+ }
2849
+
2850
+ static VALUE
2851
+ dcl_sgnplc(obj)
2852
+ VALUE obj;
2853
+ {
2854
+ sgnplc_();
2855
+
2856
+ return Qnil;
2857
+
2858
+ }
2859
+
2860
+ static VALUE
2861
+ dcl_sgiget(obj, cp)
2862
+ VALUE obj, cp;
2863
+ {
2864
+ char *i_cp;
2865
+ integer o_ipara;
2866
+ VALUE ipara;
2867
+
2868
+ if (TYPE(cp) != T_STRING) {
2869
+ cp = rb_funcall(cp, rb_intern("to_str"), 0);
2870
+ }
2871
+
2872
+ i_cp = StringValuePtr(cp);
2873
+
2874
+
2875
+ sgiget_(i_cp, &o_ipara, (ftnlen)strlen(i_cp));
2876
+
2877
+ ipara = INT2NUM(o_ipara);
2878
+
2879
+
2880
+ return ipara;
2881
+
2882
+ }
2883
+
2884
+ static VALUE
2885
+ dcl_sgiset(obj, cp, ipara)
2886
+ VALUE obj, cp, ipara;
2887
+ {
2888
+ char *i_cp;
2889
+ integer i_ipara;
2890
+
2891
+ if (TYPE(cp) != T_STRING) {
2892
+ cp = rb_funcall(cp, rb_intern("to_str"), 0);
2893
+ }
2894
+ if ((TYPE(ipara) != T_BIGNUM) || (TYPE(ipara) != T_FIXNUM)) {
2895
+ ipara = rb_funcall(ipara, rb_intern("to_i"), 0);
2896
+ }
2897
+
2898
+ i_cp = StringValuePtr(cp);
2899
+ i_ipara = NUM2INT(ipara);
2900
+
2901
+
2902
+ sgiset_(i_cp, &i_ipara, (ftnlen)strlen(i_cp));
2903
+
2904
+ return Qnil;
2905
+
2906
+ }
2907
+
2908
+ static VALUE
2909
+ dcl_sgistx(obj, cp, ipara)
2910
+ VALUE obj, cp, ipara;
2911
+ {
2912
+ char *i_cp;
2913
+ integer i_ipara;
2914
+
2915
+ if (TYPE(cp) != T_STRING) {
2916
+ cp = rb_funcall(cp, rb_intern("to_str"), 0);
2917
+ }
2918
+ if ((TYPE(ipara) != T_BIGNUM) || (TYPE(ipara) != T_FIXNUM)) {
2919
+ ipara = rb_funcall(ipara, rb_intern("to_i"), 0);
2920
+ }
2921
+
2922
+ i_cp = StringValuePtr(cp);
2923
+ i_ipara = NUM2INT(ipara);
2924
+
2925
+
2926
+ sgistx_(i_cp, &i_ipara, (ftnlen)strlen(i_cp));
2927
+
2928
+ return Qnil;
2929
+
2930
+ }
2931
+
2932
+ static VALUE
2933
+ dcl_sgiqnp(obj)
2934
+ VALUE obj;
2935
+ {
2936
+ integer o_ncp;
2937
+ VALUE ncp;
2938
+
2939
+ sgiqnp_(&o_ncp);
2940
+
2941
+ ncp = INT2NUM(o_ncp);
2942
+
2943
+
2944
+ return ncp;
2945
+
2946
+ }
2947
+
2948
+ static VALUE
2949
+ dcl_sgiqid(obj, cp)
2950
+ VALUE obj, cp;
2951
+ {
2952
+ char *i_cp;
2953
+ integer o_idx;
2954
+ VALUE idx;
2955
+
2956
+ if (TYPE(cp) != T_STRING) {
2957
+ cp = rb_funcall(cp, rb_intern("to_str"), 0);
2958
+ }
2959
+
2960
+ i_cp = StringValuePtr(cp);
2961
+
2962
+
2963
+ sgiqid_(i_cp, &o_idx, (ftnlen)strlen(i_cp));
2964
+
2965
+ idx = INT2NUM(o_idx);
2966
+
2967
+
2968
+ return idx;
2969
+
2970
+ }
2971
+
2972
+ static VALUE
2973
+ dcl_sgiqcp(obj, idx)
2974
+ VALUE obj, idx;
2975
+ {
2976
+ integer i_idx;
2977
+ char *o_cp;
2978
+ VALUE cp;
2979
+
2980
+ if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
2981
+ idx = rb_funcall(idx, rb_intern("to_i"), 0);
2982
+ }
2983
+
2984
+ i_idx = NUM2INT(idx);
2985
+
2986
+ o_cp= ALLOCA_N(char, (DFLT_SIZE+1));
2987
+ memset(o_cp, '\0', DFLT_SIZE+1);
2988
+
2989
+ sgiqcp_(&i_idx, o_cp, (ftnlen)DFLT_SIZE);
2990
+
2991
+ cp = rb_str_new2(o_cp);
2992
+
2993
+
2994
+ return cp;
2995
+
2996
+ }
2997
+
2998
+ static VALUE
2999
+ dcl_sgiqcl(obj, idx)
3000
+ VALUE obj, idx;
3001
+ {
3002
+ integer i_idx;
3003
+ char *o_cp;
3004
+ VALUE cp;
3005
+
3006
+ if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
3007
+ idx = rb_funcall(idx, rb_intern("to_i"), 0);
3008
+ }
3009
+
3010
+ i_idx = NUM2INT(idx);
3011
+
3012
+ o_cp= ALLOCA_N(char, (DFLT_SIZE+1));
3013
+ memset(o_cp, '\0', DFLT_SIZE+1);
3014
+
3015
+ sgiqcl_(&i_idx, o_cp, (ftnlen)DFLT_SIZE);
3016
+
3017
+ cp = rb_str_new2(o_cp);
3018
+
3019
+
3020
+ return cp;
3021
+
3022
+ }
3023
+
3024
+ static VALUE
3025
+ dcl_sgiqvl(obj, idx)
3026
+ VALUE obj, idx;
3027
+ {
3028
+ integer i_idx;
3029
+ integer o_ipara;
3030
+ VALUE ipara;
3031
+
3032
+ if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
3033
+ idx = rb_funcall(idx, rb_intern("to_i"), 0);
3034
+ }
3035
+
3036
+ i_idx = NUM2INT(idx);
3037
+
3038
+
3039
+ sgiqvl_(&i_idx, &o_ipara);
3040
+
3041
+ ipara = INT2NUM(o_ipara);
3042
+
3043
+
3044
+ return ipara;
3045
+
3046
+ }
3047
+
3048
+ static VALUE
3049
+ dcl_sgisvl(obj, idx, ipara)
3050
+ VALUE obj, idx, ipara;
3051
+ {
3052
+ integer i_idx;
3053
+ integer i_ipara;
3054
+
3055
+ if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
3056
+ idx = rb_funcall(idx, rb_intern("to_i"), 0);
3057
+ }
3058
+ if ((TYPE(ipara) != T_BIGNUM) || (TYPE(ipara) != T_FIXNUM)) {
3059
+ ipara = rb_funcall(ipara, rb_intern("to_i"), 0);
3060
+ }
3061
+
3062
+ i_idx = NUM2INT(idx);
3063
+ i_ipara = NUM2INT(ipara);
3064
+
3065
+
3066
+ sgisvl_(&i_idx, &i_ipara);
3067
+
3068
+ return Qnil;
3069
+
3070
+ }
3071
+
3072
+ static VALUE
3073
+ dcl_sgiqin(obj, cp)
3074
+ VALUE obj, cp;
3075
+ {
3076
+ char *i_cp;
3077
+ integer o_in;
3078
+ VALUE in;
3079
+
3080
+ if (TYPE(cp) != T_STRING) {
3081
+ cp = rb_funcall(cp, rb_intern("to_str"), 0);
3082
+ }
3083
+
3084
+ i_cp = StringValuePtr(cp);
3085
+
3086
+
3087
+ sgiqin_(i_cp, &o_in, (ftnlen)strlen(i_cp));
3088
+
3089
+ in = INT2NUM(o_in);
3090
+
3091
+
3092
+ return in;
3093
+
3094
+ }
3095
+
3096
+ static VALUE
3097
+ dcl_sglget(obj, cp)
3098
+ VALUE obj, cp;
3099
+ {
3100
+ char *i_cp;
3101
+ logical o_lpara;
3102
+ VALUE lpara;
3103
+
3104
+ if (TYPE(cp) != T_STRING) {
3105
+ cp = rb_funcall(cp, rb_intern("to_str"), 0);
3106
+ }
3107
+
3108
+ i_cp = StringValuePtr(cp);
3109
+
3110
+
3111
+ sglget_(i_cp, &o_lpara, (ftnlen)strlen(i_cp));
3112
+
3113
+ lpara = (o_lpara == FALSE_) ? Qfalse : Qtrue;
3114
+
3115
+
3116
+ return lpara;
3117
+
3118
+ }
3119
+
3120
+ static VALUE
3121
+ dcl_sglset(obj, cp, lpara)
3122
+ VALUE obj, cp, lpara;
3123
+ {
3124
+ char *i_cp;
3125
+ logical i_lpara;
3126
+
3127
+ if (TYPE(cp) != T_STRING) {
3128
+ cp = rb_funcall(cp, rb_intern("to_str"), 0);
3129
+ }
3130
+
3131
+ i_cp = StringValuePtr(cp);
3132
+ i_lpara = ((lpara == Qnil)||(lpara == Qfalse)) ? FALSE_ : TRUE_;
3133
+
3134
+
3135
+ sglset_(i_cp, &i_lpara, (ftnlen)strlen(i_cp));
3136
+
3137
+ return Qnil;
3138
+
3139
+ }
3140
+
3141
+ static VALUE
3142
+ dcl_sglstx(obj, cp, lpara)
3143
+ VALUE obj, cp, lpara;
3144
+ {
3145
+ char *i_cp;
3146
+ logical i_lpara;
3147
+
3148
+ if (TYPE(cp) != T_STRING) {
3149
+ cp = rb_funcall(cp, rb_intern("to_str"), 0);
3150
+ }
3151
+
3152
+ i_cp = StringValuePtr(cp);
3153
+ i_lpara = ((lpara == Qnil)||(lpara == Qfalse)) ? FALSE_ : TRUE_;
3154
+
3155
+
3156
+ sglstx_(i_cp, &i_lpara, (ftnlen)strlen(i_cp));
3157
+
3158
+ return Qnil;
3159
+
3160
+ }
3161
+
3162
+ static VALUE
3163
+ dcl_sglqnp(obj)
3164
+ VALUE obj;
3165
+ {
3166
+ integer o_ncp;
3167
+ VALUE ncp;
3168
+
3169
+ sglqnp_(&o_ncp);
3170
+
3171
+ ncp = INT2NUM(o_ncp);
3172
+
3173
+
3174
+ return ncp;
3175
+
3176
+ }
3177
+
3178
+ static VALUE
3179
+ dcl_sglqid(obj, cp)
3180
+ VALUE obj, cp;
3181
+ {
3182
+ char *i_cp;
3183
+ integer o_idx;
3184
+ VALUE idx;
3185
+
3186
+ if (TYPE(cp) != T_STRING) {
3187
+ cp = rb_funcall(cp, rb_intern("to_str"), 0);
3188
+ }
3189
+
3190
+ i_cp = StringValuePtr(cp);
3191
+
3192
+
3193
+ sglqid_(i_cp, &o_idx, (ftnlen)strlen(i_cp));
3194
+
3195
+ idx = INT2NUM(o_idx);
3196
+
3197
+
3198
+ return idx;
3199
+
3200
+ }
3201
+
3202
+ static VALUE
3203
+ dcl_sglqcp(obj, idx)
3204
+ VALUE obj, idx;
3205
+ {
3206
+ integer i_idx;
3207
+ char *o_cp;
3208
+ VALUE cp;
3209
+
3210
+ if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
3211
+ idx = rb_funcall(idx, rb_intern("to_i"), 0);
3212
+ }
3213
+
3214
+ i_idx = NUM2INT(idx);
3215
+
3216
+ o_cp= ALLOCA_N(char, (DFLT_SIZE+1));
3217
+ memset(o_cp, '\0', DFLT_SIZE+1);
3218
+
3219
+ sglqcp_(&i_idx, o_cp, (ftnlen)DFLT_SIZE);
3220
+
3221
+ cp = rb_str_new2(o_cp);
3222
+
3223
+
3224
+ return cp;
3225
+
3226
+ }
3227
+
3228
+ static VALUE
3229
+ dcl_sglqcl(obj, idx)
3230
+ VALUE obj, idx;
3231
+ {
3232
+ integer i_idx;
3233
+ char *o_cp;
3234
+ VALUE cp;
3235
+
3236
+ if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
3237
+ idx = rb_funcall(idx, rb_intern("to_i"), 0);
3238
+ }
3239
+
3240
+ i_idx = NUM2INT(idx);
3241
+
3242
+ o_cp= ALLOCA_N(char, (DFLT_SIZE+1));
3243
+ memset(o_cp, '\0', DFLT_SIZE+1);
3244
+
3245
+ sglqcl_(&i_idx, o_cp, (ftnlen)DFLT_SIZE);
3246
+
3247
+ cp = rb_str_new2(o_cp);
3248
+
3249
+
3250
+ return cp;
3251
+
3252
+ }
3253
+
3254
+ static VALUE
3255
+ dcl_sglqvl(obj, idx)
3256
+ VALUE obj, idx;
3257
+ {
3258
+ integer i_idx;
3259
+ logical o_lpara;
3260
+ VALUE lpara;
3261
+
3262
+ if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
3263
+ idx = rb_funcall(idx, rb_intern("to_i"), 0);
3264
+ }
3265
+
3266
+ i_idx = NUM2INT(idx);
3267
+
3268
+
3269
+ sglqvl_(&i_idx, &o_lpara);
3270
+
3271
+ lpara = (o_lpara == FALSE_) ? Qfalse : Qtrue;
3272
+
3273
+
3274
+ return lpara;
3275
+
3276
+ }
3277
+
3278
+ static VALUE
3279
+ dcl_sglsvl(obj, idx, lpara)
3280
+ VALUE obj, idx, lpara;
3281
+ {
3282
+ integer i_idx;
3283
+ logical i_lpara;
3284
+
3285
+ if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
3286
+ idx = rb_funcall(idx, rb_intern("to_i"), 0);
3287
+ }
3288
+
3289
+ i_idx = NUM2INT(idx);
3290
+ i_lpara = ((lpara == Qnil)||(lpara == Qfalse)) ? FALSE_ : TRUE_;
3291
+
3292
+
3293
+ sglsvl_(&i_idx, &i_lpara);
3294
+
3295
+ return Qnil;
3296
+
3297
+ }
3298
+
3299
+ static VALUE
3300
+ dcl_sglqin(obj, cp)
3301
+ VALUE obj, cp;
3302
+ {
3303
+ char *i_cp;
3304
+ integer o_in;
3305
+ VALUE in;
3306
+
3307
+ if (TYPE(cp) != T_STRING) {
3308
+ cp = rb_funcall(cp, rb_intern("to_str"), 0);
3309
+ }
3310
+
3311
+ i_cp = StringValuePtr(cp);
3312
+
3313
+
3314
+ sglqin_(i_cp, &o_in, (ftnlen)strlen(i_cp));
3315
+
3316
+ in = INT2NUM(o_in);
3317
+
3318
+
3319
+ return in;
3320
+
3321
+ }
3322
+
3323
+ static VALUE
3324
+ dcl_sgoopn(obj, cprc, com)
3325
+ VALUE obj, cprc, com;
3326
+ {
3327
+ char *i_cprc;
3328
+ char *i_com;
3329
+
3330
+ if (TYPE(cprc) != T_STRING) {
3331
+ cprc = rb_funcall(cprc, rb_intern("to_str"), 0);
3332
+ }
3333
+ if (TYPE(com) != T_STRING) {
3334
+ com = rb_funcall(com, rb_intern("to_str"), 0);
3335
+ }
3336
+
3337
+ i_cprc = StringValuePtr(cprc);
3338
+ i_com = StringValuePtr(com);
3339
+
3340
+
3341
+ sgoopn_(i_cprc, i_com, (ftnlen)strlen(i_cprc), (ftnlen)strlen(i_com));
3342
+
3343
+ return Qnil;
3344
+
3345
+ }
3346
+
3347
+ static VALUE
3348
+ dcl_sgocls(obj, cprc)
3349
+ VALUE obj, cprc;
3350
+ {
3351
+ char *i_cprc;
3352
+
3353
+ if (TYPE(cprc) != T_STRING) {
3354
+ cprc = rb_funcall(cprc, rb_intern("to_str"), 0);
3355
+ }
3356
+
3357
+ i_cprc = StringValuePtr(cprc);
3358
+
3359
+
3360
+ sgocls_(i_cprc, (ftnlen)strlen(i_cprc));
3361
+
3362
+ return Qnil;
3363
+
3364
+ }
3365
+
3366
+ static VALUE
3367
+ dcl_sgrget(obj, cp)
3368
+ VALUE obj, cp;
3369
+ {
3370
+ char *i_cp;
3371
+ real o_rpara;
3372
+ VALUE rpara;
3373
+
3374
+ if (TYPE(cp) != T_STRING) {
3375
+ cp = rb_funcall(cp, rb_intern("to_str"), 0);
3376
+ }
3377
+
3378
+ i_cp = StringValuePtr(cp);
3379
+
3380
+
3381
+ sgrget_(i_cp, &o_rpara, (ftnlen)strlen(i_cp));
3382
+
3383
+ rpara = rb_float_new((double)o_rpara);
3384
+
3385
+
3386
+ return rpara;
3387
+
3388
+ }
3389
+
3390
+ static VALUE
3391
+ dcl_sgrset(obj, cp, rpara)
3392
+ VALUE obj, cp, rpara;
3393
+ {
3394
+ char *i_cp;
3395
+ real i_rpara;
3396
+
3397
+ if (TYPE(cp) != T_STRING) {
3398
+ cp = rb_funcall(cp, rb_intern("to_str"), 0);
3399
+ }
3400
+ if (TYPE(rpara) != T_FLOAT) {
3401
+ rpara = rb_funcall(rpara, rb_intern("to_f"), 0);
3402
+ }
3403
+
3404
+ i_cp = StringValuePtr(cp);
3405
+ i_rpara = (real)NUM2DBL(rpara);
3406
+
3407
+
3408
+ sgrset_(i_cp, &i_rpara, (ftnlen)strlen(i_cp));
3409
+
3410
+ return Qnil;
3411
+
3412
+ }
3413
+
3414
+ static VALUE
3415
+ dcl_sgrstx(obj, cp, rpara)
3416
+ VALUE obj, cp, rpara;
3417
+ {
3418
+ char *i_cp;
3419
+ real i_rpara;
3420
+
3421
+ if (TYPE(cp) != T_STRING) {
3422
+ cp = rb_funcall(cp, rb_intern("to_str"), 0);
3423
+ }
3424
+ if (TYPE(rpara) != T_FLOAT) {
3425
+ rpara = rb_funcall(rpara, rb_intern("to_f"), 0);
3426
+ }
3427
+
3428
+ i_cp = StringValuePtr(cp);
3429
+ i_rpara = (real)NUM2DBL(rpara);
3430
+
3431
+
3432
+ sgrstx_(i_cp, &i_rpara, (ftnlen)strlen(i_cp));
3433
+
3434
+ return Qnil;
3435
+
3436
+ }
3437
+
3438
+ static VALUE
3439
+ dcl_sgrqnp(obj)
3440
+ VALUE obj;
3441
+ {
3442
+ integer o_ncp;
3443
+ VALUE ncp;
3444
+
3445
+ sgrqnp_(&o_ncp);
3446
+
3447
+ ncp = INT2NUM(o_ncp);
3448
+
3449
+
3450
+ return ncp;
3451
+
3452
+ }
3453
+
3454
+ static VALUE
3455
+ dcl_sgrqid(obj, cp)
3456
+ VALUE obj, cp;
3457
+ {
3458
+ char *i_cp;
3459
+ integer o_idx;
3460
+ VALUE idx;
3461
+
3462
+ if (TYPE(cp) != T_STRING) {
3463
+ cp = rb_funcall(cp, rb_intern("to_str"), 0);
3464
+ }
3465
+
3466
+ i_cp = StringValuePtr(cp);
3467
+
3468
+
3469
+ sgrqid_(i_cp, &o_idx, (ftnlen)strlen(i_cp));
3470
+
3471
+ idx = INT2NUM(o_idx);
3472
+
3473
+
3474
+ return idx;
3475
+
3476
+ }
3477
+
3478
+ static VALUE
3479
+ dcl_sgrqcp(obj, idx)
3480
+ VALUE obj, idx;
3481
+ {
3482
+ integer i_idx;
3483
+ char *o_cp;
3484
+ VALUE cp;
3485
+
3486
+ if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
3487
+ idx = rb_funcall(idx, rb_intern("to_i"), 0);
3488
+ }
3489
+
3490
+ i_idx = NUM2INT(idx);
3491
+
3492
+ o_cp= ALLOCA_N(char, (DFLT_SIZE+1));
3493
+ memset(o_cp, '\0', DFLT_SIZE+1);
3494
+
3495
+ sgrqcp_(&i_idx, o_cp, (ftnlen)DFLT_SIZE);
3496
+
3497
+ cp = rb_str_new2(o_cp);
3498
+
3499
+
3500
+ return cp;
3501
+
3502
+ }
3503
+
3504
+ static VALUE
3505
+ dcl_sgrqcl(obj, idx)
3506
+ VALUE obj, idx;
3507
+ {
3508
+ integer i_idx;
3509
+ char *o_cp;
3510
+ VALUE cp;
3511
+
3512
+ if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
3513
+ idx = rb_funcall(idx, rb_intern("to_i"), 0);
3514
+ }
3515
+
3516
+ i_idx = NUM2INT(idx);
3517
+
3518
+ o_cp= ALLOCA_N(char, (DFLT_SIZE+1));
3519
+ memset(o_cp, '\0', DFLT_SIZE+1);
3520
+
3521
+ sgrqcl_(&i_idx, o_cp, (ftnlen)DFLT_SIZE);
3522
+
3523
+ cp = rb_str_new2(o_cp);
3524
+
3525
+
3526
+ return cp;
3527
+
3528
+ }
3529
+
3530
+ static VALUE
3531
+ dcl_sgrqvl(obj, idx)
3532
+ VALUE obj, idx;
3533
+ {
3534
+ integer i_idx;
3535
+ real o_rpara;
3536
+ VALUE rpara;
3537
+
3538
+ if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
3539
+ idx = rb_funcall(idx, rb_intern("to_i"), 0);
3540
+ }
3541
+
3542
+ i_idx = NUM2INT(idx);
3543
+
3544
+
3545
+ sgrqvl_(&i_idx, &o_rpara);
3546
+
3547
+ rpara = rb_float_new((double)o_rpara);
3548
+
3549
+
3550
+ return rpara;
3551
+
3552
+ }
3553
+
3554
+ static VALUE
3555
+ dcl_sgrsvl(obj, idx, rpara)
3556
+ VALUE obj, idx, rpara;
3557
+ {
3558
+ integer i_idx;
3559
+ real i_rpara;
3560
+
3561
+ if ((TYPE(idx) != T_BIGNUM) || (TYPE(idx) != T_FIXNUM)) {
3562
+ idx = rb_funcall(idx, rb_intern("to_i"), 0);
3563
+ }
3564
+ if (TYPE(rpara) != T_FLOAT) {
3565
+ rpara = rb_funcall(rpara, rb_intern("to_f"), 0);
3566
+ }
3567
+
3568
+ i_idx = NUM2INT(idx);
3569
+ i_rpara = (real)NUM2DBL(rpara);
3570
+
3571
+
3572
+ sgrsvl_(&i_idx, &i_rpara);
3573
+
3574
+ return Qnil;
3575
+
3576
+ }
3577
+
3578
+ static VALUE
3579
+ dcl_sgrqin(obj, cp)
3580
+ VALUE obj, cp;
3581
+ {
3582
+ char *i_cp;
3583
+ integer o_in;
3584
+ VALUE in;
3585
+
3586
+ if (TYPE(cp) != T_STRING) {
3587
+ cp = rb_funcall(cp, rb_intern("to_str"), 0);
3588
+ }
3589
+
3590
+ i_cp = StringValuePtr(cp);
3591
+
3592
+
3593
+ sgrqin_(i_cp, &o_in, (ftnlen)strlen(i_cp));
3594
+
3595
+ in = INT2NUM(o_in);
3596
+
3597
+
3598
+ return in;
3599
+
3600
+ }
3601
+
3602
+ #if DCLVER >= 530
3603
+
3604
+ static VALUE
3605
+ dcl_sgpcmd(obj)
3606
+ VALUE obj;
3607
+ {
3608
+ sgpcmd_();
3609
+
3610
+ return Qnil;
3611
+
3612
+ }
3613
+
3614
+ #endif
3615
+
3616
+ #if DCLVER >= 530
3617
+
3618
+ static VALUE
3619
+ dcl_sgscmn(obj, nc)
3620
+ VALUE obj, nc;
3621
+ {
3622
+ integer i_nc;
3623
+
3624
+ if ((TYPE(nc) != T_BIGNUM) || (TYPE(nc) != T_FIXNUM)) {
3625
+ nc = rb_funcall(nc, rb_intern("to_i"), 0);
3626
+ }
3627
+
3628
+ i_nc = NUM2INT(nc);
3629
+
3630
+
3631
+ sgscmn_(&i_nc);
3632
+
3633
+ return Qnil;
3634
+
3635
+ }
3636
+
3637
+ #endif
3638
+
3639
+ #if DCLVER >= 530
3640
+
3641
+ static VALUE
3642
+ dcl_sgqcmn(obj)
3643
+ VALUE obj;
3644
+ {
3645
+ integer o_nmax;
3646
+ VALUE nmax;
3647
+
3648
+ sgqcmn_(&o_nmax);
3649
+
3650
+ nmax = INT2NUM(o_nmax);
3651
+
3652
+
3653
+ return nmax;
3654
+
3655
+ }
3656
+
3657
+ #endif
3658
+
3659
+ #if DCLVER >= 530
3660
+
3661
+ static VALUE
3662
+ dcl_sgscwd(obj, cxmin, cxmax, cymin, cymax)
3663
+ VALUE obj, cxmin, cxmax, cymin, cymax;
3664
+ {
3665
+ real i_cxmin;
3666
+ real i_cxmax;
3667
+ real i_cymin;
3668
+ real i_cymax;
3669
+
3670
+ if (TYPE(cxmin) != T_FLOAT) {
3671
+ cxmin = rb_funcall(cxmin, rb_intern("to_f"), 0);
3672
+ }
3673
+ if (TYPE(cxmax) != T_FLOAT) {
3674
+ cxmax = rb_funcall(cxmax, rb_intern("to_f"), 0);
3675
+ }
3676
+ if (TYPE(cymin) != T_FLOAT) {
3677
+ cymin = rb_funcall(cymin, rb_intern("to_f"), 0);
3678
+ }
3679
+ if (TYPE(cymax) != T_FLOAT) {
3680
+ cymax = rb_funcall(cymax, rb_intern("to_f"), 0);
3681
+ }
3682
+
3683
+ i_cxmin = (real)NUM2DBL(cxmin);
3684
+ i_cxmax = (real)NUM2DBL(cxmax);
3685
+ i_cymin = (real)NUM2DBL(cymin);
3686
+ i_cymax = (real)NUM2DBL(cymax);
3687
+
3688
+
3689
+ sgscwd_(&i_cxmin, &i_cxmax, &i_cymin, &i_cymax);
3690
+
3691
+ return Qnil;
3692
+
3693
+ }
3694
+
3695
+ #endif
3696
+
3697
+ #if DCLVER >= 530
3698
+
3699
+ static VALUE
3700
+ dcl_sgqcwd(obj)
3701
+ VALUE obj;
3702
+ {
3703
+ real o_cxmin;
3704
+ real o_cxmax;
3705
+ real o_cymin;
3706
+ real o_cymax;
3707
+ VALUE cxmin;
3708
+ VALUE cxmax;
3709
+ VALUE cymin;
3710
+ VALUE cymax;
3711
+
3712
+ sgqcwd_(&o_cxmin, &o_cxmax, &o_cymin, &o_cymax);
3713
+
3714
+ cxmin = rb_float_new((double)o_cxmin);
3715
+ cxmax = rb_float_new((double)o_cxmax);
3716
+ cymin = rb_float_new((double)o_cymin);
3717
+ cymax = rb_float_new((double)o_cymax);
3718
+
3719
+
3720
+ return rb_ary_new3(4, cxmin, cxmax, cymin, cymax);
3721
+
3722
+ }
3723
+
3724
+ #endif
3725
+ void
3726
+ init_grph1_sgpack(mDCL)
3727
+ VALUE mDCL;
3728
+ {
3729
+ rb_define_module_function(mDCL, "sgopn", dcl_sgopn, 1);
3730
+ rb_define_module_function(mDCL, "sgfrm", dcl_sgfrm, 0);
3731
+ rb_define_module_function(mDCL, "sgcls", dcl_sgcls, 0);
3732
+ rb_define_module_function(mDCL, "sgpqnp", dcl_sgpqnp, 0);
3733
+ rb_define_module_function(mDCL, "sgpqid", dcl_sgpqid, 1);
3734
+ rb_define_module_function(mDCL, "sgpqcp", dcl_sgpqcp, 1);
3735
+ rb_define_module_function(mDCL, "sgpqcl", dcl_sgpqcl, 1);
3736
+ rb_define_module_function(mDCL, "sgpqit", dcl_sgpqit, 1);
3737
+ rb_define_module_function(mDCL, "sgpqvl", dcl_sgpqvl, 1);
3738
+ rb_define_module_function(mDCL, "sgpsvl", dcl_sgpsvl, 2);
3739
+ rb_define_module_function(mDCL, "sgpqin", dcl_sgpqin, 1);
3740
+ rb_define_module_function(mDCL, "sgpwsn", dcl_sgpwsn, 0);
3741
+ rb_define_module_function(mDCL, "sgsvpt", dcl_sgsvpt, 4);
3742
+ rb_define_module_function(mDCL, "sgqvpt", dcl_sgqvpt, 0);
3743
+ rb_define_module_function(mDCL, "sgswnd", dcl_sgswnd, 4);
3744
+ rb_define_module_function(mDCL, "sgqwnd", dcl_sgqwnd, 0);
3745
+ rb_define_module_function(mDCL, "sgssim", dcl_sgssim, 3);
3746
+ rb_define_module_function(mDCL, "sgqsim", dcl_sgqsim, 0);
3747
+ rb_define_module_function(mDCL, "sgsmpl", dcl_sgsmpl, 3);
3748
+ rb_define_module_function(mDCL, "sgqmpl", dcl_sgqmpl, 0);
3749
+ rb_define_module_function(mDCL, "sgstxy", dcl_sgstxy, 4);
3750
+ rb_define_module_function(mDCL, "sgqtxy", dcl_sgqtxy, 0);
3751
+ rb_define_module_function(mDCL, "sgstrn", dcl_sgstrn, 1);
3752
+ rb_define_module_function(mDCL, "sgqtrn", dcl_sgqtrn, 0);
3753
+ rb_define_module_function(mDCL, "sgstrf", dcl_sgstrf, 0);
3754
+ rb_define_module_function(mDCL, "sgtrqf", dcl_sgtrqf, 1);
3755
+ rb_define_module_function(mDCL, "sgtrsl", dcl_sgtrsl, 1);
3756
+ rb_define_module_function(mDCL, "sgtrsn", dcl_sgtrsn, 1);
3757
+ rb_define_module_function(mDCL, "sgtrls", dcl_sgtrls, 1);
3758
+ rb_define_module_function(mDCL, "sgtrln", dcl_sgtrln, 1);
3759
+ rb_define_module_function(mDCL, "sgtrns", dcl_sgtrns, 1);
3760
+ rb_define_module_function(mDCL, "sgtrnl", dcl_sgtrnl, 1);
3761
+ rb_define_module_function(mDCL, "isgtrc", dcl_isgtrc, 1);
3762
+ rb_define_module_function(mDCL, "sgplu", dcl_sgplu, 3);
3763
+ rb_define_module_function(mDCL, "sgplv", dcl_sgplv, 3);
3764
+ rb_define_module_function(mDCL, "sgplr", dcl_sgplr, 3);
3765
+ rb_define_module_function(mDCL, "sgsplt", dcl_sgsplt, 1);
3766
+ rb_define_module_function(mDCL, "sgqplt", dcl_sgqplt, 0);
3767
+ rb_define_module_function(mDCL, "sgspli", dcl_sgspli, 1);
3768
+ rb_define_module_function(mDCL, "sgqpli", dcl_sgqpli, 0);
3769
+ rb_define_module_function(mDCL, "sgplzu", dcl_sgplzu, 5);
3770
+ rb_define_module_function(mDCL, "sgplzv", dcl_sgplzv, 5);
3771
+ rb_define_module_function(mDCL, "sgplzr", dcl_sgplzr, 5);
3772
+ rb_define_module_function(mDCL, "sgpmu", dcl_sgpmu, 3);
3773
+ rb_define_module_function(mDCL, "sgpmv", dcl_sgpmv, 3);
3774
+ rb_define_module_function(mDCL, "sgpmr", dcl_sgpmr, 3);
3775
+ rb_define_module_function(mDCL, "sgspmt", dcl_sgspmt, 1);
3776
+ rb_define_module_function(mDCL, "sgqpmt", dcl_sgqpmt, 0);
3777
+ rb_define_module_function(mDCL, "sgspmi", dcl_sgspmi, 1);
3778
+ rb_define_module_function(mDCL, "sgqpmi", dcl_sgqpmi, 0);
3779
+ rb_define_module_function(mDCL, "sgspms", dcl_sgspms, 1);
3780
+ rb_define_module_function(mDCL, "sgqpms", dcl_sgqpms, 0);
3781
+ rb_define_module_function(mDCL, "sgtxu", dcl_sgtxu, 3);
3782
+ rb_define_module_function(mDCL, "sgtxv", dcl_sgtxv, 3);
3783
+ rb_define_module_function(mDCL, "sgtxr", dcl_sgtxr, 3);
3784
+ rb_define_module_function(mDCL, "sgstxs", dcl_sgstxs, 1);
3785
+ rb_define_module_function(mDCL, "sgqtxs", dcl_sgqtxs, 0);
3786
+ rb_define_module_function(mDCL, "sgstxr", dcl_sgstxr, 1);
3787
+ rb_define_module_function(mDCL, "sgqtxr", dcl_sgqtxr, 0);
3788
+ rb_define_module_function(mDCL, "sgstxc", dcl_sgstxc, 1);
3789
+ rb_define_module_function(mDCL, "sgqtxc", dcl_sgqtxc, 0);
3790
+ rb_define_module_function(mDCL, "sgstxi", dcl_sgstxi, 1);
3791
+ rb_define_module_function(mDCL, "sgqtxi", dcl_sgqtxi, 0);
3792
+ rb_define_module_function(mDCL, "sgpmzu", dcl_sgpmzu, 6);
3793
+ rb_define_module_function(mDCL, "sgpmzv", dcl_sgpmzv, 6);
3794
+ rb_define_module_function(mDCL, "sgpmzr", dcl_sgpmzr, 6);
3795
+ rb_define_module_function(mDCL, "sgtxzu", dcl_sgtxzu, 7);
3796
+ rb_define_module_function(mDCL, "sgtxzv", dcl_sgtxzv, 7);
3797
+ rb_define_module_function(mDCL, "sgtxzr", dcl_sgtxzr, 7);
3798
+ rb_define_module_function(mDCL, "sgtnu", dcl_sgtnu, 3);
3799
+ rb_define_module_function(mDCL, "sgtnv", dcl_sgtnv, 3);
3800
+ rb_define_module_function(mDCL, "sgtnr", dcl_sgtnr, 3);
3801
+ rb_define_module_function(mDCL, "sgstnp", dcl_sgstnp, 1);
3802
+ rb_define_module_function(mDCL, "sgqtnp", dcl_sgqtnp, 0);
3803
+ rb_define_module_function(mDCL, "sgtnzu", dcl_sgtnzu, 4);
3804
+ rb_define_module_function(mDCL, "sgtnzv", dcl_sgtnzv, 4);
3805
+ rb_define_module_function(mDCL, "sgtnzr", dcl_sgtnzr, 4);
3806
+ rb_define_module_function(mDCL, "sglnu", dcl_sglnu, 4);
3807
+ rb_define_module_function(mDCL, "sglnv", dcl_sglnv, 4);
3808
+ rb_define_module_function(mDCL, "sglnr", dcl_sglnr, 4);
3809
+ rb_define_module_function(mDCL, "sgslni", dcl_sgslni, 1);
3810
+ rb_define_module_function(mDCL, "sgqlni", dcl_sgqlni, 0);
3811
+ rb_define_module_function(mDCL, "sglnzu", dcl_sglnzu, 5);
3812
+ rb_define_module_function(mDCL, "sglnzv", dcl_sglnzv, 5);
3813
+ rb_define_module_function(mDCL, "sglnzr", dcl_sglnzr, 5);
3814
+ rb_define_module_function(mDCL, "sglau", dcl_sglau, 4);
3815
+ rb_define_module_function(mDCL, "sglav", dcl_sglav, 4);
3816
+ rb_define_module_function(mDCL, "sglar", dcl_sglar, 4);
3817
+ rb_define_module_function(mDCL, "sgslat", dcl_sgslat, 1);
3818
+ rb_define_module_function(mDCL, "sgqlat", dcl_sgqlat, 0);
3819
+ rb_define_module_function(mDCL, "sgslai", dcl_sgslai, 1);
3820
+ rb_define_module_function(mDCL, "sgqlai", dcl_sgqlai, 0);
3821
+ rb_define_module_function(mDCL, "sglazu", dcl_sglazu, 6);
3822
+ rb_define_module_function(mDCL, "sglazv", dcl_sglazv, 6);
3823
+ rb_define_module_function(mDCL, "sglazr", dcl_sglazr, 6);
3824
+ rb_define_module_function(mDCL, "sgsplc", dcl_sgsplc, 1);
3825
+ rb_define_module_function(mDCL, "sgqplc", dcl_sgqplc, 0);
3826
+ rb_define_module_function(mDCL, "sgspls", dcl_sgspls, 1);
3827
+ rb_define_module_function(mDCL, "sgqpls", dcl_sgqpls, 0);
3828
+ rb_define_module_function(mDCL, "sgnplc", dcl_sgnplc, 0);
3829
+ rb_define_module_function(mDCL, "sgiget", dcl_sgiget, 1);
3830
+ rb_define_module_function(mDCL, "sgiset", dcl_sgiset, 2);
3831
+ rb_define_module_function(mDCL, "sgistx", dcl_sgistx, 2);
3832
+ rb_define_module_function(mDCL, "sgiqnp", dcl_sgiqnp, 0);
3833
+ rb_define_module_function(mDCL, "sgiqid", dcl_sgiqid, 1);
3834
+ rb_define_module_function(mDCL, "sgiqcp", dcl_sgiqcp, 1);
3835
+ rb_define_module_function(mDCL, "sgiqcl", dcl_sgiqcl, 1);
3836
+ rb_define_module_function(mDCL, "sgiqvl", dcl_sgiqvl, 1);
3837
+ rb_define_module_function(mDCL, "sgisvl", dcl_sgisvl, 2);
3838
+ rb_define_module_function(mDCL, "sgiqin", dcl_sgiqin, 1);
3839
+ rb_define_module_function(mDCL, "sglget", dcl_sglget, 1);
3840
+ rb_define_module_function(mDCL, "sglset", dcl_sglset, 2);
3841
+ rb_define_module_function(mDCL, "sglstx", dcl_sglstx, 2);
3842
+ rb_define_module_function(mDCL, "sglqnp", dcl_sglqnp, 0);
3843
+ rb_define_module_function(mDCL, "sglqid", dcl_sglqid, 1);
3844
+ rb_define_module_function(mDCL, "sglqcp", dcl_sglqcp, 1);
3845
+ rb_define_module_function(mDCL, "sglqcl", dcl_sglqcl, 1);
3846
+ rb_define_module_function(mDCL, "sglqvl", dcl_sglqvl, 1);
3847
+ rb_define_module_function(mDCL, "sglsvl", dcl_sglsvl, 2);
3848
+ rb_define_module_function(mDCL, "sglqin", dcl_sglqin, 1);
3849
+ rb_define_module_function(mDCL, "sgoopn", dcl_sgoopn, 2);
3850
+ rb_define_module_function(mDCL, "sgocls", dcl_sgocls, 1);
3851
+ rb_define_module_function(mDCL, "sgrget", dcl_sgrget, 1);
3852
+ rb_define_module_function(mDCL, "sgrset", dcl_sgrset, 2);
3853
+ rb_define_module_function(mDCL, "sgrstx", dcl_sgrstx, 2);
3854
+ rb_define_module_function(mDCL, "sgrqnp", dcl_sgrqnp, 0);
3855
+ rb_define_module_function(mDCL, "sgrqid", dcl_sgrqid, 1);
3856
+ rb_define_module_function(mDCL, "sgrqcp", dcl_sgrqcp, 1);
3857
+ rb_define_module_function(mDCL, "sgrqcl", dcl_sgrqcl, 1);
3858
+ rb_define_module_function(mDCL, "sgrqvl", dcl_sgrqvl, 1);
3859
+ rb_define_module_function(mDCL, "sgrsvl", dcl_sgrsvl, 2);
3860
+ rb_define_module_function(mDCL, "sgrqin", dcl_sgrqin, 1);
3861
+ #if DCLVER >= 530
3862
+ rb_define_module_function(mDCL, "sgpcmd", dcl_sgpcmd, 0);
3863
+ #endif
3864
+ #if DCLVER >= 530
3865
+ rb_define_module_function(mDCL, "sgscmn", dcl_sgscmn, 1);
3866
+ #endif
3867
+ #if DCLVER >= 530
3868
+ rb_define_module_function(mDCL, "sgqcmn", dcl_sgqcmn, 0);
3869
+ #endif
3870
+ #if DCLVER >= 530
3871
+ rb_define_module_function(mDCL, "sgscwd", dcl_sgscwd, 4);
3872
+ #endif
3873
+ #if DCLVER >= 530
3874
+ rb_define_module_function(mDCL, "sgqcwd", dcl_sgqcwd, 0);
3875
+ #endif
3876
+ }