* rclex.l: Add casts and change types to avoid warnings.
* rcparse.y: Likewise. * resbin.c: Likewise. * rescoff.c: Likewise. * resrc.c: Likewise. * Makefile.am: Rebuild dependencies. (HFILES): Remove readelf.h. * Makefile.in: Rebuild. Based on patches from Andrew Kozin <Andrew.Kozin@p14.f960.n5020.z2.fidonet.org>: * winduni.h: New file, from windres.h. * winduni.c: New file, from windres.c. * windres.c: Move Unicode functions into winduni.c. * windres.h: Move Unicode declarations into winduni.h. Include winduni.h. (RT_ACCELERATOR): Rename from RT_ACCELERATORS to match Windows macro. Change all uses. (RT_PLUGPLAY, RT_VXD): Correct values. * Makefile.am (HFILES): Add windres.h. (CFILES): Add winduni.c. (windres_SOURCES): Add winduni.c.
This commit is contained in:
parent
d8d4c4e71a
commit
72574626a9
|
@ -111,6 +111,8 @@ testsuite
|
||||||
version.c
|
version.c
|
||||||
windres.c
|
windres.c
|
||||||
windres.h
|
windres.h
|
||||||
|
winduni.c
|
||||||
|
winduni.h
|
||||||
wrstabs.c
|
wrstabs.c
|
||||||
|
|
||||||
Things-to-lose:
|
Things-to-lose:
|
||||||
|
|
|
@ -73,7 +73,7 @@ DEP = mkdep
|
||||||
INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @HDEFINES@ -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\""
|
INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @HDEFINES@ -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\""
|
||||||
|
|
||||||
HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h dlltool.h \
|
HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h dlltool.h \
|
||||||
windres.h readelf.h
|
windres.h winduni.h
|
||||||
|
|
||||||
GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h
|
GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ CFILES = addr2line.c ar.c arsup.c bucomm.c coffdump.c coffgrok.c debug.c \
|
||||||
maybe-strip.c nlmconv.c nm.c not-ranlib.c not-strip.c \
|
maybe-strip.c nlmconv.c nm.c not-ranlib.c not-strip.c \
|
||||||
objcopy.c objdump.c prdbg.c rdcoff.c rddbg.c size.c srconv.c \
|
objcopy.c objdump.c prdbg.c rdcoff.c rddbg.c size.c srconv.c \
|
||||||
stabs.c strings.c sysdump.c version.c wrstabs.c \
|
stabs.c strings.c sysdump.c version.c wrstabs.c \
|
||||||
windres.c resrc.c rescoff.c resbin.c readelf.c
|
windres.c resrc.c rescoff.c resbin.c winduni.c readelf.c
|
||||||
|
|
||||||
GENERATED_CFILES = \
|
GENERATED_CFILES = \
|
||||||
underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
|
underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
|
||||||
|
@ -252,7 +252,7 @@ nlmconv.o: nlmconv.c $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
|
||||||
nlmconv_SOURCES = nlmconv.c nlmheader.y $(BULIBS)
|
nlmconv_SOURCES = nlmconv.c nlmheader.y $(BULIBS)
|
||||||
|
|
||||||
windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \
|
windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \
|
||||||
$(BULIBS)
|
winduni.c $(BULIBS)
|
||||||
windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
|
windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
|
||||||
|
|
||||||
DISTSTUFF = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \
|
DISTSTUFF = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \
|
||||||
|
@ -430,21 +430,24 @@ wrstabs.o: wrstabs.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
$(INCDIR)/aout/stab.def
|
$(INCDIR)/aout/stab.def
|
||||||
windres.o: windres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
windres.o: windres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
$(INCDIR)/getopt.h bucomm.h config.h $(INCDIR)/fopen-same.h \
|
$(INCDIR)/getopt.h bucomm.h config.h $(INCDIR)/fopen-same.h \
|
||||||
$(INCDIR)/libiberty.h $(INCDIR)/obstack.h windres.h
|
$(INCDIR)/libiberty.h $(INCDIR)/obstack.h windres.h \
|
||||||
|
winduni.h
|
||||||
resrc.o: resrc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
resrc.o: resrc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||||
windres.h
|
windres.h winduni.h
|
||||||
rescoff.o: rescoff.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
rescoff.o: rescoff.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||||
windres.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
|
windres.h winduni.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
|
||||||
$(INCDIR)/bfdlink.h
|
$(INCDIR)/bfdlink.h
|
||||||
resbin.o: resbin.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
resbin.o: resbin.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||||
windres.h
|
windres.h winduni.h
|
||||||
readelf.o: readelf.c readelf.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
winduni.o: winduni.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
|
bucomm.h config.h $(INCDIR)/fopen-same.h winduni.h
|
||||||
|
readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
$(INCDIR)/elf/common.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/m32r.h \
|
$(INCDIR)/elf/common.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/m32r.h \
|
||||||
$(INCDIR)/elf/mips.h bucomm.h config.h $(INCDIR)/fopen-same.h \
|
$(INCDIR)/elf/mips.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \
|
||||||
$(INCDIR)/getopt.h
|
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h
|
||||||
underscore.o: underscore.c
|
underscore.o: underscore.c
|
||||||
arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
bucomm.h config.h $(INCDIR)/fopen-same.h arsup.h
|
bucomm.h config.h $(INCDIR)/fopen-same.h arsup.h
|
||||||
|
@ -461,9 +464,9 @@ nlmheader.o: nlmheader.c ../bfd/bfd.h bucomm.h config.h \
|
||||||
nlmconv.h
|
nlmconv.h
|
||||||
rcparse.o: rcparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
rcparse.o: rcparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||||
windres.h
|
windres.h winduni.h
|
||||||
rclex.o: rclex.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
rclex.o: rclex.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||||
windres.h rcparse.h
|
windres.h winduni.h rcparse.h
|
||||||
|
|
||||||
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
|
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
|
||||||
|
|
|
@ -145,7 +145,7 @@ DEP = mkdep
|
||||||
INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @HDEFINES@ -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\""
|
INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @HDEFINES@ -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\""
|
||||||
|
|
||||||
HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h dlltool.h \
|
HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h dlltool.h \
|
||||||
windres.h
|
windres.h winduni.h
|
||||||
|
|
||||||
GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h
|
GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ CFILES = addr2line.c ar.c arsup.c bucomm.c coffdump.c coffgrok.c debug.c \
|
||||||
maybe-strip.c nlmconv.c nm.c not-ranlib.c not-strip.c \
|
maybe-strip.c nlmconv.c nm.c not-ranlib.c not-strip.c \
|
||||||
objcopy.c objdump.c prdbg.c rdcoff.c rddbg.c size.c srconv.c \
|
objcopy.c objdump.c prdbg.c rdcoff.c rddbg.c size.c srconv.c \
|
||||||
stabs.c strings.c sysdump.c version.c wrstabs.c \
|
stabs.c strings.c sysdump.c version.c wrstabs.c \
|
||||||
windres.c resrc.c rescoff.c resbin.c readelf.c
|
windres.c resrc.c rescoff.c resbin.c winduni.c readelf.c
|
||||||
|
|
||||||
GENERATED_CFILES = \
|
GENERATED_CFILES = \
|
||||||
underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
|
underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
|
||||||
|
@ -239,7 +239,7 @@ sysdump_SOURCES = sysdump.c $(BULIBS)
|
||||||
nlmconv_SOURCES = nlmconv.c nlmheader.y $(BULIBS)
|
nlmconv_SOURCES = nlmconv.c nlmheader.y $(BULIBS)
|
||||||
|
|
||||||
windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \
|
windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \
|
||||||
$(BULIBS)
|
winduni.c $(BULIBS)
|
||||||
windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
|
windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
|
||||||
|
|
||||||
DISTSTUFF = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \
|
DISTSTUFF = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \
|
||||||
|
@ -289,7 +289,7 @@ filemode.o
|
||||||
dlltool_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
|
dlltool_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
|
||||||
dlltool_LDFLAGS =
|
dlltool_LDFLAGS =
|
||||||
windres_OBJECTS = windres.o resrc.o rescoff.o resbin.o rcparse.o \
|
windres_OBJECTS = windres.o resrc.o rescoff.o resbin.o rcparse.o \
|
||||||
rclex.o bucomm.o version.o filemode.o
|
rclex.o winduni.o bucomm.o version.o filemode.o
|
||||||
windres_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
|
windres_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
|
||||||
windres_LDFLAGS =
|
windres_LDFLAGS =
|
||||||
size_OBJECTS = size.o bucomm.o version.o filemode.o
|
size_OBJECTS = size.o bucomm.o version.o filemode.o
|
||||||
|
@ -425,15 +425,15 @@ install-binPROGRAMS: $(bin_PROGRAMS)
|
||||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||||
if test -f $$p; then \
|
if test -f $$p; then \
|
||||||
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
|
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
|
||||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
|
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||||
else :; fi; \
|
else :; fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
uninstall-binPROGRAMS:
|
uninstall-binPROGRAMS:
|
||||||
@$(NORMAL_UNINSTALL)
|
@$(NORMAL_UNINSTALL)
|
||||||
list='$(bin_PROGRAMS)'; for p in $$list; do \
|
list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||||
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
|
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||||
done
|
done
|
||||||
|
|
||||||
mostlyclean-noinstPROGRAMS:
|
mostlyclean-noinstPROGRAMS:
|
||||||
|
@ -1202,21 +1202,24 @@ wrstabs.o: wrstabs.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
$(INCDIR)/aout/stab.def
|
$(INCDIR)/aout/stab.def
|
||||||
windres.o: windres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
windres.o: windres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
$(INCDIR)/getopt.h bucomm.h config.h $(INCDIR)/fopen-same.h \
|
$(INCDIR)/getopt.h bucomm.h config.h $(INCDIR)/fopen-same.h \
|
||||||
$(INCDIR)/libiberty.h $(INCDIR)/obstack.h windres.h
|
$(INCDIR)/libiberty.h $(INCDIR)/obstack.h windres.h \
|
||||||
|
winduni.h
|
||||||
resrc.o: resrc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
resrc.o: resrc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||||
windres.h
|
windres.h winduni.h
|
||||||
rescoff.o: rescoff.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
rescoff.o: rescoff.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||||
windres.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
|
windres.h winduni.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
|
||||||
$(INCDIR)/bfdlink.h
|
$(INCDIR)/bfdlink.h
|
||||||
resbin.o: resbin.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
resbin.o: resbin.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||||
windres.h
|
windres.h winduni.h
|
||||||
|
winduni.o: winduni.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
|
bucomm.h config.h $(INCDIR)/fopen-same.h winduni.h
|
||||||
readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
$(INCDIR)/elf/common.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/m32r.h \
|
$(INCDIR)/elf/common.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/m32r.h \
|
||||||
$(INCDIR)/elf/mips.h bucomm.h config.h $(INCDIR)/fopen-same.h \
|
$(INCDIR)/elf/mips.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \
|
||||||
$(INCDIR)/getopt.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
|
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h
|
||||||
underscore.o: underscore.c
|
underscore.o: underscore.c
|
||||||
arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
bucomm.h config.h $(INCDIR)/fopen-same.h arsup.h
|
bucomm.h config.h $(INCDIR)/fopen-same.h arsup.h
|
||||||
|
@ -1233,10 +1236,10 @@ nlmheader.o: nlmheader.c ../bfd/bfd.h bucomm.h config.h \
|
||||||
nlmconv.h
|
nlmconv.h
|
||||||
rcparse.o: rcparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
rcparse.o: rcparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||||
windres.h
|
windres.h winduni.h
|
||||||
rclex.o: rclex.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
rclex.o: rclex.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||||
windres.h rcparse.h
|
windres.h winduni.h rcparse.h
|
||||||
|
|
||||||
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
|
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
|
||||||
|
|
||||||
|
|
|
@ -235,18 +235,18 @@ cpp_line (s)
|
||||||
char *send, *fn;
|
char *send, *fn;
|
||||||
|
|
||||||
++s;
|
++s;
|
||||||
while (isspace (*s))
|
while (isspace ((unsigned char) *s))
|
||||||
++s;
|
++s;
|
||||||
|
|
||||||
line = strtol (s, &send, 0);
|
line = strtol (s, &send, 0);
|
||||||
if (*send != '\0' && ! isspace (*send))
|
if (*send != '\0' && ! isspace ((unsigned char) *send))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Subtract 1 because we are about to count the newline. */
|
/* Subtract 1 because we are about to count the newline. */
|
||||||
rc_lineno = line - 1;
|
rc_lineno = line - 1;
|
||||||
|
|
||||||
s = send;
|
s = send;
|
||||||
while (isspace (*s))
|
while (isspace ((unsigned char) *s))
|
||||||
++s;
|
++s;
|
||||||
|
|
||||||
if (*s != '"')
|
if (*s != '"')
|
||||||
|
@ -392,8 +392,8 @@ handle_quotes (input, len)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
++t;
|
++t;
|
||||||
assert (isspace (*t));
|
assert (isspace ((unsigned char) *t));
|
||||||
while (isspace (*t))
|
while (isspace ((unsigned char) *t))
|
||||||
++t;
|
++t;
|
||||||
if (*t == '\0')
|
if (*t == '\0')
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -107,7 +107,7 @@ static unsigned long class;
|
||||||
%token BEDIT HEDIT IEDIT
|
%token BEDIT HEDIT IEDIT
|
||||||
%token FONT
|
%token FONT
|
||||||
%token ICON
|
%token ICON
|
||||||
%token LANGUAGE CHARACTERISTICS VERSION
|
%token LANGUAGE CHARACTERISTICS VERSIONK
|
||||||
%token MENU MENUEX MENUITEM SEPARATOR POPUP CHECKED GRAYED HELP INACTIVE
|
%token MENU MENUEX MENUITEM SEPARATOR POPUP CHECKED GRAYED HELP INACTIVE
|
||||||
%token MENUBARBREAK MENUBREAK
|
%token MENUBARBREAK MENUBREAK
|
||||||
%token MESSAGETABLE
|
%token MESSAGETABLE
|
||||||
|
@ -221,6 +221,9 @@ acc_entry:
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
$$.id = $2;
|
$$.id = $2;
|
||||||
$$.flags |= $4;
|
$$.flags |= $4;
|
||||||
|
if (($$.flags & ACC_VIRTKEY) == 0
|
||||||
|
&& ($$.flags & (ACC_SHIFT | ACC_CONTROL | ACC_ALT)) != 0)
|
||||||
|
rcparse_warning (_("inappropriate modifiers for non-VIRTKEY"));
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -228,21 +231,27 @@ acc_event:
|
||||||
QUOTEDSTRING
|
QUOTEDSTRING
|
||||||
{
|
{
|
||||||
const char *s = $1;
|
const char *s = $1;
|
||||||
|
char ch;
|
||||||
|
|
||||||
|
$$.next = NULL;
|
||||||
$$.id = 0;
|
$$.id = 0;
|
||||||
if (*s != '^')
|
ch = *s;
|
||||||
|
if (ch != '^')
|
||||||
$$.flags = 0;
|
$$.flags = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$$.flags = ACC_CONTROL;
|
$$.flags = ACC_CONTROL | ACC_VIRTKEY;
|
||||||
++s;
|
++s;
|
||||||
|
ch = *s;
|
||||||
|
ch = toupper ((unsigned char) ch);
|
||||||
}
|
}
|
||||||
$$.key = *s;
|
$$.key = ch;
|
||||||
if (s[1] != '\0')
|
if (s[1] != '\0')
|
||||||
rcparse_warning ("accelerator should only be one character");
|
rcparse_warning (_("accelerator should only be one character"));
|
||||||
}
|
}
|
||||||
| posnumexpr
|
| posnumexpr
|
||||||
{
|
{
|
||||||
|
$$.next = NULL;
|
||||||
$$.flags = 0;
|
$$.flags = 0;
|
||||||
$$.id = 0;
|
$$.id = 0;
|
||||||
$$.key = $1;
|
$$.key = $1;
|
||||||
|
@ -258,6 +267,11 @@ acc_options:
|
||||||
{
|
{
|
||||||
$$ = $1 | $3;
|
$$ = $1 | $3;
|
||||||
}
|
}
|
||||||
|
/* I've had one report that the comma is optional. */
|
||||||
|
| acc_options acc_option
|
||||||
|
{
|
||||||
|
$$ = $1 | $2;
|
||||||
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
acc_option:
|
acc_option:
|
||||||
|
@ -422,7 +436,7 @@ styles:
|
||||||
dialog.pointsize = $3;
|
dialog.pointsize = $3;
|
||||||
unicode_from_ascii ((int *) NULL, &dialog.font, $5);
|
unicode_from_ascii ((int *) NULL, &dialog.font, $5);
|
||||||
if (dialog.ex == NULL)
|
if (dialog.ex == NULL)
|
||||||
rcparse_warning ("extended FONT requires DIALOGEX");
|
rcparse_warning (_("extended FONT requires DIALOGEX"));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dialog.ex->weight = $6;
|
dialog.ex->weight = $6;
|
||||||
|
@ -441,7 +455,7 @@ styles:
|
||||||
{
|
{
|
||||||
sub_res_info.language = $3 | ($4 << 8);
|
sub_res_info.language = $3 | ($4 << 8);
|
||||||
}
|
}
|
||||||
| styles VERSION numexpr
|
| styles VERSIONK numexpr
|
||||||
{
|
{
|
||||||
sub_res_info.version = $3;
|
sub_res_info.version = $3;
|
||||||
}
|
}
|
||||||
|
@ -500,7 +514,7 @@ control:
|
||||||
{
|
{
|
||||||
$$ = $3;
|
$$ = $3;
|
||||||
if (dialog.ex == NULL)
|
if (dialog.ex == NULL)
|
||||||
rcparse_warning ("IEDIT requires DIALOGEX");
|
rcparse_warning (_("IEDIT requires DIALOGEX"));
|
||||||
res_string_to_id (&$$->class, "BEDIT");
|
res_string_to_id (&$$->class, "BEDIT");
|
||||||
}
|
}
|
||||||
| CHECKBOX
|
| CHECKBOX
|
||||||
|
@ -530,7 +544,7 @@ control:
|
||||||
if ($11 != NULL)
|
if ($11 != NULL)
|
||||||
{
|
{
|
||||||
if (dialog.ex == NULL)
|
if (dialog.ex == NULL)
|
||||||
rcparse_warning ("control data requires DIALOGEX");
|
rcparse_warning (_("control data requires DIALOGEX"));
|
||||||
$$->data = $11;
|
$$->data = $11;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -539,7 +553,7 @@ control:
|
||||||
{
|
{
|
||||||
$$ = define_control ($2, $3, $6, $7, $8, $9, $4, style, $10);
|
$$ = define_control ($2, $3, $6, $7, $8, $9, $4, style, $10);
|
||||||
if (dialog.ex == NULL)
|
if (dialog.ex == NULL)
|
||||||
rcparse_warning ("help ID requires DIALOGEX");
|
rcparse_warning (_("help ID requires DIALOGEX"));
|
||||||
$$->help = $11;
|
$$->help = $11;
|
||||||
$$->data = $12;
|
$$->data = $12;
|
||||||
}
|
}
|
||||||
|
@ -593,7 +607,7 @@ control:
|
||||||
{
|
{
|
||||||
$$ = $3;
|
$$ = $3;
|
||||||
if (dialog.ex == NULL)
|
if (dialog.ex == NULL)
|
||||||
rcparse_warning ("IEDIT requires DIALOGEX");
|
rcparse_warning (_("IEDIT requires DIALOGEX"));
|
||||||
res_string_to_id (&$$->class, "HEDIT");
|
res_string_to_id (&$$->class, "HEDIT");
|
||||||
}
|
}
|
||||||
| ICON optstringc numexpr cnumexpr cnumexpr opt_control_data
|
| ICON optstringc numexpr cnumexpr cnumexpr opt_control_data
|
||||||
|
@ -603,7 +617,7 @@ control:
|
||||||
if ($6 != NULL)
|
if ($6 != NULL)
|
||||||
{
|
{
|
||||||
if (dialog.ex == NULL)
|
if (dialog.ex == NULL)
|
||||||
rcparse_warning ("control data requires DIALOGEX");
|
rcparse_warning (_("control data requires DIALOGEX"));
|
||||||
$$->data = $6;
|
$$->data = $6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -615,7 +629,7 @@ control:
|
||||||
if ($10 != NULL)
|
if ($10 != NULL)
|
||||||
{
|
{
|
||||||
if (dialog.ex == NULL)
|
if (dialog.ex == NULL)
|
||||||
rcparse_warning ("control data requires DIALOGEX");
|
rcparse_warning (_("control data requires DIALOGEX"));
|
||||||
$$->data = $10;
|
$$->data = $10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -625,7 +639,7 @@ control:
|
||||||
$$ = define_control ($2, $3, $4, $5, $6, $7, CTL_STATIC,
|
$$ = define_control ($2, $3, $4, $5, $6, $7, CTL_STATIC,
|
||||||
style, $9);
|
style, $9);
|
||||||
if (dialog.ex == NULL)
|
if (dialog.ex == NULL)
|
||||||
rcparse_warning ("help ID requires DIALOGEX");
|
rcparse_warning (_("help ID requires DIALOGEX"));
|
||||||
$$->help = $10;
|
$$->help = $10;
|
||||||
$$->data = $11;
|
$$->data = $11;
|
||||||
}
|
}
|
||||||
|
@ -639,7 +653,7 @@ control:
|
||||||
{
|
{
|
||||||
$$ = $3;
|
$$ = $3;
|
||||||
if (dialog.ex == NULL)
|
if (dialog.ex == NULL)
|
||||||
rcparse_warning ("IEDIT requires DIALOGEX");
|
rcparse_warning (_("IEDIT requires DIALOGEX"));
|
||||||
res_string_to_id (&$$->class, "IEDIT");
|
res_string_to_id (&$$->class, "IEDIT");
|
||||||
}
|
}
|
||||||
| LISTBOX
|
| LISTBOX
|
||||||
|
@ -748,7 +762,7 @@ control_params:
|
||||||
if ($7 != NULL)
|
if ($7 != NULL)
|
||||||
{
|
{
|
||||||
if (dialog.ex == NULL)
|
if (dialog.ex == NULL)
|
||||||
rcparse_warning ("control data requires DIALOGEX");
|
rcparse_warning (_("control data requires DIALOGEX"));
|
||||||
$$->data = $7;
|
$$->data = $7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -759,7 +773,7 @@ control_params:
|
||||||
if ($9 != NULL)
|
if ($9 != NULL)
|
||||||
{
|
{
|
||||||
if (dialog.ex == NULL)
|
if (dialog.ex == NULL)
|
||||||
rcparse_warning ("control data requires DIALOGEX");
|
rcparse_warning (_("control data requires DIALOGEX"));
|
||||||
$$->data = $9;
|
$$->data = $9;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -768,7 +782,7 @@ control_params:
|
||||||
{
|
{
|
||||||
$$ = define_control ($1, $2, $3, $4, $5, $6, class, style, $8);
|
$$ = define_control ($1, $2, $3, $4, $5, $6, class, style, $8);
|
||||||
if (dialog.ex == NULL)
|
if (dialog.ex == NULL)
|
||||||
rcparse_warning ("help ID requires DIALOGEX");
|
rcparse_warning (_("help ID requires DIALOGEX"));
|
||||||
$$->help = $9;
|
$$->help = $9;
|
||||||
$$->data = $10;
|
$$->data = $10;
|
||||||
}
|
}
|
||||||
|
@ -1221,8 +1235,8 @@ id:
|
||||||
/* It seems that resource ID's are forced to upper case. */
|
/* It seems that resource ID's are forced to upper case. */
|
||||||
copy = xstrdup ($1);
|
copy = xstrdup ($1);
|
||||||
for (s = copy; *s != '\0'; s++)
|
for (s = copy; *s != '\0'; s++)
|
||||||
if (islower (*s))
|
if (islower ((unsigned char) *s))
|
||||||
*s = toupper (*s);
|
*s = toupper ((unsigned char) *s);
|
||||||
res_string_to_id (&$$, copy);
|
res_string_to_id (&$$, copy);
|
||||||
free (copy);
|
free (copy);
|
||||||
}
|
}
|
||||||
|
@ -1255,7 +1269,7 @@ suboptions:
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
$$.language = $3 | ($4 << 8);
|
$$.language = $3 | ($4 << 8);
|
||||||
}
|
}
|
||||||
| suboptions VERSION numexpr
|
| suboptions VERSIONK numexpr
|
||||||
{
|
{
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
$$.version = $3;
|
$$.version = $3;
|
||||||
|
|
|
@ -105,7 +105,7 @@ bin_to_res (type, data, length, big_endian)
|
||||||
return bin_to_res_fontdir (data, length, big_endian);
|
return bin_to_res_fontdir (data, length, big_endian);
|
||||||
case RT_FONT:
|
case RT_FONT:
|
||||||
return bin_to_res_generic (RES_TYPE_FONT, data, length);
|
return bin_to_res_generic (RES_TYPE_FONT, data, length);
|
||||||
case RT_ACCELERATORS:
|
case RT_ACCELERATOR:
|
||||||
return bin_to_res_accelerators (data, length, big_endian);
|
return bin_to_res_accelerators (data, length, big_endian);
|
||||||
case RT_RCDATA:
|
case RT_RCDATA:
|
||||||
return bin_to_res_rcdata (data, length, big_endian);
|
return bin_to_res_rcdata (data, length, big_endian);
|
||||||
|
@ -127,7 +127,7 @@ static void
|
||||||
toosmall (msg)
|
toosmall (msg)
|
||||||
const char *msg;
|
const char *msg;
|
||||||
{
|
{
|
||||||
fatal ("%s: not enough binary data", msg);
|
fatal (_("%s: not enough binary data"), msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Swap in a NULL terminated unicode string. */
|
/* Swap in a NULL terminated unicode string. */
|
||||||
|
@ -145,8 +145,8 @@ get_unicode (data, length, big_endian, retlen)
|
||||||
c = 0;
|
c = 0;
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
if (length < c * 2 + 2)
|
if (length < (unsigned long) c * 2 + 2)
|
||||||
toosmall ("null terminated unicode string");
|
toosmall (_("null terminated unicode string"));
|
||||||
if (get_16 (big_endian, data + c * 2) == 0)
|
if (get_16 (big_endian, data + c * 2) == 0)
|
||||||
break;
|
break;
|
||||||
++c;
|
++c;
|
||||||
|
@ -176,13 +176,13 @@ get_resid (id, data, length, big_endian)
|
||||||
int first;
|
int first;
|
||||||
|
|
||||||
if (length < 2)
|
if (length < 2)
|
||||||
toosmall ("resource ID");
|
toosmall (_("resource ID"));
|
||||||
|
|
||||||
first = get_16 (big_endian, data);
|
first = get_16 (big_endian, data);
|
||||||
if (first == 0xffff)
|
if (first == 0xffff)
|
||||||
{
|
{
|
||||||
if (length < 4)
|
if (length < 4)
|
||||||
toosmall ("resource ID");
|
toosmall (_("resource ID"));
|
||||||
id->named = 0;
|
id->named = 0;
|
||||||
id->u.id = get_16 (big_endian, data + 2);
|
id->u.id = get_16 (big_endian, data + 2);
|
||||||
return 4;
|
return 4;
|
||||||
|
@ -226,7 +226,7 @@ bin_to_res_cursor (data, length, big_endian)
|
||||||
struct res_resource *r;
|
struct res_resource *r;
|
||||||
|
|
||||||
if (length < 4)
|
if (length < 4)
|
||||||
toosmall ("cursor");
|
toosmall (_("cursor"));
|
||||||
|
|
||||||
c = (struct cursor *) res_alloc (sizeof *c);
|
c = (struct cursor *) res_alloc (sizeof *c);
|
||||||
c->xhotspot = get_16 (big_endian, data);
|
c->xhotspot = get_16 (big_endian, data);
|
||||||
|
@ -260,35 +260,35 @@ bin_to_res_menu (data, length, big_endian)
|
||||||
r->u.menu = m;
|
r->u.menu = m;
|
||||||
|
|
||||||
if (length < 2)
|
if (length < 2)
|
||||||
toosmall ("menu header");
|
toosmall (_("menu header"));
|
||||||
|
|
||||||
version = get_16 (big_endian, data);
|
version = get_16 (big_endian, data);
|
||||||
|
|
||||||
if (version == 0)
|
if (version == 0)
|
||||||
{
|
{
|
||||||
if (length < 4)
|
if (length < 4)
|
||||||
toosmall ("menu header");
|
toosmall (_("menu header"));
|
||||||
m->help = 0;
|
m->help = 0;
|
||||||
m->items = bin_to_res_menuitems (data + 4, length - 4, big_endian,
|
m->items = bin_to_res_menuitems (data + 4, length - 4, big_endian,
|
||||||
&read);
|
&read);
|
||||||
}
|
}
|
||||||
else if (version == 1)
|
else if (version == 1)
|
||||||
{
|
{
|
||||||
int offset;
|
unsigned int offset;
|
||||||
|
|
||||||
if (length < 8)
|
if (length < 8)
|
||||||
toosmall ("menuex header");
|
toosmall (_("menuex header"));
|
||||||
m->help = get_32 (big_endian, data + 4);
|
m->help = get_32 (big_endian, data + 4);
|
||||||
offset = get_16 (big_endian, data + 2);
|
offset = get_16 (big_endian, data + 2);
|
||||||
if (offset + 4 >= length)
|
if (offset + 4 >= length)
|
||||||
toosmall ("menuex offset");
|
toosmall (_("menuex offset"));
|
||||||
m->items = bin_to_res_menuexitems (data + 4 + offset,
|
m->items = bin_to_res_menuexitems (data + 4 + offset,
|
||||||
length - (4 + offset),
|
length - (4 + offset),
|
||||||
big_endian,
|
big_endian,
|
||||||
&read);
|
&read);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fatal ("unsupported menu version %d", version);
|
fatal (_("unsupported menu version %d"), version);
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -311,18 +311,19 @@ bin_to_res_menuitems (data, length, big_endian, read)
|
||||||
|
|
||||||
while (length > 0)
|
while (length > 0)
|
||||||
{
|
{
|
||||||
int flags, stroff, slen, itemlen;
|
int flags, slen, itemlen;
|
||||||
|
unsigned int stroff;
|
||||||
struct menuitem *mi;
|
struct menuitem *mi;
|
||||||
|
|
||||||
if (length < 4)
|
if (length < 4)
|
||||||
toosmall ("menuitem header");
|
toosmall (_("menuitem header"));
|
||||||
|
|
||||||
mi = (struct menuitem *) res_alloc (sizeof *mi);
|
mi = (struct menuitem *) res_alloc (sizeof *mi);
|
||||||
mi->state = 0;
|
mi->state = 0;
|
||||||
mi->help = 0;
|
mi->help = 0;
|
||||||
|
|
||||||
flags = get_16 (big_endian, data);
|
flags = get_16 (big_endian, data);
|
||||||
mi->type = flags;
|
mi->type = flags &~ (MENUITEM_POPUP | MENUITEM_ENDMENU);
|
||||||
|
|
||||||
if ((flags & MENUITEM_POPUP) == 0)
|
if ((flags & MENUITEM_POPUP) == 0)
|
||||||
stroff = 4;
|
stroff = 4;
|
||||||
|
@ -330,7 +331,7 @@ bin_to_res_menuitems (data, length, big_endian, read)
|
||||||
stroff = 2;
|
stroff = 2;
|
||||||
|
|
||||||
if (length < stroff + 2)
|
if (length < stroff + 2)
|
||||||
toosmall ("menuitem header");
|
toosmall (_("menuitem header"));
|
||||||
|
|
||||||
if (get_16 (big_endian, data + stroff) == 0)
|
if (get_16 (big_endian, data + stroff) == 0)
|
||||||
{
|
{
|
||||||
|
@ -391,11 +392,12 @@ bin_to_res_menuexitems (data, length, big_endian, read)
|
||||||
|
|
||||||
while (length > 0)
|
while (length > 0)
|
||||||
{
|
{
|
||||||
int flags, slen, itemlen;
|
int flags, slen;
|
||||||
|
unsigned int itemlen;
|
||||||
struct menuitem *mi;
|
struct menuitem *mi;
|
||||||
|
|
||||||
if (length < 14)
|
if (length < 14)
|
||||||
toosmall ("menuitem header");
|
toosmall (_("menuitem header"));
|
||||||
|
|
||||||
mi = (struct menuitem *) res_alloc (sizeof *mi);
|
mi = (struct menuitem *) res_alloc (sizeof *mi);
|
||||||
mi->type = get_32 (big_endian, data);
|
mi->type = get_32 (big_endian, data);
|
||||||
|
@ -425,7 +427,7 @@ bin_to_res_menuexitems (data, length, big_endian, read)
|
||||||
int subread;
|
int subread;
|
||||||
|
|
||||||
if (length < itemlen + 4)
|
if (length < itemlen + 4)
|
||||||
toosmall ("menuitem");
|
toosmall (_("menuitem"));
|
||||||
mi->help = get_32 (big_endian, data + itemlen);
|
mi->help = get_32 (big_endian, data + itemlen);
|
||||||
itemlen += 4;
|
itemlen += 4;
|
||||||
|
|
||||||
|
@ -460,12 +462,13 @@ bin_to_res_dialog (data, length, big_endian)
|
||||||
{
|
{
|
||||||
int version;
|
int version;
|
||||||
struct dialog *d;
|
struct dialog *d;
|
||||||
int c, sublen, off, i;
|
int c, sublen, i;
|
||||||
|
unsigned int off;
|
||||||
struct dialog_control **pp;
|
struct dialog_control **pp;
|
||||||
struct res_resource *r;
|
struct res_resource *r;
|
||||||
|
|
||||||
if (length < 18)
|
if (length < 18)
|
||||||
toosmall ("dialog header");
|
toosmall (_("dialog header"));
|
||||||
|
|
||||||
d = (struct dialog *) res_alloc (sizeof *d);
|
d = (struct dialog *) res_alloc (sizeof *d);
|
||||||
|
|
||||||
|
@ -483,7 +486,7 @@ bin_to_res_dialog (data, length, big_endian)
|
||||||
|
|
||||||
signature = get_16 (big_endian, data + 2);
|
signature = get_16 (big_endian, data + 2);
|
||||||
if (signature != 1)
|
if (signature != 1)
|
||||||
fatal ("unexpected dialog signature %d", signature);
|
fatal (_("unexpected dialog signature %d"), signature);
|
||||||
|
|
||||||
d->ex = (struct dialog_ex *) res_alloc (sizeof (struct dialog_ex));
|
d->ex = (struct dialog_ex *) res_alloc (sizeof (struct dialog_ex));
|
||||||
d->ex->help = get_32 (big_endian, data + 4);
|
d->ex->help = get_32 (big_endian, data + 4);
|
||||||
|
@ -493,7 +496,7 @@ bin_to_res_dialog (data, length, big_endian)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length < off + 10)
|
if (length < off + 10)
|
||||||
toosmall ("dialog header");
|
toosmall (_("dialog header"));
|
||||||
|
|
||||||
c = get_16 (big_endian, data + off);
|
c = get_16 (big_endian, data + off);
|
||||||
d->x = get_16 (big_endian, data + off + 2);
|
d->x = get_16 (big_endian, data + off + 2);
|
||||||
|
@ -525,7 +528,7 @@ bin_to_res_dialog (data, length, big_endian)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (length < off + 2)
|
if (length < off + 2)
|
||||||
toosmall ("dialog font point size");
|
toosmall (_("dialog font point size"));
|
||||||
|
|
||||||
d->pointsize = get_16 (big_endian, data + off);
|
d->pointsize = get_16 (big_endian, data + off);
|
||||||
off += 2;
|
off += 2;
|
||||||
|
@ -533,7 +536,7 @@ bin_to_res_dialog (data, length, big_endian)
|
||||||
if (d->ex != NULL)
|
if (d->ex != NULL)
|
||||||
{
|
{
|
||||||
if (length < off + 4)
|
if (length < off + 4)
|
||||||
toosmall ("dialogex font information");
|
toosmall (_("dialogex font information"));
|
||||||
d->ex->weight = get_16 (big_endian, data + off);
|
d->ex->weight = get_16 (big_endian, data + off);
|
||||||
d->ex->italic = get_16 (big_endian, data + off + 2);
|
d->ex->italic = get_16 (big_endian, data + off + 2);
|
||||||
off += 4;
|
off += 4;
|
||||||
|
@ -558,7 +561,7 @@ bin_to_res_dialog (data, length, big_endian)
|
||||||
if (d->ex == NULL)
|
if (d->ex == NULL)
|
||||||
{
|
{
|
||||||
if (length < off + 8)
|
if (length < off + 8)
|
||||||
toosmall ("dialog control");
|
toosmall (_("dialog control"));
|
||||||
|
|
||||||
dc->style = get_32 (big_endian, data + off);
|
dc->style = get_32 (big_endian, data + off);
|
||||||
dc->exstyle = get_32 (big_endian, data + off + 4);
|
dc->exstyle = get_32 (big_endian, data + off + 4);
|
||||||
|
@ -568,7 +571,7 @@ bin_to_res_dialog (data, length, big_endian)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (length < off + 12)
|
if (length < off + 12)
|
||||||
toosmall ("dialogex control");
|
toosmall (_("dialogex control"));
|
||||||
dc->help = get_32 (big_endian, data + off);
|
dc->help = get_32 (big_endian, data + off);
|
||||||
dc->exstyle = get_32 (big_endian, data + off + 4);
|
dc->exstyle = get_32 (big_endian, data + off + 4);
|
||||||
dc->style = get_32 (big_endian, data + off + 18);
|
dc->style = get_32 (big_endian, data + off + 18);
|
||||||
|
@ -576,7 +579,7 @@ bin_to_res_dialog (data, length, big_endian)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length < off + 10)
|
if (length < off + 10)
|
||||||
toosmall ("dialog control");
|
toosmall (_("dialog control"));
|
||||||
|
|
||||||
dc->x = get_16 (big_endian, data + off);
|
dc->x = get_16 (big_endian, data + off);
|
||||||
dc->y = get_16 (big_endian, data + off + 2);
|
dc->y = get_16 (big_endian, data + off + 2);
|
||||||
|
@ -593,7 +596,7 @@ bin_to_res_dialog (data, length, big_endian)
|
||||||
off += sublen;
|
off += sublen;
|
||||||
|
|
||||||
if (length < off + 2)
|
if (length < off + 2)
|
||||||
toosmall ("dialog control end");
|
toosmall (_("dialog control end"));
|
||||||
|
|
||||||
datalen = get_16 (big_endian, data + off);
|
datalen = get_16 (big_endian, data + off);
|
||||||
off += 2;
|
off += 2;
|
||||||
|
@ -605,7 +608,7 @@ bin_to_res_dialog (data, length, big_endian)
|
||||||
off = (off + 3) &~ 3;
|
off = (off + 3) &~ 3;
|
||||||
|
|
||||||
if (length < off + datalen)
|
if (length < off + datalen)
|
||||||
toosmall ("dialog control data");
|
toosmall (_("dialog control data"));
|
||||||
|
|
||||||
dc->data = ((struct rcdata_item *)
|
dc->data = ((struct rcdata_item *)
|
||||||
res_alloc (sizeof (struct rcdata_item)));
|
res_alloc (sizeof (struct rcdata_item)));
|
||||||
|
@ -645,20 +648,20 @@ bin_to_res_string (data, length, big_endian)
|
||||||
|
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
{
|
{
|
||||||
int slen;
|
unsigned int slen;
|
||||||
|
|
||||||
if (length < 2)
|
if (length < 2)
|
||||||
toosmall ("stringtable string length");
|
toosmall (_("stringtable string length"));
|
||||||
slen = get_16 (big_endian, data);
|
slen = get_16 (big_endian, data);
|
||||||
st->strings[i].length = slen;
|
st->strings[i].length = slen;
|
||||||
|
|
||||||
if (slen > 0)
|
if (slen > 0)
|
||||||
{
|
{
|
||||||
unichar *s;
|
unichar *s;
|
||||||
int j;
|
unsigned int j;
|
||||||
|
|
||||||
if (length < 2 + 2 * slen)
|
if (length < 2 + 2 * slen)
|
||||||
toosmall ("stringtable string");
|
toosmall (_("stringtable string"));
|
||||||
|
|
||||||
s = (unichar *) res_alloc (slen * sizeof (unichar));
|
s = (unichar *) res_alloc (slen * sizeof (unichar));
|
||||||
st->strings[i].string = s;
|
st->strings[i].string = s;
|
||||||
|
@ -691,7 +694,7 @@ bin_to_res_fontdir (data, length, big_endian)
|
||||||
struct res_resource *r;
|
struct res_resource *r;
|
||||||
|
|
||||||
if (length < 2)
|
if (length < 2)
|
||||||
toosmall ("fontdir header");
|
toosmall (_("fontdir header"));
|
||||||
|
|
||||||
c = get_16 (big_endian, data);
|
c = get_16 (big_endian, data);
|
||||||
|
|
||||||
|
@ -701,10 +704,10 @@ bin_to_res_fontdir (data, length, big_endian)
|
||||||
for (i = 0; i < c; i++)
|
for (i = 0; i < c; i++)
|
||||||
{
|
{
|
||||||
struct fontdir *fd;
|
struct fontdir *fd;
|
||||||
int off;
|
unsigned int off;
|
||||||
|
|
||||||
if (length < 56)
|
if (length < 56)
|
||||||
toosmall ("fontdir");
|
toosmall (_("fontdir"));
|
||||||
|
|
||||||
fd = (struct fontdir *) res_alloc (sizeof *fd);
|
fd = (struct fontdir *) res_alloc (sizeof *fd);
|
||||||
fd->index = get_16 (big_endian, data);
|
fd->index = get_16 (big_endian, data);
|
||||||
|
@ -720,13 +723,13 @@ bin_to_res_fontdir (data, length, big_endian)
|
||||||
while (off < length && data[off] != '\0')
|
while (off < length && data[off] != '\0')
|
||||||
++off;
|
++off;
|
||||||
if (off >= length)
|
if (off >= length)
|
||||||
toosmall ("fontdir device name");
|
toosmall (_("fontdir device name"));
|
||||||
++off;
|
++off;
|
||||||
|
|
||||||
while (off < length && data[off] != '\0')
|
while (off < length && data[off] != '\0')
|
||||||
++off;
|
++off;
|
||||||
if (off >= length)
|
if (off >= length)
|
||||||
toosmall ("fontdir face name");
|
toosmall (_("fontdir face name"));
|
||||||
++off;
|
++off;
|
||||||
|
|
||||||
fd->length = off;
|
fd->length = off;
|
||||||
|
@ -769,7 +772,9 @@ bin_to_res_accelerators (data, length, big_endian)
|
||||||
struct accelerator *a;
|
struct accelerator *a;
|
||||||
|
|
||||||
if (length < 8)
|
if (length < 8)
|
||||||
toosmall ("accelerator");
|
toosmall (_("accelerator"));
|
||||||
|
|
||||||
|
a = (struct accelerator *) res_alloc (sizeof *a);
|
||||||
|
|
||||||
a->flags = get_16 (big_endian, data);
|
a->flags = get_16 (big_endian, data);
|
||||||
a->key = get_16 (big_endian, data + 2);
|
a->key = get_16 (big_endian, data + 2);
|
||||||
|
@ -831,11 +836,11 @@ bin_to_res_group_cursor (data, length, big_endian)
|
||||||
struct res_resource *r;
|
struct res_resource *r;
|
||||||
|
|
||||||
if (length < 6)
|
if (length < 6)
|
||||||
toosmall ("group cursor header");
|
toosmall (_("group cursor header"));
|
||||||
|
|
||||||
type = get_16 (big_endian, data + 2);
|
type = get_16 (big_endian, data + 2);
|
||||||
if (type != 2)
|
if (type != 2)
|
||||||
fatal ("unexpected group cursor type %d", type);
|
fatal (_("unexpected group cursor type %d"), type);
|
||||||
|
|
||||||
c = get_16 (big_endian, data + 4);
|
c = get_16 (big_endian, data + 4);
|
||||||
|
|
||||||
|
@ -850,7 +855,7 @@ bin_to_res_group_cursor (data, length, big_endian)
|
||||||
struct group_cursor *gc;
|
struct group_cursor *gc;
|
||||||
|
|
||||||
if (length < 14)
|
if (length < 14)
|
||||||
toosmall ("group cursor");
|
toosmall (_("group cursor"));
|
||||||
|
|
||||||
gc = (struct group_cursor *) res_alloc (sizeof *gc);
|
gc = (struct group_cursor *) res_alloc (sizeof *gc);
|
||||||
|
|
||||||
|
@ -889,11 +894,11 @@ bin_to_res_group_icon (data, length, big_endian)
|
||||||
struct res_resource *r;
|
struct res_resource *r;
|
||||||
|
|
||||||
if (length < 6)
|
if (length < 6)
|
||||||
toosmall ("group icon header");
|
toosmall (_("group icon header"));
|
||||||
|
|
||||||
type = get_16 (big_endian, data + 2);
|
type = get_16 (big_endian, data + 2);
|
||||||
if (type != 1)
|
if (type != 1)
|
||||||
fatal ("unexpected group icon type %d", type);
|
fatal (_("unexpected group icon type %d"), type);
|
||||||
|
|
||||||
c = get_16 (big_endian, data + 4);
|
c = get_16 (big_endian, data + 4);
|
||||||
|
|
||||||
|
@ -908,7 +913,7 @@ bin_to_res_group_icon (data, length, big_endian)
|
||||||
struct group_icon *gi;
|
struct group_icon *gi;
|
||||||
|
|
||||||
if (length < 14)
|
if (length < 14)
|
||||||
toosmall ("group icon");
|
toosmall (_("group icon"));
|
||||||
|
|
||||||
gi = (struct group_icon *) res_alloc (sizeof *gi);
|
gi = (struct group_icon *) res_alloc (sizeof *gi);
|
||||||
|
|
||||||
|
@ -978,8 +983,8 @@ get_version_header (data, length, big_endian, key, pkey, len, vallen, type,
|
||||||
{
|
{
|
||||||
if (length < 2)
|
if (length < 2)
|
||||||
toosmall (key);
|
toosmall (key);
|
||||||
if (get_16 (big_endian, data) != *key)
|
if (get_16 (big_endian, data) != (unsigned char) *key)
|
||||||
fatal ("unexpected version string");
|
fatal (_("unexpected version string"));
|
||||||
|
|
||||||
*off += 2;
|
*off += 2;
|
||||||
length -= 2;
|
length -= 2;
|
||||||
|
@ -1012,12 +1017,12 @@ bin_to_res_version (data, length, big_endian)
|
||||||
get_version_header (data, length, big_endian, "VS_VERSION_INFO",
|
get_version_header (data, length, big_endian, "VS_VERSION_INFO",
|
||||||
(unichar *) NULL, &verlen, &vallen, &type, &off);
|
(unichar *) NULL, &verlen, &vallen, &type, &off);
|
||||||
|
|
||||||
if (verlen != length)
|
if ((unsigned int) verlen != length)
|
||||||
fatal ("version length %d does not match resource length %lu",
|
fatal (_("version length %d does not match resource length %lu"),
|
||||||
verlen, length);
|
verlen, length);
|
||||||
|
|
||||||
if (type != 0)
|
if (type != 0)
|
||||||
fatal ("unexpected version type %d", type);
|
fatal (_("unexpected version type %d"), type);
|
||||||
|
|
||||||
data += off;
|
data += off;
|
||||||
length -= off;
|
length -= off;
|
||||||
|
@ -1029,18 +1034,18 @@ bin_to_res_version (data, length, big_endian)
|
||||||
unsigned long signature, fiv;
|
unsigned long signature, fiv;
|
||||||
|
|
||||||
if (vallen != 52)
|
if (vallen != 52)
|
||||||
fatal ("unexpected fixed version information length %d", vallen);
|
fatal (_("unexpected fixed version information length %d"), vallen);
|
||||||
|
|
||||||
if (length < 52)
|
if (length < 52)
|
||||||
toosmall ("fixed version info");
|
toosmall (_("fixed version info"));
|
||||||
|
|
||||||
signature = get_32 (big_endian, data);
|
signature = get_32 (big_endian, data);
|
||||||
if (signature != 0xfeef04bd)
|
if (signature != 0xfeef04bd)
|
||||||
fatal ("unexpected fixed version signature %lu", signature);
|
fatal (_("unexpected fixed version signature %lu"), signature);
|
||||||
|
|
||||||
fiv = get_32 (big_endian, data + 4);
|
fiv = get_32 (big_endian, data + 4);
|
||||||
if (fiv != 0 && fiv != 0x10000)
|
if (fiv != 0 && fiv != 0x10000)
|
||||||
fatal ("unexpected fixed version info version %lu", fiv);
|
fatal (_("unexpected fixed version info version %lu"), fiv);
|
||||||
|
|
||||||
fi = (struct fixed_versioninfo *) res_alloc (sizeof *fi);
|
fi = (struct fixed_versioninfo *) res_alloc (sizeof *fi);
|
||||||
|
|
||||||
|
@ -1069,7 +1074,7 @@ bin_to_res_version (data, length, big_endian)
|
||||||
int ch;
|
int ch;
|
||||||
|
|
||||||
if (length < 8)
|
if (length < 8)
|
||||||
toosmall ("version var info");
|
toosmall (_("version var info"));
|
||||||
|
|
||||||
vi = (struct ver_info *) res_alloc (sizeof *vi);
|
vi = (struct ver_info *) res_alloc (sizeof *vi);
|
||||||
|
|
||||||
|
@ -1086,7 +1091,7 @@ bin_to_res_version (data, length, big_endian)
|
||||||
&off);
|
&off);
|
||||||
|
|
||||||
if (vallen != 0)
|
if (vallen != 0)
|
||||||
fatal ("unexpected stringfileinfo value length %d", vallen);
|
fatal (_("unexpected stringfileinfo value length %d"), vallen);
|
||||||
|
|
||||||
data += off;
|
data += off;
|
||||||
length -= off;
|
length -= off;
|
||||||
|
@ -1096,7 +1101,7 @@ bin_to_res_version (data, length, big_endian)
|
||||||
&type, &off);
|
&type, &off);
|
||||||
|
|
||||||
if (vallen != 0)
|
if (vallen != 0)
|
||||||
fatal ("unexpected version stringtable value length %d", vallen);
|
fatal (_("unexpected version stringtable value length %d"), vallen);
|
||||||
|
|
||||||
data += off;
|
data += off;
|
||||||
length -= off;
|
length -= off;
|
||||||
|
@ -1130,7 +1135,7 @@ bin_to_res_version (data, length, big_endian)
|
||||||
valoff = (valoff + 3) &~ 3;
|
valoff = (valoff + 3) &~ 3;
|
||||||
|
|
||||||
if (off + valoff != subverlen)
|
if (off + valoff != subverlen)
|
||||||
fatal ("unexpected version string length %d != %d + %d",
|
fatal (_("unexpected version string length %d != %d + %d"),
|
||||||
subverlen, off, valoff);
|
subverlen, off, valoff);
|
||||||
|
|
||||||
vs->next = NULL;
|
vs->next = NULL;
|
||||||
|
@ -1141,7 +1146,7 @@ bin_to_res_version (data, length, big_endian)
|
||||||
length -= valoff;
|
length -= valoff;
|
||||||
|
|
||||||
if (verlen < subverlen)
|
if (verlen < subverlen)
|
||||||
fatal ("unexpected version string length %d < %d",
|
fatal (_("unexpected version string length %d < %d"),
|
||||||
verlen, subverlen);
|
verlen, subverlen);
|
||||||
|
|
||||||
verlen -= subverlen;
|
verlen -= subverlen;
|
||||||
|
@ -1158,7 +1163,7 @@ bin_to_res_version (data, length, big_endian)
|
||||||
&off);
|
&off);
|
||||||
|
|
||||||
if (vallen != 0)
|
if (vallen != 0)
|
||||||
fatal ("unexpected varfileinfo value length %d", vallen);
|
fatal (_("unexpected varfileinfo value length %d"), vallen);
|
||||||
|
|
||||||
data += off;
|
data += off;
|
||||||
length -= off;
|
length -= off;
|
||||||
|
@ -1177,7 +1182,7 @@ bin_to_res_version (data, length, big_endian)
|
||||||
struct ver_varinfo *vv;
|
struct ver_varinfo *vv;
|
||||||
|
|
||||||
if (length < 4)
|
if (length < 4)
|
||||||
toosmall ("version varfileinfo");
|
toosmall (_("version varfileinfo"));
|
||||||
|
|
||||||
vv = (struct ver_varinfo *) res_alloc (sizeof *vv);
|
vv = (struct ver_varinfo *) res_alloc (sizeof *vv);
|
||||||
|
|
||||||
|
@ -1192,13 +1197,13 @@ bin_to_res_version (data, length, big_endian)
|
||||||
length -= 4;
|
length -= 4;
|
||||||
|
|
||||||
if (vallen < 4)
|
if (vallen < 4)
|
||||||
fatal ("unexpected version value length %d", vallen);
|
fatal (_("unexpected version value length %d"), vallen);
|
||||||
|
|
||||||
vallen -= 4;
|
vallen -= 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fatal ("unexpected version string");
|
fatal (_("unexpected version string"));
|
||||||
|
|
||||||
vi->next = NULL;
|
vi->next = NULL;
|
||||||
*pp = vi;
|
*pp = vi;
|
||||||
|
@ -1448,7 +1453,7 @@ res_to_bin_accelerator (accelerators, big_endian)
|
||||||
d->data = (unsigned char *) reswr_alloc (8);
|
d->data = (unsigned char *) reswr_alloc (8);
|
||||||
|
|
||||||
put_16 (big_endian,
|
put_16 (big_endian,
|
||||||
a->flags | (a->next == NULL ? 0 : ACC_LAST),
|
a->flags | (a->next != NULL ? 0 : ACC_LAST),
|
||||||
d->data);
|
d->data);
|
||||||
put_16 (big_endian, a->key, d->data + 2);
|
put_16 (big_endian, a->key, d->data + 2);
|
||||||
put_16 (big_endian, a->id, d->data + 4);
|
put_16 (big_endian, a->id, d->data + 4);
|
||||||
|
@ -1559,7 +1564,7 @@ res_to_bin_dialog (dialog, big_endian)
|
||||||
if (! dialogex)
|
if (! dialogex)
|
||||||
{
|
{
|
||||||
put_32 (big_endian, dialog->style, first->data);
|
put_32 (big_endian, dialog->style, first->data);
|
||||||
put_32 (big_endian, dialog->style, first->data + 4);
|
put_32 (big_endian, dialog->exstyle, first->data + 4);
|
||||||
off = 8;
|
off = 8;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1599,7 +1604,7 @@ res_to_bin_dialog (dialog, big_endian)
|
||||||
struct bindata *d;
|
struct bindata *d;
|
||||||
|
|
||||||
d = (struct bindata *) reswr_alloc (sizeof *d);
|
d = (struct bindata *) reswr_alloc (sizeof *d);
|
||||||
d->length = dialogex ? 2 : 6;
|
d->length = dialogex ? 6 : 2;
|
||||||
d->data = (unsigned char *) reswr_alloc (d->length);
|
d->data = (unsigned char *) reswr_alloc (d->length);
|
||||||
|
|
||||||
length += d->length;
|
length += d->length;
|
||||||
|
@ -1631,7 +1636,6 @@ res_to_bin_dialog (dialog, big_endian)
|
||||||
c = 0;
|
c = 0;
|
||||||
for (dc = dialog->controls; dc != NULL; dc = dc->next)
|
for (dc = dialog->controls; dc != NULL; dc = dc->next)
|
||||||
{
|
{
|
||||||
unsigned long length;
|
|
||||||
struct bindata *d;
|
struct bindata *d;
|
||||||
int dcoff;
|
int dcoff;
|
||||||
|
|
||||||
|
@ -1690,14 +1694,21 @@ res_to_bin_dialog (dialog, big_endian)
|
||||||
put_16 (big_endian, 0, d->data);
|
put_16 (big_endian, 0, d->data);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
unsigned long sublen;
|
||||||
|
|
||||||
dword_align_bin (&pp, &length);
|
dword_align_bin (&pp, &length);
|
||||||
|
|
||||||
*pp = res_to_bin_rcdata (dc->data, big_endian);
|
*pp = res_to_bin_rcdata (dc->data, big_endian);
|
||||||
|
sublen = 0;
|
||||||
while (*pp != NULL)
|
while (*pp != NULL)
|
||||||
{
|
{
|
||||||
length += (*pp)->length;
|
sublen += (*pp)->length;
|
||||||
pp = &(*pp)->next;
|
pp = &(*pp)->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
put_16 (big_endian, sublen, d->data);
|
||||||
|
|
||||||
|
length += sublen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -124,6 +124,9 @@ read_coff_rsrc (filename, target)
|
||||||
bfd_byte *data;
|
bfd_byte *data;
|
||||||
struct coff_file_info finfo;
|
struct coff_file_info finfo;
|
||||||
|
|
||||||
|
if (filename == NULL)
|
||||||
|
fatal (_("filename required for COFF input"));
|
||||||
|
|
||||||
abfd = bfd_openr (filename, target);
|
abfd = bfd_openr (filename, target);
|
||||||
if (abfd == NULL)
|
if (abfd == NULL)
|
||||||
bfd_fatal (filename);
|
bfd_fatal (filename);
|
||||||
|
@ -139,7 +142,7 @@ read_coff_rsrc (filename, target)
|
||||||
sec = bfd_get_section_by_name (abfd, ".rsrc");
|
sec = bfd_get_section_by_name (abfd, ".rsrc");
|
||||||
if (sec == NULL)
|
if (sec == NULL)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "%s: %s: no resource section\n", program_name,
|
fprintf (stderr, _("%s: %s: no resource section\n"), program_name,
|
||||||
filename);
|
filename);
|
||||||
xexit (1);
|
xexit (1);
|
||||||
}
|
}
|
||||||
|
@ -148,7 +151,7 @@ read_coff_rsrc (filename, target)
|
||||||
data = (bfd_byte *) res_alloc (size);
|
data = (bfd_byte *) res_alloc (size);
|
||||||
|
|
||||||
if (! bfd_get_section_contents (abfd, sec, data, 0, size))
|
if (! bfd_get_section_contents (abfd, sec, data, 0, size))
|
||||||
bfd_fatal ("can't read resource section");
|
bfd_fatal (_("can't read resource section"));
|
||||||
|
|
||||||
finfo.filename = filename;
|
finfo.filename = filename;
|
||||||
finfo.data = data;
|
finfo.data = data;
|
||||||
|
@ -174,7 +177,7 @@ overrun (finfo, msg)
|
||||||
const struct coff_file_info *finfo;
|
const struct coff_file_info *finfo;
|
||||||
const char *msg;
|
const char *msg;
|
||||||
{
|
{
|
||||||
fatal ("%s: %s: address out of bounds", finfo->filename, msg);
|
fatal (_("%s: %s: address out of bounds"), finfo->filename, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read a resource directory. */
|
/* Read a resource directory. */
|
||||||
|
@ -192,8 +195,8 @@ read_coff_res_dir (data, finfo, type, level)
|
||||||
struct res_entry **pp;
|
struct res_entry **pp;
|
||||||
const struct extern_res_entry *ere;
|
const struct extern_res_entry *ere;
|
||||||
|
|
||||||
if (finfo->data_end - data < sizeof (struct extern_res_directory))
|
if ((size_t) (finfo->data_end - data) < sizeof (struct extern_res_directory))
|
||||||
overrun (finfo, "directory");
|
overrun (finfo, _("directory"));
|
||||||
|
|
||||||
erd = (const struct extern_res_directory *) data;
|
erd = (const struct extern_res_directory *) data;
|
||||||
|
|
||||||
|
@ -221,7 +224,7 @@ read_coff_res_dir (data, finfo, type, level)
|
||||||
int length, j;
|
int length, j;
|
||||||
|
|
||||||
if ((const bfd_byte *) ere >= finfo->data_end)
|
if ((const bfd_byte *) ere >= finfo->data_end)
|
||||||
overrun (finfo, "named directory entry");
|
overrun (finfo, _("named directory entry"));
|
||||||
|
|
||||||
name = getfi_32 (finfo, ere->name);
|
name = getfi_32 (finfo, ere->name);
|
||||||
rva = getfi_32 (finfo, ere->rva);
|
rva = getfi_32 (finfo, ere->rva);
|
||||||
|
@ -229,8 +232,8 @@ read_coff_res_dir (data, finfo, type, level)
|
||||||
/* For some reason the high bit in NAME is set. */
|
/* For some reason the high bit in NAME is set. */
|
||||||
name &=~ 0x80000000;
|
name &=~ 0x80000000;
|
||||||
|
|
||||||
if (name > finfo->data_end - finfo->data)
|
if (name > (size_t) (finfo->data_end - finfo->data))
|
||||||
overrun (finfo, "directory entry name");
|
overrun (finfo, _("directory entry name"));
|
||||||
|
|
||||||
ers = finfo->data + name;
|
ers = finfo->data + name;
|
||||||
|
|
||||||
|
@ -249,16 +252,16 @@ read_coff_res_dir (data, finfo, type, level)
|
||||||
if ((rva & 0x80000000) != 0)
|
if ((rva & 0x80000000) != 0)
|
||||||
{
|
{
|
||||||
rva &=~ 0x80000000;
|
rva &=~ 0x80000000;
|
||||||
if (rva >= finfo->data_end - finfo->data)
|
if (rva >= (size_t) (finfo->data_end - finfo->data))
|
||||||
overrun (finfo, "named subdirectory");
|
overrun (finfo, _("named subdirectory"));
|
||||||
re->subdir = 1;
|
re->subdir = 1;
|
||||||
re->u.dir = read_coff_res_dir (finfo->data + rva, finfo, type,
|
re->u.dir = read_coff_res_dir (finfo->data + rva, finfo, type,
|
||||||
level + 1);
|
level + 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (rva >= finfo->data_end - finfo->data)
|
if (rva >= (size_t) (finfo->data_end - finfo->data))
|
||||||
overrun (finfo, "named resource");
|
overrun (finfo, _("named resource"));
|
||||||
re->subdir = 0;
|
re->subdir = 0;
|
||||||
re->u.res = read_coff_data_entry (finfo->data + rva, finfo, type);
|
re->u.res = read_coff_data_entry (finfo->data + rva, finfo, type);
|
||||||
}
|
}
|
||||||
|
@ -273,7 +276,7 @@ read_coff_res_dir (data, finfo, type, level)
|
||||||
struct res_entry *re;
|
struct res_entry *re;
|
||||||
|
|
||||||
if ((const bfd_byte *) ere >= finfo->data_end)
|
if ((const bfd_byte *) ere >= finfo->data_end)
|
||||||
overrun (finfo, "ID directory entry");
|
overrun (finfo, _("ID directory entry"));
|
||||||
|
|
||||||
name = getfi_32 (finfo, ere->name);
|
name = getfi_32 (finfo, ere->name);
|
||||||
rva = getfi_32 (finfo, ere->rva);
|
rva = getfi_32 (finfo, ere->rva);
|
||||||
|
@ -289,16 +292,16 @@ read_coff_res_dir (data, finfo, type, level)
|
||||||
if ((rva & 0x80000000) != 0)
|
if ((rva & 0x80000000) != 0)
|
||||||
{
|
{
|
||||||
rva &=~ 0x80000000;
|
rva &=~ 0x80000000;
|
||||||
if (rva >= finfo->data_end - finfo->data)
|
if (rva >= (size_t) (finfo->data_end - finfo->data))
|
||||||
overrun (finfo, "ID subdirectory");
|
overrun (finfo, _("ID subdirectory"));
|
||||||
re->subdir = 1;
|
re->subdir = 1;
|
||||||
re->u.dir = read_coff_res_dir (finfo->data + rva, finfo, type,
|
re->u.dir = read_coff_res_dir (finfo->data + rva, finfo, type,
|
||||||
level + 1);
|
level + 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (rva >= finfo->data_end - finfo->data)
|
if (rva >= (size_t) (finfo->data_end - finfo->data))
|
||||||
overrun (finfo, "ID resource");
|
overrun (finfo, _("ID resource"));
|
||||||
re->subdir = 0;
|
re->subdir = 0;
|
||||||
re->u.res = read_coff_data_entry (finfo->data + rva, finfo, type);
|
re->u.res = read_coff_data_entry (finfo->data + rva, finfo, type);
|
||||||
}
|
}
|
||||||
|
@ -324,23 +327,23 @@ read_coff_data_entry (data, finfo, type)
|
||||||
const bfd_byte *resdata;
|
const bfd_byte *resdata;
|
||||||
|
|
||||||
if (type == NULL)
|
if (type == NULL)
|
||||||
fatal ("resource type unknown");
|
fatal (_("resource type unknown"));
|
||||||
|
|
||||||
if (finfo->data_end - data < sizeof (struct extern_res_data))
|
if ((size_t) (finfo->data_end - data) < sizeof (struct extern_res_data))
|
||||||
overrun (finfo, "data entry");
|
overrun (finfo, _("data entry"));
|
||||||
|
|
||||||
erd = (const struct extern_res_data *) data;
|
erd = (const struct extern_res_data *) data;
|
||||||
|
|
||||||
size = getfi_32 (finfo, erd->size);
|
size = getfi_32 (finfo, erd->size);
|
||||||
rva = getfi_32 (finfo, erd->rva);
|
rva = getfi_32 (finfo, erd->rva);
|
||||||
if (rva < finfo->secaddr
|
if (rva < finfo->secaddr
|
||||||
|| rva - finfo->secaddr >= finfo->data_end - finfo->data)
|
|| rva - finfo->secaddr >= (size_t) (finfo->data_end - finfo->data))
|
||||||
overrun (finfo, "resource data");
|
overrun (finfo, _("resource data"));
|
||||||
|
|
||||||
resdata = finfo->data + (rva - finfo->secaddr);
|
resdata = finfo->data + (rva - finfo->secaddr);
|
||||||
|
|
||||||
if (size > finfo->data_end - resdata)
|
if (size > (size_t) (finfo->data_end - resdata))
|
||||||
overrun (finfo, "resource data size");
|
overrun (finfo, _("resource data size"));
|
||||||
|
|
||||||
r = bin_to_res (*type, resdata, size, finfo->big_endian);
|
r = bin_to_res (*type, resdata, size, finfo->big_endian);
|
||||||
|
|
||||||
|
@ -422,7 +425,6 @@ static void coff_res_to_bin
|
||||||
would require doing the basic work of objcopy, just modifying or
|
would require doing the basic work of objcopy, just modifying or
|
||||||
adding the .rsrc section. */
|
adding the .rsrc section. */
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
write_coff_file (filename, target, resources)
|
write_coff_file (filename, target, resources)
|
||||||
const char *filename;
|
const char *filename;
|
||||||
|
@ -435,6 +437,9 @@ write_coff_file (filename, target, resources)
|
||||||
struct bindata *d;
|
struct bindata *d;
|
||||||
unsigned long length, offset;
|
unsigned long length, offset;
|
||||||
|
|
||||||
|
if (filename == NULL)
|
||||||
|
fatal (_("filename required for COFF output"));
|
||||||
|
|
||||||
abfd = bfd_openw (filename, target);
|
abfd = bfd_openw (filename, target);
|
||||||
if (abfd == NULL)
|
if (abfd == NULL)
|
||||||
bfd_fatal (filename);
|
bfd_fatal (filename);
|
||||||
|
@ -721,7 +726,7 @@ coff_res_to_bin (res, cwi)
|
||||||
r->addend = 0;
|
r->addend = 0;
|
||||||
r->howto = bfd_reloc_type_lookup (cwi->abfd, BFD_RELOC_RVA);
|
r->howto = bfd_reloc_type_lookup (cwi->abfd, BFD_RELOC_RVA);
|
||||||
if (r->howto == NULL)
|
if (r->howto == NULL)
|
||||||
bfd_fatal ("can't get BFD_RELOC_RVA relocation type");
|
bfd_fatal (_("can't get BFD_RELOC_RVA relocation type"));
|
||||||
|
|
||||||
cwi->relocs = xrealloc (cwi->relocs,
|
cwi->relocs = xrealloc (cwi->relocs,
|
||||||
(cwi->reloc_count + 2) * sizeof (arelent *));
|
(cwi->reloc_count + 2) * sizeof (arelent *));
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
/* This is the header file for the windres program. It defines
|
/* This is the header file for the windres program. It defines
|
||||||
structures and declares functions used within the program. */
|
structures and declares functions used within the program. */
|
||||||
|
|
||||||
|
#include "winduni.h"
|
||||||
|
|
||||||
/* We represent resources internally as a tree, similar to the tree
|
/* We represent resources internally as a tree, similar to the tree
|
||||||
used in the .rsrc section of a COFF file. The root is a
|
used in the .rsrc section of a COFF file. The root is a
|
||||||
res_directory structure. */
|
res_directory structure. */
|
||||||
|
@ -55,9 +57,9 @@ struct res_id
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
/* Length of the name. */
|
/* Length of the name. */
|
||||||
unsigned short length;
|
int length;
|
||||||
/* Pointer to the name, which is a Unicode string. */
|
/* Pointer to the name, which is a Unicode string. */
|
||||||
unsigned short *name;
|
unichar *name;
|
||||||
} n;
|
} n;
|
||||||
/* If the named field is zero, this is the ID. */
|
/* If the named field is zero, this is the ID. */
|
||||||
unsigned long id;
|
unsigned long id;
|
||||||
|
@ -162,7 +164,7 @@ struct res_resource
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
unsigned long length;
|
unsigned long length;
|
||||||
unsigned char *data;
|
const unsigned char *data;
|
||||||
} data;
|
} data;
|
||||||
struct accelerator *acc;
|
struct accelerator *acc;
|
||||||
struct cursor *cursor;
|
struct cursor *cursor;
|
||||||
|
@ -170,10 +172,10 @@ struct res_resource
|
||||||
struct dialog *dialog;
|
struct dialog *dialog;
|
||||||
struct fontdir *fontdir;
|
struct fontdir *fontdir;
|
||||||
struct group_icon *group_icon;
|
struct group_icon *group_icon;
|
||||||
struct menuitem *menu;
|
struct menu *menu;
|
||||||
struct rcdata_data *rcdata;
|
struct rcdata_item *rcdata;
|
||||||
struct stringtable *stringtable;
|
struct stringtable *stringtable;
|
||||||
struct rcdata_data *userdata;
|
struct rcdata_item *userdata;
|
||||||
struct versioninfo *versioninfo;
|
struct versioninfo *versioninfo;
|
||||||
} u;
|
} u;
|
||||||
/* Information from a res file. */
|
/* Information from a res file. */
|
||||||
|
@ -200,15 +202,15 @@ struct res_resource
|
||||||
#define RT_STRING 6
|
#define RT_STRING 6
|
||||||
#define RT_FONTDIR 7
|
#define RT_FONTDIR 7
|
||||||
#define RT_FONT 8
|
#define RT_FONT 8
|
||||||
#define RT_ACCELERATORS 9
|
#define RT_ACCELERATOR 9
|
||||||
#define RT_RCDATA 10
|
#define RT_RCDATA 10
|
||||||
#define RT_MESSAGETABLE 11
|
#define RT_MESSAGETABLE 11
|
||||||
#define RT_GROUP_CURSOR 12
|
#define RT_GROUP_CURSOR 12
|
||||||
#define RT_GROUP_ICON 14
|
#define RT_GROUP_ICON 14
|
||||||
#define RT_VERSION 16
|
#define RT_VERSION 16
|
||||||
#define RT_DLGINCLUDE 17
|
#define RT_DLGINCLUDE 17
|
||||||
#define RT_PLUGPLAY 18
|
#define RT_PLUGPLAY 19
|
||||||
#define RT_VXD 19
|
#define RT_VXD 20
|
||||||
#define RT_ANICURSOR 21
|
#define RT_ANICURSOR 21
|
||||||
#define RT_ANIICON 22
|
#define RT_ANIICON 22
|
||||||
|
|
||||||
|
@ -247,7 +249,7 @@ struct cursor
|
||||||
/* Length of bitmap data. */
|
/* Length of bitmap data. */
|
||||||
unsigned long length;
|
unsigned long length;
|
||||||
/* Data. */
|
/* Data. */
|
||||||
unsigned char *data;
|
const unsigned char *data;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* A group_cursor resource is a list of group_cursor structures. */
|
/* A group_cursor resource is a list of group_cursor structures. */
|
||||||
|
@ -291,11 +293,11 @@ struct dialog
|
||||||
/* Class name. */
|
/* Class name. */
|
||||||
struct res_id class;
|
struct res_id class;
|
||||||
/* Caption. */
|
/* Caption. */
|
||||||
char *caption;
|
unichar *caption;
|
||||||
/* Font point size. */
|
/* Font point size. */
|
||||||
unsigned short pointsize;
|
unsigned short pointsize;
|
||||||
/* Font name. */
|
/* Font name. */
|
||||||
char *font;
|
unichar *font;
|
||||||
/* Extended information for a dialogex. */
|
/* Extended information for a dialogex. */
|
||||||
struct dialog_ex *ex;
|
struct dialog_ex *ex;
|
||||||
/* Controls. */
|
/* Controls. */
|
||||||
|
@ -491,7 +493,7 @@ struct dialog_control
|
||||||
/* Associated text. */
|
/* Associated text. */
|
||||||
struct res_id text;
|
struct res_id text;
|
||||||
/* Extra data for the window procedure. */
|
/* Extra data for the window procedure. */
|
||||||
struct rcdata_data *data;
|
struct rcdata_item *data;
|
||||||
/* Help ID. Only used in an extended dialog. */
|
/* Help ID. Only used in an extended dialog. */
|
||||||
unsigned long help;
|
unsigned long help;
|
||||||
};
|
};
|
||||||
|
@ -516,7 +518,7 @@ struct fontdir
|
||||||
/* Length of font information. */
|
/* Length of font information. */
|
||||||
unsigned long length;
|
unsigned long length;
|
||||||
/* Font information. */
|
/* Font information. */
|
||||||
unsigned char *data;
|
const unsigned char *data;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* A group_icon resource is a list of group_icon structures. */
|
/* A group_icon resource is a list of group_icon structures. */
|
||||||
|
@ -541,6 +543,17 @@ struct group_icon
|
||||||
unsigned short index;
|
unsigned short index;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* A menu resource. */
|
||||||
|
|
||||||
|
struct menu
|
||||||
|
{
|
||||||
|
/* List of menuitems. */
|
||||||
|
struct menuitem *items;
|
||||||
|
/* Help ID. I don't think there is any way to set this in an rc
|
||||||
|
file, but it can appear in the binary format. */
|
||||||
|
unsigned long help;
|
||||||
|
};
|
||||||
|
|
||||||
/* A menu resource is a list of menuitem structures. */
|
/* A menu resource is a list of menuitem structures. */
|
||||||
|
|
||||||
struct menuitem
|
struct menuitem
|
||||||
|
@ -554,8 +567,8 @@ struct menuitem
|
||||||
unsigned long state;
|
unsigned long state;
|
||||||
/* Id. */
|
/* Id. */
|
||||||
unsigned short id;
|
unsigned short id;
|
||||||
/* Text. */
|
/* Unicode text. */
|
||||||
char *text;
|
unichar *text;
|
||||||
/* Popup menu items for a popup. */
|
/* Popup menu items for a popup. */
|
||||||
struct menuitem *popup;
|
struct menuitem *popup;
|
||||||
/* Help ID. This is only used in a menuex. */
|
/* Help ID. This is only used in a menuex. */
|
||||||
|
@ -573,19 +586,11 @@ struct menuitem
|
||||||
#define MENUITEM_POPUP 0x010
|
#define MENUITEM_POPUP 0x010
|
||||||
#define MENUITEM_MENUBARBREAK 0x020
|
#define MENUITEM_MENUBARBREAK 0x020
|
||||||
#define MENUITEM_MENUBREAK 0x040
|
#define MENUITEM_MENUBREAK 0x040
|
||||||
|
#define MENUITEM_ENDMENU 0x080
|
||||||
#define MENUITEM_HELP 0x4000
|
#define MENUITEM_HELP 0x4000
|
||||||
|
|
||||||
/* An rcdata resource is a pointer to an rcdata_data structure. */
|
/* An rcdata resource is a pointer to a list of rcdata_item
|
||||||
|
structures. */
|
||||||
struct rcdata_data
|
|
||||||
{
|
|
||||||
/* First data item. */
|
|
||||||
struct rcdata_item *first;
|
|
||||||
/* Last data item. */
|
|
||||||
struct rcdata_item *last;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* For an rcdata resource we keep a list of rcdata_item structures. */
|
|
||||||
|
|
||||||
struct rcdata_item
|
struct rcdata_item
|
||||||
{
|
{
|
||||||
|
@ -604,12 +609,20 @@ struct rcdata_item
|
||||||
{
|
{
|
||||||
unsigned int word;
|
unsigned int word;
|
||||||
unsigned long dword;
|
unsigned long dword;
|
||||||
char *string;
|
|
||||||
unsigned short *wstring;
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
unsigned long length;
|
unsigned long length;
|
||||||
unsigned char *data;
|
const char *s;
|
||||||
|
} string;
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
unsigned long length;
|
||||||
|
const unichar *w;
|
||||||
|
} wstring;
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
unsigned long length;
|
||||||
|
const unsigned char *data;
|
||||||
} buffer;
|
} buffer;
|
||||||
} u;
|
} u;
|
||||||
};
|
};
|
||||||
|
@ -622,9 +635,9 @@ struct stringtable
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
/* Length of string. */
|
/* Length of string. */
|
||||||
unsigned short length;
|
int length;
|
||||||
/* String data if length > 0. */
|
/* String data if length > 0. */
|
||||||
unsigned short *string;
|
unichar *string;
|
||||||
} strings[16];
|
} strings[16];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -677,7 +690,7 @@ struct ver_info
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
/* Language. */
|
/* Language. */
|
||||||
unsigned short *language;
|
unichar *language;
|
||||||
/* Strings. */
|
/* Strings. */
|
||||||
struct ver_stringinfo *strings;
|
struct ver_stringinfo *strings;
|
||||||
} string;
|
} string;
|
||||||
|
@ -685,7 +698,7 @@ struct ver_info
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
/* Key. */
|
/* Key. */
|
||||||
unsigned short *key;
|
unichar *key;
|
||||||
/* Values. */
|
/* Values. */
|
||||||
struct ver_varinfo *var;
|
struct ver_varinfo *var;
|
||||||
} var;
|
} var;
|
||||||
|
@ -699,9 +712,9 @@ struct ver_stringinfo
|
||||||
/* Next string. */
|
/* Next string. */
|
||||||
struct ver_stringinfo *next;
|
struct ver_stringinfo *next;
|
||||||
/* Key. */
|
/* Key. */
|
||||||
unsigned short *key;
|
unichar *key;
|
||||||
/* Value. */
|
/* Value. */
|
||||||
unsigned short *value;
|
unichar *value;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* A list of variable version information. */
|
/* A list of variable version information. */
|
||||||
|
@ -716,6 +729,19 @@ struct ver_varinfo
|
||||||
unsigned short charset;
|
unsigned short charset;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* This structure is used when converting resource information to
|
||||||
|
binary. */
|
||||||
|
|
||||||
|
struct bindata
|
||||||
|
{
|
||||||
|
/* Next data. */
|
||||||
|
struct bindata *next;
|
||||||
|
/* Length of data. */
|
||||||
|
unsigned long length;
|
||||||
|
/* Data. */
|
||||||
|
unsigned char *data;
|
||||||
|
};
|
||||||
|
|
||||||
/* Function declarations. */
|
/* Function declarations. */
|
||||||
|
|
||||||
extern struct res_directory *read_rc_file
|
extern struct res_directory *read_rc_file
|
||||||
|
@ -730,9 +756,16 @@ extern void write_res_file
|
||||||
extern void write_coff_file
|
extern void write_coff_file
|
||||||
PARAMS ((const char *, const char *, const struct res_directory *));
|
PARAMS ((const char *, const char *, const struct res_directory *));
|
||||||
|
|
||||||
|
extern struct res_resource *bin_to_res
|
||||||
|
PARAMS ((struct res_id, const unsigned char *, unsigned long, int));
|
||||||
|
extern struct bindata *res_to_bin PARAMS ((const struct res_resource *, int));
|
||||||
|
|
||||||
extern FILE *open_file_search
|
extern FILE *open_file_search
|
||||||
PARAMS ((const char *, const char *, const char *, char **));
|
PARAMS ((const char *, const char *, const char *, char **));
|
||||||
|
|
||||||
|
extern PTR res_alloc PARAMS ((size_t));
|
||||||
|
extern PTR reswr_alloc PARAMS ((size_t));
|
||||||
|
|
||||||
/* Resource ID handling. */
|
/* Resource ID handling. */
|
||||||
|
|
||||||
extern int res_id_cmp PARAMS ((struct res_id, struct res_id));
|
extern int res_id_cmp PARAMS ((struct res_id, struct res_id));
|
||||||
|
@ -740,12 +773,6 @@ extern void res_id_print PARAMS ((FILE *, struct res_id, int));
|
||||||
extern void res_ids_print PARAMS ((FILE *, int, const struct res_id *));
|
extern void res_ids_print PARAMS ((FILE *, int, const struct res_id *));
|
||||||
extern void res_string_to_id PARAMS ((struct res_id *, const char *));
|
extern void res_string_to_id PARAMS ((struct res_id *, const char *));
|
||||||
|
|
||||||
/* Unicode support. */
|
|
||||||
|
|
||||||
extern void unicode_from_ascii
|
|
||||||
PARAMS ((unsigned short *, unsigned short **, const char *));
|
|
||||||
extern void unicode_print PARAMS ((FILE *, const unsigned short *, int));
|
|
||||||
|
|
||||||
/* Manipulation of the resource tree. */
|
/* Manipulation of the resource tree. */
|
||||||
|
|
||||||
extern struct res_resource *define_resource
|
extern struct res_resource *define_resource
|
||||||
|
@ -754,7 +781,7 @@ extern struct res_resource *define_standard_resource
|
||||||
PARAMS ((struct res_directory **, int, struct res_id, int, int));
|
PARAMS ((struct res_directory **, int, struct res_id, int, int));
|
||||||
|
|
||||||
extern int extended_dialog PARAMS ((const struct dialog *));
|
extern int extended_dialog PARAMS ((const struct dialog *));
|
||||||
extern int extended_menu PARAMS ((const struct menuitem *));
|
extern int extended_menu PARAMS ((const struct menu *));
|
||||||
|
|
||||||
/* Communication between the rc file support and the parser and lexer. */
|
/* Communication between the rc file support and the parser and lexer. */
|
||||||
|
|
||||||
|
@ -767,6 +794,9 @@ extern int yylex PARAMS ((void));
|
||||||
extern void yyerror PARAMS ((const char *));
|
extern void yyerror PARAMS ((const char *));
|
||||||
extern void rcparse_warning PARAMS ((const char *));
|
extern void rcparse_warning PARAMS ((const char *));
|
||||||
extern void rcparse_set_language PARAMS ((int));
|
extern void rcparse_set_language PARAMS ((int));
|
||||||
|
extern void rcparse_discard_strings PARAMS ((void));
|
||||||
|
extern void rcparse_rcdata PARAMS ((void));
|
||||||
|
extern void rcparse_normal PARAMS ((void));
|
||||||
|
|
||||||
extern void define_accelerator
|
extern void define_accelerator
|
||||||
PARAMS ((struct res_id, const struct res_res_info *, struct accelerator *));
|
PARAMS ((struct res_id, const struct res_res_info *, struct accelerator *));
|
||||||
|
@ -777,7 +807,7 @@ extern void define_cursor
|
||||||
extern void define_dialog
|
extern void define_dialog
|
||||||
PARAMS ((struct res_id, const struct res_res_info *, const struct dialog *));
|
PARAMS ((struct res_id, const struct res_res_info *, const struct dialog *));
|
||||||
extern struct dialog_control *define_control
|
extern struct dialog_control *define_control
|
||||||
PARAMS ((char *, unsigned long, unsigned long, unsigned long,
|
PARAMS ((const char *, unsigned long, unsigned long, unsigned long,
|
||||||
unsigned long, unsigned long, unsigned long, unsigned long,
|
unsigned long, unsigned long, unsigned long, unsigned long,
|
||||||
unsigned long));
|
unsigned long));
|
||||||
extern void define_font
|
extern void define_font
|
||||||
|
@ -787,23 +817,20 @@ extern void define_icon
|
||||||
extern void define_menu
|
extern void define_menu
|
||||||
PARAMS ((struct res_id, const struct res_res_info *, struct menuitem *));
|
PARAMS ((struct res_id, const struct res_res_info *, struct menuitem *));
|
||||||
extern struct menuitem *define_menuitem
|
extern struct menuitem *define_menuitem
|
||||||
PARAMS ((char *, int, unsigned long, unsigned long, unsigned long,
|
PARAMS ((const char *, int, unsigned long, unsigned long, unsigned long,
|
||||||
struct menuitem *));
|
struct menuitem *));
|
||||||
extern void define_messagetable
|
extern void define_messagetable
|
||||||
PARAMS ((struct res_id, const struct res_res_info *, const char *));
|
PARAMS ((struct res_id, const struct res_res_info *, const char *));
|
||||||
extern void define_rcdata
|
extern void define_rcdata
|
||||||
PARAMS ((struct res_id, const struct res_res_info *, struct rcdata_data *));
|
PARAMS ((struct res_id, const struct res_res_info *, struct rcdata_item *));
|
||||||
extern struct rcdata_data *append_rcdata_item
|
extern struct rcdata_item *define_rcdata_string
|
||||||
PARAMS ((struct rcdata_data *, struct rcdata_item *));
|
PARAMS ((const char *, unsigned long));
|
||||||
extern struct rcdata_data *append_rcdata_string
|
extern struct rcdata_item *define_rcdata_number PARAMS ((unsigned long, int));
|
||||||
PARAMS ((struct rcdata_data *, char *));
|
|
||||||
extern struct rcdata_data *append_rcdata_number
|
|
||||||
PARAMS ((struct rcdata_data *, unsigned long, int));
|
|
||||||
extern void define_stringtable
|
extern void define_stringtable
|
||||||
PARAMS ((const struct res_res_info *, unsigned long, char *));
|
PARAMS ((const struct res_res_info *, unsigned long, const char *));
|
||||||
extern void define_user_data
|
extern void define_user_data
|
||||||
PARAMS ((struct res_id, struct res_id, const struct res_res_info *,
|
PARAMS ((struct res_id, struct res_id, const struct res_res_info *,
|
||||||
struct rcdata_data *));
|
struct rcdata_item *));
|
||||||
extern void define_user_file
|
extern void define_user_file
|
||||||
PARAMS ((struct res_id, struct res_id, const struct res_res_info *,
|
PARAMS ((struct res_id, struct res_id, const struct res_res_info *,
|
||||||
const char *));
|
const char *));
|
||||||
|
@ -811,10 +838,10 @@ extern void define_versioninfo
|
||||||
PARAMS ((struct res_id, int, struct fixed_versioninfo *,
|
PARAMS ((struct res_id, int, struct fixed_versioninfo *,
|
||||||
struct ver_info *));
|
struct ver_info *));
|
||||||
extern struct ver_info *append_ver_stringfileinfo
|
extern struct ver_info *append_ver_stringfileinfo
|
||||||
PARAMS ((struct ver_info *, char *, struct ver_stringinfo *));
|
PARAMS ((struct ver_info *, const char *, struct ver_stringinfo *));
|
||||||
extern struct ver_info *append_ver_varfileinfo
|
extern struct ver_info *append_ver_varfileinfo
|
||||||
PARAMS ((struct ver_info *, char *, struct ver_varinfo *));
|
PARAMS ((struct ver_info *, const char *, struct ver_varinfo *));
|
||||||
extern struct ver_stringinfo *append_verval
|
extern struct ver_stringinfo *append_verval
|
||||||
PARAMS ((struct ver_stringinfo *, char *, char *));
|
PARAMS ((struct ver_stringinfo *, const char *, const char *));
|
||||||
extern struct ver_varinfo *append_vertrans
|
extern struct ver_varinfo *append_vertrans
|
||||||
PARAMS ((struct ver_varinfo *, unsigned long, unsigned long));
|
PARAMS ((struct ver_varinfo *, unsigned long, unsigned long));
|
||||||
|
|
Loading…
Reference in New Issue