Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

fogcreek shellext: renamed parameters for consistency, part 2

Changeset 4037f1bffabc

Parent dffce7f97154

by David Golub

Changes to 6 files · Browse files at 4037f1bffabc Showing diff from parent dffce7f97154 Diff from another changeset...

 
132
133
134
135
136
 
 
137
138
139
 
140
141
 
142
143
144
 
147
148
149
150
151
 
 
152
153
154
 
192
193
194
195
 
196
197
198
 
200
201
202
203
204
 
 
205
206
207
208
209
 
210
211
212
 
214
215
216
217
 
218
219
220
221
222
 
223
224
225
 
228
229
230
231
 
232
233
234
235
236
 
237
238
239
240
241
242
 
243
244
245
 
247
248
249
250
251
 
 
252
253
254
255
256
257
 
258
259
260
 
262
263
264
265
 
266
267
268
269
270
 
271
272
273
 
276
277
278
279
 
280
281
282
283
284
285
 
286
287
288
 
306
307
308
309
 
310
311
312
 
313
314
315
 
355
356
357
358
 
359
360
361
 
132
133
134
 
 
135
136
137
138
 
139
140
 
141
142
143
144
 
147
148
149
 
 
150
151
152
153
154
 
192
193
194
 
195
196
197
198
 
200
201
202
 
 
203
204
205
206
207
208
 
209
210
211
212
 
214
215
216
 
217
218
219
220
221
 
222
223
224
225
 
228
229
230
 
231
232
233
234
235
 
236
237
238
239
240
241
 
242
243
244
245
 
247
248
249
 
 
250
251
252
253
254
255
256
 
257
258
259
260
 
262
263
264
 
265
266
267
268
269
 
270
271
272
273
 
276
277
278
 
279
280
281
282
283
284
 
285
286
287
288
 
306
307
308
 
309
310
311
 
312
313
314
315
 
355
356
357
 
