WPBDC 2013.1.1 → 2013.1.2
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 +15 -0
- data/ext/WPBDC/WPBDC.c +49 -49
- metadata +4 -6
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YTVmY2NiNzZhOTVmZDg2MGY4YzA1ODk2MTkzNmU4ODdhNjU2Mzc0Ng==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
N2M0MjEwNDBjNzRjNzg2OTZkY2QyZWQyNTA1M2ZkZTdiMzc0Y2FiMg==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NTk3NDZjZGUyZTkyZTg2OGEwZWZiNDJiYzVlODNjYTFjN2YxZjVjMjNiYjNi
|
10
|
+
OGIxNTY4MzM3NGM0M2E1YThiZmM2YjQ3ZDQ5ZjNmMTJjNWUwMzIwODI1NTYy
|
11
|
+
ZjQ2MGE5NWNjN2ZmZWI2MDY1ZDMxMTBiYTVlNjRlMGRkZTFlMDc=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YTQ5ODgwN2QzZTk5MmNiZGZhMDY3YmJmMDJmNGE1NzFiNThhNmJlYzQzN2Fi
|
14
|
+
MDA0MGFmNWU3ZDIzNDg4OWU2NTQwYWYxODc0ZjM4MWRiN2YyYjM2YjM5NGM3
|
15
|
+
Yjk3NWNjN2MwMjcwNDdlOGE1ZjVhMGU3YzgzNTVjNTNhOWQ5ZjE=
|
data/ext/WPBDC/WPBDC.c
CHANGED
@@ -125,7 +125,7 @@ static VALUE rb_api_sketch(VALUE self, VALUE bridge_as_string, VALUE width, VALU
|
|
125
125
|
*/
|
126
126
|
add_analysis_to_hash(hash, result);
|
127
127
|
if (result->status == BRIDGE_OK) {
|
128
|
-
rb_hash_aset(hash,
|
128
|
+
rb_hash_aset(hash, symbol("image"), rb_str_new(compressed_image->data, compressed_image->filled));
|
129
129
|
clear_compressed_image(compressed_image);
|
130
130
|
}
|
131
131
|
return hash;
|
@@ -149,74 +149,74 @@ static VALUE rb_api_local_contest_number_to_id(VALUE self, VALUE number_as_strin
|
|
149
149
|
}
|
150
150
|
|
151
151
|
|
152
|
-
#define
|
152
|
+
#define FUNCTION_TABLE_ENTRY(Name) { #Name, rb_api_ ## Name, ARGC_ ## Name }
|
153
153
|
|
154
154
|
static struct ft_entry {
|
155
155
|
char *name;
|
156
156
|
VALUE (*func)();
|
157
157
|
int argc;
|
158
158
|
} function_table[] = {
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
159
|
+
FUNCTION_TABLE_ENTRY(endecrypt),
|
160
|
+
FUNCTION_TABLE_ENTRY(analyze),
|
161
|
+
FUNCTION_TABLE_ENTRY(are_same),
|
162
|
+
FUNCTION_TABLE_ENTRY(variant),
|
163
|
+
FUNCTION_TABLE_ENTRY(failed_variant),
|
164
|
+
FUNCTION_TABLE_ENTRY(perturbation),
|
165
|
+
FUNCTION_TABLE_ENTRY(sketch),
|
166
|
+
FUNCTION_TABLE_ENTRY(analysis_table),
|
167
|
+
FUNCTION_TABLE_ENTRY(local_contest_number_to_id),
|
168
168
|
};
|
169
169
|
|
170
|
-
#define
|
170
|
+
#define INT_CONST_TABLE_ENTRY(Name) { #Name, Name }
|
171
171
|
|
172
172
|
static struct ict_entry {
|
173
173
|
char *name;
|
174
174
|
int val;
|
175
175
|
} int_const_table[] = {
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
176
|
+
INT_CONST_TABLE_ENTRY(BRIDGE_OK),
|
177
|
+
INT_CONST_TABLE_ENTRY(BRIDGE_MALFORMED),
|
178
|
+
INT_CONST_TABLE_ENTRY(BRIDGE_WRONGVERSION),
|
179
|
+
INT_CONST_TABLE_ENTRY(BRIDGE_FAILEDTEST),
|
180
180
|
|
181
|
-
|
182
|
-
|
181
|
+
INT_CONST_TABLE_ENTRY(MAX_JOINTS),
|
182
|
+
INT_CONST_TABLE_ENTRY(MAX_MEMBERS),
|
183
183
|
|
184
184
|
// Size of hash value in bytes.
|
185
|
-
|
185
|
+
INT_CONST_TABLE_ENTRY(HASH_SIZE),
|
186
186
|
|
187
187
|
// Possible errors during bridge parsing.
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
188
|
+
INT_CONST_TABLE_ENTRY(BridgeNoError),
|
189
|
+
INT_CONST_TABLE_ENTRY(BridgeMissingData),
|
190
|
+
INT_CONST_TABLE_ENTRY(BridgeSyntax),
|
191
|
+
INT_CONST_TABLE_ENTRY(BridgeMissingHeader),
|
192
|
+
INT_CONST_TABLE_ENTRY(BridgeBadHeader),
|
193
|
+
INT_CONST_TABLE_ENTRY(BridgeMissingTestStatus),
|
194
|
+
INT_CONST_TABLE_ENTRY(BridgeBadTestStatus),
|
195
|
+
INT_CONST_TABLE_ENTRY(BridgeBadScenario),
|
196
|
+
INT_CONST_TABLE_ENTRY(BridgeBadNDesignIterations),
|
197
|
+
INT_CONST_TABLE_ENTRY(BridgeTooManyElements),
|
198
|
+
INT_CONST_TABLE_ENTRY(BridgeBadJointBanner),
|
199
|
+
INT_CONST_TABLE_ENTRY(BridgeTooFewJoints),
|
200
|
+
INT_CONST_TABLE_ENTRY(BridgeWrongPrescribedJoints),
|
201
|
+
INT_CONST_TABLE_ENTRY(BridgeBadMemberBanner),
|
202
|
+
INT_CONST_TABLE_ENTRY(BridgeTooFewMembers),
|
203
|
+
INT_CONST_TABLE_ENTRY(BridgeBadLabelPos),
|
204
|
+
INT_CONST_TABLE_ENTRY(BridgeExtraJunk),
|
205
|
+
INT_CONST_TABLE_ENTRY(BridgeDupJoints),
|
206
|
+
INT_CONST_TABLE_ENTRY(BridgeDupMembers),
|
207
|
+
INT_CONST_TABLE_ENTRY(BridgeJointOnMember),
|
208
|
+
INT_CONST_TABLE_ENTRY(BridgeBadLoadScenario),
|
209
|
+
INT_CONST_TABLE_ENTRY(BridgeBadChar),
|
210
210
|
|
211
211
|
// Test status flag values read from bridge file.
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
212
|
+
INT_CONST_TABLE_ENTRY(NullTestStatus),
|
213
|
+
INT_CONST_TABLE_ENTRY(Unrecorded),
|
214
|
+
INT_CONST_TABLE_ENTRY(Untested),
|
215
|
+
INT_CONST_TABLE_ENTRY(Failed),
|
216
|
+
INT_CONST_TABLE_ENTRY(Passed),
|
217
|
+
|
218
|
+
INT_CONST_TABLE_ENTRY(SCENARIO_ID_SIZE),
|
219
|
+
INT_CONST_TABLE_ENTRY(SCENARIO_NUMBER_SIZE),
|
220
220
|
};
|
221
221
|
|
222
222
|
void Init_WPBDC(void)
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: WPBDC
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2013.1.
|
5
|
-
prerelease:
|
4
|
+
version: 2013.1.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Gene Ressler
|
@@ -46,26 +45,25 @@ files:
|
|
46
45
|
- ext/WPBDC/extconf.rb
|
47
46
|
homepage: http://rubygems.org/gems/wpbdc_judge
|
48
47
|
licenses: []
|
48
|
+
metadata: {}
|
49
49
|
post_install_message:
|
50
50
|
rdoc_options: []
|
51
51
|
require_paths:
|
52
52
|
- lib
|
53
53
|
required_ruby_version: !ruby/object:Gem::Requirement
|
54
|
-
none: false
|
55
54
|
requirements:
|
56
55
|
- - ! '>='
|
57
56
|
- !ruby/object:Gem::Version
|
58
57
|
version: '0'
|
59
58
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
|
-
none: false
|
61
59
|
requirements:
|
62
60
|
- - ! '>='
|
63
61
|
- !ruby/object:Gem::Version
|
64
62
|
version: '0'
|
65
63
|
requirements: []
|
66
64
|
rubyforge_project:
|
67
|
-
rubygems_version:
|
65
|
+
rubygems_version: 2.0.3
|
68
66
|
signing_key:
|
69
|
-
specification_version:
|
67
|
+
specification_version: 4
|
70
68
|
summary: Judge functions of the West Point Bridge Design Contest
|
71
69
|
test_files: []
|