cosmos 3.6.3 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/Manifest.txt +10 -0
  3. data/data/crc.txt +22 -13
  4. data/demo/config/data/crc.txt +2 -1
  5. data/demo/config/targets/INST/screens/limits.txt +51 -0
  6. data/demo/config/targets/INST/screens/other.txt +0 -5
  7. data/ext/cosmos/ext/array/array.c +6 -6
  8. data/ext/cosmos/ext/buffered_file/buffered_file.c +10 -10
  9. data/ext/cosmos/ext/config_parser/config_parser.c +10 -10
  10. data/ext/cosmos/ext/cosmos_io/cosmos_io.c +3 -3
  11. data/ext/cosmos/ext/crc/crc.c +6 -6
  12. data/ext/cosmos/ext/line_graph/line_graph.c +20 -20
  13. data/ext/cosmos/ext/low_fragmentation_array/low_fragmentation_array.c +4 -4
  14. data/ext/cosmos/ext/packet/packet.c +18 -23
  15. data/ext/cosmos/ext/platform/platform.c +1 -1
  16. data/ext/cosmos/ext/polynomial_conversion/polynomial_conversion.c +1 -1
  17. data/ext/cosmos/ext/structure/structure.c +34 -29
  18. data/ext/cosmos/ext/tabbed_plots_config/tabbed_plots_config.c +1 -1
  19. data/ext/cosmos/ext/telemetry/telemetry.c +33 -33
  20. data/lib/cosmos/gui/line_graph/line_graph.rb +25 -1
  21. data/lib/cosmos/gui/line_graph/line_graph_dialog.rb +2 -2
  22. data/lib/cosmos/gui/line_graph/line_graph_drawing.rb +64 -14
  23. data/lib/cosmos/gui/line_graph/line_graph_popups.rb +2 -1
  24. data/lib/cosmos/gui/line_graph/line_graph_scaling.rb +9 -3
  25. data/lib/cosmos/gui/line_graph/line_graph_script.rb +64 -9
  26. data/lib/cosmos/gui/line_graph/lines.rb +24 -11
  27. data/lib/cosmos/interfaces/udp_interface.rb +8 -3
  28. data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_config.rb +1 -1
  29. data/lib/cosmos/tools/tlm_viewer/widgets.rb +8 -1
  30. data/lib/cosmos/tools/tlm_viewer/widgets/canvasdot_widget.rb +79 -0
  31. data/lib/cosmos/tools/tlm_viewer/widgets/labelvaluelimitscolumn_widget.rb +38 -0
  32. data/lib/cosmos/tools/tlm_viewer/widgets/labelvaluerangebar_widget.rb +1 -1
  33. data/lib/cosmos/tools/tlm_viewer/widgets/labelvaluerangecolumn_widget.rb +39 -0
  34. data/lib/cosmos/tools/tlm_viewer/widgets/limits_widget.rb +103 -0
  35. data/lib/cosmos/tools/tlm_viewer/widgets/limitsbar_widget.rb +77 -147
  36. data/lib/cosmos/tools/tlm_viewer/widgets/limitscolor_widget.rb +102 -0
  37. data/lib/cosmos/tools/tlm_viewer/widgets/limitscolumn_widget.rb +108 -0
  38. data/lib/cosmos/tools/tlm_viewer/widgets/rangecolumn_widget.rb +57 -0
  39. data/lib/cosmos/tools/tlm_viewer/widgets/valuelimitscolumn_widget.rb +37 -0
  40. data/lib/cosmos/tools/tlm_viewer/widgets/valuerangecolumn_widget.rb +37 -0
  41. data/lib/cosmos/version.rb +5 -5
  42. data/spec/tools/cmd_tlm_server/cmd_tlm_server_config_spec.rb +33 -4
  43. metadata +12 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c086907a0e1bda08352520d1a264be73867cde38
4
- data.tar.gz: 6ae05f354e92bb9331bbea4a49689580a3e78e9e
3
+ metadata.gz: 9112201f45a7327cc5ce26c21e5bf83dc00ae783
4
+ data.tar.gz: ea97aee7b5c6b97d17e5161d6cce2565bed64f1e
5
5
  SHA512:
6
- metadata.gz: cac5dbce95e3e6893fb81f9bcb56738a7bd15c89e3e2f63aba7e04e5989cba2a5b3d3b9fb72230c1dc4f4a306fe71dd8d7b1e2948c1a2273bf613132cb9b3f42
7
- data.tar.gz: 32ff6b4ff7946905dfc52dfe71d00978d76d3a333a2ec849cb441076bbca9f1e41c313ededa8931ff39fd3dd00fe17f0e344c1c8edb97e8e2286ed028722e69e
6
+ metadata.gz: 080bfbf420c3c831b7dea10289633b289c2e116ed368bac38fcc70d89845709631f55ac39c439c335ef2f972ade3819d4b081ef04378b120b45145511f0d699a
7
+ data.tar.gz: 55b8c3ff623c95b3411785234ac36aa925820635c891e023accfd6edca90d6a5fd1b80516744842c1efbcee54371a49db69829bc39ec7895e2d0e53a4ba76a13
@@ -324,6 +324,7 @@ demo/config/targets/INST/screens/graphs.txt
324
324
  demo/config/targets/INST/screens/ground.txt
