summaryrefslogtreecommitdiff
path: root/src/format/java
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-07-24 18:43:55 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-07-24 18:43:55 (GMT)
commit156d2e2f6beda2302552ac79678494d914fda05b (patch)
tree021825960b7ac3315a336fc085a4f1d07c05df39 /src/format/java
parent21537636cd8318cf5a720211619ad3c3023b52e9 (diff)
Replaced all remaining raw accesses to binary contents with the GBinContent wrapper in binary formats.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@555 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/java')
-rw-r--r--src/format/java/java-int.c4
-rwxr-xr-xsrc/format/java/pool.c14
2 files changed, 8 insertions, 10 deletions
diff --git a/src/format/java/java-int.c b/src/format/java/java-int.c
index 2593f3c..a201d50 100644
--- a/src/format/java/java-int.c
+++ b/src/format/java/java-int.c
@@ -51,8 +51,8 @@ bool read_java_header(const GJavaFormat *format, off_t *pos, java_header *header
uint32_t magic; /* Identifiant Java */
size_t i; /* Boucle de parcours */
- content = G_BIN_FORMAT(format)->content;
- length = G_BIN_FORMAT(format)->length;
+ content = NULL; //G_BIN_FORMAT(format)->content;
+ length = 0; //G_BIN_FORMAT(format)->length;
result &= read_u32(&magic, content, pos, length, SRE_BIG);
printf("magic :: 0x%08x\n", magic);
diff --git a/src/format/java/pool.c b/src/format/java/pool.c
index e90484e..f23cd41 100755
--- a/src/format/java/pool.c
+++ b/src/format/java/pool.c
@@ -61,8 +61,8 @@ bool load_java_pool(GJavaFormat *format, off_t *pos)
uint16_t count; /* Nombre d'éléments présents */
uint16_t i; /* Boucle de parcours */
- result = read_u16(&count, G_BIN_FORMAT(format)->content, pos,
- G_BIN_FORMAT(format)->length, SRE_BIG);
+ result = false/*read_u16(&count, G_BIN_FORMAT(format)->content, pos,
+ G_BIN_FORMAT(format)->length, SRE_BIG)*/;
printf("Alloc %hu entries (result=%d)\n", count, result);
@@ -86,8 +86,6 @@ bool load_java_pool(GJavaFormat *format, off_t *pos)
}
- printf("stop at %hd || pos :: %d - max %d\n", i, *pos, G_BIN_FORMAT(format)->length);
-
return result;
}
@@ -163,11 +161,11 @@ bool load_java_pool_entry(GJavaFormat *format, constant_pool_entry *entry, off_t
uint64_t mantissa64; /* Mantisse du nombre lu 64b */
uint16_t length; /* Taille d'une chaîne */
- result = read_u8(&tag, G_BIN_FORMAT(format)->content, pos,
- G_BIN_FORMAT(format)->length, SRE_BIG);
+ result = false/*read_u8(&tag, G_BIN_FORMAT(format)->content, pos,
+ G_BIN_FORMAT(format)->length, SRE_BIG)*/;
entry->tag = tag;
-
+#if 0
switch (entry->tag)
{
case CONSTANT_CLASS:
@@ -319,7 +317,7 @@ bool load_java_pool_entry(GJavaFormat *format, constant_pool_entry *entry, off_t
break;
}
-
+#endif
return result;
}