ruby-dcl 1.6.3.1 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/grph1_stpack.c CHANGED
@@ -430,6 +430,42 @@ dcl_stsrad(obj, lxdeg, lydeg)
430
430
 
431
431
  }
432
432
 
433
+ #if DCLVER >= 544
434
+
435
+ static VALUE
436
+ dcl_stfusr(obj, xlon, ylat)
437
+ VALUE obj, xlon, ylat;
438
+ {
439
+ real i_xlon;
440
+ real i_ylat;
441
+ real o_xx;
442
+ real o_yy;
443
+ VALUE xx;
444
+ VALUE yy;
445
+
446
+ if (TYPE(xlon) != T_FLOAT) {
447
+ xlon = rb_funcall(xlon, rb_intern("to_f"), 0);
448
+ }
449
+ if (TYPE(ylat) != T_FLOAT) {
450
+ ylat = rb_funcall(ylat, rb_intern("to_f"), 0);
451
+ }
452
+
453
+ i_xlon = (real)NUM2DBL(xlon);
454
+ i_ylat = (real)NUM2DBL(ylat);
455
+
456
+
457
+ stfusr_(&i_xlon, &i_ylat, &o_xx, &o_yy);
458
+
459
+ xx = rb_float_new((double)o_xx);
460
+ yy = rb_float_new((double)o_yy);
461
+
462
+
463
+ return rb_ary_new3(2, xx, yy);
464
+
465
+ }
466
+
467
+ #else
468
+
433
469
  static VALUE
434
470
  dcl_stfusr(obj, ux, uy)
435
471
  VALUE obj, ux, uy;
@@ -462,6 +498,44 @@ dcl_stfusr(obj, ux, uy)
462
498
 
463
499
  }
464
500
 
501
+ #endif
502
+
503
+ #if DCLVER >= 544
504
+
505
+ static VALUE
506
+ dcl_stiusr(obj, xx, yy)
507
+ VALUE obj, xx, yy;
508
+ {
509
+ real i_xx;
510
+ real i_yy;
511
+ real o_xlon;
512
+ real o_ylat;
513
+ VALUE xlon;
514
+ VALUE ylat;
515
+
516
+ if (TYPE(xx) != T_FLOAT) {
517
+ xx = rb_funcall(xx, rb_intern("to_f"), 0);
518
+ }
519
+ if (TYPE(yy) != T_FLOAT) {
520
+ yy = rb_funcall(yy, rb_intern("to_f"), 0);
521
+ }
522
+
523
+ i_xx = (real)NUM2DBL(xx);
524
+ i_yy = (real)NUM2DBL(yy);
525
+
526
+
527
+ stiusr_(&i_xx, &i_yy, &o_xlon, &o_ylat);
528
+
529
+ xlon = rb_float_new((double)o_xlon);
530
+ ylat = rb_float_new((double)o_ylat);
531
+
532
+
533
+ return rb_ary_new3(2, xlon, ylat);
534
+
535
+ }
536
+
537
+ #else
538
+
465
539
  static VALUE
466
540
  dcl_stiusr(obj, xx, yy)
467
541
  VALUE obj, xx, yy;
@@ -494,6 +568,8 @@ dcl_stiusr(obj, xx, yy)
494
568
 
495
569
  }
496
570
 
571
+ #endif
572
+
497
573
  static VALUE
498
574
  dcl_stsusr(obj)
499
575
  VALUE obj;
@@ -504,6 +580,59 @@ dcl_stsusr(obj)
504
580
 
505
581
  }
506
582
 