325
325
  demo/config/targets/INST/screens/hs.txt
326
326
  demo/config/targets/INST/screens/latest.txt
327
+ demo/config/targets/INST/screens/limits.txt
327
328
  demo/config/targets/INST/screens/other.txt
328
329
  demo/config/targets/INST/screens/tabs.txt
329
330
  demo/config/targets/INST/target.txt
@@ -997,6 +998,7 @@ lib/cosmos/tools/tlm_viewer/widgets/array_widget.rb
997
998
  lib/cosmos/tools/tlm_viewer/widgets/block_widget.rb
998
999
  lib/cosmos/tools/tlm_viewer/widgets/button_widget.rb
999
1000
  lib/cosmos/tools/tlm_viewer/widgets/canvas_widget.rb
1001
+ lib/cosmos/tools/tlm_viewer/widgets/canvasdot_widget.rb
1000
1002
  lib/cosmos/tools/tlm_viewer/widgets/canvasimage_widget.rb
1001
1003
  lib/cosmos/tools/tlm_viewer/widgets/canvasimagevalue_widget.rb
1002
1004
  lib/cosmos/tools/tlm_viewer/widgets/canvaslabel_widget.rb
@@ -1018,15 +1020,21 @@ lib/cosmos/tools/tlm_viewer/widgets/labeltrendlimitsbar_widget.rb
1018
1020
  lib/cosmos/tools/tlm_viewer/widgets/labelvalue_widget.rb
1019
1021
  lib/cosmos/tools/tlm_viewer/widgets/labelvaluedesc_widget.rb
1020
1022
  lib/cosmos/tools/tlm_viewer/widgets/labelvaluelimitsbar_widget.rb
1023
+ lib/cosmos/tools/tlm_viewer/widgets/labelvaluelimitscolumn_widget.rb
1021
1024
  lib/cosmos/tools/tlm_viewer/widgets/labelvaluerangebar_widget.rb
1025
+ lib/cosmos/tools/tlm_viewer/widgets/labelvaluerangecolumn_widget.rb
1022
1026
  lib/cosmos/tools/tlm_viewer/widgets/layout_widget.rb
1027
+ lib/cosmos/tools/tlm_viewer/widgets/limits_widget.rb
1023
1028
  lib/cosmos/tools/tlm_viewer/widgets/limitsbar_widget.rb
1029
+ lib/cosmos/tools/tlm_viewer/widgets/limitscolor_widget.rb
1030
+ lib/cosmos/tools/tlm_viewer/widgets/limitscolumn_widget.rb
1024
1031
  lib/cosmos/tools/tlm_viewer/widgets/linegraph_widget.rb
1025
1032
  lib/cosmos/tools/tlm_viewer/widgets/matrixbycolumns_widget.rb
1026
1033
  lib/cosmos/tools/tlm_viewer/widgets/multi_widget.rb
1027
1034
  lib/cosmos/tools/tlm_viewer/widgets/progressbar_widget.rb
1028
1035
  lib/cosmos/tools/tlm_viewer/widgets/radiobutton_widget.rb
1029
1036
  lib/cosmos/tools/tlm_viewer/widgets/rangebar_widget.rb
1037
+ lib/cosmos/tools/tlm_viewer/widgets/rangecolumn_widget.rb
1030
1038
  lib/cosmos/tools/tlm_viewer/widgets/screenshotbutton_widget.rb
1031
1039
  lib/cosmos/tools/tlm_viewer/widgets/scrollwindow_widget.rb
1032
1040
  lib/cosmos/tools/tlm_viewer/widgets/sectionheader_widget.rb
@@ -1040,7 +1048,9 @@ lib/cosmos/tools/tlm_viewer/widgets/trendbar_widget.rb
1040
1048
  lib/cosmos/tools/tlm_viewer/widgets/trendlimitsbar_widget.rb
1041
1049
  lib/cosmos/tools/tlm_viewer/widgets/value_widget.rb
1042
1050
  lib/cosmos/tools/tlm_viewer/widgets/valuelimitsbar_widget.rb
1051
+ lib/cosmos/tools/tlm_viewer/widgets/valuelimitscolumn_widget.rb
1043
1052
  lib/cosmos/tools/tlm_viewer/widgets/valuerangebar_widget.rb
1053
+ lib/cosmos/tools/tlm_viewer/widgets/valuerangecolumn_widget.rb
1044
1054
  lib/cosmos/tools/tlm_viewer/widgets/vertical_widget.rb
