diff options
Diffstat (limited to 'src/format/strsym.c')
-rw-r--r-- | src/format/strsym.c | 55 |
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. * |