summaryrefslogtreecommitdiff
path: root/src/analysis/variable.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-10-12 07:28:19 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-10-12 07:28:19 (GMT)
commitc7a14e50bd002e3922969e9bae7816753aefb073 (patch)
treecd098d2f92880705810dfdc353dad6ad1412b2c2 /src/analysis/variable.c
parent4a51f37982c2d5d358971e947d05786b939af88e (diff)
Reorganized types definitions.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@267 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/variable.c')
-rw-r--r--src/analysis/variable.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/analysis/variable.c b/src/analysis/variable.c
index 2da691d..7ecf793 100644
--- a/src/analysis/variable.c
+++ b/src/analysis/variable.c
@@ -24,9 +24,11 @@
#include "variable.h"
+#include <malloc.h>
#include <string.h>
+#include "types/cse.h"
#include "../common/extstr.h"
@@ -39,10 +41,10 @@ struct _GBinVariable
{
GObject parent; /* A laisser en premier */
- GOpenidaType *type; /* Type de la variable */
+ GDataType *type; /* Type de la variable */
char *name; /* Désignation humaine */
- GOpenidaType *owner; /* Zone d'appartenance */
+ GDataType *owner; /* Zone d'appartenance */
};
@@ -119,7 +121,7 @@ static void g_binary_variable_init(GBinVariable *var)
* *
******************************************************************************/
-GBinVariable *g_binary_variable_new(GOpenidaType *type)
+GBinVariable *g_binary_variable_new(GDataType *type)
{
GBinVariable *result; /* Variable à retourner */
@@ -145,7 +147,7 @@ GBinVariable *g_binary_variable_new(GOpenidaType *type)
* *
******************************************************************************/
-GOpenidaType *g_binary_variable_get_vtype(const GBinVariable *var)
+GDataType *g_binary_variable_get_vtype(const GBinVariable *var)
{
return var->type;
@@ -207,7 +209,7 @@ void g_binary_variable_set_name(GBinVariable *var, const char *name)
* *
******************************************************************************/
-GOpenidaType *g_binary_variable_get_owner(const GBinVariable *var)
+GDataType *g_binary_variable_get_owner(const GBinVariable *var)
{
return var->owner;
@@ -227,7 +229,7 @@ GOpenidaType *g_binary_variable_get_owner(const GBinVariable *var)
* *
******************************************************************************/
-void g_binary_variable_set_owner(GBinVariable *var, GOpenidaType *owner)
+void g_binary_variable_set_owner(GBinVariable *var, GDataType *owner)
{
var->owner = owner;
@@ -251,11 +253,11 @@ char *g_binary_variable_to_string(const GBinVariable *var, bool simple)
{
char *result; /* Valeur à retourner */
- result = strdup(""); /* FIXME : arg _g_openida_type_to_string(var->type, simple);*/
+ result = strdup(""); /* FIXME : arg _g_data_type_to_string(var->type, simple);*/
if (var->name != NULL)
{
- if (!g_openida_type_is_pointer(var->type, true))
+ if (!g_data_type_is_pointer(var->type, true))
/*result = stradd(result, " ")*/;
result = stradd(result, var->name);
@@ -1052,6 +1054,9 @@ char *encapsulated_var_to_string(const encapsulated_variable *var)
case ECT_IMAGINARY:
result = stradd(result, " imaginary");
break;
+ case ECT_ROUTINE:
+ result = stradd(result, "< routine ? TODO ! >");
+ break;
}
return result;