583
+ #if DCLVER >= 544
584
+
585
+ static VALUE
586
+ dcl_stnusr(obj, kproj)
587
+ VALUE obj, kproj;
588
+ {
589
+ integer i_kproj;
590
+
591
+ if ((TYPE(kproj) != T_BIGNUM) || (TYPE(kproj) != T_FIXNUM)) {
592
+ kproj = rb_funcall(kproj, rb_intern("to_i"), 0);
593
+ }
594
+
595
+ i_kproj = NUM2INT(kproj);
596
+
597
+
598
+ stnusr_(&i_kproj);
599
+
600
+ return Qnil;
601
+
602
+ }
603
+
604
+ #endif
605
+
606
+ #if DCLVER >= 544
607
+
608
+ static VALUE
609
+ dcl_stcusr(obj, i)
610
+ VALUE obj, i;
611
+ {
612
+ integer i_i;
613
+ char *o_cttl;
614
+ VALUE cttl;
615
+
616
+ if ((TYPE(i) != T_BIGNUM) || (TYPE(i) != T_FIXNUM)) {
617
+ i = rb_funcall(i, rb_intern("to_i"), 0);
618
+ }
619
+
620
+ i_i = NUM2INT(i);
621
+
622
+ o_cttl= ALLOCA_N(char, (DFLT_SIZE+1));
623
+ memset(o_cttl, '\0', DFLT_SIZE+1);
624
+
625
+ stcusr_(&i_i, o_cttl, (ftnlen)DFLT_SIZE);
626
+
627
+ cttl = rb_str_new2(o_cttl);
628
+
629
+
630
+ return cttl;
631
+
632
+ }
633
+
634
+ #endif
635
+
507
636
  static VALUE
508
637
  dcl_stfwtr(obj, rx, ry)
509
638
  VALUE obj, rx, ry;
@@ -1023,9 +1152,21 @@ VALUE mDCL;
1023
1152
  rb_define_module_function(mDCL, "stfrad", dcl_stfrad, 2);
1024
1153
  rb_define_module_function(mDCL, "stirad", dcl_stirad, 2);
1025
1154
  rb_define_module_function(mDCL, "stsrad", dcl_stsrad, 2);
1155
+ #if DCLVER >= 544
1156
+ rb_define_module_function(mDCL, "stfusr", dcl_stfusr, 2);
1026
1157
  rb_define_module_function(mDCL, "stfusr", dcl_stfusr, 2);
1158
+ #endif
1159
+ #if DCLVER >= 544
1160
+ rb_define_module_function(mDCL, "stiusr", dcl_stiusr, 2);
1027
1161
  rb_define_module_function(mDCL, "stiusr", dcl_stiusr, 2);
1162
+ #endif
1028
1163
  rb_define_module_function(mDCL, "stsusr", dcl_stsusr, 0);
1164
+ #if DCLVER >= 544
1165
+ rb_define_module_function(mDCL, "stnusr", dcl_stnusr, 1);
1166
+ #endif
1167
+ #if DCLVER >= 544
1168
+ rb_define_module_function(mDCL, "stcusr", dcl_stcusr, 1);
1169
+ #endif
1029
1170
  rb_define_module_function(mDCL, "stfwtr", dcl_stfwtr, 2);
1030
1171
  rb_define_module_function(mDCL, "stiwtr", dcl_stiwtr, 2);
1031
1172
  rb_define_module_function(mDCL, "stswtr", dcl_stswtr, 9);
data/grph1_swpack.c CHANGED
@@ -81,6 +81,46 @@ dcl_swdcls(obj)
81
81
 
82
82
  }
83
83
 
84
+ #if DCLVER >= 544
85
+
86
+ static VALUE
87
+ dcl_swqfcc(obj)
88
+ VALUE obj;
89
+ {
90
+ logical o_lfcatr;
91
+ VALUE lfcatr;
92
+
93
+ swqfcc_(&o_lfcatr);
94
+
95
+ lfcatr = (o_lfcatr == FALSE_) ? Qfalse : Qtrue;
96
+
97
+
98
+ return lfcatr;
99
+
100
+ }
101
+
102
+ #endif
103
+
104
+ #if DCLVER >= 544
105
+
106
+ static VALUE
107
+ dcl_swsfcm(obj)
108
+ VALUE obj;
109
+ {
110
+ logical o_lfcmod;
111
+ VALUE lfcmod;
112
+
113
+ swsfcm_(&o_lfcmod);
114
+
115
+ lfcmod = (o_lfcmod == FALSE_) ? Qfalse : Qtrue;
116
+
117
+
118
+ return lfcmod;
119
+
120
+ }
121
+
122
+ #endif
123
+
84
124
  static VALUE
85
125
  dcl_swpopn(obj)
86
126
  VALUE obj;
@@ -163,6 +203,31 @@ dcl_swswdi(obj, iwdidx)
163
203
 
164
204
  }