358
359
360
361
@@ -132,13 +132,13 @@
 }     -void GetCMenuTranslation(const CString& lang, LPCSTR name, CStringW& menuText, - CStringW& helpText) +void GetCMenuTranslation(const CString& strLang, LPCTSTR lpszName, + CStringW& strMenuText, CStringW& strHelpText)  {   CStringW subkey = L"Software\\TortoiseHg\\CMenu\\"; - subkey += lang; + subkey += strLang;   subkey += L"\\"; - subkey += name; + subkey += lpszName;     ATLTRACE(L"GetCMenuTranslation: '%s'\n", (LPCWSTR)subkey);   @@ -147,8 +147,8 @@
    if (rv == ERROR_SUCCESS && hkey)   { - GetRegSZValueW(hkey, L"menuText", menuText); - GetRegSZValueW(hkey, L"helpText", helpText); + GetRegSZValueW(hkey, L"menuText", strMenuText); + GetRegSZValueW(hkey, L"helpText", strHelpText);   }   else   { @@ -192,7 +192,7 @@
     void InsertMenuItemWithIcon1(HMENU hMenu, UINT indexMenu, UINT idCmd, - const CStringW& menuText, const CString& iconName) + const CStringW& strMenuText, const CString& strIconName)  {   // MFT_STRING is obsolete and should not be used (replaced by MIIM_STRING   // from Win2K onward) @@ -200,13 +200,13 @@
  memset(&mi, 0, sizeof(mi));   mi.cbSize = sizeof(mi);   mi.fMask = MIIM_ID | MIIM_STRING; - mi.dwTypeData = (LPWSTR)(LPCWSTR)menuText; - mi.cch = menuText.GetLength(); + mi.dwTypeData = (LPWSTR)(LPCWSTR)strMenuText; + mi.cch = strMenuText.GetLength();   mi.wID = idCmd;     if (CSysInfo::Instance().IsVistaOrLater())   { - HBITMAP hBmp = GetTortoiseIconBitmap(iconName); + HBITMAP hBmp = GetTortoiseIconBitmap(strIconName);   if (hBmp)   {   mi.fMask |= MIIM_BITMAP; @@ -214,12 +214,12 @@
  }   else   { - ATLTRACE(" ***** InsertMenuItemWithIcon1: can't find '%s'\n", iconName); + ATLTRACE(" ***** InsertMenuItemWithIcon1: can't find '%s'\n", strIconName);   }   }   else   { - HICON h = GetTortoiseIcon(iconName); + HICON h = GetTortoiseIcon(strIconName);   if (h)   {   mi.fMask |= MIIM_BITMAP | MIIM_DATA; @@ -228,18 +228,18 @@
  }   else   { - ATLTRACE(" ***** InsertMenuItemWithIcon1: can't find '%s'\n", iconName); + ATLTRACE(" ***** InsertMenuItemWithIcon1: can't find '%s'\n", strIconName);   }   }   InsertMenuItemW(hMenu, indexMenu, TRUE, &mi);   - ATLTRACE(L"InsertMenuItemWithIcon1('%s') finished\n", menuText); + ATLTRACE(L"InsertMenuItemWithIcon1('%s') finished\n", strMenuText);  }      void InsertSubMenuItemWithIcon2(   HMENU hMenu, HMENU hSubMenu, UINT indexMenu, UINT idCmd, - const CStringW& menuText, const CString& iconName) + const CStringW& strMenuText, const CString& strIconName)  {   // MFT_STRING is obsolete and should not be used (replaced by MIIM_STRING   // from Win2K onward) @@ -247,14 +247,14 @@
  memset(&mi, 0, sizeof(mi));   mi.cbSize = sizeof(mi);   mi.fMask = MIIM_SUBMENU | MIIM_ID | MIIM_STRING; - mi.dwTypeData = (LPWSTR)(LPCWSTR)menuText; - mi.cch = menuText.GetLength(); + mi.dwTypeData = (LPWSTR)(LPCWSTR)strMenuText; + mi.cch = strMenuText.GetLength();   mi.wID = idCmd;   mi.hSubMenu = hSubMenu;     if (CSysInfo::Instance().IsVistaOrLater())   { - HBITMAP hBmp = GetTortoiseIconBitmap(iconName); + HBITMAP hBmp = GetTortoiseIconBitmap(strIconName);   if (hBmp)   {   mi.fMask |= MIIM_BITMAP; @@ -262,12 +262,12 @@
  }   else   { - ATLTRACE(" ***** InsertSubMenuItemWithIcon2: can't find '%s'\n", (LPCTSTR)iconName); + ATLTRACE(" ***** InsertSubMenuItemWithIcon2: can't find '%s'\n", (LPCTSTR)strIconName);   }   }   else   { - HICON h = GetTortoiseIcon(iconName); + HICON h = GetTortoiseIcon(strIconName);   if (h)   {   mi.fMask |= MIIM_BITMAP | MIIM_DATA; @@ -276,13 +276,13 @@
  }   else   { - ATLTRACE(" ***** InsertSubMenuItemWithIcon2: can't find '%s'\n", (LPCTSTR)iconName); + ATLTRACE(" ***** InsertSubMenuItemWithIcon2: can't find '%s'\n", (LPCTSTR)strIconName);   }   }     InsertMenuItemW(hMenu, indexMenu, TRUE, &mi);   - ATLTRACE(L"InsertMenuItemWithIcon2('%s') finished\n", (LPCWSTR)menuText); + ATLTRACE(L"InsertMenuItemWithIcon2('%s') finished\n", (LPCWSTR)strMenuText);  }     @@ -306,10 +306,10 @@
   const LPCWSTR TortoiseHgMenuEntryString = L"TortoiseHg";   -int HasTortoiseMenu(HMENU hMenu, bool& hasmenu) +int HasTortoiseMenu(HMENU hMenu, bool& bHasMenu)  // returns -1 on error, 0 otherwise  { - hasmenu = false; + bHasMenu = false;     const int count = ::GetMenuItemCount(hMenu);   if (count == -1) @@ -355,7 +355,7 @@
  if (strMenuItemText == TortoiseHgMenuEntryString)   {   ATLTRACE("HasTortoiseMenu: FOUND TortoiseHg menu entry\n"); - hasmenu = true; + bHasMenu = true;   return 0;   }   }
 
46
47
48
49
 
50
51
 
52
53
54
 
55
56
57
58
 
 
59
60
61
62
 
63
64
65
66
 
 
67
68
69
 
46
47
48
 
49
50
 
51
52
53
 
54
55
56
 
 
57
58
59
60
61
 
