Corrected the alignment of unicode message table strings in wmc, and
switched to unicode for message strings, so that FormatMessage() now works.
This commit is contained in:
parent
b3332d74b0
commit
3f44167715
|
@ -117,7 +117,7 @@ LINTS = $(C_SRCS:.c=.ln)
|
|||
$(AS) -o $@ $<
|
||||
|
||||
.mc.mc.rc:
|
||||
$(LDPATH) $(WMC) -i -H /dev/null -o $@ $<
|
||||
$(LDPATH) $(WMC) -i -U -H /dev/null -o $@ $<
|
||||
|
||||
.rc.res:
|
||||
$(LDPATH) $(WRC) $(WRCFLAGS) $(DIVINCL) -o $@ -r $<
|
||||
|
|
|
@ -359,6 +359,9 @@ static char *make_string(WCHAR *uc, int len, int codepage)
|
|||
b = 0;
|
||||
}
|
||||
}
|
||||
if (unicodeout)
|
||||
len = (len + 1) & ~1;
|
||||
else
|
||||
len = (len + 3) & ~3;
|
||||
for(; i < len; i++)
|
||||
{
|
||||
|
@ -467,7 +470,7 @@ static void write_rcinline(FILE *fp)
|
|||
cptr = make_string(blk->msgs[j]->msg, l, unicodeout ? 0 : blk->msgs[j]->cp);
|
||||
fprintf(fp, "\n /* Msg 0x%08x */ 0x%04x, 0x000%c,\n",
|
||||
blk->idlo + j,
|
||||
(unicodeout ? (l*2+3)&~3 : (l+3)&~3)+4,
|
||||
(unicodeout ? (l*2+3)&~3 : (l+3)&~3) + 4,
|
||||
unicodeout ? '1' : '0');
|
||||
fprintf(fp, "%s%s\n", cptr, comma);
|
||||
free(cptr);
|
||||
|
|
Loading…
Reference in New Issue