summaryrefslogtreecommitdiff
path: root/src/format/strsym.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/format/strsym.c')
-rw-r--r--src/format/strsym.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/format/strsym.c b/src/format/strsym.c
index d09995d..c921b9a 100644
--- a/src/format/strsym.c
+++ b/src/format/strsym.c
@@ -381,6 +381,45 @@ StringEncodingType g_string_symbol_get_encoding(const GStrSymbol *symbol)
* *
* Paramètres : symbol = symbole à venir consulter. *
* *
+* Description : Fournit la chaîne brute de caractères du symbole. *
+* *
+* Retour : Chaîne de caractères d'origine. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+const char *g_string_symbol_get_raw(const GStrSymbol *symbol)
+{
+ const char *result; /* Données à retourner */
+ const mrange_t *range; /* Couverture du symbole */
+ vmpa2t pos; /* Tête de lecture modifiable */
+ phys_t length; /* Taille de la chaîne */
+
+ if (symbol->has_content)
+ {
+ range = g_binary_symbol_get_range(G_BIN_SYMBOL(symbol));
+
+ copy_vmpa(&pos, get_mrange_addr(range));
+
+ length = get_mrange_length(range);
+
+ result = (const char *)g_binary_content_get_raw_access(symbol->content, &pos, length);
+
+ }
+
+ else
+ result = symbol->string;
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : symbol = symbole à venir consulter. *
+* *
* Description : Fournit la chaîne de caractères du symbole. *
* *
* Retour : Chaîne de caractères, à priori en UTF-8. *