excel_to_code 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -104,7 +104,7 @@ static ExcelValue new_excel_range(void *array, int rows, int columns) {
104
104
  HEAPCHECK
105
105
  ExcelValue new_cell = cells[cell_counter];
106
106
  new_cell.type = ExcelRange;
107
- new_cell.array =array;
107
+ new_cell.array = array;
108
108
  new_cell.rows = rows;
109
109
  new_cell.columns = columns;
110
110
  return new_cell;
@@ -328,6 +328,7 @@ static struct average_result calculate_average(int array_size, ExcelValue *array
328
328
  }
329
329
  r.count = count;
330
330
  r.sum = sum;
331
+ r.has_error = false;
331
332
  return r;
332
333
  }
333
334
 
@@ -1850,6 +1851,11 @@ int test_functions() {
1850
1851
  ExcelValue subtotal_array_1_v = new_excel_range(subtotal_array_1,3,1);
1851
1852
  ExcelValue subtotal_array_2[] = {new_excel_number(1),new_excel_string("two"),subtotal_array_1_v};
1852
1853
 
1854
+ // new_excel_number(1.0);
1855
+ // inspect_excel_value(new_excel_number(1.0));
1856
+ // inspect_excel_value(new_excel_range(subtotal_array_2,3,1));
1857
+ // inspect_excel_value(subtotal(new_excel_number(1.0),3,subtotal_array_2));
1858
+
1853
1859
  assert(subtotal(new_excel_number(1.0),3,subtotal_array_2).number == 111.0/3.0);
1854
1860
  assert(subtotal(new_excel_number(2.0),3,subtotal_array_2).number == 3);
1855
1861
  assert(subtotal(new_excel_number(3.0),7, count_a_test_array_1).number == 6);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: excel_to_code
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-24 00:00:00.000000000 Z
12
+ date: 2012-04-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubypeg
16
- requirement: &70157840000000 !ruby/object:Gem::Requirement
16
+ requirement: &70225829675560 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70157840000000
24
+ version_requirements: *70225829675560
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: nokogiri
27
- requirement: &70157839999500 !ruby/object:Gem::Requirement
27
+ requirement: &70225829675060 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.5.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70157839999500
35
+ version_requirements: *70225829675060
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70157839999000 !ruby/object:Gem::Requirement
38
+ requirement: &70225829674560 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 2.7.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70157839999000
46
+ version_requirements: *70225829674560
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: ffi
49
- requirement: &70157839998540 !ruby/object:Gem::Requirement
49
+ requirement: &70225829674100 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: 1.0.11
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70157839998540
57
+ version_requirements: *70225829674100
58
58
  description: ! "# excel_to_code\n\nConverts some excel spreadsheets (.xlsx, not .xls)
59
59
  into some other programming languages (currently ruby or c).\nThis allows the excel
60
60
  spreadsheets to be run programatically, without excel.\n\nIts cannonical source
@@ -88,6 +88,7 @@ files:
88
88
  - src/compile/c/compile_to_c_header.rb
89
89
  - src/compile/c/compile_to_c_unit_test.rb
90
90
  - src/compile/c/excel_to_c_runtime.c
91
+ - src/compile/c/excel_to_c_runtime.c.out
91
92
  - src/compile/c/map_formulae_to_c.rb
92
93
  - src/compile/c/map_sheet_names_to_c_names.rb
93
94
  - src/compile/c/map_values_to_c.rb