summaryrefslogtreecommitdiff
path: root/src/format/dex/dex-int.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2010-06-06 14:08:21 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2010-06-06 14:08:21 (GMT)
commitb5934203c1cb287eb46b07e866b54d1de240b87b (patch)
tree283fad2a6d4517b84985331e5234095c71c8734b /src/format/dex/dex-int.c
parente72eea33b9967d4169d2c8ffcb4a9e85c4c3ee8c (diff)
Used a treeview with icons to show all known symbols.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@165 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/dex/dex-int.c')
-rw-r--r--src/format/dex/dex-int.c67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/format/dex/dex-int.c b/src/format/dex/dex-int.c
index 025429f..8f5b408 100644
--- a/src/format/dex/dex-int.c
+++ b/src/format/dex/dex-int.c
@@ -354,6 +354,73 @@ bool read_dex_encoded_method(const GDexFormat *format, off_t *pos, encoded_metho
* pos = position de début de lecture. [OUT] *
* item = structure lue à retourner. [OUT] *
* *
+* Description : Procède à la lecture d'un type DEX. *
+* *
+* Retour : Bilan de l'opération. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+bool read_dex_type_item(const GDexFormat *format, off_t *pos, type_item *item)
+{
+ bool result; /* Bilan à retourner */
+ const bin_t *content; /* Contenu binaire à lire */
+ off_t length; /* Taille totale du contenu */
+
+ result = true;
+
+ content = G_BIN_FORMAT(format)->content;
+ length = G_BIN_FORMAT(format)->length;
+
+ result &= read_u16(&item->type_idx, content, pos, length, SRE_LITTLE);
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : format = informations chargées à consulter. *
+* pos = position de début de lecture. [OUT] *
+* list = structure lue à retourner. [OUT] *
+* *
+* Description : Procède à la lecture d'une liste de types DEX. *
+* *
+* Retour : Bilan de l'opération. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+bool read_dex_type_list(const GDexFormat *format, off_t *pos, type_list *list)
+{
+ bool result; /* Bilan à retourner */
+ const bin_t *content; /* Contenu binaire à lire */
+ off_t length; /* Taille totale du contenu */
+
+ result = true;
+
+ content = G_BIN_FORMAT(format)->content;
+ length = G_BIN_FORMAT(format)->length;
+
+ result &= read_u32(&list->size, content, pos, length, SRE_LITTLE);
+
+ list->list = (type_item *)&content[*pos];
+ result &= ((*pos + list->size * sizeof(type_item)) <= length);
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : format = informations chargées à consulter. *
+* pos = position de début de lecture. [OUT] *
+* item = structure lue à retourner. [OUT] *
+* *
* Description : Procède à la lecture d'un contenu de classe DEX. *
* *
* Retour : Bilan de l'opération. *