summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authorJon Loeliger <jdl@freescale.com>2007-02-16 09:33:54 -0600
committerJon Loeliger <jdl@freescale.com>2007-02-16 09:33:54 -0600
commit3948849fd0cdcaf0b91c7cc4774e86c05ba097ef (patch)
tree5c0580f8d9a196f7370b2e5c0ed574913aad3371 /data.c
parentfd84d97deecc23b8519f8bc1f384a418bb69181b (diff)
downloaddtc-3948849fd0cdcaf0b91c7cc4774e86c05ba097ef.tar.gz
Moved data_convert_cell() out of data.c to the parser.
It constructs a cell_t, not data objects. Renamed it to cell_from_string() as well. Signed-off-by: Jon Loeliger <jdl@freescale.com>
Diffstat (limited to 'data.c')
-rw-r--r--data.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/data.c b/data.c
index c6c2350..5d7db17 100644
--- a/data.c
+++ b/data.c
@@ -225,26 +225,6 @@ struct data data_merge(struct data d1, struct data d2)
return d;
}
-/*
- * Convert a string representation of a numberic cell
- * in the given base into a cell.
- */
-cell_t data_convert_cell(char *s, unsigned int base)
-{
- cell_t c;
- extern YYLTYPE yylloc;
-
- c = strtoul(s, NULL, base);
- if (errno == EINVAL || errno == ERANGE) {
- fprintf(stderr,
- "Line %d: Invalid cell value '%s'; %d assumed\n",
- yylloc.first_line, s, c);
- }
-
- return c;
-}
-
-
struct data data_append_cell(struct data d, cell_t word)
{
cell_t beword = cpu_to_be32(word);