1045
1055
  lib/cosmos/tools/tlm_viewer/widgets/verticalbox_widget.rb
1046
1056
  lib/cosmos/tools/tlm_viewer/widgets/widget.rb
@@ -58,14 +58,14 @@
58
58
  "lib/cosmos/gui/widgets/full_text_search_line_edit.rb" 0x7AAF694C
59
59
  "lib/cosmos/gui/widgets/realtime_button_bar.rb" 0xEB0CE858
60
60
  "lib/cosmos/gui/widgets/packet_log_frame.rb" 0xF9312CBD
61
- "lib/cosmos/gui/line_graph/line_graph.rb" 0x15D29433
62
- "lib/cosmos/gui/line_graph/line_graph_popups.rb" 0x6B6BD351
63
- "lib/cosmos/gui/line_graph/line_graph_drawing.rb" 0xEC9FEECC
61
+ "lib/cosmos/gui/line_graph/line_graph.rb" 0xE9C0B20F
62
+ "lib/cosmos/gui/line_graph/line_graph_popups.rb" 0x14BC9861
63
+ "lib/cosmos/gui/line_graph/line_graph_drawing.rb" 0xFBD19D32
64
64
  "lib/cosmos/gui/line_graph/overview_graph.rb" 0x8FCDCE33
65
- "lib/cosmos/gui/line_graph/line_graph_dialog.rb" 0xF73F68CB
66
- "lib/cosmos/gui/line_graph/lines.rb" 0x871CA030
67
- "lib/cosmos/gui/line_graph/line_graph_script.rb" 0x9FD973A1
68
- "lib/cosmos/gui/line_graph/line_graph_scaling.rb" 0xBF57D9F7
65
+ "lib/cosmos/gui/line_graph/line_graph_dialog.rb" 0x306BB716
66
+ "lib/cosmos/gui/line_graph/lines.rb" 0x81B61BA8
67
+ "lib/cosmos/gui/line_graph/line_graph_script.rb" 0x5169466F
68
+ "lib/cosmos/gui/line_graph/line_graph_scaling.rb" 0x96BFF329
69
69
  "lib/cosmos/gui/text/completion_text_edit.rb" 0xCF57B24D
70
70
  "lib/cosmos/gui/text/ruby_editor.rb" 0xBEDB4735
71
71
  "lib/cosmos/gui/text/completion_line_edit.rb" 0x16E0A174
@@ -107,7 +107,7 @@
107
107
  "lib/cosmos/tools/tlm_extractor/tlm_extractor.rb" 0xBEE35D52
108
108
  "lib/cosmos/tools/tlm_extractor/tlm_extractor_config.rb" 0x7779DCEC
109
109
  "lib/cosmos/tools/tlm_extractor/text_item_chooser.rb" 0x587768C6
110
- "lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_config.rb" 0xEFDAD3B8
110
+ "lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_config.rb" 0x603D04E2
111
111
  "lib/cosmos/tools/cmd_tlm_server/api.rb" 0x217CE77F
112
112
  "lib/cosmos/tools/cmd_tlm_server/connections.rb" 0x6DC54689
113
113
  "lib/cosmos/tools/cmd_tlm_server/background_task.rb" 0x448A2191
@@ -178,27 +178,35 @@
178
178
  "lib/cosmos/tools/handbook_creator/handbook_creator.rb" 0x729A16C4
179
179
  "lib/cosmos/tools/tlm_viewer/screen.rb" 0xEBC2A043
180
180
  "lib/cosmos/tools/tlm_viewer/tlm_viewer_config.rb" 0x99975EA1
181
- "lib/cosmos/tools/tlm_viewer/widgets.rb" 0x6D47EAF0
181
+ "lib/cosmos/tools/tlm_viewer/widgets.rb" 0xED06BC7C
182
182
  "lib/cosmos/tools/tlm_viewer/widgets/horizontalbox_widget.rb" 0xE84BD2B5
183
+ "lib/cosmos/tools/tlm_viewer/widgets/labelvaluelimitscolumn_widget.rb" 0x83106C3B
183
184
  "lib/cosmos/tools/tlm_viewer/widgets/formatvalue_widget.rb" 0x2D9BB6B1
184
185
  "lib/cosmos/tools/tlm_viewer/widgets/canvaslabel_widget.rb" 0x2C9CA260
185
- "lib/cosmos/tools/tlm_viewer/widgets/labelvaluerangebar_widget.rb" 0x858377C2
186
+ "lib/cosmos/tools/tlm_viewer/widgets/valuelimitscolumn_widget.rb" 0x12154778
187
+ "lib/cosmos/tools/tlm_viewer/widgets/labelvaluerangebar_widget.rb" 0xEA9E63B6
188
+ "lib/cosmos/tools/tlm_viewer/widgets/limits_widget.rb" 0xA05C8B00
186
189
  "lib/cosmos/tools/tlm_viewer/widgets/aging_widget.rb" 0xF86604BD
