another debugstr patch
Andreas Mohr
a.mohr at mailto.de
Sat Jul 14 10:01:27 CDT 2001
Hi all,
fix some more overflowing string traces (assert()s happened during DirectX8
install).
BTW, Alexandre, why didn't you apply my "debugstr patch" from Jun 04 ?
IMHO the assert()s in case of debugstr overflow that exist right now
are pretty darn useless.
My error output at least hints directly at where the problem is.
--
Andreas Mohr Stauferstr. 6, D-71272 Renningen, Germany
-------------- next part --------------
Determining best CVS host...
Using CVSROOT :pserver:cvs at rhlx01.fht-esslingen.de:/home/wine
Index: dlls/user/text.c
===================================================================
RCS file: /home/wine/wine/dlls/user/text.c,v
retrieving revision 1.11
diff -u -r1.11 text.c
--- dlls/user/text.c 2001/07/02 19:59:43 1.11
+++ dlls/user/text.c 2001/07/14 12:58:32
@@ -747,7 +747,7 @@
DWORD WINAPI GetTabbedTextExtentA( HDC hdc, LPCSTR lpstr, INT count,
INT cTabStops, const INT *lpTabPos )
{
- TRACE("%04x '%.*s' %d\n", hdc, count, lpstr, count );
+ TRACE("%04x %s %d\n", hdc, debugstr_an(lpstr,count), count );
return TEXT_TabbedTextOut( hdc, 0, 0, lpstr, count, cTabStops,
NULL, lpTabPos, 0, FALSE );
}
Index: ole/ole2nls.c
===================================================================
RCS file: /home/wine/wine/ole/ole2nls.c,v
retrieving revision 1.91
diff -u -r1.91 ole2nls.c
--- ole/ole2nls.c 2001/07/11 18:56:47 1.91
+++ ole/ole2nls.c 2001/07/14 12:58:34
@@ -1892,11 +1892,12 @@
int i;
TRACE("(0x%04lx,0x%08lx,%s,%d,%p,%d)\n",
- lcid,mapflags,srcstr,srclen,dststr,dstlen);
+ lcid,mapflags,debugstr_an(srcstr,srclen),srclen,dststr,dstlen);
if ( ((dstlen!=0) && (dststr==NULL)) || (srcstr==NULL) )
{
- ERR("(src=%s,dest=%s): Invalid NULL string\n", srcstr, dststr);
+ ERR("(src=%s,dest=%s): Invalid NULL string\n",
+ debugstr_an(srcstr,srclen), dststr);
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
@@ -2470,11 +2471,12 @@
int result;
LPSTR sk1,sk2;
TRACE("%s and %s\n",
- debugstr_a (s1), debugstr_a (s2));
+ debugstr_an (s1,l1), debugstr_an (s2,l2));
if ( (s1==NULL) || (s2==NULL) )
{
- ERR("(s1=%s,s2=%s): Invalid NULL string\n", s1, s2);
+ ERR("(s1=%s,s2=%s): Invalid NULL string\n",
+ debugstr_an(s1,l1), debugstr_an(s2,l2));
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
@@ -3074,10 +3076,10 @@
if (xtime == NULL) {
GetSystemTime(&t);
} else {
- /* Silently correct wDayOfWeek by tranforming to FileTime and back again*/
+ /* Silently correct wDayOfWeek by transforming to FileTime and back again */
res=SystemTimeToFileTime(xtime,&ft);
- /* Check year(?)/month and date for range and set ERROR_INVALID_PARAMETER on error*/
- /*FIXME: SystemTimeToFileTime doesn't yet do that ckeck*/
+ /* Check year(?)/month and date for range and set ERROR_INVALID_PARAMETER on error */
+ /*FIXME: SystemTimeToFileTime doesn't yet do that check */
if(!res)
{
SetLastError(ERROR_INVALID_PARAMETER);
@@ -3575,7 +3577,7 @@
* Description: A number could be formatted using different numbers
* of "digits in group" (example: 4;3;2;0).
* The first parameter of this function is an array
- * containing the rule to be used. It's format is the following:
+ * containing the rule to be used. Its format is the following:
* |NDG|DG1|DG2|...|0|
* where NDG is the number of used "digits in group" and DG1, DG2,
* are the corresponding "digits in group".
@@ -3860,7 +3862,7 @@
LPCWSTR lpvalue, const NUMBERFMTW * lpFormat,
LPWSTR lpNumberStr, int cchNumber)
{
- FIXME("%s: stub, no reformating done\n",debugstr_w(lpvalue));
+ FIXME("%s: stub, no reformatting done\n",debugstr_w(lpvalue));
lstrcpynW( lpNumberStr, lpvalue, cchNumber );
return cchNumber? strlenW( lpNumberStr ) : 0;
@@ -3910,7 +3912,7 @@
switch(used_operation)
{
case USE_LOCALEINFO:
- /* Specific to CURRENCYFMTA*/
+ /* Specific to CURRENCYFMTA */
GetLocaleInfoA(locale, LOCALE_INEGCURR, sNegOrder, sizeof(sNegOrder));
GetLocaleInfoA(locale, LOCALE_ICURRENCY, sPosOrder, sizeof(sPosOrder));
GetLocaleInfoA(locale, LOCALE_SCURRENCY, sCurrencySymbol, sizeof(sCurrencySymbol));
@@ -3919,14 +3921,14 @@
nNegOrder = atoi(sNegOrder);
break;
case USE_PARAMETER:
- /* Specific to CURRENCYFMTA*/
+ /* Specific to CURRENCYFMTA */
nNegOrder = lpFormat->NegativeOrder;
nPosOrder = lpFormat->PositiveOrder;
strcpy(sCurrencySymbol, lpFormat->lpCurrencySymbol);
break;
case USE_SYSTEMDEFAULT:
systemDefaultLCID = GetSystemDefaultLCID();
- /* Specific to CURRENCYFMTA*/
+ /* Specific to CURRENCYFMTA */
GetLocaleInfoA(systemDefaultLCID, LOCALE_INEGCURR, sNegOrder, sizeof(sNegOrder));
GetLocaleInfoA(systemDefaultLCID, LOCALE_ICURRENCY, sPosOrder, sizeof(sPosOrder));
GetLocaleInfoA(systemDefaultLCID, LOCALE_SCURRENCY, sCurrencySymbol, sizeof(sCurrencySymbol));
@@ -4168,7 +4170,7 @@
SYSTEMTIME t;
LPSYSTEMTIME thistime;
LCID thislocale=0;
- DWORD thisflags=LOCALE_STIMEFORMAT; /* standart timeformat */
+ DWORD thisflags=LOCALE_STIMEFORMAT; /* standard timeformat */
INT ret;
TRACE("GetTimeFormat(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",locale,flags,xtime,format,timestr,timelen);
@@ -4176,7 +4178,7 @@
thislocale = OLE2NLS_CheckLocale ( locale );
if (format == NULL)
- { if (flags & LOCALE_NOUSEROVERRIDE) /*use system default*/
+ { if (flags & LOCALE_NOUSEROVERRIDE) /* use system default */
{ thislocale = GetSystemDefaultLCID();
}
GetLocaleInfoA(thislocale, thisflags, format_buf, sizeof(format_buf));
@@ -4186,7 +4188,7 @@
{ thisformat = format;
}
- if (xtime == NULL) /* NULL means use the current local time*/
+ if (xtime == NULL) /* NULL means use the current local time */
{ GetLocalTime(&t);
thistime = &t;
}
@@ -4216,7 +4218,7 @@
SYSTEMTIME t;
LPSYSTEMTIME thistime;
LCID thislocale=0;
- DWORD thisflags=LOCALE_STIMEFORMAT; /* standart timeformat */
+ DWORD thisflags=LOCALE_STIMEFORMAT; /* standard timeformat */
INT ret;
TRACE("GetTimeFormat(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",locale,flags,
@@ -4225,7 +4227,7 @@
thislocale = OLE2NLS_CheckLocale ( locale );
if (format == NULL)
- { if (flags & LOCALE_NOUSEROVERRIDE) /*use system default*/
+ { if (flags & LOCALE_NOUSEROVERRIDE) /* use system default */
{ thislocale = GetSystemDefaultLCID();
}
GetLocaleInfoW(thislocale, thisflags, format_buf, 40);
@@ -4235,7 +4237,7 @@
{ thisformat = format;
}
- if (xtime == NULL) /* NULL means use the current local time*/
+ if (xtime == NULL) /* NULL means use the current local time */
{ GetLocalTime(&t);
thistime = &t;
}
More information about the wine-patches
mailing list