diff options
Diffstat (limited to 'src/decomp')
-rw-r--r-- | src/decomp/expr/access.c | 2 | ||||
-rw-r--r-- | src/decomp/expr/arithm.c | 2 | ||||
-rw-r--r-- | src/decomp/expr/array.c | 4 | ||||
-rw-r--r-- | src/decomp/expr/assign.c | 2 | ||||
-rw-r--r-- | src/decomp/expr/call.c | 10 | ||||
-rw-r--r-- | src/decomp/expr/dalvik/array.c | 4 | ||||
-rw-r--r-- | src/decomp/expr/pseudo.c | 4 | ||||
-rw-r--r-- | src/decomp/expr/return.c | 4 | ||||
-rw-r--r-- | src/decomp/expr/text.c | 6 | ||||
-rw-r--r-- | src/decomp/expression.c | 2 | ||||
-rw-r--r-- | src/decomp/instr/ite.c | 4 | ||||
-rw-r--r-- | src/decomp/instr/keyword.c | 4 | ||||
-rw-r--r-- | src/decomp/instr/switch.c | 24 | ||||
-rw-r--r-- | src/decomp/lang/asm.c | 28 | ||||
-rw-r--r-- | src/decomp/lang/java.c | 74 |
15 files changed, 87 insertions, 87 deletions
diff --git a/src/decomp/expr/access.c b/src/decomp/expr/access.c index 0af60c7..d7d354d 100644 --- a/src/decomp/expr/access.c +++ b/src/decomp/expr/access.c @@ -239,7 +239,7 @@ static GBufferLine *g_access_expression_print(const GAccessExpression *expr, GCo result = g_dec_instruction_print(G_DEC_INSTRUCTION(expr->owner), buffer, line, output); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, ".", 3, RTT_PUNCT); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, ".", 3, RTT_PUNCT, NULL); result = g_dec_instruction_print(G_DEC_INSTRUCTION(expr->target), buffer, result, output); diff --git a/src/decomp/expr/arithm.c b/src/decomp/expr/arithm.c index f14086d..7314dde 100644 --- a/src/decomp/expr/arithm.c +++ b/src/decomp/expr/arithm.c @@ -276,7 +276,7 @@ static GBufferLine *g_arithm_expression_print(const GArithmExpression *expr, GCo break; } - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, sign, 3, RTT_SIGNS); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, sign, 3, RTT_SIGNS, NULL); result = g_dec_instruction_print(G_DEC_INSTRUCTION(expr->op2), buffer, result, output); diff --git a/src/decomp/expr/array.c b/src/decomp/expr/array.c index d335f61..5c18c11 100644 --- a/src/decomp/expr/array.c +++ b/src/decomp/expr/array.c @@ -239,12 +239,12 @@ static GBufferLine *g_array_access_print(const GArrayAccess *expr, GCodeBuffer * result = g_dec_instruction_print(G_DEC_INSTRUCTION(expr->array), buffer, line, output); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "[", 1, RTT_RAW); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "[", 1, RTT_RAW, NULL); result = g_dec_instruction_print(G_DEC_INSTRUCTION(expr->index), buffer, result, output); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "]", 1, RTT_RAW); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "]", 1, RTT_RAW, NULL); return result; diff --git a/src/decomp/expr/assign.c b/src/decomp/expr/assign.c index 9a5b308..f4ab149 100644 --- a/src/decomp/expr/assign.c +++ b/src/decomp/expr/assign.c @@ -239,7 +239,7 @@ static GBufferLine *g_assign_expression_print(const GAssignExpression *expr, GCo result = g_dec_instruction_print(G_DEC_INSTRUCTION(expr->dest), buffer, line, output); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, " = ", 3, RTT_SIGNS); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, " = ", 3, RTT_SIGNS, NULL); result = g_dec_instruction_print(G_DEC_INSTRUCTION(expr->src), buffer, result, output); diff --git a/src/decomp/expr/call.c b/src/decomp/expr/call.c index 8382b6d..7a09c37 100644 --- a/src/decomp/expr/call.c +++ b/src/decomp/expr/call.c @@ -238,9 +238,9 @@ static GBufferLine *g_routine_call_print(const GRoutineCall *call, GCodeBuffer * size_t i; /* Boucle de parcours */ name = g_binary_routine_get_name(call->routine); - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, name, strlen(name), RTT_RAW); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, name, strlen(name), RTT_RAW, NULL); - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "(", 1, RTT_PUNCT); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "(", 1, RTT_PUNCT, NULL); if (call->count > 0) { @@ -248,8 +248,8 @@ static GBufferLine *g_routine_call_print(const GRoutineCall *call, GCodeBuffer * for (i = 1; i < call->count; i++) { - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, ",", 1, RTT_PUNCT); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, ",", 1, RTT_PUNCT, NULL); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL); g_dec_instruction_print(call->args[i], buffer, result, output); @@ -258,7 +258,7 @@ static GBufferLine *g_routine_call_print(const GRoutineCall *call, GCodeBuffer * } else result = line; - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, ")", 1, RTT_PUNCT); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, ")", 1, RTT_PUNCT, NULL); return result; diff --git a/src/decomp/expr/dalvik/array.c b/src/decomp/expr/dalvik/array.c index 018952a..7806349 100644 --- a/src/decomp/expr/dalvik/array.c +++ b/src/decomp/expr/dalvik/array.c @@ -148,8 +148,8 @@ static void g_dalvik_alength_print(const GDalvikALength *expr, GCodeBuffer *buff g_dec_instruction_print(G_DEC_INSTRUCTION(expr->array), buffer, line, output); - g_buffer_line_insert_text(line, BLC_ASSEMBLY, ".", 1, RTT_RAW); + g_buffer_line_append_text(line, BLC_ASSEMBLY, ".", 1, RTT_RAW, NULL); - g_buffer_line_insert_text(line, BLC_ASSEMBLY, "length", 6, RTT_RAW); + g_buffer_line_append_text(line, BLC_ASSEMBLY, "length", 6, RTT_RAW, NULL); } diff --git a/src/decomp/expr/pseudo.c b/src/decomp/expr/pseudo.c index 85a9e72..0ee83b9 100644 --- a/src/decomp/expr/pseudo.c +++ b/src/decomp/expr/pseudo.c @@ -179,13 +179,13 @@ static GBufferLine *g_pseudo_register_print(const GPseudoRegister *reg, GCodeBuf if (reg->var != NULL) { name = g_binary_variable_to_string(reg->var, true); - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, name, strlen(name), RTT_RAW); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, name, strlen(name), RTT_RAW, NULL); free(name); } else { snprintf(label, 32, "%s%zu", reg->name, reg->index); - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, label, strlen(label), RTT_RAW); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, label, strlen(label), RTT_RAW, NULL); } return line; diff --git a/src/decomp/expr/return.c b/src/decomp/expr/return.c index b61eb39..8758042 100644 --- a/src/decomp/expr/return.c +++ b/src/decomp/expr/return.c @@ -226,11 +226,11 @@ static GBufferLine *g_return_expression_print(const GReturnExpression *expr, GCo { GBufferLine *result; /* Ligne à retourner */ - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "return", 6, RTT_KEY_WORD); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "return", 6, RTT_KEY_WORD, NULL); if (expr->payload != NULL) { - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL); result = g_dec_instruction_print(G_DEC_INSTRUCTION(expr->payload), buffer, line, output); diff --git a/src/decomp/expr/text.c b/src/decomp/expr/text.c index 9991b85..d4d5f85 100644 --- a/src/decomp/expr/text.c +++ b/src/decomp/expr/text.c @@ -150,9 +150,9 @@ GDecInstruction *g_str_expression_new(const char *value) static GBufferLine *g_str_expression_print(const GStrExpression *expr, GCodeBuffer *buffer, GBufferLine *line, GLangOutput *output) { - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "\"", 1, RTT_STRING); - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, expr->value, expr->len, RTT_STRING); - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "\"", 1, RTT_STRING); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "\"", 1, RTT_STRING, NULL); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, expr->value, expr->len, RTT_STRING, NULL); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "\"", 1, RTT_STRING, NULL); return line; diff --git a/src/decomp/expression.c b/src/decomp/expression.c index e8bdbd9..ff2c0da 100644 --- a/src/decomp/expression.c +++ b/src/decomp/expression.c @@ -98,7 +98,7 @@ static GBufferLine *g_dec_expression_neg_print(const GDecExpression *expr, GCode { GBufferLine *result; /* Ligne à retourner */ - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "!", 1, RTT_KEY_WORD); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "!", 1, RTT_KEY_WORD, NULL); result = expr->original_print(G_DEC_INSTRUCTION(expr), buffer, line, output); diff --git a/src/decomp/instr/ite.c b/src/decomp/instr/ite.c index eedd7b4..b6391d5 100644 --- a/src/decomp/instr/ite.c +++ b/src/decomp/instr/ite.c @@ -241,7 +241,7 @@ static GBufferLine *g_ite_instruction_print(const GITEInstruction *instr, GCodeB { GBufferLine *result; /* Ligne à retourner */ - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "if ", 3, RTT_KEY_WORD); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "if ", 3, RTT_KEY_WORD, NULL); result = g_dec_instruction_print(G_DEC_INSTRUCTION(instr->cond), buffer, line, output); @@ -250,7 +250,7 @@ static GBufferLine *g_ite_instruction_print(const GITEInstruction *instr, GCodeB if (instr->false_branch != NULL) { - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "else", 4, RTT_KEY_WORD); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "else", 4, RTT_KEY_WORD, NULL); result = g_dec_instruction_print(instr->false_branch, buffer, result, output); } diff --git a/src/decomp/instr/keyword.c b/src/decomp/instr/keyword.c index 3ed12fb..aec6897 100644 --- a/src/decomp/instr/keyword.c +++ b/src/decomp/instr/keyword.c @@ -148,11 +148,11 @@ static GBufferLine *g_keyword_instruction_print(const GKeywordInstruction *instr switch (instr->keyword) { case DKW_BREAK: - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "break", 5, RTT_KEY_WORD); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "break", 5, RTT_KEY_WORD, NULL); break; case DKW_CONTINUE: - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "continue", 8, RTT_KEY_WORD); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "continue", 8, RTT_KEY_WORD, NULL); break; } diff --git a/src/decomp/instr/switch.c b/src/decomp/instr/switch.c index a01c28c..eb93bb2 100644 --- a/src/decomp/instr/switch.c +++ b/src/decomp/instr/switch.c @@ -246,17 +246,17 @@ static GBufferLine *g_switch_instruction_print(const GSwitchInstruction *instr, size_t i; /* Boucle de parcours #1 */ size_t j; /* Boucle de parcours #2 */ - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "switch", 9, RTT_KEY_WORD); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "switch", 9, RTT_KEY_WORD, NULL); - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW); - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "(", 1, RTT_PUNCT); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "(", 1, RTT_PUNCT, NULL); result = g_dec_instruction_print(G_DEC_INSTRUCTION(instr->value), buffer, line, output); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, ")", 1, RTT_PUNCT); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, ")", 1, RTT_PUNCT, NULL); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "{", 1, RTT_HOOK); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "{", 1, RTT_HOOK, NULL); g_code_buffer_inc_indentation(buffer); @@ -268,13 +268,13 @@ static GBufferLine *g_switch_instruction_print(const GSwitchInstruction *instr, { result = g_code_buffer_append_new_line_fixme(buffer); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "case", 4, RTT_KEY_WORD); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "case", 4, RTT_KEY_WORD, NULL); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL); result = g_dec_instruction_print(G_DEC_INSTRUCTION(instr->cases[i].values[j]) , buffer, result, output); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, ":", 1, RTT_PUNCT); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, ":", 1, RTT_PUNCT, NULL); } @@ -288,8 +288,8 @@ static GBufferLine *g_switch_instruction_print(const GSwitchInstruction *instr, { result = g_code_buffer_append_new_line_fixme(buffer); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "default", 7, RTT_KEY_WORD); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, ":", 1, RTT_PUNCT); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "default", 7, RTT_KEY_WORD, NULL); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, ":", 1, RTT_PUNCT, NULL); result = g_dec_instruction_print(instr->def_case, buffer, result, output); @@ -301,7 +301,7 @@ static GBufferLine *g_switch_instruction_print(const GSwitchInstruction *instr, result = g_code_buffer_append_new_line_fixme(buffer); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "}", 1, RTT_HOOK); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "}", 1, RTT_HOOK, NULL); return result; diff --git a/src/decomp/lang/asm.c b/src/decomp/lang/asm.c index bafef2e..069d0c4 100644 --- a/src/decomp/lang/asm.c +++ b/src/decomp/lang/asm.c @@ -165,10 +165,10 @@ static GBufferLine *g_asm_output_write_comments(GAsmOutput *output, GCodeBuffer result = g_code_buffer_append_new_line_fixme(buffer); - g_buffer_line_insert_text(result, BLC_COMMENTS, "; ", 2, RTT_COMMENT); + g_buffer_line_append_text(result, BLC_COMMENTS, "; ", 2, RTT_COMMENT, NULL); if (length > 0) - g_buffer_line_insert_text(result, BLC_COMMENTS, text, length, RTT_COMMENT); + g_buffer_line_append_text(result, BLC_COMMENTS, text, length, RTT_COMMENT, NULL); return result; @@ -191,34 +191,34 @@ static GBufferLine *g_asm_output_write_comments(GAsmOutput *output, GCodeBuffer static void g_asm_output_write_comp_sign(GAsmOutput *output, GBufferLine *line, CompSignType sign) { - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL); switch (sign) { case CST_EQ: - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "==", 2, RTT_SIGNS); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "==", 2, RTT_SIGNS, NULL); break; case CST_NE: - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "!=", 2, RTT_SIGNS); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "!=", 2, RTT_SIGNS, NULL); break; case CST_LT: - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "<", 1, RTT_SIGNS); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "<", 1, RTT_SIGNS, NULL); break; case CST_GE: - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, ">=", 2, RTT_SIGNS); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, ">=", 2, RTT_SIGNS, NULL); break; case CST_GT: - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, ">", 1, RTT_SIGNS); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, ">", 1, RTT_SIGNS, NULL); break; case CST_LE: - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "<=", 2, RTT_SIGNS); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "<=", 2, RTT_SIGNS, NULL); break; default: - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "?", 1, RTT_SIGNS); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "?", 1, RTT_SIGNS, NULL); break; } - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL); } @@ -242,7 +242,7 @@ static GBufferLine *g_asm_output_start_routine_info(const GAsmOutput *output, GC result = g_code_buffer_append_new_line_fixme(buffer); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "; ", 2, RTT_COMMENT); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "; ", 2, RTT_COMMENT, NULL); return result; @@ -270,7 +270,7 @@ static GBufferLine *g_asm_output_start_routine_prototype(GAsmOutput *output, GCo result = g_code_buffer_append_new_line_fixme(buffer); /* TODO */ - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "XXX", 3, RTT_COMMENT); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "XXX", 3, RTT_COMMENT, NULL); return result; @@ -293,6 +293,6 @@ static GBufferLine *g_asm_output_start_routine_prototype(GAsmOutput *output, GCo static void g_asm_output_end_routine_prototype(GAsmOutput *output, GCodeBuffer *buffer, GBufferLine *line) { - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, ";", 1, RTT_COMMENT); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, ";", 1, RTT_COMMENT, NULL); } diff --git a/src/decomp/lang/java.c b/src/decomp/lang/java.c index d3db691..f8954a8 100644 --- a/src/decomp/lang/java.c +++ b/src/decomp/lang/java.c @@ -204,7 +204,7 @@ static GBufferLine *g_java_output_start_comments(GJavaOutput *output, GCodeBuffe result = g_code_buffer_append_new_line_fixme(buffer); - g_buffer_line_insert_text(result, BLC_COMMENTS, "/**", 3, RTT_COMMENT); + g_buffer_line_append_text(result, BLC_COMMENTS, "/**", 3, RTT_COMMENT, NULL); return result; @@ -232,10 +232,10 @@ static GBufferLine *g_java_output_continue_comments(GJavaOutput *output, GCodeBu result = g_code_buffer_append_new_line_fixme(buffer); - g_buffer_line_insert_text(result, BLC_COMMENTS, " * ", 3, RTT_COMMENT); + g_buffer_line_append_text(result, BLC_COMMENTS, " * ", 3, RTT_COMMENT, NULL); if (length > 0) - g_buffer_line_insert_text(result, BLC_COMMENTS, text, length, RTT_COMMENT); + g_buffer_line_append_text(result, BLC_COMMENTS, text, length, RTT_COMMENT, NULL); return result; @@ -261,7 +261,7 @@ static GBufferLine *g_java_output_end_comments(GJavaOutput *output, GCodeBuffer result = g_code_buffer_append_new_line_fixme(buffer); - g_buffer_line_insert_text(result, BLC_COMMENTS, " */", 3, RTT_COMMENT); + g_buffer_line_append_text(result, BLC_COMMENTS, " */", 3, RTT_COMMENT, NULL); return result; @@ -289,10 +289,10 @@ static GBufferLine *g_java_output_write_comments(GJavaOutput *output, GCodeBuffe result = g_code_buffer_append_new_line_fixme(buffer); - g_buffer_line_insert_text(result, BLC_COMMENTS, "// ", 3, RTT_COMMENT); + g_buffer_line_append_text(result, BLC_COMMENTS, "// ", 3, RTT_COMMENT, NULL); if (length > 0) - g_buffer_line_insert_text(result, BLC_COMMENTS, text, length, RTT_COMMENT); + g_buffer_line_append_text(result, BLC_COMMENTS, text, length, RTT_COMMENT, NULL); return result; @@ -315,34 +315,34 @@ static GBufferLine *g_java_output_write_comments(GJavaOutput *output, GCodeBuffe static void g_java_output_write_comp_sign(GJavaOutput *output, GBufferLine *line, CompSignType sign) { - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL); switch (sign) { case CST_EQ: - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "==", 2, RTT_SIGNS); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "==", 2, RTT_SIGNS, NULL); break; case CST_NE: - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "!=", 2, RTT_SIGNS); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "!=", 2, RTT_SIGNS, NULL); break; case CST_LT: - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "<", 1, RTT_SIGNS); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "<", 1, RTT_SIGNS, NULL); break; case CST_GE: - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, ">=", 2, RTT_SIGNS); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, ">=", 2, RTT_SIGNS, NULL); break; case CST_GT: - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, ">", 1, RTT_SIGNS); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, ">", 1, RTT_SIGNS, NULL); break; case CST_LE: - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "<=", 2, RTT_SIGNS); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "<=", 2, RTT_SIGNS, NULL); break; default: - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "?", 1, RTT_SIGNS); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "?", 1, RTT_SIGNS, NULL); break; } - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL); } @@ -363,22 +363,22 @@ static void g_java_output_write_comp_sign(GJavaOutput *output, GBufferLine *line static void g_java_output_write_cond_operator(GLangOutput *output, GBufferLine *line, CondOperatorType op) { - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL); switch (op) { case COT_AND: - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "&&", 2, RTT_SIGNS); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "&&", 2, RTT_SIGNS, NULL); break; case COT_OR: - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "||", 2, RTT_SIGNS); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "||", 2, RTT_SIGNS, NULL); break; default: - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "??", 2, RTT_SIGNS); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "??", 2, RTT_SIGNS, NULL); break; } - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL); } @@ -404,15 +404,15 @@ static GBufferLine *g_java_output_start_class(GJavaOutput *output, GCodeBuffer * result = g_code_buffer_append_new_line_fixme(buffer); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "class", 5, RTT_KEY_WORD); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "class", 5, RTT_KEY_WORD, NULL); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL); name = _g_data_type_to_string(type, true); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, name, strlen(name), RTT_RAW); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, name, strlen(name), RTT_RAW, NULL); free(name); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "{", 1, RTT_HOOK); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "{", 1, RTT_HOOK, NULL); result = g_code_buffer_append_new_line_fixme(buffer); @@ -444,7 +444,7 @@ static void g_java_output_end_class(GJavaOutput *output, GCodeBuffer *buffer) result = g_code_buffer_append_new_line_fixme(buffer); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "}", 1, RTT_HOOK); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "}", 1, RTT_HOOK, NULL); result = g_code_buffer_append_new_line_fixme(buffer); @@ -474,7 +474,7 @@ static GBufferLine *g_java_output_start_routine_prototype(GJavaOutput *output, G result = g_code_buffer_append_new_line_fixme(buffer); /* TODO */ - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "XXX", 3, RTT_RAW); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "XXX", 3, RTT_RAW, NULL); return result; @@ -497,7 +497,7 @@ static GBufferLine *g_java_output_start_routine_prototype(GJavaOutput *output, G static void g_java_output_end_routine_prototype(GJavaOutput *output, GCodeBuffer *buffer, GBufferLine *line) { - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, ";", 1, RTT_PUNCT); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, ";", 1, RTT_PUNCT, NULL); } @@ -519,8 +519,8 @@ static void g_java_output_end_routine_prototype(GJavaOutput *output, GCodeBuffer static void g_java_output_start_routine_body(GJavaOutput *output, GCodeBuffer *buffer, GBufferLine *line) { /* - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW); - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "{", 1, RTT_HOOK); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "{", 1, RTT_HOOK, NULL); g_code_buffer_inc_indentation(buffer); */ @@ -548,7 +548,7 @@ static void g_java_output_end_routine_body(GJavaOutput *output, GCodeBuffer *buf line = g_code_buffer_append_new_line_fixme(buffer); - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "}", 1, RTT_HOOK); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "}", 1, RTT_HOOK, NULL); */ } @@ -574,8 +574,8 @@ static GBufferLine *g_java_output_start_code_block(GJavaOutput *output, GCodeBuf if (count > 1) { - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW); - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "{", 1, RTT_HOOK); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL); + g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, "{", 1, RTT_HOOK, NULL); } g_code_buffer_inc_indentation(buffer); @@ -612,8 +612,8 @@ static GBufferLine *g_java_output_end_code_block(GJavaOutput *output, GCodeBuffe if (count > 1) { - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "}", 1, RTT_HOOK); - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "}", 1, RTT_HOOK, NULL); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL); } return result; @@ -643,9 +643,9 @@ static GBufferLine *g_java_output_encapsulate_condition(GLangOutput *output, GCo result = line; if (opening) - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "(", 1, RTT_HOOK); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, "(", 1, RTT_HOOK, NULL); else - g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, ")", 1, RTT_HOOK); + g_buffer_line_append_text(result, BLC_ASSEMBLY_HEAD, ")", 1, RTT_HOOK, NULL); return result; |