62
63
64
 
 
65
66
67
68
69
@@ -46,24 +46,24 @@
 }     -int SplitBase(const CString& n, CString& base, CString& rest) +int SplitBase(const CString& strPath, CString& strBase, CString& strRest)  { - if (n.IsEmpty()) + if (strPath.IsEmpty())   return 0;   - int x = n.Find('/'); + int x = strPath.Find('/');   if (x == -1)   { - base.Empty(); - rest = n; + strBase.Empty(); + strRest = strPath;   return 1;   }   - if (x == 0 || x == n.GetLength()-1) + if (x == 0 || x == strPath.GetLength()-1)   return 0;   - base = n.Left(x); - rest = n.Mid(x+1); + strBase = strPath.Left(x); + strRest = strPath.Mid(x+1);     return 1;  }
 
23
24
25
26
 
27
28
29
30
 
31
32
 
33
34
35
36
 
 
 
37
38
39
40
41
42
43
44
 
 
45
46
47
 
107
108
109
110
 
111
112
 
113
114
115
 
136
137
138
139
 
140
141
142
 
146
147
148
149
 
150
151
152
 
189
190
191
192
 
193
194
195
 
23
24
25
 
26
27
28
29
 
30
31
 
32
33
 
 
 
34
35
36
37
38
39
40
41
42
 
 
43
44
45
46
47
 
107
108
109
 
110
111
 
112
113
114
115
 
136
137
138
 
139
140
141
142
 
146
147
148
 
149
150
151
152
 
189
190
191
 