187
190
  "lib/cosmos/tools/tlm_viewer/widgets/labelvalue_widget.rb" 0x3A167C64
191
+ "lib/cosmos/tools/tlm_viewer/widgets/rangecolumn_widget.rb" 0xAD3C0180
192
+ "lib/cosmos/tools/tlm_viewer/widgets/limitscolor_widget.rb" 0x346B0043
188
193
  "lib/cosmos/tools/tlm_viewer/widgets/sectionheader_widget.rb" 0x0CDABB7D
189
- "lib/cosmos/tools/tlm_viewer/widgets/limitsbar_widget.rb" 0x37B72108
194
+ "lib/cosmos/tools/tlm_viewer/widgets/limitsbar_widget.rb" 0x49C757A0
190
195
  "lib/cosmos/tools/tlm_viewer/widgets/labelvaluedesc_widget.rb" 0x9FDF915A
191
196
  "lib/cosmos/tools/tlm_viewer/widgets/progressbar_widget.rb" 0x88E04062
192
197
  "lib/cosmos/tools/tlm_viewer/widgets/trendbar_widget.rb" 0xCC7F70CC
193
198
  "lib/cosmos/tools/tlm_viewer/widgets/multi_widget.rb" 0x692A64C9
194
199
  "lib/cosmos/tools/tlm_viewer/widgets/screenshotbutton_widget.rb" 0xD59B52F4
195
200
  "lib/cosmos/tools/tlm_viewer/widgets/combobox_widget.rb" 0x8B143D7D
201
+ "lib/cosmos/tools/tlm_viewer/widgets/labelvaluerangecolumn_widget.rb" 0x5935BAC8
196
202
  "lib/cosmos/tools/tlm_viewer/widgets/formatfontvalue_widget.rb" 0xBA3127ED
197
203
  "lib/cosmos/tools/tlm_viewer/widgets/timegraph_widget.rb" 0xEA9E936C
198
204
  "lib/cosmos/tools/tlm_viewer/widgets/checkbutton_widget.rb" 0x1C8F7E80
205
+ "lib/cosmos/tools/tlm_viewer/widgets/limitscolumn_widget.rb" 0xFDB55BB8
199
206
  "lib/cosmos/tools/tlm_viewer/widgets/horizontalline_widget.rb" 0xF1D7738C
200
207
  "lib/cosmos/tools/tlm_viewer/widgets/scrollwindow_widget.rb" 0x9CF64770
201
208
  "lib/cosmos/tools/tlm_viewer/widgets/label_widget.rb" 0x5158C883
209
+ "lib/cosmos/tools/tlm_viewer/widgets/canvasdot_widget.rb" 0x9454DCA0
202
210
  "lib/cosmos/tools/tlm_viewer/widgets/labelvaluelimitsbar_widget.rb" 0xF8B0AEA6
203
211
  "lib/cosmos/tools/tlm_viewer/widgets/rangebar_widget.rb" 0x6264A25A
204
212
  "lib/cosmos/tools/tlm_viewer/widgets/textbox_widget.rb" 0x9208702E
@@ -227,6 +235,7 @@
227
235
  "lib/cosmos/tools/tlm_viewer/widgets/labelprogressbar_widget.rb" 0xC4662AC8
228
236
  "lib/cosmos/tools/tlm_viewer/widgets/tabbook_widget.rb" 0xD19A5F86
229
237
  "lib/cosmos/tools/tlm_viewer/widgets/radiobutton_widget.rb" 0x192594BB
238
+ "lib/cosmos/tools/tlm_viewer/widgets/valuerangecolumn_widget.rb" 0x20019A6D
230
239
  "lib/cosmos/tools/tlm_viewer/widgets/tabitem_widget.rb" 0x390CA44D
231
240
  "lib/cosmos/tools/tlm_viewer/widgets/canvaslinevalue_widget.rb" 0xA2867A1C
232
241
  "lib/cosmos/tools/tlm_viewer/widgets/button_widget.rb" 0x189ED964
@@ -234,7 +243,7 @@
234
243
  "lib/cosmos/tools/tlm_viewer/tlm_viewer.rb" 0x895983E9
235
244
  "lib/cosmos/system.rb" 0x735DFB42
236
245
  "lib/cosmos/conversions.rb" 0x43679D05
237
- "lib/cosmos/version.rb" 0x52D8F90A
246
+ "lib/cosmos/version.rb" 0x1B3425B3
238
247
  "lib/cosmos/core_ext.rb" 0x1951B346
239
248
  "lib/cosmos/interfaces.rb" 0x7E3EA326
240
249
  "lib/cosmos/processors.rb" 0x5241327D
@@ -297,7 +306,7 @@
297
306
  "lib/cosmos/interfaces/simulated_target_interface.rb" 0x15DC496F
