tioga 1.8 → 1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/Tioga_README +46 -11
  2. data/split/Dtable/dtable.c +2 -2
  3. data/split/Dtable/dvector.h +8 -0
  4. data/split/Dtable/namespace.h +16 -8
  5. data/split/Dtable/symbols.h +1 -1
  6. data/split/Dvector/dvector.c +77 -2
  7. data/split/Dvector/dvector_intern.h +2 -0
  8. data/split/Dvector/include/dvector.h +8 -0
  9. data/split/Dvector/lib/Dvector_extras.rb +12 -0
  10. data/split/Dvector/namespace.h +16 -8
  11. data/split/Dvector/symbols.h +1 -1
  12. data/split/Flate/namespace.h +16 -8
  13. data/split/Flate/symbols.h +1 -1
  14. data/split/Function/dvector.h +8 -0
  15. data/split/Function/function.c +2 -1
  16. data/split/Function/namespace.h +16 -8
  17. data/split/Function/symbols.h +1 -1
  18. data/split/Tioga/axes.c +217 -75
  19. data/split/Tioga/dvector.h +8 -0
  20. data/split/Tioga/figures.c +19 -2
  21. data/split/Tioga/figures.h +7 -6
  22. data/split/Tioga/generic.c +14 -1
  23. data/split/Tioga/generic.h +13 -0
  24. data/split/Tioga/init.c +5 -9
  25. data/split/Tioga/lib/Colormaps.rb +33 -2
  26. data/split/Tioga/lib/Doc.rb +30 -0
  27. data/split/Tioga/lib/Executive.rb +4 -2
  28. data/split/Tioga/lib/FigMkr.rb +219 -53
  29. data/split/Tioga/lib/Figures_and_Plots.rb +7 -0
  30. data/split/Tioga/lib/Images.rb +10 -2
  31. data/split/Tioga/lib/Legends.rb +7 -3
  32. data/split/Tioga/lib/Markers.rb +7 -0
  33. data/split/Tioga/lib/TexPreamble.rb +56 -56
  34. data/split/Tioga/lib/Utils.rb +7 -0
  35. data/split/Tioga/lib/maker.rb +1 -0
  36. data/split/Tioga/lib/tioga_ui_cmds.rb +6 -5
  37. data/split/Tioga/namespace.h +16 -8
  38. data/split/Tioga/pdfcolor.c +63 -7
  39. data/split/Tioga/pdfcoords.c +0 -16
  40. data/split/Tioga/pdfimage.c +16 -2
  41. data/split/Tioga/pdfs.h +1 -0
  42. data/split/Tioga/pdftext.c +223 -82
  43. data/split/Tioga/symbols.h +1 -1
  44. data/split/Tioga/texout.c +1 -1
  45. data/split/Tioga/wrappers.c +21 -10
  46. data/split/Tioga/wrappers.h +5 -0
  47. data/split/extconf.rb +27 -15
  48. data/split/namespace.h +16 -8
  49. data/split/scripts/tioga +0 -0
  50. data/split/symbols.h +1 -1
  51. data/tests/Icon_Test.pdf +0 -0
  52. data/tests/tc_Dvector.rb +24 -0
  53. metadata +38 -37
@@ -92,6 +92,8 @@ extern OBJ_PTR FM_xaxis_stroke_color_get(OBJ_PTR fmkr);
92
92
  extern OBJ_PTR FM_xaxis_stroke_color_set(OBJ_PTR fmkr, OBJ_PTR val);
93
93
  extern OBJ_PTR FM_yaxis_stroke_color_get(OBJ_PTR fmkr);
94
94
  extern OBJ_PTR FM_yaxis_stroke_color_set(OBJ_PTR fmkr, OBJ_PTR val);
95
+ extern OBJ_PTR FM_string_hls_to_rgb_bang(OBJ_PTR fmkr, OBJ_PTR str);
96
+ extern OBJ_PTR FM_string_rgb_to_hls_bang(OBJ_PTR fmkr, OBJ_PTR str);
95
97
 
96
98
  /*======================================================================*/
97
99
  // pdfcoords.c
