summaryrefslogtreecommitdiff
path: root/src/decomp/output.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2013-02-24 11:09:36 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2013-02-24 11:09:36 (GMT)
commit02c2cf555953f335a825e34c869c9999668fd42c (patch)
tree59395c04d509f9fae8314d311f6ab90e163df45d /src/decomp/output.h
parent34e1a14aced520ba06ee1b81cfd7710e97c1643f (diff)
Refined comparisons decompilation and fixed some bugs.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@340 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/decomp/output.h')
-rw-r--r--src/decomp/output.h30
1 files changed, 24 insertions, 6 deletions
diff --git a/src/decomp/output.h b/src/decomp/output.h
index dc81a98..63f586a 100644
--- a/src/decomp/output.h
+++ b/src/decomp/output.h
@@ -63,20 +63,35 @@ GBufferLine *g_lang_output_write_comments(GLangOutput *, GCodeBuffer *, const ch
/* Liste des signes binaires de comparaison */
typedef enum _CompSignType
{
- CST_EQ, /* == */
- CST_NE, /* != */
- CST_LT, /* < */
- CST_GE, /* >= */
- CST_GT, /* > */
- CST_LE, /* <= */
+ CST_EQ, /* == */
+ CST_NE, /* != */
+ CST_LT, /* < */
+ CST_GE, /* >= */
+ CST_GT, /* > */
+ CST_LE, /* <= */
CST_COUNT
} CompSignType;
+/* Liste des signes binaires de comparaison */
+typedef enum _CondOperatorType
+{
+ COT_NONE, /* pas de condition */
+ COT_AND, /* && */
+ COT_OR, /* || */
+
+ COT_COUNT
+
+} CondOperatorType;
+
+
/* Imprime dans un tampon donné une méthode de comparaison. */
void g_lang_output_write_comp_sign(GLangOutput *, GBufferLine *, CompSignType);
+/* Imprime dans un tampon donné un opérateur logique. */
+void g_lang_output_write_cond_operator(GLangOutput *, GBufferLine *, CondOperatorType);
+
/* Débute la définition d'une classe. */
GBufferLine *g_lang_output_start_class(GLangOutput *, GCodeBuffer *, const void *);
@@ -105,6 +120,9 @@ GBufferLine *g_lang_output_start_code_block(GLangOutput *, GCodeBuffer *, GBuffe
/* Termine la définition d'un bloc de code. */
GBufferLine *g_lang_output_end_code_block(GLangOutput *, GCodeBuffer *, GBufferLine *, size_t);
+/* Emballe une expression conditionelle. */
+GBufferLine *g_lang_output_encapsulate_condition(GLangOutput *, GCodeBuffer *, GBufferLine *, bool);
+
typedef unsigned int lang_t;