298
307
  "lib/cosmos/interfaces/serial_interface.rb" 0xC376DDA0
299
308
  "lib/cosmos/interfaces/tcpip_client_interface.rb" 0x5F0DB50D
300
- "lib/cosmos/interfaces/udp_interface.rb" 0xCE4532AD
309
+ "lib/cosmos/interfaces/udp_interface.rb" 0x99C0D354
301
310
  "lib/cosmos/interfaces/tcpip_server_interface.rb" 0xC8F6E908
302
311
  "lib/cosmos/script/limits.rb" 0x9CED41D8
303
312
  "lib/cosmos/script/commands.rb" 0x58ABA373
@@ -32,13 +32,14 @@
32
32
  "config/targets/INST/screens/graphs.txt" 0x82EF35B4
33
33
  "config/targets/INST/screens/commanding.txt" 0xC0EDFAC3
34
34
  "config/targets/INST/screens/tabs.txt" 0x8C8BB548
35
+ "config/targets/INST/screens/limits.txt" 0x9705EB1B
35
36
  "config/targets/INST/screens/latest.txt" 0x9ED55CAF
36
37
  "config/targets/INST/screens/adcs.txt" 0xBF096628
37
38
  "config/targets/INST/screens/block.txt" 0x77C3F2F0
38
39
  "config/targets/INST/screens/hs.txt" 0x3FF100C3
39
40
  "config/targets/INST/screens/array.txt" 0x4E9CE715
40
41
  "config/targets/INST/screens/ground.txt" 0x2D89624D
41
- "config/targets/INST/screens/other.txt" 0x6E6541FA
42
+ "config/targets/INST/screens/other.txt" 0x2F7A1014
42
43
  "config/targets/INST/doc/README.txt" 0x93B2C07E
43
44
  "config/targets/INST/lib/example_limits_response.rb" 0xB4A746B1
44
45
  "config/targets/INST/lib/sim_inst.rb" 0x7CEC7033
@@ -0,0 +1,51 @@
1
+ SCREEN AUTO AUTO 1.0
2
+
3
+ TITLE "Instrument Limits"
4
+
5
+ VERTICALBOX
6
+ SECTIONHEADER "Range Bars 0-100"
7
+
8
+ RANGEBAR INST HEALTH_STATUS TEMP1 0 100
9
+ VALUERANGEBAR INST HEALTH_STATUS TEMP1 0 100
10
+ LABELVALUERANGEBAR INST HEALTH_STATUS TEMP1 0 100
11
+ END
12
+
13
+ VERTICALBOX
14
+ SECTIONHEADER "Limits Bars"
15
+
16
+ LIMITSBAR INST HEALTH_STATUS TEMP1
17
+ VALUELIMITSBAR INST HEALTH_STATUS TEMP1
18
+ LABELVALUELIMITSBAR INST HEALTH_STATUS TEMP1
19
+ END
20
+
21
+ VERTICALBOX
22
+ SECTIONHEADER "Range Columns 0-100"
23
+ HORIZONTAL
24
+ RANGECOLUMN INST HEALTH_STATUS TEMP1 0 100
25
+ VALUERANGECOLUMN INST HEALTH_STATUS TEMP1 0 100
26
+ LABELVALUERANGECOLUMN INST HEALTH_STATUS TEMP1 0 100
27
+ END
28
+ END
29
+
30
+ VERTICALBOX
31
+ SECTIONHEADER "Limits Columns"
32
+ HORIZONTAL
33
+ LIMITSCOLUMN INST HEALTH_STATUS TEMP1
34
+ VALUELIMITSCOLUMN INST HEALTH_STATUS TEMP1
35
+ LABELVALUELIMITSCOLUMN INST HEALTH_STATUS TEMP1
36
+ END
37
+ END
38
+
39
+ VERTICALBOX
40
+ SECTIONHEADER "Limits Colors"
41
+ LIMITSCOLOR INST HEALTH_STATUS TEMP1
42
+ LIMITSCOLOR INST HEALTH_STATUS GROUND1STATUS CONVERTED 5 TRUE
43
+ END
44
+ END
45
+
46
+ VERTICALBOX
47
+ LABELVALUE INST HEALTH_STATUS TIMEFORMATTED WITH_UNITS 30
48
+ LABELVALUE COSMOS VERSION COSMOS
49
+ END
50
+
51
+
@@ -17,13 +17,8 @@ SCROLLWINDOW
17
17
  TIMEGRAPH INST ADCS Q1 100 500 500 3
18
18
  END
19
19
 
20
- LIMITSBAR INST HEALTH_STATUS TEMP1
21
- RANGEBAR INST HEALTH_STATUS TEMP1 0 100
22
20
  LABELVALUEDESC INST HEALTH_STATUS TEMP1
23
21
  LABELFORMATVALUE INST HEALTH_STATUS TEMP1 %0.6f