165
205
 
206
+ #if DCLVER >= 544
207
+
208
+ static VALUE
209
+ dcl_swscli(obj, iclidx, lfcatr)
210
+ VALUE obj, iclidx, lfcatr;
211
+ {
212
+ integer i_iclidx;
213
+ logical i_lfcatr;
214
+
215
+ if ((TYPE(iclidx) != T_BIGNUM) || (TYPE(iclidx) != T_FIXNUM)) {
216
+ iclidx = rb_funcall(iclidx, rb_intern("to_i"), 0);
217
+ }
218
+
219
+ i_iclidx = NUM2INT(iclidx);
220
+ i_lfcatr = ((lfcatr == Qnil)||(lfcatr == Qfalse)) ? FALSE_ : TRUE_;
221
+
222
+
223
+ swscli_(&i_iclidx, &i_lfcatr);
224
+
225
+ return Qnil;
226
+
227
+ }
228
+
229
+ #else
230
+
166
231
  static VALUE
167
232
  dcl_swscli(obj, iclidx)
168
233
  VALUE obj, iclidx;
@@ -182,6 +247,31 @@ dcl_swscli(obj, iclidx)
182
247
 
183
248
  }
184
249
 
250
+ #endif
251
+
252
+ #if DCLVER >= 544
253
+
254
+ static VALUE
255
+ dcl_swslcl(obj, icolor)
256
+ VALUE obj, icolor;
257
+ {
258
+ integer i_icolor;
259
+
260
+ if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
261
+ icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
262
+ }
263
+
264
+ i_icolor = NUM2INT(icolor);
265
+
266
+
267
+ swslcl_(&i_icolor);
268
+
269
+ return Qnil;
270
+
271
+ }
272
+
273
+ #endif
274
+
185
275
  static VALUE
186
276
  dcl_swgopn(obj)
187
277
  VALUE obj;
@@ -250,6 +340,29 @@ dcl_swgcls(obj)
250
340
 
251
341
  }
252
342
 
343
+ #if DCLVER >= 544
344
+
345
+ static VALUE
346
+ dcl_swstcl(obj, icolor)
347
+ VALUE obj, icolor;
348
+ {
349
+ integer i_icolor;
350
+
351
+ if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
352
+ icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
353
+ }
354
+
355
+ i_icolor = NUM2INT(icolor);
356
+
357
+
358
+ swstcl_(&i_icolor);
359
+
360
+ return Qnil;
361
+
362
+ }
363
+
364
+ #endif
365
+
253
366
  static VALUE
254
367
  dcl_swgton(obj, np, wpx, wpy, itpat)
255
368
  VALUE obj, np, wpx, wpy, itpat;
@@ -359,6 +472,40 @@ dcl_swidat(obj, image, nlen)
359
472
 
360
473
  }
361
474
 
475
+ #if DCLVER >= 544
476
+
477
+ static VALUE
478
+ dcl_swiclr(obj, image, nlen)
479
+ VALUE obj, image, nlen;
480
+ {
481
+ integer *i_image;
482
+ integer i_nlen;
483
+
484
+ if ((TYPE(image) == T_BIGNUM) || (TYPE(image) == T_FIXNUM)) {
485
+ image = rb_Array(image);
486
+ }
487
+ /* if ((TYPE(image) != T_ARRAY) &&
488
+ (rb_obj_is_kind_of(image, cNArray) != Qtrue)) {
489
+ rb_raise(rb_eTypeError, "invalid type");
490
+ } -- no check since obj2c*ary will do that */
491
+ if ((TYPE(nlen) != T_BIGNUM) || (TYPE(nlen) != T_FIXNUM)) {
492
+ nlen = rb_funcall(nlen, rb_intern("to_i"), 0);
493
+ }
494
+
495
+ i_nlen = NUM2INT(nlen);
496
+ i_image = dcl_obj2cintegerary(image);
497
+
498
+
499
+ swiclr_(i_image, &i_nlen);
500
+
501
+ dcl_freecintegerary(i_image);
502
+
503
+ return Qnil;
504
+
505
+ }
506
+
507
+ #endif
508
+
362
509
  static VALUE
363
510
  dcl_swicls(obj)
364
511
  VALUE obj;
