summaryrefslogtreecommitdiff
path: root/tools/d2c/qckcall.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/d2c/qckcall.c')
-rw-r--r--tools/d2c/qckcall.c38
1 files changed, 8 insertions, 30 deletions
diff --git a/tools/d2c/qckcall.c b/tools/d2c/qckcall.c
index 828a379..f8f8641 100644
--- a/tools/d2c/qckcall.c
+++ b/tools/d2c/qckcall.c
@@ -96,13 +96,11 @@ char *build_cast_if_needed(const char *callee)
/******************************************************************************
* *
-* Paramètres : top = indique si l'écriture se fait au plus haut niveau. *
-* callee = fonction appelée à nommer. *
+* Paramètres : callee = fonction appelée à nommer. *
* args = précise si la conversion est la dernière. *
* fd = descripteur d'un flux ouvert en écriture. *
* bits = gestionnaire des bits d'encodage. *
* list = liste de l'ensemble des fonctions de conversion. *
-* pp = pré-processeur pour les échanges de chaînes. *
* *
* Description : Réalise un appel à une fonction liée à une instruction. *
* *
@@ -112,7 +110,7 @@ char *build_cast_if_needed(const char *callee)
* *
******************************************************************************/
-bool call_instr_func(bool top, const char *callee, const arg_list_t *args, int fd, const coding_bits *bits, const conv_list *list, const pre_processor *pp)
+bool call_instr_func(const char *callee, const arg_list_t *args, int fd, const coding_bits *bits, const conv_list *list)
{
bool result; /* Bilan à remonter */
char *cast; /* Macro de transtypage */
@@ -120,21 +118,12 @@ bool call_instr_func(bool top, const char *callee, const arg_list_t *args, int f
cast = build_cast_if_needed(callee);
if (cast == NULL)
- {
- if (!top)
- dprintf(fd, "\t");
-
- dprintf(fd, "\t%s(%s, ", callee, top ? "result" : "instr");
+ dprintf(fd, "\t%s(result, ", callee);
- }
else
{
- if (!top)
- dprintf(fd, "\t");
-
- dprintf(fd, "\t%s(%s(%s), ", callee, cast, top ? "result" : "instr");
+ dprintf(fd, "\t%s(%s(result), ", callee, cast);
free(cast);
-
}
result = define_arg_list(args, fd, bits, list);
@@ -148,13 +137,11 @@ bool call_instr_func(bool top, const char *callee, const arg_list_t *args, int f
/******************************************************************************
* *
-* Paramètres : top = indique si l'écriture se fait au plus haut niveau. *
-* callee = fonction appelée à nommer. *
+* Paramètres : callee = fonction appelée à nommer. *
* args = précise si la conversion est la dernière. *
* fd = descripteur d'un flux ouvert en écriture. *
* bits = gestionnaire des bits d'encodage. *
* list = liste de l'ensemble des fonctions de conversion. *
-* pp = pré-processeur pour les échanges de chaînes. *
* *
* Description : Réalise un appel à une fonction liée à une instruction. *
* *
@@ -164,7 +151,7 @@ bool call_instr_func(bool top, const char *callee, const arg_list_t *args, int f
* *
******************************************************************************/
-bool checked_call_instr_func(bool top, const char *callee, const arg_list_t *args, int fd, const coding_bits *bits, const conv_list *list, const pre_processor *pp)
+bool checked_call_instr_func(const char *callee, const arg_list_t *args, int fd, const coding_bits *bits, const conv_list *list)
{
bool result; /* Bilan à remonter */
char *cast; /* Macro de transtypage */
@@ -172,21 +159,12 @@ bool checked_call_instr_func(bool top, const char *callee, const arg_list_t *arg
cast = build_cast_if_needed(callee);
if (cast == NULL)
- {
- if (!top)
- dprintf(fd, "\t");
-
- dprintf(fd, "\tif (!%s(%s, ", callee, top ? "result" : "instr");
+ dprintf(fd, "\tif (!%s(result, ", callee);
- }
else
{
- if (!top)
- dprintf(fd, "\t");
-
- dprintf(fd, "\tif (!%s(%s(%s), ", callee, cast, top ? "result" : "instr");
+ dprintf(fd, "\tif (!%s(%s(result), ", callee, cast);
free(cast);
-
}
result = define_arg_list(args, fd, bits, list);