192
193
194
195
@@ -23,25 +23,25 @@
 #include "SysInfo.h"    CIconBitmapUtils::CIconBitmapUtils() : - hUxTheme(NULL) + m_hUxTheme(NULL)  {   if (CSysInfo::Instance().IsVistaOrLater())   { - hUxTheme = LoadLibrary(_T("UXTHEME.DLL")); + m_hUxTheme = LoadLibrary(_T("UXTHEME.DLL"));   - if (hUxTheme) + if (m_hUxTheme)   { - pfnGetBufferedPaintBits = (FN_GetBufferedPaintBits)::GetProcAddress(hUxTheme, "GetBufferedPaintBits"); - pfnBeginBufferedPaint = (FN_BeginBufferedPaint)::GetProcAddress(hUxTheme, "BeginBufferedPaint"); - pfnEndBufferedPaint = (FN_EndBufferedPaint)::GetProcAddress(hUxTheme, "EndBufferedPaint"); + m_pfnGetBufferedPaintBits = (FN_GetBufferedPaintBits)::GetProcAddress(m_hUxTheme, "GetBufferedPaintBits"); + m_pfnBeginBufferedPaint = (FN_BeginBufferedPaint)::GetProcAddress(m_hUxTheme, "BeginBufferedPaint"); + m_pfnEndBufferedPaint = (FN_EndBufferedPaint)::GetProcAddress(m_hUxTheme, "EndBufferedPaint");   }   }  }    CIconBitmapUtils::~CIconBitmapUtils()  { - if (hUxTheme) - FreeLibrary(hUxTheme); + if (m_hUxTheme) + FreeLibrary(m_hUxTheme);  }    HBITMAP CIconBitmapUtils::IconToBitmap(HICON hIcon) @@ -107,9 +107,9 @@
  if (!hIcon)   return NULL;   - if (pfnBeginBufferedPaint == NULL || pfnEndBufferedPaint == NULL || pfnGetBufferedPaintBits == NULL) + if (m_pfnBeginBufferedPaint == NULL || m_pfnEndBufferedPaint == NULL || m_pfnGetBufferedPaintBits == NULL)   { - ATLTRACE(" IconBitmapUtils::IconToBitmapPARGB32: Theme functions not found, returns NULL\n"); + ATLTRACE(" CIconBitmapUtils::IconToBitmapPARGB32: Theme functions not found, returns NULL\n");   return NULL;   }   @@ -136,7 +136,7 @@
  paintParams.pBlendFunction = &bfAlpha;     HDC hdcBuffer; - HPAINTBUFFER hPaintBuffer = pfnBeginBufferedPaint(hdcDest, &rcIcon, BPBF_DIB, &paintParams, &hdcBuffer); + HPAINTBUFFER hPaintBuffer = m_pfnBeginBufferedPaint(hdcDest, &rcIcon, BPBF_DIB, &paintParams, &hdcBuffer);   if (hPaintBuffer)   {   if (DrawIconEx(hdcBuffer, 0, 0, hIcon, sizIcon.cx, sizIcon.cy, 0, NULL, DI_NORMAL)) @@ -146,7 +146,7 @@
  ConvertBufferToPARGB32(hPaintBuffer, hdcDest, hIcon, sizIcon);   }   // This will write the buffer contents to the destination bitmap - pfnEndBufferedPaint(hPaintBuffer, TRUE); + m_pfnEndBufferedPaint(hPaintBuffer, TRUE);   }     SelectObject(hdcDest, hbmpOld); @@ -189,7 +189,7 @@
 {   RGBQUAD *prgbQuad;   int cxRow; - HRESULT hr = pfnGetBufferedPaintBits(hPaintBuffer, &prgbQuad, &cxRow); + HRESULT hr = m_pfnGetBufferedPaintBits(hPaintBuffer, &prgbQuad, &cxRow);   if (SUCCEEDED(hr))   {   Gdiplus::ARGB *pargb = reinterpret_cast<Gdiplus::ARGB *>(prgbQuad);
 
47
48
49
50
 
51
52
53
54
 
 
 
55
 
47
48
49
 
50
51
 
 
 
52
53
54
55
@@ -47,9 +47,9 @@
     private: - HMODULE hUxTheme; + HMODULE m_hUxTheme;   - FN_GetBufferedPaintBits pfnGetBufferedPaintBits; - FN_BeginBufferedPaint pfnBeginBufferedPaint; - FN_EndBufferedPaint pfnEndBufferedPaint; + FN_GetBufferedPaintBits m_pfnGetBufferedPaintBits; + FN_BeginBufferedPaint m_pfnBeginBufferedPaint; + FN_EndBufferedPaint m_pfnEndBufferedPaint;  };
 
28
29
30
31
 
32
33
34
35
36
37
 
 
 
 
38
39
40
 
 
41
42
 
43
44
45
46
 
47
48
 
49
50
51
52
 
53
54
55
 
56
57
58
 
61
62
63
64
 
65
66
 
67
68
69
70
 
71
72
73
74
75
76
77
 
78
79
 
80
81
82
 
83
84
85
86
87
88
 
89
90
91
 
97
98
99
100
 
101
102
103
104
105
106
107
108
 
 
 
109
110
 
111
112
113
114
115
116
117
 
118
119
120
121
 
122
123
124
 
128
129
130
131
132
 
 
133
134
135
136
137
 
138
139
 
140
141
 
142
143
144
145
 
146
147
 
148
149
150
 
155
156
157
158
 
159
160
 
161
162
163
 
170
171
172
173
 
174
175
176
177
 
178
179
 
180
181
182
183
184
185
186
 
 
 
187
188
189
190
 
191
192
193
194
 
195
196
197
 
198
199
200
 
201
202
203
 
207
208
209
210
 
211
212
213
214
215
 
216
217
218
 
 
219
220
 
221
222
 
223
224
 
225
226
227
 
233
234
235
236
 
237
238
239
 
240
241
242
 
254
255
256
257
 
258
259
260
 
264
265
266
267
268
 
 
269
270
271
272
273
274
275
 
276
277
278
279
 
280
281
282
 
288
289
290
291
 
292
293
294
295
296
297
 
298
299
300
301
302
 
303
304
305
 
308
309
310
311
312
 
 
313
314
315
 
318
319
320
321
 
322
323
324
 
340
341
342
343
 
344
345
346
 
374
375
376
377
 
378
379
380
 
381
382
383
 
28
29
30
 
31
32
33
 
 
 
 
34
35
36
37
38
 
 
39
40
41
 
42
43
44
45
 
46
47
 
48
49
50
51
 
52
53
54
 
55
56
57
58
 
61
62
63
 
64
65
 
66
67
68
69
 
70
71
72
73
74
75
76
 
77
78
 
79
80
81
 
82
83
84
85
86
87
 
88
89
90
91
 
97
98
99
 
100
101
102
103
104
105
 
 
 
106
107
108
109
 
110
111
112
113
114
115
116
 
117
118
119
120
 
121
122
123
124
 
128
129
130
 
 
131
132
133
134
135
136
 
137
138
 
139
140
 
141
142
143
144
 
145
146
 
147
148
149
150
 
155
156
157
 
158
159
 
160
161
162
163
 
170
171
172
 
173
174
175
176
 
177
178
 
179
180
181
182
183
 
 
 
184
185
186
187
188
189
 
190
191
192
193
 
194
195
196
 
197
198
199
 
200
201
202
203
 
207
208
209
 
210
211
212
213
214
 
215
216
 
 
217
218
219
 
220
221
 
222
223
 
224
225
226
227
 
233
234
235
 
236
237
238
 
239
240
241
242
 
254
255
256
 
257
258
259
260
 
264
265
266
 
 
267
268
269
270
271
272
273
274
 
275
276
277
278
 
279
280
281
282
 
288
289
290
 
291
292
293
294
295
296
 
297
298
299
300
301
 
302
303
304
305
 
308
309
310
 
 
311
312
313
314
315
 
318
319
320
 
321
322
323
324
 
340
341
342
 
343
344
345
346
 
374
375
376
 
377
378
379
 
380
381
382
383
@@ -28,31 +28,31 @@
 #include <shlwapi.h>     -class QueryState +class CQueryState  {  public: - CString path; - bool isdir; - CString basedir; - CString hgroot; + CString strPath; + bool bIsDir; + CString strBaseDir; + CString strHgRoot;   - char status; - unsigned tickcount; + char chStatus; + unsigned uTickCount;   - QueryState(): isdir(false), status('0'), tickcount(0) {} + CQueryState() : bIsDir(false), chStatus('0'), uTickCount(0) {}  };     -bool hasHgDir(char cls, const CString& path, unsigned& ticks) +bool HasHgDir(char chClass, const CString& strPath, unsigned& uTicks)  { - ticks = 0; + uTicks = 0;     bool res = false;   - if (path.IsEmpty() || path == "\\") + if (strPath.IsEmpty() || strPath == "\\")   return res;   - const CString p = path + "\\.hg"; + const CString p = strPath + "\\.hg";     if (::PathIsUNCServerShare(p))   return res; @@ -61,31 +61,31 @@
  res = ::PathIsDirectory(p) != 0;   unsigned tc1 = ::GetTickCount();   - ticks = tc1 - tc0; + uTicks = tc1 - tc0;   - if (ticks > 5 /* ms */) + if (uTicks > 5 /* ms */)   {   // trace slower PathIsDirectory calls (untypical on local discs)   ATLTRACE("[%c] hasHgDir: PathIsDirectory('%s') -> %d, in %d ticks\n", - cls, (LPCTSTR)p, (int)res, ticks); + chClass, (LPCTSTR)p, (int)res, uTicks);   }     return res;  }     -int findHgRoot(char cls, QueryState& cur, QueryState& last, bool outdated) +int FindHgRoot(char chClass, CQueryState& qsCur, CQueryState& qsLast, bool bOutdated)  { - CString dp = "["; dp += cls; dp += "] findHgRoot"; + CString dp = "["; dp += chClass; dp += "] findHgRoot";     { - CString p = cur.path; + CString p = qsCur.strPath;   p.AppendChar('\\');   bool unset = false;   if (p.Find("\\.hg\\") != -1)   {   // ignore files and dirs named '.hg' - last = cur; + qsLast = qsCur;   return 0;   }   int pos; @@ -97,28 +97,28 @@
  if (stat.lstat(p, true) == 0)   {   // ignore files and dirs named '.kbf' when kbfiles is enabled - last = cur; + qsLast = qsCur;   return 0;   }   }   }   - if (!outdated && !last.hgroot.IsEmpty() - && cur.path.GetLength() >= last.hgroot.GetLength() - && StartsWith(cur.path, last.hgroot + "\\")) + if (!bOutdated && !qsLast.strHgRoot.IsEmpty() + && qsCur.strPath.GetLength() >= qsLast.strHgRoot.GetLength() + && StartsWith(qsCur.strPath, qsLast.strHgRoot + "\\"))   { - cur.hgroot = last.hgroot; + qsCur.strHgRoot = qsLast.strHgRoot;   return 1;   }     unsigned ticks = 0;   bool file_access_is_unacceptably_slow = false;   - if (!::PathIsNetworkPath(cur.path)) + if (!::PathIsNetworkPath(qsCur.strPath))   {   // checking if we have a repo root, visible from its parent dir   - const bool has_hg = hasHgDir(cls, cur.path, ticks); + const bool has_hg = HasHgDir(chClass, qsCur.strPath, ticks);     if (ticks > 5000 /* ms */)   { @@ -128,23 +128,23 @@
    if (has_hg)   { - cur.hgroot = cur.path; - ATLTRACE("%s('%s'): hgroot = cur.path\n", (LPCTSTR)dp, (LPCTSTR)cur.path); + qsCur.strHgRoot = qsCur.strPath; + ATLTRACE("%s('%s'): hgroot = cur.path\n", (LPCTSTR)dp, (LPCTSTR)qsCur.strPath);   return 1;   }   }   - cur.basedir = DirName(cur.path); + qsCur.strBaseDir = DirName(qsCur.strPath);   - if (!outdated && !last.basedir.IsEmpty() && cur.basedir == last.basedir) + if (!bOutdated && !qsLast.strBaseDir.IsEmpty() && qsCur.strBaseDir == qsLast.strBaseDir)   { - cur.hgroot = last.hgroot; + qsCur.strHgRoot = qsLast.strHgRoot;   return 1;   }   - for (CString p = cur.basedir;;) + for (CString p = qsCur.strBaseDir;;)   { - bool has_hg = hasHgDir(cls, p, ticks); + bool has_hg = HasHgDir(chClass, p, ticks);   if (ticks > 5000 /* ms */)   {   CString reason = "ignoring slow \"" + p + "\""; @@ -155,9 +155,9 @@
    if (has_hg)   { - cur.hgroot = p; + qsCur.strHgRoot = p;   ATLTRACE("%s('%s'): hgroot = '%s' (found repo)", (LPCTSTR)dp, - (LPCTSTR)cur.path, (LPCTSTR)cur.hgroot); + (LPCTSTR)qsCur.strPath, (LPCTSTR)qsCur.strHgRoot);   return 1;   }   CString p2 = DirName(p); @@ -170,34 +170,34 @@
  if (file_access_is_unacceptably_slow)   {   ATLTRACE("****** %s('%s'): ignored, call took too long (%d ticks)\n", - (LPCTSTR)dp, (LPCTSTR)cur.path, ticks); + (LPCTSTR)dp, (LPCTSTR)qsCur.strPath, ticks);   }   else   { - ATLTRACE("%s('%s'): NO repo found\n", (LPCTSTR)dp, (LPCTSTR)cur.path); + ATLTRACE("%s('%s'): NO repo found\n", (LPCTSTR)dp, (LPCTSTR)qsCur.strPath);   } - last = cur; + qsLast = qsCur;   return 0;  }     -int get_relpath( - const CString& hgroot, - const CString& path, +int GetRelPath( + const CString& strHgRoot, + const CString& strPath,   CString& res  )  { - int offset = hgroot.GetLength(); + int offset = strHgRoot.GetLength();   if (offset == 0)   return 0;   - if (offset > path.GetLength()) + if (offset > strPath.GetLength())   return 0;   - if (path[offset] == '\\') + if (strPath[offset] == '\\')   offset++;   - res = path.Mid(offset); + res = strPath.Mid(offset);   return 1;  }   @@ -207,21 +207,21 @@
 {   CString dp = "["; dp += chClass; dp += "] HgQueryDirstate: ";   - static QueryState last; + static CQueryState last;     if (strPath.IsEmpty())   return 0;   - QueryState cur; + CQueryState cur;   - cur.path = strPath; - cur.tickcount = ::GetTickCount(); + cur.strPath = strPath; + cur.uTickCount = ::GetTickCount();   - const bool outdated = cur.tickcount - last.tickcount > 2000; + const bool outdated = cur.uTickCount - last.uTickCount > 2000;   - if (!outdated && last.path == strPath) + if (!outdated && last.strPath == strPath)   { - chOutStatus = last.status; + chOutStatus = last.chStatus;   if (chOutStatus == 'P')   chOutStatus = 'M';   return 1; @@ -233,10 +233,10 @@
  return 0;   }   - if (findHgRoot(chClass, cur, last, outdated) == 0) + if (FindHgRoot(chClass, cur, last, outdated) == 0)   return 0;   - int offset = cur.hgroot.GetLength(); + int offset = cur.strHgRoot.GetLength();     if (offset == 0)   { @@ -254,7 +254,7 @@
  relpath.SetAt(i, '/');   }   - CDirectoryStatus* pdirsta = CDirectoryStatus::Get(cur.hgroot, cur.basedir); + CDirectoryStatus* pdirsta = CDirectoryStatus::Get(cur.strHgRoot, cur.strBaseDir);   if (pdirsta && pdirsta->NoIcons())   {   last = cur; @@ -264,19 +264,19 @@
  if (relpath.IsEmpty())   {   chOutStatus = (pdirsta ? pdirsta->Status(relpath) : '?'); - cur.status = chOutStatus; - cur.tickcount = ::GetTickCount(); + cur.chStatus = chOutStatus; + cur.uTickCount = ::GetTickCount();   last = cur;   return 1;   }     bool unset = false;   - CDirstate* pds = CDirstateCache::Get(cur.hgroot, cur.basedir, unset); + CDirstate* pds = CDirstateCache::Get(cur.strHgRoot, cur.strBaseDir, unset);   if (!pds)   {   ATLTRACE("%s Dirstatecache::Get('%s') returns no Dirstate\n", (LPCTSTR)dp, - (LPCTSTR)cur.hgroot); + (LPCTSTR)cur.strHgRoot);   last = cur;   return 0;   } @@ -288,18 +288,18 @@
  last = cur;   return 0;   } - cur.isdir = stat.bIsDir; + cur.bIsDir = stat.bIsDir;  #if 0   ATLTRACE("%s stat.lstat('%s') -> stat.isdir is %d\n" << (LPCTSTR)dp,   (LPCTSTR)cur.path, (int)stat.isdir);  #endif   - if (cur.isdir) + if (cur.bIsDir)   {   if (!relpath.IsEmpty() && !pds->Root().GetDir(relpath))   {   // attempt to get status from kbfiles - pds = CDirstateCache::Get(cur.hgroot, cur.basedir, unset, true); + pds = CDirstateCache::Get(cur.strHgRoot, cur.strBaseDir, unset, true);   if (!pds || !pds->Root().GetDir(relpath))   {   last = cur; @@ -308,8 +308,8 @@
  }     chOutStatus = (pdirsta ? pdirsta->Status(relpath) : '?'); - cur.status = chOutStatus; - cur.tickcount = ::GetTickCount(); + cur.chStatus = chOutStatus; + cur.uTickCount = ::GetTickCount();   last = cur;   return 1;   } @@ -318,7 +318,7 @@
  if (!e)   {   // attempt to get status from kbfiles - pds = CDirstateCache::Get(cur.hgroot, cur.basedir, unset, true); + pds = CDirstateCache::Get(cur.strHgRoot, cur.strBaseDir, unset, true);   if (pds)   {   e = pds->Root().Get(relpath); @@ -340,7 +340,7 @@
  if (chOutStatus == 'M')   {   CString relbase; - if (pdirsta && get_relpath(cur.hgroot, cur.basedir, relbase)) + if (pdirsta && GetRelPath(cur.strHgRoot, cur.strBaseDir, relbase))   {   ATLTRACE("%s relbase = '%s'\n", (LPCTSTR)dp, (LPCTSTR)relbase);   @@ -374,10 +374,10 @@
  }     exit: - cur.status = chOutStatus; + cur.chStatus = chOutStatus;   if (chOutStatus == 'P')   chOutStatus = 'M'; - cur.tickcount = ::GetTickCount(); + cur.uTickCount = ::GetTickCount();   last = cur;   return 1;  }
 
56
57
58
59
 
60
61
62
63
64
65
66
67
 
 
68
69
70
 
56
57
58
 
59
60
61
62
63
64
65
 
 
66
67
68
69
70
@@ -56,15 +56,15 @@
 }     -static char *RevHashString(const char revhash[HASH_LENGTH]) +static char *RevHashString(const char achRevHash[HASH_LENGTH])  {   unsigned ix;   static char rev_string[HASH_LENGTH * 2 + 1];   static char *hexval = "0123456789abcdef";   for (ix = 0; ix < HASH_LENGTH; ++ix)   { - rev_string[ix * 2] = hexval[(revhash[ix] >> 4) & 0xf]; - rev_string[ix * 2 + 1] = hexval[revhash[ix] & 0xf]; + rev_string[ix * 2] = hexval[(achRevHash[ix] >> 4) & 0xf]; + rev_string[ix * 2 + 1] = hexval[achRevHash[ix] & 0xf];   }   rev_string[HASH_LENGTH * 2] = 0;   return rev_string;