24
- LABELVALUERANGEBAR INST HEALTH_STATUS TEMP1 0 100
25
- VALUELIMITSBAR INST HEALTH_STATUS TEMP1
26
- VALUERANGEBAR INST HEALTH_STATUS TEMP1 0 100
27
22
  END
28
23
 
29
24
  END
@@ -22,9 +22,9 @@ static VALUE max_with_index (VALUE self)
22
22
  int index = 0;
23
23
  long array_length = RARRAY_LEN(self);
24
24
  int maximum_index = 0;
25
- VALUE value = Qnil;
26
- VALUE maximum = Qnil;
27
- VALUE return_value = Qnil;
25
+ volatile VALUE value = Qnil;
26
+ volatile VALUE maximum = Qnil;
27
+ volatile VALUE return_value = Qnil;
28
28
 
29
29
  if (array_length > 0)
30
30
  {
@@ -64,9 +64,9 @@ static VALUE min_with_index (VALUE self)
64
64
  int index = 0;
65
65
  long array_length = RARRAY_LEN(self);
66
66
  int minimum_index = 0;
67
- VALUE value = Qnil;
68
- VALUE minimum = Qnil;
69
- VALUE return_value = Qnil;
67
+ volatile VALUE value = Qnil;
68
+ volatile VALUE minimum = Qnil;
69
+ volatile VALUE return_value = Qnil;
70
70
 
71
71
  if (array_length > 0)
72
72
  {
@@ -37,11 +37,11 @@ static VALUE buffered_file_initialize(int argc, VALUE* argv, VALUE self) {
37
37
  /* Read using an internal buffer to avoid system calls */
38
38
  static VALUE buffered_file_read(VALUE self, VALUE arg_length) {
39
39
  long length = FIX2INT(arg_length);
40
- VALUE buffer = rb_ivar_get(self, id_ivar_buffer);
40
+ volatile VALUE buffer = rb_ivar_get(self, id_ivar_buffer);
41
41
  long buffer_length = RSTRING_LEN(buffer);
42
42
  long buffer_index = FIX2INT(rb_ivar_get(self, id_ivar_buffer_index));
43
- VALUE result = Qnil;
44
- VALUE super_arg = Qnil;
43
+ volatile VALUE result = Qnil;
44
+ volatile VALUE super_arg = Qnil;
45
45
 
46
46
  if (length <= (buffer_length - buffer_index)) {
47
47
  /* Return part of the buffer without having to go to the OS */
@@ -59,7 +59,7 @@ static VALUE buffered_file_read(VALUE self, VALUE arg_length) {
59
59
  rb_ivar_set(self, id_ivar_buffer_index, INT2FIX(0));
60
60
  }
61
61
  super_arg = INT2FIX(length - buffer_length);
62
- rb_str_append(buffer, rb_funcall(rb_call_super(1, &super_arg), id_method_to_s, 0));
62
+ rb_str_append(buffer, rb_funcall(rb_call_super(1, (VALUE*) &super_arg), id_method_to_s, 0));
63
63
  return rb_funcall(buffer, id_method_slice_bang, 1, rb_const_get(cBufferedFile, id_const_ALL_RANGE));
64
64
  } else {
65
65
  return rb_call_super(1, &arg_length);
@@ -73,7 +73,7 @@ static VALUE buffered_file_read(VALUE self, VALUE arg_length) {
73
73
  rb_ivar_set(self, id_ivar_buffer_index, INT2FIX(0));
74
74
  }
75
75
  super_arg = INT2FIX(BUFFER_SIZE - buffer_length);
76
- rb_str_append(buffer, rb_funcall(rb_call_super(1, &super_arg), id_method_to_s, 0));
76
+ rb_str_append(buffer, rb_funcall(rb_call_super(1, (VALUE*) &super_arg), id_method_to_s, 0));
77
77
  buffer_length = RSTRING_LEN(buffer);
78
78
  if (buffer_length <= 0) {
79
79
  return Qnil;
@@ -92,7 +92,7 @@ static VALUE buffered_file_read(VALUE self, VALUE arg_length) {
92
92
 
93
93
  /* Get the current file position */
94
94
  static VALUE buffered_file_pos(VALUE self) {
95
- VALUE parent_pos = rb_call_super(0, NULL);
95
+ volatile VALUE parent_pos = rb_call_super(0, NULL);
96
96
  long long ll_pos = NUM2LL(parent_pos);
97
97
  long buffer_length = RSTRING_LEN(rb_ivar_get(self, id_ivar_buffer));
98
98
  long buffer_index = FIX2INT(rb_ivar_get(self, id_ivar_buffer_index));
@@ -101,10 +101,10 @@ static VALUE buffered_file_pos(VALUE self) {
101
101
 
102
102
  /* Seek to a given file position */
103
103
  static VALUE buffered_file_seek(int argc, VALUE* argv, VALUE self) {
104
- VALUE amount = Qnil;
105
- VALUE whence = Qnil;
104
+ volatile VALUE amount = Qnil;
105
+ volatile VALUE whence = Qnil;
106
106
  long buffer_index = 0;
107
- VALUE super_args[2] = {Qnil, Qnil};
107
+ volatile VALUE super_args[2] = {Qnil, Qnil};
108
108
 
109
109
  switch (argc)
110
110
  {
@@ -131,7 +131,7 @@ static VALUE buffered_file_seek(int argc, VALUE* argv, VALUE self) {
131
131
  }
132
132
  super_args[0] = rb_funcall(self, id_method_pos, 0);
133
133
  super_args[1] = BUFFERED_FILE_SEEK_SET;
134
- rb_call_super(2, super_args);
134
+ rb_call_super(2, (VALUE*) super_args);
135
135
  }
136
136
 
137
137
  rb_funcall(rb_ivar_get(self, id_ivar_buffer), id_method_clear, 0);
@@ -76,16 +76,16 @@ static VALUE parse_loop(VALUE self, VALUE io, VALUE yield_non_keyword_lines, VAL
76
76
  int index = 0;
77
77
  double float_pos = 0.0;
78
78
  double float_size = NUM2DBL(size);
79
- VALUE progress_callback = rb_cvar_get(cConfigParser, id_cvar_progress_callback);
80
- VALUE line = Qnil;
81
- VALUE data = Qnil;
82
- VALUE line_continuation = Qfalse;
83
- VALUE string = Qnil;
84
- VALUE array = rb_ary_new();
85
- VALUE first_item = Qnil;
86
- VALUE ivar_keyword = Qnil;
87
- VALUE ivar_parameters = rb_ary_new();
88
- VALUE ivar_line =Qnil;
79
+ volatile VALUE progress_callback = rb_cvar_get(cConfigParser, id_cvar_progress_callback);
80
+ volatile VALUE line = Qnil;
81
+ volatile VALUE data = Qnil;
82
+ volatile VALUE line_continuation = Qfalse;
83
+ volatile VALUE string = Qnil;
84
+ volatile VALUE array = rb_ary_new();
85
+ volatile VALUE first_item = Qnil;
86
+ volatile VALUE ivar_keyword = Qnil;
87
+ volatile VALUE ivar_parameters = rb_ary_new();
88
+ volatile VALUE ivar_line =Qnil;
89
89
 
90
90
  rb_ivar_set(self, id_ivar_line_number, INT2FIX(0));
91
91
  rb_ivar_set(self, id_ivar_keyword, ivar_keyword);
@@ -41,9 +41,9 @@ static VALUE read_length_bytes(VALUE self, VALUE param_length_num_bytes)
41
41
  long string_length = 0;
42
42
  unsigned short short_length = 0;
43
43
  unsigned char* length_ptr = NULL;
44
- VALUE temp_string = Qnil;
45
- VALUE temp_string_length = Qnil;
46
- VALUE return_value = Qnil;
44
+ volatile VALUE temp_string = Qnil;
45
+ volatile VALUE temp_string_length = Qnil;
46
+ volatile VALUE return_value = Qnil;
47
47
 
48
48
  /* Read bytes for string length */
49
49
  temp_string = rb_funcall(self, id_method_read, 1, param_length_num_bytes);
@@ -90,8 +90,8 @@ static unsigned long long bit_reverse_64(unsigned long long value)
90
90
  */
91
91
  static VALUE crc16_calculate(int argc, VALUE* argv, VALUE self)
92
92
  {
93
- VALUE param_data = Qnil;
94
- VALUE param_seed = Qnil;
93
+ volatile VALUE param_data = Qnil;
94
+ volatile VALUE param_seed = Qnil;
95
95
  unsigned char* data = NULL;
96
96
  unsigned short* table = NULL;
97
97
  int i = 0;
@@ -167,8 +167,8 @@ static VALUE crc16_calculate(int argc, VALUE* argv, VALUE self)
167
167
  */
168
168
  static VALUE crc32_calculate(int argc, VALUE* argv, VALUE self)
169
169
  {
170
- VALUE param_data = Qnil;
171
- VALUE param_seed = Qnil;
170
+ volatile VALUE param_data = Qnil;
171
+ volatile VALUE param_seed = Qnil;
172
172
  unsigned char* data = NULL;
173
173
  unsigned int* table = NULL;
174
174
  int i = 0;
@@ -244,8 +244,8 @@ static VALUE crc32_calculate(int argc, VALUE* argv, VALUE self)
244
244
  */
245
245
  static VALUE crc64_calculate(int argc, VALUE* argv, VALUE self)
246
246
  {
247
- VALUE param_data = Qnil;
248
- VALUE param_seed = Qnil;
247
+ volatile VALUE param_data = Qnil;
248
+ volatile VALUE param_seed = Qnil;
249
249
  unsigned char* data = NULL;
250
250
  unsigned long long* table = NULL;
251
251
  int i = 0;
@@ -87,14 +87,14 @@ static int cal_code (double x, double y, double xmin, double ymin, double xmax,
87
87
  /*
88
88
  * Internal function to perform clipping
89
89
  */
90
- static VALUE line_clip_internal(double x0, double y0, double x1, double y1, double xmin, double ymin, double xmax, double ymax, double* result_x0, double* result_y0, double* result_x1, double* result_y1, VALUE* result_clipped0, VALUE* result_clipped1) {
90
+ static VALUE line_clip_internal(double x0, double y0, double x1, double y1, double xmin, double ymin, double xmax, double ymax, double* result_x0, double* result_y0, double* result_x1, double* result_y1, volatile VALUE* result_clipped0, volatile VALUE* result_clipped1) {
91
91
  int code0 = 0;
92
92
  int code1 = 0;
93
93
  int codeout = 0;
94
- VALUE accept = Qfalse;
95
- VALUE done = Qfalse;
96
- VALUE clipped0 = Qfalse;
97
- VALUE clipped1 = Qfalse;
94
+ volatile VALUE accept = Qfalse;
95
+ volatile VALUE done = Qfalse;
96
+ volatile VALUE clipped0 = Qfalse;
97
+ volatile VALUE clipped1 = Qfalse;
98
98
  double x = 0.0;
99
99
  double y = 0.0;
100
100
 
@@ -174,10 +174,10 @@ static VALUE line_clip_internal(double x0, double y0, double x1, double y1, doub
174
174
  * If no part of the line is viewable, it returns nil
175
175
  */
176
176
  static VALUE line_clip(VALUE self, VALUE x0, VALUE y0, VALUE x1, VALUE y1, VALUE xmin, VALUE ymin, VALUE xmax, VALUE ymax) {
177
- VALUE result = Qnil;
178
- VALUE result_clipped0 = Qnil;
179
- VALUE result_clipped1 = Qnil;
180
- VALUE return_value = Qnil;
177
+ volatile VALUE result = Qnil;
178
+ volatile VALUE result_clipped0 = Qnil;
179
+ volatile VALUE result_clipped1 = Qnil;
180
+ volatile VALUE return_value = Qnil;
181
181
  double double_x0 = 0.0;
182
182
  double double_y0 = 0.0;
183
183
  double double_x1 = 0.0;
@@ -234,7 +234,7 @@ static long scale_value_to_graph_y_internal (double y, double y_max, double y_sc
234
234
  * This function converts a y value to a y coordinate on the graph
235
235
  */
236
236
  static VALUE scale_value_to_graph_y(int argc, VALUE* argv, VALUE self) {
237
- VALUE y = Qnil;
237
+ volatile VALUE y = Qnil;
238
238
  ID id_axis = 0;
239
239
  long long_graph_top_y = 0;
240
240
  double double_y = 0.0;
@@ -298,9 +298,9 @@ static VALUE scale_value_to_graph_x(VALUE self, VALUE x) {
298
298
  * Internal version to draw a line
299
299
  */
300
300
  static void draw_line_internal(VALUE dc, double x1, double y1, double x2, double y2, double x_min, double y_min, double x_max, double y_max, double x_scale, double y_scale, long graph_left_x, long graph_top_y, ID id_axis, VALUE show_line, VALUE point_size, VALUE color) {
301
- VALUE result = Qnil;
302
- VALUE clipped1 = Qnil;
303
- VALUE clipped2 = Qnil;
301
+ volatile VALUE result = Qnil;
302
+ volatile VALUE clipped1 = Qnil;
303
+ volatile VALUE clipped2 = Qnil;
304
304
  long x1_scaled = 0;
305
305
  long y1_scaled = 0;
306
306
  long x2_scaled = 0;
@@ -390,13 +390,13 @@ static VALUE draw_lines (VALUE self, VALUE dc, VALUE axis) {
390
390
  long line_length = 0;
391
391
  long point_index = 0;
392
392
  ID id_axis = 0;
393
- VALUE lines = Qnil;
394
- VALUE line = Qnil;
395
- VALUE x_values = Qnil;
396
- VALUE y_values = Qnil;
397
- VALUE color = Qnil;
398
- VALUE show_lines = Qnil;
399
- VALUE point_size = Qnil;
393
+ volatile VALUE lines = Qnil;
394
+ volatile VALUE line = Qnil;
395
+ volatile VALUE x_values = Qnil;
396
+ volatile VALUE y_values = Qnil;
397
+ volatile VALUE color = Qnil;
398
+ volatile VALUE show_lines = Qnil;
399
+ volatile VALUE point_size = Qnil;
400
400
  double double_x1 = 0.0;
401
401
  double double_y1 = 0.0;
402
402
  double double_x2 = 0.0;