aboutsummaryrefslogtreecommitdiff
path: root/binutils/windres.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1997-06-23 00:08:54 +0000
committerIan Lance Taylor <ian@airs.com>1997-06-23 00:08:54 +0000
commite4486bdf9ffd0c61863eee6ccb2e5ef5621d1417 (patch)
tree50f3865d0257543e4d87f4373208df253546efff /binutils/windres.c
parent3ce6d9410caa23759ba24cd6735b7f5ed449d302 (diff)
downloadgdb-e4486bdf9ffd0c61863eee6ccb2e5ef5621d1417.zip
gdb-e4486bdf9ffd0c61863eee6ccb2e5ef5621d1417.tar.gz
gdb-e4486bdf9ffd0c61863eee6ccb2e5ef5621d1417.tar.bz2
Another windres snapshot. Can now read the COFF resources directory,
although it doesn't yet parse out the binary format.
Diffstat (limited to 'binutils/windres.c')
-rw-r--r--binutils/windres.c28
1 files changed, 3 insertions, 25 deletions
diff --git a/binutils/windres.c b/binutils/windres.c
index d08fb97..bd17aaf 100644
--- a/binutils/windres.c
+++ b/binutils/windres.c
@@ -306,22 +306,9 @@ res_id_print (stream, id, quote)
fprintf (stream, "%lu", id.u.id);
else
{
- unsigned short *s, *se;
-
if (quote)
putc ('"', stream);
- s = id.u.n.name;
- se = s + id.u.n.length;
- while (s < se)
- {
- if (*s == '"')
- fprintf (stream, "\\\"");
- else if ((*s & 0xff) == *s && isprint (*s))
- putc (*s, stream);
- else
- fprintf (stream, "\\%03o", *s);
- ++s;
- }
+ unicode_print (stream, id.u.n.name, id.u.n.length);
if (quote)
putc ('"', stream);
}
@@ -600,8 +587,8 @@ format_from_filename (filename, input)
fclose (e);
- /* A PE executable starts with 0x4d 0x5a 0x90 0x00. */
- if (b1 == 0x4d && b2 == 0x5a && b3 == 0x90 && b4 == 0)
+ /* A PE executable starts with 0x4d 0x5a. */
+ if (b1 == 0x4d && b2 == 0x5a)
return RES_FORMAT_COFF;
/* A COFF .o file starts with a COFF magic number. */
@@ -885,15 +872,6 @@ read_res_file (filename)
return NULL;
}
-struct res_directory *
-read_coff_rsrc (filename, target)
- const char *filename;
- const char *target;
-{
- fatal ("read_coff_rsrc unimplemented");
- return NULL;
-}
-
void
write_res_file (filename, resources)
const char *filename;