fixed system error messages for FormatMessage()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Changelog
Corrects the alignment of unicode message table strings in wmc, and switched 
to unicode for message strings, so that FormatMessage() now works.

annotation:
wrc seems not to be completely clean, even with this fix:
It can only store unicode strings in message tables, even if wmc doesn't set 
the UNICODE-Flag.


Index: Make.rules.in
===================================================================
RCS file: /home/wine/wine/Make.rules.in,v
retrieving revision 1.130
diff -u -r1.130 Make.rules.in
--- Make.rules.in	2 Oct 2002 02:34:09 -0000	1.130
+++ Make.rules.in	19 Oct 2002 01:45:27 -0000
@@ -117,7 +117,7 @@
 	$(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 $<
Index: tools/wmc/write.c
===================================================================
RCS file: /home/wine/wine/tools/wmc/write.c,v
retrieving revision 1.5
diff -u -r1.5 write.c
--- tools/wmc/write.c	31 May 2002 23:41:00 -0000	1.5
+++ tools/wmc/write.c	19 Oct 2002 01:45:34 -0000
@@ -359,7 +359,10 @@
 				b = 0;
 			}
 		}
-		len = (len + 3) & ~3;
+		if (unicodeout)
+		    len = (len + 1) & ~1;
+		else
+		    len = (len + 3) & ~3;
 		for(; i < len; i++)
 		{
 			*cptr++ = '\\';
@@ -467,7 +471,7 @@
 				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);



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux