summaryrefslogtreecommitdiff
path: root/src/decomp/lang/java.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/decomp/lang/java.c')
-rw-r--r--src/decomp/lang/java.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/decomp/lang/java.c b/src/decomp/lang/java.c
index b934a62..90a0ddc 100644
--- a/src/decomp/lang/java.c
+++ b/src/decomp/lang/java.c
@@ -53,6 +53,9 @@ static void g_java_output_init(GJavaOutput *);
/* Ajoute un commentaire à un tampon donné. */
static GBufferLine *g_java_output_write_comments(GJavaOutput *, GCodeBuffer *, const char *, size_t);
+/* Imprime dans un tampon donné une méthode de comparaison. */
+static void g_java_output_write_comp_sign(GJavaOutput *, GBufferLine *, CompSignType);
+
/* Débute la définition d'une classe. */
static GBufferLine *g_java_output_start_class(GJavaOutput *, GCodeBuffer *, const GOpenidaType *);
@@ -115,6 +118,8 @@ static void g_java_output_init(GJavaOutput *output)
lang->write_comments = (write_comments_fc)g_java_output_write_comments;
+ lang->comp_sign = (write_comp_sign_fc)g_java_output_write_comp_sign;
+
lang->start_class = (rlgbuftp_fc)g_java_output_start_class;
lang->end_class = (lgbuf_fc)g_java_output_end_class;
@@ -184,6 +189,54 @@ static GBufferLine *g_java_output_write_comments(GJavaOutput *output, GCodeBuffe
/******************************************************************************
* *
* Paramètres : output = encadrant de l'impression en langage de prog. *
+* line = tampon de sortie à disposition. *
+* sign = méthode de comparaison à imprimer. *
+* *
+* Description : Imprime dans un tampon donné une méthode de comparaison. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+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);
+
+ switch (sign)
+ {
+ case CST_EQ:
+ g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "==", 2, RTT_SIGNS);
+ break;
+ case CST_NE:
+ g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "!=", 2, RTT_SIGNS);
+ break;
+ case CST_LT:
+ g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "<", 1, RTT_SIGNS);
+ break;
+ case CST_GE:
+ g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, ">=", 2, RTT_SIGNS);
+ break;
+ case CST_GT:
+ g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, ">", 1, RTT_SIGNS);
+ break;
+ case CST_LE:
+ g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "<=", 2, RTT_SIGNS);
+ break;
+ default:
+ g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "?", 1, RTT_SIGNS);
+ break;
+ }
+
+ g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW);
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : output = encadrant de l'impression en langage de prog. *
* buffer = tampon de sortie à disposition. *
* type = désignation de la classe à définir. *
* *