Increment, Decrement, and Assignment Operators
Stephen Leibowitz
librestephen at gmail.com
Tue May 28 16:43:09 CDT 2013
Hello:
This is my first patch. The changes are minor. If it works out, I may
attempt something more substantial.
Sincerely,
Stephen Leibowitz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20130528/1c93827a/attachment-0001.html>
-------------- next part --------------
diff U3 wine-1.5.31/dlls/mshtml/htmllocation.c wine-1.5.31/dlls/mshtml/htmllocation.c
--- wine-1.5.31/dlls/mshtml/htmllocation.c Fri May 24 14:20:04 2013
+++ wine-1.5.31/dlls/mshtml/htmllocation.c Tue May 28 16:00:44 2013
@@ -206,7 +206,7 @@
url_path[0] = '/';
memcpy(url_path + 1, url.lpszUrlPath, url.dwUrlPathLength * sizeof(WCHAR));
url.lpszUrlPath = url_path;
- url.dwUrlPathLength = url.dwUrlPathLength + 1;
+ ++url.dwUrlPathLength;
}
break;
diff U3 wine-1.5.31/dlls/oleaut32/tests/safearray.c wine-1.5.31/dlls/oleaut32/tests/safearray.c
--- wine-1.5.31/dlls/oleaut32/tests/safearray.c Fri May 24 14:20:04 2013
+++ wine-1.5.31/dlls/oleaut32/tests/safearray.c Tue May 28 16:38:34 2013
@@ -1006,7 +1006,7 @@
indices[2] = sab[2].lLbound;
indices[3] = sab[3].lLbound;
- indices[x] = indices[x] - 1;
+ --indices[x];
hres = SafeArrayPutElement(sa, indices, &value);
ok(hres == DISP_E_BADINDEX, "Put allowed too small index in dimension %d\n", x);
hres = SafeArrayGetElement(sa, indices, &value);
diff U3 wine-1.5.31/dlls/oleaut32/varformat.c wine-1.5.31/dlls/oleaut32/varformat.c
--- wine-1.5.31/dlls/oleaut32/varformat.c Fri May 24 14:20:04 2013
+++ wine-1.5.31/dlls/oleaut32/varformat.c Tue May 28 16:03:07 2013
@@ -1153,7 +1153,7 @@
if (fmt_state & FMT_STATE_OPEN_COPY)
{
- pOut[-1] = pOut[-1] + 1; /* Increase the length of the open copy */
+ ++pOut[-1]; /* Increase the length of the open copy */
TRACE("extend copy (char '%c'), length now %d\n", *pFormat, pOut[-1]);
}
else
diff U3 wine-1.5.31/dlls/riched20/run.c wine-1.5.31/dlls/riched20/run.c
--- wine-1.5.31/dlls/riched20/run.c Fri May 24 14:20:04 2013
+++ wine-1.5.31/dlls/riched20/run.c Tue May 28 16:05:10 2013
@@ -455,7 +455,7 @@
GetTextExtentPoint32W(c->hDC, str, fit, &sz2);
GetTextExtentPoint32W(c->hDC, str, fit + 1, &sz3);
if (cx >= (sz2.cx+sz3.cx)/2)
- fit = fit + 1;
+ ++fit;
}
ME_DestroyString( mask_text );
diff U3 wine-1.5.31/dlls/user32/uitools.c wine-1.5.31/dlls/user32/uitools.c
--- wine-1.5.31/dlls/user32/uitools.c Fri May 24 14:20:04 2013
+++ wine-1.5.31/dlls/user32/uitools.c Tue May 28 16:07:29 2013
@@ -758,7 +758,7 @@
bar.left = myr.left;
bar.top = myr.top + 2;
for (k = 0; k < 7; k++) {
- bar.left = bar.left + 1;
+ ++bar.left;
bar.top = (k < 3) ? bar.top + 1 : bar.top - 1;
bar.bottom = bar.top + 3;
bar.right = bar.left + 1;
diff U3 wine-1.5.31/programs/cmd/batch.c wine-1.5.31/programs/cmd/batch.c
--- wine-1.5.31/programs/cmd/batch.c Fri May 24 14:20:04 2013
+++ wine-1.5.31/programs/cmd/batch.c Tue May 28 16:39:22 2013
@@ -484,7 +484,7 @@
int len = strlenW(outputparam);
if (outputparam[len-1] == '"') {
outputparam[len-1]=0x00;
- len = len - 1;
+ --len;
}
memmove(outputparam, &outputparam[1], (len * sizeof(WCHAR))-1);
}
diff U3 wine-1.5.31/programs/cmd/builtins.c wine-1.5.31/programs/cmd/builtins.c
--- wine-1.5.31/programs/cmd/builtins.c Fri May 24 14:20:04 2013
+++ wine-1.5.31/programs/cmd/builtins.c Tue May 28 16:28:38 2013
@@ -1637,7 +1637,7 @@
pos, sizeof(eolW)/sizeof(WCHAR),
eolW, sizeof(eolW)/sizeof(WCHAR)) == CSTR_EQUAL) {
*eol = *(pos + sizeof(eolW)/sizeof(WCHAR));
- pos = pos + sizeof(eolW)/sizeof(WCHAR) + 1;
+ pos += sizeof(eolW)/sizeof(WCHAR) + 1;
WINE_TRACE("Found eol as %c(%x)\n", *eol, *eol);
/* Save number of lines to skip (Can be in base 10, hex (0x...) or octal (0xx) */
diff U3 wine-1.5.31/programs/cmd/directory.c wine-1.5.31/programs/cmd/directory.c
--- wine-1.5.31/programs/cmd/directory.c Fri May 24 14:20:04 2013
+++ wine-1.5.31/programs/cmd/directory.c Tue May 28 16:40:33 2013
@@ -682,7 +682,7 @@
case 'C': if (negate) separator = !separator;
else separator = TRUE;
break;
- case 'T': p = p + 1;
+ case 'T': ++p;
if (*p==':') p++; /* Skip optional : */
if (*p == 'A') dirTime = Access;
@@ -692,7 +692,7 @@
/* Support /T and /T: with no parms, default to written */
else if (*p == 0x00 || *p == '/') {
dirTime = Written;
- p = p - 1; /* So when step on, move to '/' */
+ --p; /* So when step on, move to '/' */
} else {
SetLastError(ERROR_INVALID_PARAMETER);
WCMD_print_error();
@@ -700,7 +700,7 @@
return;
}
break;
- case 'O': p = p + 1;
+ case 'O': ++p;
if (*p==':') p++; /* Skip optional : */
while (*p && *p != '/') {
WINE_TRACE("Processing subparm '%c' (in %s)\n", *p, wine_dbgstr_w(quals));
@@ -721,9 +721,9 @@
}
p++;
}
- p = p - 1; /* So when step on, move to '/' */
+ --p; /* So when step on, move to '/' */
break;
- case 'A': p = p + 1;
+ case 'A': ++p;
showattrs = 0;
attrsbits = 0;
if (*p==':') p++; /* Skip optional : */
@@ -760,7 +760,7 @@
p++;
}
- p = p - 1; /* So when step on, move to '/' */
+ --p; /* So when step on, move to '/' */
WINE_TRACE("Result: showattrs %x, bits %x\n", showattrs, attrsbits);
break;
default:
@@ -769,7 +769,7 @@
errorlevel = 1;
return;
}
- p = p + 1;
+ ++p;
}
/* Handle conflicting args and initialization */
diff U3 wine-1.5.31/programs/winecfg/driveui.c wine-1.5.31/programs/winecfg/driveui.c
--- wine-1.5.31/programs/winecfg/driveui.c Fri May 24 14:20:04 2013
+++ wine-1.5.31/programs/winecfg/driveui.c Tue May 28 16:41:54 2013
@@ -393,7 +393,7 @@
fill_drives_list(dialog);
- itemIndex = itemIndex - 1;
+ --itemIndex;
if (itemIndex < 0) itemIndex = 0;
lv_set_curr_select(dialog, itemIndex); /* previous item */
More information about the wine-patches
mailing list