daniel_peintner 14 лет назад
Родитель
Сommit
894153d088

+ 2 - 0
.cproject

@@ -600,9 +600,11 @@
 								<option id="gnu.c.compiler.option.warnings.pedantic.289278524" name="Pedantic (-pedantic)" superClass="gnu.c.compiler.option.warnings.pedantic" value="true" valueType="boolean"/>
 								<option id="gnu.c.compiler.option.warnings.pedantic.error.822372173" name="Pedantic warnings as errors (-pedantic-errors)" superClass="gnu.c.compiler.option.warnings.pedantic.error" value="true" valueType="boolean"/>
 								<option id="gnu.c.compiler.option.optimization.flags.1051939537" name="Other optimization flags" superClass="gnu.c.compiler.option.optimization.flags" value="-Os" valueType="string"/>
+								<option id="gnu.c.compiler.option.misc.other.1470884128" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fdata-sections -ffunction-sections" valueType="string"/>
 								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.898314529" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
 							</tool>
 							<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.base.2082341498" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.base">
+								<option id="gnu.c.link.option.other.71044722" name="Other options (-Xlinker [option])" superClass="gnu.c.link.option.other" valueType="stringList"/>
 								<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.153003457" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
 									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
 									<additionalInput kind="additionalinput" paths="$(LIBS)"/>

+ 0 - 26
src/codec/EXIDecoder.c

@@ -109,32 +109,6 @@ static int _decodeListValues(bitstream_t* stream, exi_datatype_t dt, uint16_t le
 
 	return 0;
 }
-static int _decodeListIntegerValues(bitstream_t* stream, exi_integer_type_t dt, uint16_t len) {
-	unsigned int i;
-
-	integer_t iv;
-
-	for(i = 0; i<len; i++) {
-		switch(dt) {
-		case UNSIGNED_INTEGER_8:
-		case UNSIGNED_INTEGER_16:
-		case UNSIGNED_INTEGER_32:
-		case UNSIGNED_INTEGER_64:
-			errn = decodeUnsignedInteger(stream, &iv);
-			break;
-		case INTEGER_8:
-		case INTEGER_16:
-		case INTEGER_32:
-		case INTEGER_64:
-			errn = decodeInteger(stream, &iv);
-			break;
-		default:
-			return EXI_UNSUPPORTED_LIST_VALUE_TYPE;
-		}
-	}
-
-	return 0;
-}
 
 
 int exiInitDecoder(bitstream_t* stream, exi_state_t* state, exi_name_table_runtime_t runtimeTable) {

+ 0 - 26
src/codec/appHandCodec/appHand_EXIDecoder.c

@@ -109,32 +109,6 @@ static int _decodeListValues(bitstream_t* stream, exi_datatype_t dt, uint16_t le
 
 	return 0;
 }
-static int _decodeListIntegerValues(bitstream_t* stream, exi_integer_type_t dt, uint16_t len) {
-	unsigned int i;
-
-	integer_t iv;
-
-	for(i = 0; i<len; i++) {
-		switch(dt) {
-		case UNSIGNED_INTEGER_8:
-		case UNSIGNED_INTEGER_16:
-		case UNSIGNED_INTEGER_32:
-		case UNSIGNED_INTEGER_64:
-			errn = decodeUnsignedInteger(stream, &iv);
-			break;
-		case INTEGER_8:
-		case INTEGER_16:
-		case INTEGER_32:
-		case INTEGER_64:
-			errn = decodeInteger(stream, &iv);
-			break;
-		default:
-			return EXI_UNSUPPORTED_LIST_VALUE_TYPE;
-		}
-	}
-
-	return 0;
-}
 
 
 int exiappHandInitDecoder(bitstream_t* stream, exi_state_t* state, exi_name_table_runtime_t runtimeTable) {

+ 0 - 100
src/codec/appHandCodec/appHand_EXIEncoder.c

@@ -50,106 +50,6 @@ static int errn;
 
 /* ==================================== */
 
-/* <0 ... Error, 1 .. Not-Found, 0.. Success */
-static int _exiGet1stLevelEventCode(exi_state_t* state, exi_event_t eventType, uint16_t* resGrammarID) {
-	/* retrieve current grammar-rule ID */
-	uint16_t grammarID = state->grammarStack[ state->stackIndex ];
-
-	switch(grammarID) {
-	case DOCUMENT:
-		switch(eventType) {
-		case START_DOCUMENT:
-			*resGrammarID = 0;
-			return 0;
-		default:
-			return 1; /* not found */
-		}
-		break;
-	case DOC_CONTENT:
-		switch(eventType) {
-		/* TODO other IDs */
-		case START_ELEMENT_GENERIC:
-			*resGrammarID = 0;
-			return 0;
-		default:
-			return 1; /* not found */
-		}
-		break;
-	case DOC_END:
-		switch(eventType) {
-		case END_DOCUMENT:
-			*resGrammarID = 0;
-			return 0;
-		default:
-			return 1; /* not found */
-		}
-		break;
-	case UR_TYPE_GRAMMAR_0:
-		switch(eventType) {
-		case ATTRIBUTE_GENERIC:
-			*resGrammarID = 0;
-			return 0;
-		case START_ELEMENT_GENERIC:
-			*resGrammarID = 1;
-			return 0;
-		case END_ELEMENT:
-			*resGrammarID = 2;
-			return 0;
-		case CHARACTERS_GENERIC:
-			*resGrammarID = 3;
-			return 0;
-		default:
-			return 1; /* not found */
-		}
-		break;
-	case UR_TYPE_GRAMMAR_1:
-		switch(eventType) {
-		case START_ELEMENT_GENERIC:
-			*resGrammarID = 0;
-			return 0;
-		case END_ELEMENT:
-			*resGrammarID = 1;
-			return 0;
-		case CHARACTERS_GENERIC:
-			*resGrammarID = 2;
-			return 0;
-		default:
-			return 1; /* not found */
-		}
-		break;
-	}
-
-	return 1; /* not found */
-}
-
-
-static int _exiGetEventCodeLength(exi_state_t* state, uint16_t* eventCodeLength) {
-	/* retrieve current grammar-rule ID */
-	uint16_t grammarID = state->grammarStack[ state->stackIndex ];
-
-	switch(grammarID) {
-	/* TODO OTHER IDs */
-	case DOCUMENT:
-		*eventCodeLength = 0;
-		return 0;
-	case DOC_CONTENT:
-		/* TODO other root elements */
-		*eventCodeLength = IS_STRICT ? 0 : 1;
-		return 0;
-	case DOC_END:
-		*eventCodeLength = IS_STRICT ? 0 : 1;
-		return 0;
-	case UR_TYPE_GRAMMAR_0:
-		*eventCodeLength = IS_STRICT ? 4 : 5;
-		return 0;
-	case UR_TYPE_GRAMMAR_1:
-		*eventCodeLength = IS_STRICT ? 3 : 4;
-		return 0;
-	}
-
-	return EXI_ERROR_UNEXPECTED_GRAMMAR_ID;
-}
-
 static int _encodeNBitIntegerValue(bitstream_t* stream, integer_t* iv, uint16_t nbits, int32_t lowerBound) {
 	int errn;
 	uint32_t val;