@@ -156,6 +158,9 @@ extern OBJ_PTR FM_private_create_monochrome_image_data(OBJ_PTR fmkr, OBJ_PTR dat
156
158
  extern OBJ_PTR FM_private_show_image(OBJ_PTR fmkr, OBJ_PTR llx, OBJ_PTR lly, OBJ_PTR lrx, OBJ_PTR lry, OBJ_PTR ulx, OBJ_PTR uly,
157
159
  OBJ_PTR interpolate, OBJ_PTR w, OBJ_PTR h, OBJ_PTR data, OBJ_PTR OBJ_PTR_mask_min, OBJ_PTR OBJ_PTR_mask_max,
158
160
  OBJ_PTR hival, OBJ_PTR lookup, OBJ_PTR mask_xo_num);
161
+ extern OBJ_PTR FM_private_show_hls_image(OBJ_PTR fmkr,
162
+ OBJ_PTR llx, OBJ_PTR lly, OBJ_PTR lrx, OBJ_PTR lry, OBJ_PTR ulx, OBJ_PTR uly,
163
+ OBJ_PTR interpolate, OBJ_PTR w, OBJ_PTR h, OBJ_PTR data, OBJ_PTR mask_xo_num);
159
164
  extern OBJ_PTR FM_private_show_rgb_image(OBJ_PTR fmkr,
160
165
  OBJ_PTR llx, OBJ_PTR lly, OBJ_PTR lrx, OBJ_PTR lry, OBJ_PTR ulx, OBJ_PTR uly,
161
166
  OBJ_PTR interpolate, OBJ_PTR w, OBJ_PTR h, OBJ_PTR data, OBJ_PTR mask_xo_num);
data/split/extconf.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  require './mkmf2.rb'
4
4
 
5
- $CFLAGS += " -O2 -g -Wall -Werror-implicit-function-declaration"
5
+ $CFLAGS += " -O2 -g -Wall"
6
6
 
7
7
  # Now, if you want to install the include file, you need to
8
8
  # set the EXTCONF_RB_INCLUDE
@@ -24,9 +24,10 @@ setup_dir("Dtable", "Dobjects",
24
24
  # b.add_sources("symbols.c")
25
25
  end
26
26
 
27
- setup_dir("Flate", "", "Flate", include) do |l,b,i|
28
- # b.add_sources("symbols.c")
29
- end
27
+
28
+ # setup_dir("Flate", "", "Flate", include) do |l,b,i|
29
+ # # b.add_sources("symbols.c")
30
+ # end
30
31
 
31
32
 
32
33
  setup_dir("Function", "Dobjects",
@@ -61,21 +62,32 @@ custom_rule("Tioga/lib/TexPreamble.rb",
61
62
  "Tioga/tioga.sty.in", "Tioga/mk_tioga_sty.rb"]
62
63
  )
63
64
 
64
- # we check the presence of zlib library
65
- unless have_header("zlib.h") and have_library("z", "compress", "zlib.h")
66
- puts <<"EON"
67
- Error: you should have zlib (including development files) installed to
68
- build and run Tioga. You can get it there:
69
65
 
70
- http://www.zlib.net/
66
+ # Conditional use of embedded zlib
67
+ if have_header("zlib.h") and have_library("z", "compress", "zlib.h")
68
+ declare_binary_library('Flate', "Flate/*.c")
69
+ else
70
+ puts "zlib was not found or could not be linked against, using private copy"
71
+ declare_binary_library('Flate', "Flate/**/*.c")
72
+ end
73
+
74
+ add_include_path("Flate/include")
75
+
76
+ # # we check the presence of zlib library
77
+ # unless have_header("zlib.h") and have_library("z", "compress", "zlib.h")
78
+ # puts <<"EON"
79
+ # Error: you should have zlib (including development files) installed to
80
+ # build and run Tioga. You can get it there:
71
81
 
72
- If that doesn't solve your problem, please report it on the Tioga tracker:
82
+ # http://www.zlib.net/
83
+
84
+ # If that doesn't solve your problem, please report it on the Tioga tracker:
73
85
 
74
- http://rubyforge.org/tracker/?group_id=701
86
+ # http://rubyforge.org/tracker/?group_id=701
75
87
 
76
- EON
77
- exit 1
78
- end
88
+ # EON
89
+ # exit 1
90
+ # end
79
91
 
80
92
  unless have_header("ieee754.h")
81
93
  puts "You lack the ieee754.h header file, which might mean lower " +
data/split/namespace.h CHANGED
@@ -21,27 +21,35 @@
21
21
  #ifndef _NAMESPACE_H
22
22
  #define _NAMESPACE_H
23
23
 
24
- /* This header file provides two OS-specific macros for the definition of
25
- extern symbols:
24
+ /* This header file provides three OS-specific macros for the definition of
25
+ extern (or NOT extern) symbols:
26
26
 
27
27
  * PUBLIC, which has to be used to mark objects that will be used
28
- outside the module
28
+ outside the module
29
29
 
30
- * PRIVATE, for symbols which are "extern" but intern to the module
30
+ * INTERN, for symbols which are shared among compilation units within a
31
+ module, but are NOT exported to other modules.
32
+
33
+ * PRIVATE, for symbols which are visible only within the containing
34
+ compilation unit (i.e. C source file) and, of course, are not exported to
35
+ other modules.
31
36
 
32
37
  Please don't add "extern" after the PRIVATE or PUBLIC declaration
33
38
  as this would break compilation on Darwin.
34
39
  */
35
40
 
36
- #ifdef __APPLE__
41
+ #if __GNUC__ >= 4 /* we have the visibility attribute */
42
+ # define INTERN __attribute__ ((visibility ("hidden")))
43
+ # define PUBLIC __attribute__ ((visibility ("default")))
44
+ # define INTERN_EXTERN extern
45
+ #elif defined __APPLE__
37
46
  # define INTERN __private_extern__
38
47
  # define PUBLIC
39
- #elif __GNUC__ >= 4 /* we have the visibility attribute */
40
- # define INTERN __attribute__ ((visibility ("hidden")))
41
- # define PUBLIC __attribute__ ((visibility ("default")))
48
+ # define INTERN_EXTERN
42
49
  #else /* not really good */
43
50
  # define INTERN
44
51
  # define PUBLIC
52
+ # define INTERN_EXTERN
45
53
  #endif /* __APPLE__ and __GNU_C_ >= 4*/
46
54
 
47
55
  /* In any case, PRIVATE is static */
data/split/scripts/tioga CHANGED
File without changes
data/split/symbols.h CHANGED
@@ -22,7 +22,7 @@ PRIVATE void * rb_import_symbol_no_raise(VALUE module,
22
22
 
23
23
  #define DECLARE_SYMBOL(ret_type,name,args) \
24
24
  typedef ret_type (*rb_export_##name##_type) args;\
25
- INTERN rb_export_##name##_type name
25
+ INTERN INTERN_EXTERN rb_export_##name##_type name
26
26
 
27
27
  #define IMPLEMENT_SYMBOL(name)\
28
28
  INTERN rb_export_##name##_type name = 0;
Binary file
data/tests/tc_Dvector.rb CHANGED
@@ -599,6 +599,30 @@ class TestDvector < Test::Unit::TestCase
599
599
  assert_equal(nil, @dv.delete_at(20))
600
600
  end
601
601
 
602
+ def test_prune
603
+ @dv = Dvector.new(5) {|i| i*3 }
604
+ assert_equal(6, @dv[2])
605
+ assert_equal(5, @dv.length)
606
+ x = @dv.prune([0,2])
607
+ assert_equal(3, x.length)
608
+ assert_equal(5, @dv.length)
609
+ assert_equal(3, x[0])
610
+ assert_equal(9, x[1])
611
+ end
612
+
613
+ def test_prune_bang
614
+ @dv = Dvector.new(5) {|i| i*3 }
615
+ assert_equal(6, @dv[2])
616
+ assert_equal(5, @dv.length)
617
+ x = @dv.prune!([0,2])
618
+ assert_equal(3, x.length)
619
+ assert_equal(3, @dv.length)
620
+ assert_equal(3, x[0])
621
+ assert_equal(9, x[1])
622
+ assert_equal(@dv[0], x[0])
623
+ assert_equal(@dv[1], x[1])
624
+ end
625
+
602
626
  def test_slice!
603
627
  a = Dvector.new(5) {|i| i*3 }
604
628
  assert_equal(3, a.slice!(1))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tioga
3
3
  version: !ruby/object:Gem::Version
4
- version: "1.8"
4
+ version: "1.9"
5
5
  platform: ruby
6
6
  authors: []
7
7
 
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: split/scripts
10
10
  cert_chain: []
11
11
 
12
- date: 2008-04-05 00:00:00 +02:00
12
+ date: 2008-09-28 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -26,36 +26,36 @@ extensions:
26
26
  extra_rdoc_files: []
27
27
 
28
28
  files:
29
- - split/Tioga/wrappers.c
30
29
  - split/Tioga/init.c
31
30
  - split/Tioga/figures.c
32
- - split/Tioga/generic.c
33
- - split/Tioga/pdf_font_dicts.c
34
- - split/Tioga/pdfcoords.c
35
- - split/Tioga/pdftext.c
36
- - split/Tioga/axes.c
37
31
  - split/Tioga/makers.c
38
- - split/Tioga/pdfpath.c
32
+ - split/Tioga/axes.c
33
+ - split/Tioga/pdf_font_dicts.c
39
34
  - split/Tioga/pdfcolor.c
40
- - split/Tioga/texout.c
35
+ - split/Tioga/pdfcoords.c
41
36
  - split/Tioga/pdffile.c
42
37
  - split/Tioga/pdfimage.c
38
+ - split/Tioga/pdfpath.c
39
+ - split/Tioga/pdftext.c
40
+ - split/Tioga/texout.c
41
+ - split/Tioga/wrappers.c
42
+ - split/Tioga/generic.c
43
43
  - split/Function/function.c
44
44
  - split/Function/joint_qsort.c
45
45
  - split/Dvector/dvector.c
46
46
  - split/Dtable/dtable.c
47
47
  - split/Flate/flate.c
48
- - split/Tioga/generic.h
49
48
  - split/Tioga/pdfs.h
50
- - split/Tioga/wrappers.h
51
- - split/Tioga/symbols.h
52
49
  - split/Tioga/figures.h
50
+ - split/Tioga/symbols.h
53
51
  - split/Tioga/defs.h
54
52
  - split/Tioga/safe_double.h
55
53
  - split/Tioga/namespace.h
56
54
  - split/Tioga/dvector.h
57
55
  - split/Tioga/dtable.h
58
56
  - split/Tioga/flate.h
57
+ - split/Tioga/generic.h
58
+ - split/Tioga/wrappers.h
59
59
  - split/Function/symbols.h
60
60
  - split/Function/defs.h
61
61
  - split/Function/safe_double.h
@@ -66,52 +66,52 @@ files:
66
66
  - split/Dvector/defs.h
67
67
  - split/Dvector/safe_double.h
68
68
  - split/Dvector/namespace.h
69
- - split/Dtable/symbols.h
70
69
  - split/Dtable/dtable_intern.h
70
+ - split/Dtable/symbols.h
71
71
  - split/Dtable/defs.h
72
72
  - split/Dtable/safe_double.h
73
73
  - split/Dtable/namespace.h
74
74
  - split/Dtable/dvector.h
75
- - split/Flate/symbols.h
76
75
  - split/Flate/flate_intern.h
76
+ - split/Flate/symbols.h
77
77
  - split/Flate/defs.h
78
78
  - split/Flate/safe_double.h
79
79
  - split/Flate/namespace.h
80
80
  - split/Dvector/include/dvector.h
81
81
  - split/Dtable/include/dtable.h
82
82
  - split/Flate/include/flate.h
83
- - split/Tioga/lib/Rectangles.rb
84
- - split/Tioga/lib/Colorbars.rb
85
83
  - split/Tioga/lib/Shading.rb
86
- - split/Tioga/lib/Arcs_and_Circles.rb
87
84
  - split/Tioga/lib/MarkerConstants.rb
88
85
  - split/Tioga/lib/FigureConstants.rb
86
+ - split/Tioga/lib/Arcs_and_Circles.rb
89
87
  - split/Tioga/lib/FigMkr.rb
90
- - split/Tioga/lib/Legends.rb
91
- - split/Tioga/lib/Strokes.rb
92
88
  - split/Tioga/lib/Coordinate_Conversions.rb
93
89
  - split/Tioga/lib/Special_Paths.rb
94
- - split/Tioga/lib/Creating_Paths.rb
90
+ - split/Tioga/lib/Legends.rb
95
91
  - split/Tioga/lib/Using_Paths.rb
96
- - split/Tioga/lib/X_and_Y_Axes.rb
97
- - split/Tioga/lib/irb_tioga.rb
92
+ - split/Tioga/lib/Colorbars.rb
93
+ - split/Tioga/lib/Rectangles.rb
94
+ - split/Tioga/lib/Strokes.rb
95
+ - split/Tioga/lib/Creating_Paths.rb
98
96
  - split/Tioga/lib/Colormaps.rb
99
- - split/Tioga/lib/maker.rb
100
- - split/Tioga/lib/tioga_ui.rb
101
- - split/Tioga/lib/Utils.rb
102
- - split/Tioga/lib/Figures_and_Plots.rb
103
97
  - split/Tioga/lib/Page_Frame_Bounds.rb
98
+ - split/Tioga/lib/Utils.rb
99
+ - split/Tioga/lib/tioga_ui.rb
104
100
  - split/Tioga/lib/Executive.rb
105
- - split/Tioga/lib/TeX_Text.rb
101
+ - split/Tioga/lib/X_and_Y_Axes.rb
106
102
  - split/Tioga/lib/tioga.rb
107
103
  - split/Tioga/lib/Markers.rb
108
- - split/Tioga/lib/tioga_ui_cmds.rb
104
+ - split/Tioga/lib/TeX_Text.rb
109
105
  - split/Tioga/lib/Images.rb
110
106
  - split/Tioga/lib/Doc.rb
111
- - split/Tioga/lib/TexPreamble.rb
107
+ - split/Tioga/lib/Figures_and_Plots.rb
112
108
  - split/Tioga/lib/Titles_and_Labels.rb
113
109
  - split/Tioga/lib/Transparency.rb
114
110
  - split/Tioga/lib/ColorConstants.rb
111
+ - split/Tioga/lib/irb_tioga.rb
112
+ - split/Tioga/lib/tioga_ui_cmds.rb
113
+ - split/Tioga/lib/TexPreamble.rb
114
+ - split/Tioga/lib/maker.rb
115
115
  - split/Tioga/mk_tioga_sty.rb
116
116
  - split/Tioga/extconf.rb
117
117
  - split/Function/lib/Function_extras.rb
@@ -126,20 +126,21 @@ files:
126
126
  - split/mkmf2.rb
127
127
  - split/namespace.h
128
128
  - split/defs.h
129
- - split/symbols.h
130
129
  - split/safe_double.h
130
+ - split/symbols.h
131
131
  - split/symbols.c
132
- - tests/profile_Dvector
133
- - tests/benchmark_dvector_reads.rb
134
- - tests/dvector_read_test.data
135
132
  - tests/dtable_test.data
136
133
  - tests/tc_Dtable.rb
137
134
  - tests/tc_Flate.rb
138
- - tests/tc_Function.rb
139
135
  - tests/tc_FMkr.rb
140
- - tests/dvector_test.data
136
+ - tests/dvector_read_test.data
141
137
  - tests/ts_Tioga.rb
138
+ - tests/dvector_test.data
139
+ - tests/tc_Function.rb
142
140
  - tests/tc_Dvector.rb
141
+ - tests/profile_Dvector
142
+ - tests/benchmark_dvector_reads.rb
143
+ - tests/Icon_Test.pdf
143
144
  - Tioga_README
144
145
  - lgpl.txt
145
146
  has_rdoc: false
@@ -164,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
165
  requirements: []
165
166
 
166
167
  rubyforge_project: tioga
167
- rubygems_version: 1.0.1
168
+ rubygems_version: 1.2.0
168
169
  signing_key:
169
170
  specification_version: 2
170
171
  summary: Tioga - a powerful scientific plotting library