excel_to_code 0.2.29 → 0.2.30
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.
- checksums.yaml +4 -4
- data/src/compile/c/a.out +0 -0
- data/src/compile/c/excel_to_c_runtime.c +5 -0
- data/src/compile/c/excel_to_c_runtime_test.c +1 -0
- data/src/excel_to_code.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efa73f5ef66a52e67a5026d4e791460a6b4a2544
|
4
|
+
data.tar.gz: add03f41738bc8df14386bfbb2cdadb25131a4ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc43795e22c77771abf29b37a911149130c1686152c989cc9271ca06eb5b981aeeb709d4055f2160e98be0fd873f47964e7c90e8d0e9df723f48d9a1124429d1
|
7
|
+
data.tar.gz: bd26b2ab4e65db5fcbe19d57460be77bf23980a3410e45b84270bde1d0bf4e961218dfb44721afaa4f3c4e2799ef72f6bde1b3d6ba6818eb68fafd0a73ecdbfe
|
data/src/compile/c/a.out
CHANGED
Binary file
|
@@ -2102,6 +2102,11 @@ static ExcelValue text(ExcelValue number_v, ExcelValue format_v) {
|
|
2102
2102
|
sprintf(s, "%0.2f",number_v.number);
|
2103
2103
|
free_later(s);
|
2104
2104
|
result = new_excel_string(s);
|
2105
|
+
} else if(strcmp(format_v.string,"0.000") == 0) {
|
2106
|
+
s = malloc(100);
|
2107
|
+
sprintf(s, "%0.3f",number_v.number);
|
2108
|
+
free_later(s);
|
2109
|
+
result = new_excel_string(s);
|
2105
2110
|
} else if(strcmp(format_v.string,"#,##") == 0) {
|
2106
2111
|
s = malloc(100);
|
2107
2112
|
setlocale(LC_ALL,"");
|
@@ -706,6 +706,7 @@ int test_functions() {
|
|
706
706
|
assert(strcmp(text(new_excel_number(1.1518), ZERO).string, "1") == 0);
|
707
707
|
assert(strcmp(text(new_excel_number(1.1518), new_excel_string("0.0")).string, "1.2") == 0);
|
708
708
|
assert(strcmp(text(new_excel_number(1.1518), new_excel_string("0.00")).string, "1.15") == 0);
|
709
|
+
assert(strcmp(text(new_excel_number(1.1518), new_excel_string("0.000")).string, "1.152") == 0);
|
709
710
|
assert(strcmp(text(new_excel_number(12.51), new_excel_string("0000")).string, "0013") == 0);
|
710
711
|
assert(strcmp(text(new_excel_number(125101), new_excel_string("0000")).string, "125101") == 0);
|
711
712
|
assert(strcmp(text(new_excel_number(123456789.123456), new_excel_string("#,##")).string, "123,456,789") == 0);
|
data/src/excel_to_code.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: excel_to_code
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Counsell, Green on Black Ltd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubypeg
|