summaryrefslogtreecommitdiff
path: root/src/format/strsym.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-07-20 15:59:12 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-07-20 15:59:12 (GMT)
commitf0682e7b195acbd4d83148f3829479d682f9ee9f (patch)
tree39ec963de4b08dfde01cb621a48d14e01a365541 /src/format/strsym.c
parent71db5a3a8a7a337ba63a47b6472baf99581d8400 (diff)
Marked some Dex strings as structural.
Diffstat (limited to 'src/format/strsym.c')
-rw-r--r--src/format/strsym.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/format/strsym.c b/src/format/strsym.c
index 4e8479e..ed38a6b 100644
--- a/src/format/strsym.c
+++ b/src/format/strsym.c
@@ -44,6 +44,8 @@ struct _GStrSymbol
{
GBinSymbol parent; /* A laisser en premier */
+ bool structural; /* Nature d'emploi de la chaîne*/
+
StringEncodingType encoding; /* Encodage de la chaîne liée */
union
@@ -150,6 +152,13 @@ static void g_string_symbol_class_init(GStrSymbolClass *klass)
static void g_string_symbol_init(GStrSymbol *symbol)
{
+ symbol->structural = false;
+
+ symbol->encoding = SET_NONE;
+
+ symbol->string = NULL;
+
+ symbol->has_content = false;
}
@@ -321,6 +330,10 @@ static void g_string_symbol_check_encoding(GStrSymbol *symbol)
switch (symbol->encoding)
{
+ case SET_NONE:
+ assert(false);
+ break;
+
case SET_ASCII:
break;
@@ -378,6 +391,48 @@ static void g_string_symbol_check_encoding(GStrSymbol *symbol)
/******************************************************************************
* *
+* Paramètres : symbol = symbole à venir actualiser. *
+* *
+* Description : Définit si une chaîne de caractères est liée au format. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void g_string_symbol_set_structural(GStrSymbol *symbol, bool status)
+{
+ symbol->structural = status;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : symbol = symbole à venir consulter. *
+* *
+* Description : Indique si une chaîne de caractères est liée au format. *
+* *
+* Retour : Indication sur l'emploi de la chaîne. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+bool g_string_symbol_is_structural(const GStrSymbol *symbol)
+{
+ bool result; /* Statut à retourner */
+
+ result = symbol->structural;
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : symbol = symbole à venir consulter. *
* *
* Description : Fournit l'encodage d'une chaîne de caractères. *