@@ -582,6 +729,20 @@ dcl_swsrot(obj, iwtrot)
582
729
 
583
730
  }
584
731
 
732
+ #if DCLVER >= 544
733
+
734
+ static VALUE
735
+ dcl_swclch(obj)
736
+ VALUE obj;
737
+ {
738
+ swclch_();
739
+
740
+ return Qnil;
741
+
742
+ }
743
+
744
+ #endif
745
+
585
746
  static VALUE
586
747
  dcl_swpqnp(obj)
587
748
  VALUE obj;
@@ -1834,19 +1995,37 @@ VALUE mDCL;
1834
1995
  {
1835
1996
  rb_define_module_function(mDCL, "swdopn", dcl_swdopn, 0);
1836
1997
  rb_define_module_function(mDCL, "swdcls", dcl_swdcls, 0);
1998
+ #if DCLVER >= 544
1999
+ rb_define_module_function(mDCL, "swqfcc", dcl_swqfcc, 0);
2000
+ #endif
2001
+ #if DCLVER >= 544
2002
+ rb_define_module_function(mDCL, "swsfcm", dcl_swsfcm, 0);
2003
+ #endif
1837
2004
  rb_define_module_function(mDCL, "swpopn", dcl_swpopn, 0);
1838
2005
  rb_define_module_function(mDCL, "swpcls", dcl_swpcls, 0);
1839
2006
  rb_define_module_function(mDCL, "swoopn", dcl_swoopn, 2);
1840
2007
  rb_define_module_function(mDCL, "swocls", dcl_swocls, 1);
1841
2008
  rb_define_module_function(mDCL, "swswdi", dcl_swswdi, 1);
2009
+ #if DCLVER >= 544
2010
+ rb_define_module_function(mDCL, "swscli", dcl_swscli, 2);
1842
2011
  rb_define_module_function(mDCL, "swscli", dcl_swscli, 1);
2012
+ #endif
2013
+ #if DCLVER >= 544
2014
+ rb_define_module_function(mDCL, "swslcl", dcl_swslcl, 1);
2015
+ #endif
1843
2016
  rb_define_module_function(mDCL, "swgopn", dcl_swgopn, 0);
1844
2017
  rb_define_module_function(mDCL, "swgmov", dcl_swgmov, 2);
1845
2018
  rb_define_module_function(mDCL, "swgplt", dcl_swgplt, 2);
1846
2019
  rb_define_module_function(mDCL, "swgcls", dcl_swgcls, 0);
2020
+ #if DCLVER >= 544
2021
+ rb_define_module_function(mDCL, "swstcl", dcl_swstcl, 1);
2022
+ #endif
1847
2023
  rb_define_module_function(mDCL, "swgton", dcl_swgton, 4);
1848
2024
  rb_define_module_function(mDCL, "swiopn", dcl_swiopn, 4);
1849
2025
  rb_define_module_function(mDCL, "swidat", dcl_swidat, 2);
2026
+ #if DCLVER >= 544
2027
+ rb_define_module_function(mDCL, "swiclr", dcl_swiclr, 2);
2028
+ #endif
1850
2029
  rb_define_module_function(mDCL, "swicls", dcl_swicls, 0);
1851
2030
  rb_define_module_function(mDCL, "swqpnt", dcl_swqpnt, 0);
1852
2031
  rb_define_module_function(mDCL, "swfint", dcl_swfint, 2);
@@ -1858,6 +2037,9 @@ VALUE mDCL;
1858
2037
  rb_define_module_function(mDCL, "swqptc", dcl_swqptc, 0);
1859
2038
  rb_define_module_function(mDCL, "swqrct", dcl_swqrct, 0);
1860
2039
  rb_define_module_function(mDCL, "swsrot", dcl_swsrot, 1);
2040
+ #if DCLVER >= 544
2041
+ rb_define_module_function(mDCL, "swclch", dcl_swclch, 0);
2042
+ #endif
1861
2043
  rb_define_module_function(mDCL, "swpqnp", dcl_swpqnp, 0);
1862
2044
  rb_define_module_function(mDCL, "swpqid", dcl_swpqid, 1);
1863
2045
  rb_define_module_function(mDCL, "swpqcp", dcl_swpqcp, 1);