diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2010-12-02 00:59:53 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2010-12-02 00:59:53 (GMT) |
commit | 957f50b657456c4c7da2778197c144548eded8cd (patch) | |
tree | 9aea0e8ffb4dc62b23fd324b55910916cef95167 /src/decomp/output.c | |
parent | f2d479c16a427696790441fa1459e7194f49bb6a (diff) |
Improved the rendering of decompiled Dex code.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@196 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/decomp/output.c')
-rw-r--r-- | src/decomp/output.c | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/src/decomp/output.c b/src/decomp/output.c index 17aaa0e..066096e 100644 --- a/src/decomp/output.c +++ b/src/decomp/output.c @@ -98,9 +98,143 @@ GBufferLine *g_lang_output_write_comments(GLangOutput *output, GCodeBuffer *buff } +/****************************************************************************** +* * +* Paramètres : output = encadrant de l'impression en langage de prog. * +* buffer = tampon de sortie à disposition. * +* type = désignation de la classe à définir. * +* * +* Description : Débute la définition d'une classe. * +* * +* Retour : Ligne nouvellement créée. * +* * +* Remarques : - * +* * +******************************************************************************/ + +GBufferLine *g_lang_output_start_class(GLangOutput *output, GCodeBuffer *buffer, const GOpenidaType *type) +{ + GBufferLine *result; /* Adresse nouvelle à remonter */ + + if (output->start_class != NULL) + result = output->start_class(output, buffer, type); + + else result = NULL; + + return result; + +} + + +/****************************************************************************** +* * +* Paramètres : output = encadrant de l'impression en langage de prog. * +* buffer = tampon de sortie à disposition. * +* * +* Description : Termine la définition d'une classe. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void g_lang_output_end_class(GLangOutput *output, GCodeBuffer *buffer) +{ + if (output->end_class != NULL) + output->end_class(output, buffer); + +} + + +/****************************************************************************** +* * +* Paramètres : output = encadrant de l'impression en langage de prog. * +* buffer = tampon de sortie à disposition. * +* ret = type de retour de la routine traitée. * +* * +* Description : Débute la définition d'une routine. * +* * +* Retour : Ligne nouvellement créée. * +* * +* Remarques : - * +* * +******************************************************************************/ + +GBufferLine *g_lang_output_start_routine_prototype(GLangOutput *output, GCodeBuffer *buffer, const GOpenidaType *ret) +{ + GBufferLine *result; /* Adresse nouvelle à remonter */ + if (output->start_routine_proto != NULL) + result = output->start_routine_proto(output, buffer, ret); + else result = NULL; + return result; +} +/****************************************************************************** +* * +* Paramètres : output = encadrant de l'impression en langage de prog. * +* buffer = tampon de sortie à disposition. * +* line = ligne contenant le prototype de la routine traitée. * +* * +* Description : Termine la définition d'une routine. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void g_lang_output_end_routine_prototype(GLangOutput *output, GCodeBuffer *buffer, GBufferLine *line) +{ + if (output->end_routine_proto != NULL) + output->end_routine_proto(output, buffer, line); + +} + + +/****************************************************************************** +* * +* Paramètres : output = encadrant de l'impression en langage de prog. * +* buffer = tampon de sortie à disposition. * +* line = ligne contenant le prototype de la routine traitée. * +* * +* Description : Commence la définition du corps d'une routine. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void g_lang_output_start_routine_body(GLangOutput *output, GCodeBuffer *buffer, GBufferLine *line) +{ + if (output->start_routine_body != NULL) + output->start_routine_body(output, buffer, line); + +} + + +/****************************************************************************** +* * +* Paramètres : output = encadrant de l'impression en langage de prog. * +* buffer = tampon de sortie à disposition. * +* * +* Description : Termine la définition du corps d'une routine. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void g_lang_output_end_routine_body(GLangOutput *output, GCodeBuffer *buffer) +{ + if (output->end_routine_body != NULL) + output->end_routine_body(output, buffer); + +} |