From 24a9bbe107b610f2406d39c14cb98fc9e1f0aae6 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 26 Mar 2017 18:09:37 -0400 Subject: [PATCH] #382 non-numeric defines into C sources --- java_tools/ConfigDefinition.jar | Bin 32229 -> 32247 bytes .../src/com/rusefi/VariableRegistry.java | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/java_tools/ConfigDefinition.jar b/java_tools/ConfigDefinition.jar index e87a405b361efd02197d2446fc0a52f3e25e3289..24ff841dfe70e0b8acc342bec119a25f085c3ea6 100644 GIT binary patch delta 3926 zcmeH~`#TeSAICT6!$?A#W7NpZp&T-#LX%BV$VPG;l0>u^+KnL@(Q;bLDRMqjra6?R zWpb|E4#^>h?uZp^f9bY*)37#SD*A@C@D0Q0ayhbTZ z`}gdKmK?vtKR>8>0~5YXApqb#Wm^YE6m^%ufw{ZHduu^S$<{@)crkGlE=Nr57Ups- z7!Ahv*D~M_J9|y^D+Z&-qTTV6_>xEBzKIjK4d8d!kCt3NJkk%>z^VJf__96DozF&W zzAJGDG=tmEdjT8u-g;S`fRWGMLN$8YB2CCx@O+$(_hoQKe5cVxkS|SSKaro36_~yJ zm|ZI~(zCE~SKM0?uZJrkyY(1hlN3TIvG--irMs${Q<9!&HCsM=AhtX`G~qcO7b*Ms ze6WfZyeM32EY45XtiMH)s5@WE~Xa)m5BP(}}Xi0GDx-5M!Tn*8mv+ya?ev)!n!=;j@-L;;1;`LzDZp-!L z#vs$TJ{6>X55IO&OK#PuWEFIN0htUP^m1mazYZZ~sHUQh&VT}tXGWxbg*k*KxC4b? z@(_VQpTeBAy`rTkp-l<0G0Duec_I`v4M_xHtCos<@a02#Zz;q?$i%>Fa`bq?AD>%j zL1gK6lAtYWRvk$yF1cOg+qByDpfJE+@t*yATN%m~^S1-0S9I|xMQAPyD#OH9<4cN7 zV=X?OS^|c~1rhB9)=(#pk54VTX{KK6BLcL-FR2A(-ThgJ^jkO6_D>Zy{AF zBgBg7S2-OT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GE=G5Iq_`fxv%{mf^xO&DqCI;pB^ zxl%joB9g3axTXLtTtm&)p~Gr)pH27HCh9CJZd#hM=ZkDxf23oKYxDXyEvnL;5(d^@ z+4Ra;GSyGu{F8u%<o$IcEtG+gw+;XwTodY_J&^*$r4A_( zQTlay2V&FO9tL5@p4PLL9>iV7-XlpcwV1}C$PhHfk=#0tSQ+R`$D1y|<)c-{6*eBO?DG2Kox(J^ed<2~lml!TFC+pkCDvJ5G)zL_ zml}UsEIKXXTG_ZcVfPwoDdTp=OkuOoV}Q> z365LLjdu{YPXA^>y#0R#!w>N`;tL}R0$9($QOw0%It3xoYt9gv8!#x89pcgd{3ocZ Vqx8?L3IM==z7w(lKt{|~_b(!9Hx2** diff --git a/java_tools/configuration_definition/src/com/rusefi/VariableRegistry.java b/java_tools/configuration_definition/src/com/rusefi/VariableRegistry.java index 9c918ea1f0..b764a46baa 100644 --- a/java_tools/configuration_definition/src/com/rusefi/VariableRegistry.java +++ b/java_tools/configuration_definition/src/com/rusefi/VariableRegistry.java @@ -20,7 +20,7 @@ public class VariableRegistry extends TreeMap { public Map intValues = new HashMap<>(); - private final StringBuilder cNumbericDefinitions = new StringBuilder(); + private final StringBuilder cAllDefinitions = new StringBuilder(); private final StringBuilder javaNumbericDefinitions = new StringBuilder(); private VariableRegistry() { @@ -47,6 +47,7 @@ public class VariableRegistry extends TreeMap { System.out.println("Registering " + var + " as " + value); put(var, value); + cAllDefinitions.append("#define " + var + " " + value + "\r\n"); tryToRegisterAsInteger(var, value); } @@ -58,7 +59,6 @@ public class VariableRegistry extends TreeMap { if (intValues.containsKey(var)) throw new IllegalStateException("Not allowed to redefine: " + var); intValues.put(var, intValue); - cNumbericDefinitions.append("#define " + var + " " + intValue + "\r\n"); javaNumbericDefinitions.append("\tpublic static final int " + var + " = " + intValue + ";\r\n"); } catch (NumberFormatException e) { System.out.println("Not an integer: " + value); @@ -75,7 +75,7 @@ public class VariableRegistry extends TreeMap { System.out.println("Writing to " + fileName); BufferedWriter cHeader = new BufferedWriter(new FileWriter(fileName)); - cHeader.write(cNumbericDefinitions.toString()); + cHeader.write(cAllDefinitions.toString()); cHeader.close(); }