aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gtk/PlatGTK.cxx42
-rw-r--r--gtk/ScintillaGTK.cxx6
-rw-r--r--src/ExternalLexer.cxx6
-rw-r--r--src/RESearch.cxx22
-rw-r--r--src/RESearch.h4
5 files changed, 40 insertions, 40 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx
index 725c35cae..81c0b2195 100644
--- a/gtk/PlatGTK.cxx
+++ b/gtk/PlatGTK.cxx
@@ -1071,22 +1071,22 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated
guint32 valOutline = *(reinterpret_cast<guint32 *>(pixVal));
guint32 *pixels = reinterpret_cast<guint32 *>(gdk_pixbuf_get_pixels(pixalpha));
int stride = gdk_pixbuf_get_rowstride(pixalpha) / 4;
- for (int y=0; y<height; y++) {
- for (int x=0; x<width; x++) {
- if ((x==0) || (x==width-1) || (y == 0) || (y == height-1)) {
- pixels[y*stride+x] = valOutline;
+ for (int yr=0; yr<height; yr++) {
+ for (int xr=0; xr<width; xr++) {
+ if ((xr==0) || (xr==width-1) || (yr == 0) || (yr == height-1)) {
+ pixels[yr*stride+xr] = valOutline;
} else {
- pixels[y*stride+x] = valFill;
+ pixels[yr*stride+xr] = valFill;
}
}
}
for (int c=0;c<cornerSize; c++) {
- for (int x=0;x<c+1; x++) {
- AllFour(pixels, stride, width, height, x, c-x, valEmpty);
+ for (int xr=0;xr<c+1; xr++) {
+ AllFour(pixels, stride, width, height, xr, c-xr, valEmpty);
}
}
- for (int x=1;x<cornerSize; x++) {
- AllFour(pixels, stride, width, height, x, cornerSize-x, valOutline);
+ for (int xr=1;xr<cornerSize; xr++) {
+ AllFour(pixels, stride, width, height, xr, cornerSize-xr, valOutline);
}
// Draw with alpha
@@ -1246,7 +1246,7 @@ void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, int ybase, const char
ColourAllocated fore) {
PenColour(fore);
if (gc && drawable) {
- int x = rc.left;
+ int xText = rc.left;
#ifdef USE_PANGO
if (PFont(font_)->pfd) {
char *utfForm = 0;
@@ -1271,7 +1271,7 @@ void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, int ybase, const char
}
pango_layout_set_font_description(layout, PFont(font_)->pfd);
PangoLayoutLine *pll = pango_layout_get_line(layout,0);
- gdk_draw_layout_line(drawable, gc, x, ybase, pll);
+ gdk_draw_layout_line(drawable, gc, xText, ybase, pll);
if (useGFree) {
g_free(utfForm);
} else {
@@ -1302,13 +1302,13 @@ void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, int ybase, const char
draw8bit = false;
wctext[wclen] = L'\0';
GdkWChar *wcp = wctext;
- while ((wclen > 0) && (x < maxCoordinate)) {
+ while ((wclen > 0) && (xText < maxCoordinate)) {
int lenDraw = Platform::Minimum(wclen, segmentLength);
gdk_draw_text_wc(drawable, PFont(font_)->pfont, gc,
- x, ybase, wcp, lenDraw);
+ xText, ybase, wcp, lenDraw);
wclen -= lenDraw;
if (wclen > 0) { // Avoid next calculation if possible as may be expensive
- x += gdk_text_width_wc(PFont(font_)->pfont,
+ xText += gdk_text_width_wc(PFont(font_)->pfont,
wcp, lenDraw);
}
wcp += lenDraw;
@@ -1316,13 +1316,13 @@ void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, int ybase, const char
}
}
if (draw8bit) {
- while ((len > 0) && (x < maxCoordinate)) {
+ while ((len > 0) && (xText < maxCoordinate)) {
int lenDraw = Platform::Minimum(len, segmentLength);
gdk_draw_text(drawable, PFont(font_)->pfont, gc,
- x, ybase, s, lenDraw);
+ xText, ybase, s, lenDraw);
len -= lenDraw;
if (len > 0) { // Avoid next calculation if possible as may be expensive
- x += gdk_text_width(PFont(font_)->pfont, s, lenDraw);
+ xText += gdk_text_width(PFont(font_)->pfont, s, lenDraw);
}
s += lenDraw;
}
@@ -1985,7 +1985,7 @@ public:
doubleClickAction = action;
doubleClickActionData = data;
}
- virtual void SetList(const char* list, char separator, char typesep);
+ virtual void SetList(const char *listText, char separator, char typesep);
};
ListBox *ListBox::Allocate() {
@@ -2490,12 +2490,12 @@ void ListBoxX::ClearRegisteredImages() {
xset.Clear();
}
-void ListBoxX::SetList(const char* list, char separator, char typesep) {
+void ListBoxX::SetList(const char *listText, char separator, char typesep) {
Clear();
- int count = strlen(list) + 1;
+ int count = strlen(listText) + 1;
char *words = new char[count];
if (words) {
- memcpy(words, list, count);
+ memcpy(words, listText, count);
char *startword = words;
char *numword = NULL;
int i = 0;
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index cabc1f3f3..0dd0ec9d5 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -1406,10 +1406,10 @@ void ScintillaGTK::ClaimSelection() {
void ScintillaGTK::GetGtkSelectionText(GtkSelectionData *selectionData, SelectionText &selText) {
char *data = reinterpret_cast<char *>(selectionData->data);
int len = selectionData->length;
- GdkAtom selectionType = selectionData->type;
+ GdkAtom selectionTypeData = selectionData->type;
// Return empty string if selection is not a string
- if ((selectionType != GDK_TARGET_STRING) && (selectionType != atomUTF8)) {
+ if ((selectionTypeData != GDK_TARGET_STRING) && (selectionTypeData != atomUTF8)) {
char *empty = new char[1];
empty[0] = '\0';
selText.Set(empty, 0, SC_CP_UTF8, 0, false, false);
@@ -1425,7 +1425,7 @@ void ScintillaGTK::GetGtkSelectionText(GtkSelectionData *selectionData, Selectio
#endif
char *dest;
- if (selectionType == GDK_TARGET_STRING) {
+ if (selectionTypeData == GDK_TARGET_STRING) {
dest = Document::TransformLineEnds(&len, data, len, pdoc->eolMode);
if (IsUnicodeMode()) {
// Unknown encoding so assume in Latin1
diff --git a/src/ExternalLexer.cxx b/src/ExternalLexer.cxx
index 0344debd7..a4e29e314 100644
--- a/src/ExternalLexer.cxx
+++ b/src/ExternalLexer.cxx
@@ -172,13 +172,13 @@ LexerLibrary::~LexerLibrary() {
void LexerLibrary::Release() {
//TODO maintain a list of lexers created, and delete them!
LexerMinder *lm;
- LexerMinder *next;
+ LexerMinder *lmNext;
lm = first;
while (NULL != lm) {
- next = lm->next;
+ lmNext = lm->next;
delete lm->self;
delete lm;
- lm = next;
+ lm = lmNext;
}
first = NULL;
diff --git a/src/RESearch.cxx b/src/RESearch.cxx
index be1d235de..57c745e2d 100644
--- a/src/RESearch.cxx
+++ b/src/RESearch.cxx
@@ -33,7 +33,7 @@
* Interfaces:
* RESearch::Compile: compile a regular expression into a NFA.
*
- * const char *RESearch::Compile(const char *pat, int length,
+ * const char *RESearch::Compile(const char *pattern, int length,
* bool caseSensitive, bool posix)
*
* Returns a short error string if they fail.
@@ -347,13 +347,13 @@ static int GetHexaChar(unsigned char hd1, unsigned char hd2) {
/**
* Called when the parser finds a backslash not followed
* by a valid expression (like \( in non-Posix mode).
- * @param pat: pointer on the char after the backslash.
+ * @param pattern: pointer on the char after the backslash.
* @param incr: (out) number of chars to skip after expression evaluation.
* @return the char if it resolves to a simple char,
* or -1 for a char class. In this case, bittab is changed.
*/
int RESearch::GetBackslashExpression(
- const char *pat,
+ const char *pattern,
int &incr) {
// Since error reporting is primitive and messages are not used anyway,
// I choose to interpret unexpected syntax in a logical way instead
@@ -361,7 +361,7 @@ int RESearch::GetBackslashExpression(
incr = 0; // Most of the time, will skip the char "naturally".
int c;
int result = -1;
- unsigned char bsc = *pat;
+ unsigned char bsc = *pattern;
if (!bsc) {
// Avoid overrun
result = '\\'; // \ at end of pattern, take it literally
@@ -379,8 +379,8 @@ int RESearch::GetBackslashExpression(
result = escapeValue(bsc);
break;
case 'x': {
- unsigned char hd1 = *(pat + 1);
- unsigned char hd2 = *(pat + 2);
+ unsigned char hd1 = *(pattern + 1);
+ unsigned char hd2 = *(pattern + 2);
int hexValue = GetHexaChar(hd1, hd2);
if (hexValue >= 0) {
result = hexValue;
@@ -436,7 +436,7 @@ int RESearch::GetBackslashExpression(
return result;
}
-const char *RESearch::Compile(const char *pat, int length, bool caseSensitive, bool posix) {
+const char *RESearch::Compile(const char *pattern, int length, bool caseSensitive, bool posix) {
char *mp=nfa; /* nfa pointer */
char *lp; /* saved pointer */
char *sp=nfa; /* another one */
@@ -449,14 +449,14 @@ const char *RESearch::Compile(const char *pat, int length, bool caseSensitive, b
char mask; /* xor mask -CCL/NCL */
int c1, c2, prevChar;
- if (!pat || !length)
+ if (!pattern || !length)
if (sta)
return 0;
else
return badpat("No previous regular expression");
sta = NOP;
- const char *p=pat; /* pattern pointer */
+ const char *p=pattern; /* pattern pointer */
for (int i=0; i<length; i++, p++) {
if (mp > mpMax)
return badpat("Pattern too long");
@@ -468,7 +468,7 @@ const char *RESearch::Compile(const char *pat, int length, bool caseSensitive, b
break;
case '^': /* match beginning */
- if (p == pat)
+ if (p == pattern)
*mp++ = BOL;
else {
*mp++ = CHR;
@@ -588,7 +588,7 @@ const char *RESearch::Compile(const char *pat, int length, bool caseSensitive, b
case '*': /* match 0 or more... */
case '+': /* match 1 or more... */
- if (p == pat)
+ if (p == pattern)
return badpat("Empty closure");
lp = sp; /* previous opcode */
if (*lp == CLO) /* equivalence... */
diff --git a/src/RESearch.h b/src/RESearch.h
index 0944fc398..ef8c3e11b 100644
--- a/src/RESearch.h
+++ b/src/RESearch.h
@@ -34,7 +34,7 @@ public:
RESearch(CharClassify *charClassTable);
~RESearch();
bool GrabMatches(CharacterIndexer &ci);
- const char *Compile(const char *pat, int length, bool caseSensitive, bool posix);
+ const char *Compile(const char *pattern, int length, bool caseSensitive, bool posix);
int Execute(CharacterIndexer &ci, int lp, int endp);
int Substitute(CharacterIndexer &ci, char *src, char *dst);
@@ -51,7 +51,7 @@ private:
void Clear();
void ChSet(unsigned char c);
void ChSetWithCase(unsigned char c, bool caseSensitive);
- int GetBackslashExpression(const char *pat, int &incr);
+ int GetBackslashExpression(const char *pattern, int &incr);
int PMatch(CharacterIndexer &ci, int lp, int endp, char *ap);