diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2012-11-28 09:43:50 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2012-11-28 09:43:50 (GMT) |
commit | f95598b68b98f6eda701f8f02bc09cb13f65fc72 (patch) | |
tree | eefee33963448a1ce53a7eb80dacabbcdce8fc21 /src/decomp/expr/cond.c | |
parent | fbb4b6f53d2189ba9f61c1fd149534d8aef82dcd (diff) |
Followed the excution flow to decompile instructions.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@293 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/decomp/expr/cond.c')
-rw-r--r-- | src/decomp/expr/cond.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/decomp/expr/cond.c b/src/decomp/expr/cond.c index 51309ca..4a9b63b 100644 --- a/src/decomp/expr/cond.c +++ b/src/decomp/expr/cond.c @@ -56,7 +56,7 @@ static void g_cond_expression_class_init(GCondExpressionClass *); static void g_cond_expression_init(GCondExpression *); /* Imprime pour l'écran un version humaine d'une expression. */ -static void g_cond_expression_print(const GCondExpression *, GCodeBuffer *, GBufferLine *, GLangOutput *); +static GBufferLine *g_cond_expression_print(const GCondExpression *, GCodeBuffer *, GBufferLine *, GLangOutput *); @@ -149,14 +149,18 @@ GDecInstruction *g_cond_expression_new(GDecExpression *a, CompSignType sign, GDe * * ******************************************************************************/ -static void g_cond_expression_print(const GCondExpression *expr, GCodeBuffer *buffer, GBufferLine *line, GLangOutput *output) +static GBufferLine *g_cond_expression_print(const GCondExpression *expr, GCodeBuffer *buffer, GBufferLine *line, GLangOutput *output) { - g_dec_instruction_print(G_DEC_INSTRUCTION(expr->a), - buffer, line, output); + GBufferLine *result; /* Ligne à retourner */ - g_lang_output_write_comp_sign(output, line, expr->sign); + result = g_dec_instruction_print(G_DEC_INSTRUCTION(expr->a), + buffer, line, output); - g_dec_instruction_print(G_DEC_INSTRUCTION(expr->b), - buffer, line, output); + g_lang_output_write_comp_sign(output, result, expr->sign); + + result = g_dec_instruction_print(G_DEC_INSTRUCTION(expr->b), + buffer, result, output); + + return result; } |