AfsAdmSvr_Enter();
LPHASHLIST pList = New (HASHLIST);
- for (LPENUM pEnum = l.pListCallbacks->FindFirst(); pEnum; pEnum = pEnum->FindNext())
+ LPENUM pEnum;
+ for (pEnum = l.pListCallbacks->FindFirst(); pEnum; pEnum = pEnum->FindNext())
{
LPCALLBACKDATA pData = (LPCALLBACKDATA)( pEnum->GetObject() );
pList->Add (pData);
BOOL SetActionNotification (HWND hNotify, BOOL fSet)
{
BOOL rc = TRUE;
+ size_t ii = 0;
+
asc_Enter();
if (!fSet)
{
- for (size_t ii = 0; ii < l.chActionListeners; ++ii)
+ for (ii = 0; ii < l.chActionListeners; ++ii)
{
if (l.ahActionListeners[ ii ] == hNotify)
l.ahActionListeners[ ii ] = NULL;
}
else // (fSet)
{
- for (size_t ii = 0; ii < l.chActionListeners; ++ii)
+ for (ii = 0; ii < l.chActionListeners; ++ii)
{
if (l.ahActionListeners[ ii ] == NULL)
break;
{
asc_Enter();
- for (size_t ii = 0; ii < l.cdwClients; ++ii)
+ size_t ii;
+ for (ii = 0; ii < l.cdwClients; ++ii)
{
if (!l.adwClients[ ii ])
break;
BOOL AfsAdmSvr_AttachClient (LPCTSTR pszName, DWORD *pidClient, ULONG *pStatus)
{
AfsAdmSvr_Enter();
- for (size_t iClient = 0; iClient < l.cClientsAllocated; ++iClient)
+ size_t iClient;
+ for (iClient = 0; iClient < l.cClientsAllocated; ++iClient)
{
if (!l.aClients[ iClient ])
break;
void AfsAdmSvr_DetachClient (DWORD idClient)
{
AfsAdmSvr_Enter();
- for (size_t iClient = 0; iClient < l.cClientsAllocated; ++iClient)
+ size_t iClient;
+ for (iClient = 0; iClient < l.cClientsAllocated; ++iClient)
{
if (idClient == (DWORD)(l.aClients[ iClient ]))
break;
++l.cOperations;
- for (size_t iOp = 0; iOp < l.cOperationsAllocated; ++iOp)
+ size_t iOp;
+ for (iOp = 0; iOp < l.cOperationsAllocated; ++iOp)
{
if (!l.aOperations[ iOp ].fInUse)
break;
AfsAdmSvr_PrepCellRefresh();
EnterCriticalSection (l.pcsRefreshThreads);
- for (size_t iThread = 0; iThread < l.cRefreshThreads; ++iThread)
+ size_t iThread;
+ for (iThread = 0; iThread < l.cRefreshThreads; ++iThread)
{
LPREFRESHTHREAD pThread = &l.aRefreshThreads[ iThread ];
if (pThread->idCell == idCell)
}
if (iThread == l.cRefreshThreads)
{
- for (size_t iThread = 0; iThread < l.cRefreshThreads; ++iThread)
+ for (iThread = 0; iThread < l.cRefreshThreads; ++iThread)
{
LPREFRESHTHREAD pThread = &l.aRefreshThreads[ iThread ];
if (pThread->idCell == 0)
DLLFILE = $(DESTDIR)\root.server\usr\afs\bin\TaAfsAppLib.dll
+!IF ("$(AFSVER_CL)"<"1400")
+DEFFILE = TaAfsAppLib.def
+!ELSE
+DEFFILE = TaAfsAppLib2005.def
+!ENDIF
# Since AfsAppLib links with TaAfsAdmSvrClient.lib--and both need stuff
# like the HashList code--we'll get lots of unnecessary 4049 warnings from
# AfsAppLib needs to use an explicit .DEF file to get its entry points public
-LOCALLINKFLAGS = $(LOCALLINKFLAGS) /DEF:TaAfsAppLib.def
+LOCALLINKFLAGS = $(LOCALLINKFLAGS) /DEF:$(DEFFILE)
# Also, AfsAppLib has a specific DLL entry-point which should be used
--- /dev/null
+LIBRARY TAAFSAPPLIB
+
+DESCRIPTION 'Transarc Application Base DLL'
+
+EXPORTS
+
+ DllEntryPoint
+
+ ?TaLocaleReallocFunction@@YAHPAPAXIPAIII@Z
+ ?TaLocale_EnumModule@@YAHIPAPAUHINSTANCE__@@PAG@Z
+ ?TaLocale_GetDialogResource@@YAPBUDLGTEMPLATE@@HPAPAUHINSTANCE__@@@Z
+ ?TaLocale_GetLanguage@@YAGXZ
+ ?TaLocale_LoadCorrespondingModule@@YAPAUHINSTANCE__@@PAU1@G@Z
+ ?TaLocale_GetLanguageOverride@@YAGXZ
+ ?TaLocale_RemoveLanguageOverride@@YAXXZ
+ ?TaLocale_SetLanguageOverride@@YAXG@Z
+ ?TaLocale_LoadImage@@YAPAXHIHHI@Z
+ ?TaLocale_LoadMenu@@YAPAUHMENU__@@H@Z
+ ?TaLocale_LoadIcon@@YAPAUHICON__@@H@Z
+ ?TaLocale_LoadAccelerators@@YAPAUHACCEL__@@H@Z
+ ?TaLocale_GetResource@@YAPBXPBD0GPAPAUHINSTANCE__@@@Z
+ ?TaLocale_GetResourceEx@@YAPBXPBD0GPAPAUHINSTANCE__@@H@Z
+ ?TaLocale_GetStringResource@@YAPBUSTRINGTEMPLATE@@HPAPAUHINSTANCE__@@@Z
+ ?TaLocale_Initialize@@YAXXZ
+ ?TaLocale_SetLanguage@@YAXG@Z
+ ?TaLocale_SpecifyModule@@YAXPAUHINSTANCE__@@G@Z
+ ?Message@@YAHIHHPBDZZ
+ ?Message@@YAHIHPBD0ZZ
+ ?Message@@YAHIPBD00ZZ
+ ?Message@@YAHIPBDH0ZZ
+ ?Message_ThreadProc@@YGKPAX@Z
+ ?ModalDialog@@YAHHPAUHWND__@@P6GH0IIJ@Z@Z
+ ?ModalDialogParam@@YAHHPAUHWND__@@P6GH0IIJ@ZJ@Z
+ ?ModelessDialog@@YAPAUHWND__@@HPAU1@P6GH0IIJ@Z@Z
+ ?ModelessDialogParam@@YAPAUHWND__@@HPAU1@P6GH0IIJ@ZJ@Z
+ ?vMessage@@YAHIHHPBDPAD@Z
+ ?vMessage@@YAHIHPBD0PAD@Z
+ ?vMessage@@YAHIJJPBDPAD@Z
+ ?vMessage@@YAHIPBD00PAD@Z
+ ?vMessage@@YAHIPBDH0PAD@Z
+ ?AnsiToString@@YAPADPBD@Z
+ ?AnsiToUnicode@@YAPA_WPBD@Z
+ ?ChangeExtension@@YAXPADPBD1H@Z
+ ?CloneAnsi@@YAPADPAD@Z
+ ?CloneMultiString@@YAPADPBD@Z
+ ?CloneString@@YAPADPAD@Z
+ ?CloneUnicode@@YAPADPA_W@Z
+ ?CopyAnsiToString@@YAXPADPBDI@Z
+ ?CopyStringToAnsi@@YAXPADPBDI@Z
+ ?CopyAnsiToUnicode@@YAXPA_WPBDI@Z
+ ?CopyBaseFileName@@YAXPADPBD@Z
+ ?CopyStringToAnsi@@YAXPADPBDI@Z
+ ?CopyStringToUnicode@@YAXPA_WPBDI@Z
+ ?CopyUnicodeToAnsi@@YAXPADPB_WI@Z
+ ?CopyUnicodeToString@@YAXPADPB_WI@Z
+ ?FindBaseFileName@@YAPBDPBD@Z
+ ?FindExtension@@YAPBDPBD@Z
+ ?FixFormatString@@YAPADPAD@Z
+ ?FormatBytes@@YAXPAD0N@Z
+ ?FormatDouble@@YAXPAD0N@Z
+ ?FormatElapsed@@YAHPAD0PAU_SYSTEMTIME@@@Z
+ ?FormatError@@YAHPAD0K@Z
+ ?FormatLargeInt@@YAXPAD0PAT_LARGE_INTEGER@@@Z
+ ?FormatMultiString@@YAXPAPADHHPBDZZ
+ ?FormatMultiString@@YAXPAPADHPBD1ZZ
+ ?FormatSockAddr@@YAXPAD0PAUsockaddr_in@@@Z
+ ?FormatString@@YAPADHPBDZZ
+ ?FormatString@@YAPADPBD0ZZ
+ ?FormatTime@@YAHPAD0PAU_SYSTEMTIME@@HH@Z
+ ?FreeString@@YAXPBX0@Z
+ ?GetString@@YAXPADHH@Z
+ ?GetStringLength@@YAIH@Z
+ ?SearchMultiString@@YAHPBD0H@Z
+ ?SetErrorTranslationFunction@@YAXP6GHPADKG@Z@Z
+ ?StringToAnsi@@YAPADPBD@Z
+ ?StringToUnicode@@YAPA_WPBD@Z
+ ?TranslateError@@YAHPADK@Z
+ ?TranslateErrorFunc@@YAHPADKG@Z
+ ?UnicodeToAnsi@@YAPADPB_W@Z
+ ?UnicodeToString@@YAPADPB_W@Z
+ ?lsplitpath@@YAXPBDPAD111@Z
+ ?lstrchr@@YAPBDPBDD@Z
+ ?lstrncmpi@@YAHPBD0I@Z
+ ?lstrncpy@@YAXPADPBDI@Z
+ ?lstrrchr@@YAPBDPBDD@Z
+ ?lstrupr@@YAXPAD@Z
+ ?lstrzcpy@@YAXPADPBDI@Z
+ ?vFormatMultiString@@YAXPAPADHHPBDPAD@Z
+ ?vFormatMultiString@@YAXPAPADHJPBDPAD@Z
+ ?vFormatMultiString@@YAXPAPADHPBD1PAD@Z
+ ?vFormatString@@YAPADHPBDPAD@Z
+ ?vFormatString@@YAPADJPBDPAD@Z
+ ?vFormatString@@YAPADPBD0PAD@Z
+ ShowMemoryManager
+ WhileMemoryManagerShowing
+ IsMemoryManagerMessage
+ MemMgr_AllocateMemory
+ MemMgr_FreeMemory
+ MemMgr_TrackNew
+ MemMgr_TrackDelete
void AfsAppLib_RegisterHelp (int idd, DWORD *adwContext, int idhOverview)
{
- for (size_t ih = 0; ih < g_cdh; ++ih)
+ size_t ih;
+ for (ih = 0; ih < g_cdh; ++ih)
{
if (!g_adh[ ih ].fInUse)
continue;
TCHAR szDefCell[ cchNAME ];
if (AfsAppLib_GetLocalCell (szDefCell))
{
- for (size_t iclDef = 0; iclDef < lpcl->nCells; ++iclDef)
+ size_t iclDef;
+ for (iclDef = 0; iclDef < lpcl->nCells; ++iclDef)
{
if (lpcl->aCells[ iclDef ] == NULL)
continue;
EnterCriticalSection (pcsPump);
- for (size_t ii = 0; ii < cModeless; ++ii)
+ size_t ii;
+ for (ii = 0; ii < cModeless; ++ii)
{
if (aModeless[ ii ] == hDlg)
break;
}
EnterCriticalSection (pcsData);
- for (size_t ii = 0; ii < cFields; ++ii)
+ size_t ii;
+ for (ii = 0; ii < cFields; ++ii)
{
if (!lstrcmpi (aFields[ ii ].szField, pszField))
break;
size_t iField;
if ((iField = GetWindowDataField (pszField)) != (size_t)-1)
{
- for (size_t ii = 0; ii < cWindows; ++ii)
+ size_t ii;
+ for (ii = 0; ii < cWindows; ++ii)
{
if (aWindows[ ii ].hWnd == hWnd)
{
{
if (stOriginal <= stNew)
{
- for (int st = stNew+1; st < (int)m_cStates; ++st)
+ int st;
+ for (st = stNew+1; st < (int)m_cStates; ++st)
{
LPWIZARD_STATE pState;
if ((pState = FindState (st)) != NULL)
}
else // (moving backwards?)
{
- for (int st = stNew-1; st >= 0; --st)
+ int st;
+ for (st = stNew-1; st >= 0; --st)
{
LPWIZARD_STATE pState;
if ((pState = FindState (st)) != NULL)
pPal->palVersion = 0x300;
pPal->palNumEntries = 256;
- for (size_t ii = 0; ii < 256; ++ii)
+ size_t ii;
+ for (ii = 0; ii < 256; ++ii)
{
pPal->palPalEntry[ ii ].peRed = (argb) ? argb[ ii ].rgbRed : 0;
pPal->palPalEntry[ ii ].peGreen = (argb) ? argb[ ii ].rgbGreen : 0;
}
for (COLORREF clr = clrWASH_DARKEST; clr <= clrWASH_BRIGHTEST; clr += clrWASH_INCREMENT)
- {
- for (size_t ii = 0; ii < 256; ++ii)
+ {
+ for (ii = 0; ii < 256; ++ii)
{
if ( (pPal->palPalEntry[ ii ].peRed == GetRValue (clr)) &&
(pPal->palPalEntry[ ii ].peGreen == GetGValue (clr)) &&
}
if (ii == 256)
{
- for (size_t ii = 10; ii < 246; ++ii)
+ for (ii = 10; ii < 246; ++ii)
{
if ( (pPal->palPalEntry[ ii ].peRed == 0) &&
(pPal->palPalEntry[ ii ].peGreen == 0) &&
if (msg == WM_CREATE)
{
- for (size_t iDate = 0; iDate < cDate; ++iDate)
+ size_t iDate;
+ for (iDate = 0; iDate < cDate; ++iDate)
{
if (aDate[ iDate ].hDate == NULL)
break;
if (msg == WM_CREATE)
{
- for (size_t iElapsed = 0; iElapsed < cElapsed; ++iElapsed)
+ size_t iElapsed;
+ for (iElapsed = 0; iElapsed < cElapsed; ++iElapsed)
{
if (aElapsed[ iElapsed ].hElapsed == NULL)
break;
if (msg == WM_CREATE)
{
- for (size_t iSockAddr = 0; iSockAddr < cSockAddr; ++iSockAddr)
+ size_t iSockAddr;
+ for (iSockAddr = 0; iSockAddr < cSockAddr; ++iSockAddr)
{
if (aSockAddr[ iSockAddr ].hSockAddr == NULL)
break;
EnterCriticalSection (&csSpinners);
- for (size_t ii = 0; ii < cSpinners; ++ii)
+ size_t ii;
+ for (ii = 0; ii < cSpinners; ++ii)
{
if (!aSpinners[ ii ].hSpinner)
break;
if (msg == WM_CREATE)
{
- for (size_t iTime = 0; iTime < cTime; ++iTime)
+ size_t iTime;
+ for (iTime = 0; iTime < cTime; ++iTime)
{
if (aTime[ iTime ].hTime == NULL)
break;
if (IsWindow (hTab))
{
- for (size_t ii = 0; ii < cPropSheets; ++ii)
+ size_t ii;
+ for (ii = 0; ii < cPropSheets; ++ii)
{
if (aPropSheets[ii].fInUse && (aPropSheets[ii].hSheet == hSheet))
break;
}
if (ii < cPropSheets)
{
- for (size_t iTab = 0; iTab < aPropSheets[ii].psh->cTabs; ++iTab)
+ size_t iTab;
+ for (iTab = 0; iTab < aPropSheets[ii].psh->cTabs; ++iTab)
{
if (aPropSheets[ii].psh->aTabs[iTab].hDlg == hDlg)
break;
LPARAM PropSheet_FindTabParam (HWND hTab)
{
- for (size_t ii = 0; ii < cPropSheets; ++ii)
+ size_t ii;
+ for (ii = 0; ii < cPropSheets; ++ii)
{
if (aPropSheets[ii].fInUse && (aPropSheets[ii].hSheet == hTab))
return aPropSheets[ii].psh->lpUser;
// Otherwise, we'd have to wait until the WM_INITDIALOG/IDINIT
// messages were finished.
//
- for (size_t ii = 0; ii < cPropSheets; ++ii)
+ size_t ii;
+ for (ii = 0; ii < cPropSheets; ++ii)
{
if (!aPropSheets[ ii ].fInUse)
break;
va_start (arg, iImage1);
LPTSTR apszColumns[ nCOLUMNS_MAX ];
- for (size_t iColumn = 0; iColumn < lpvi->nColsAvail; ++iColumn)
+ size_t iColumn;
+ for (iColumn = 0; iColumn < lpvi->nColsAvail; ++iColumn)
{
apszColumns[ iColumn ] = va_arg (arg, LPTSTR);
}
BOOL FL_HitTestForHeaderBar (HWND hList, POINT ptClient)
{
- for (HWND hHeader = GetWindow (hList, GW_CHILD);
+ HWND hHeader;
+ for (hHeader = GetWindow (hList, GW_CHILD);
hHeader != NULL;
hHeader = GetWindow (hHeader, GW_HWNDNEXT))
{
void LV_SortView (HWND hList, LPVIEWINFO lpvi)
{
- for (size_t iColSort = 0; iColSort < lpvi->nColsShown; ++iColSort)
+ size_t iColSort;
+ for (iColSort = 0; iColSort < lpvi->nColsShown; ++iColSort)
{
if ((lpvi->iSort & (~COLUMN_SORTREV)) == lpvi->aColumns[ iColSort ])
break;
va_start (arg, iImage);
LPTSTR apszColumns[ nCOLUMNS_MAX ];
- for (size_t iColumn = 0; iColumn < lpvi->nColsAvail; ++iColumn)
+ size_t iColumn;
+ for (iColumn = 0; iColumn < lpvi->nColsAvail; ++iColumn)
{
apszColumns[ iColumn ] = va_arg (arg, LPTSTR);
}
BOOL LV_HitTestForHeaderBar (HWND hList, POINT ptClient)
{
- for (HWND hHeader = GetWindow (hList, GW_CHILD);
+ HWND hHeader;
+ for (hHeader = GetWindow (hList, GW_CHILD);
hHeader != NULL;
hHeader = GetWindow (hHeader, GW_HWNDNEXT))
{
int iItemSkip = (int)wp;
int iItemMax = SendMessage (hList, LB_GETCOUNT, 0, 0);
int cchMax = 0;
+ int iItem;
- for (int iItem = 0; iItem < iItemMax; iItem++)
+ for (iItem = 0; iItem < iItemMax; iItem++)
{
if (iItem == iItemSkip)
continue;
if (fLevel)
{
size_t iLevelItem = 0;
- for (HLISTITEM hParent = hItem->hTreeParent; hParent; hParent = hParent->hTreeParent)
+ HLISTITEM hParent;
+ for (hParent = hItem->hTreeParent; hParent; hParent = hParent->hTreeParent)
++iLevelItem;
size_t iLevelSelected = 0;
if (fSibling)
{
BOOL fFound = FALSE;
- for (HLISTITEM hSearch = hItem->hTreePrevious; !fFound && hSearch; hSearch = hSearch->hTreePrevious)
+ HLISTITEM hSearch;
+ for (hSearch = hItem->hTreePrevious; !fFound && hSearch; hSearch = hSearch->hTreePrevious)
{
if (hSearch == pfl->hSelectFirst)
fFound = TRUE;
LPHASHLISTKEY pKey = NULL;
Enter();
- for (size_t iKey = 0; iKey < m_cpKeys; ++iKey)
+ size_t iKey;
+ for (iKey = 0; iKey < m_cpKeys; ++iKey)
{
if (m_apKeys[ iKey ] == NULL)
break;
m_aBuckets[ iBucket ].iLast = iINVALID;
}
- for (size_t iObject = 0; ; ++iObject)
+ size_t iObject;
+ for (iObject = 0; ; ++iObject)
{
LPHASHLISTENTRY pEntry;
if ((pEntry = GetEntry(m_aObjects,iObject)) == NULL)
//
REALLOC (pInfo->aBuckets, pInfo->cBuckets, m_cBuckets, 1);
- for (size_t iBucket = 0; iBucket < pInfo->cBuckets; ++iBucket)
+ size_t iBucket;
+ for (iBucket = 0; iBucket < pInfo->cBuckets; ++iBucket)
{
for (size_t iObject = m_aBuckets[ iBucket ].iFirst;
iObject != iINVALID;
{
HASHVALUE hv = 0;
- for (size_t cch = lstrlenA(pszStringA); cch >= 4; pszStringA += 4, cch -= 4)
+ size_t cch;
+ for (cch = lstrlenA(pszStringA); cch >= 4; pszStringA += 4, cch -= 4)
hv += *(DWORD *)pszStringA;
for (; cch; pszStringA++, cch--)
{
HASHVALUE hv = 0;
- for (size_t cch = lstrlenW(pszStringW); cch >= 2; pszStringW += 2, cch -= 2)
+ size_t cch;
+ for (cch = lstrlenW(pszStringW); cch >= 2; pszStringW += 2, cch -= 2)
{
hv += *(DWORD *)pszStringW; // since HIBYTE(*psz) is usually zero,
hv = (hv >> 24) | (hv << 8); // rotate {hv} high-ward by 8 bits
// Start stripping characters from the expression
//
- for (BOOL rc = TRUE; rc; )
+ BOOL rc;
+ for (rc = TRUE; rc; )
{
TCHAR ch;
{
// Is the window handle listed in awl[] already?
//
- for (int ii = 0; ii < (int)cwl; ii++)
+ int ii;
+ for (ii = 0; ii < (int)cwl; ii++)
{
if (awl[ii].hWnd == hWnd)
{
BOOL Subclass_AddHook (HWND hTarget, PVOID wndProc)
{
- for (size_t iTarget = 0; iTarget < nTargets; ++iTarget)
+ size_t iTarget;
+ for (iTarget = 0; iTarget < nTargets; ++iTarget)
{
if (aTargets[ iTarget ].hTarget == hTarget)
break;
aTargets[ iTarget ].hTarget = hTarget;
-
- for (size_t iHook = 0; iHook < aTargets[iTarget].nHooks; ++iHook)
+ size_t iHook;
+ for (iHook = 0; iHook < aTargets[iTarget].nHooks; ++iHook)
{
if (aTargets[ iTarget ].aHooks[ iHook ].wndProc == wndProc)
break;
void Subclass_RemoveHook (HWND hTarget, PVOID wndProc)
{
- for (size_t iTarget = 0; iTarget < nTargets; ++iTarget)
+ size_t iTarget;
+ for (iTarget = 0; iTarget < nTargets; ++iTarget)
{
if (aTargets[ iTarget ].hTarget == hTarget)
break;
}
if (iTarget < nTargets)
{
- for (size_t iHook = 0; iHook < aTargets[iTarget].nHooks; ++iHook)
+ size_t iHook;
+ for (iHook = 0; iHook < aTargets[iTarget].nHooks; ++iHook)
{
if (aTargets[ iTarget ].aHooks[ iHook ].wndProc == wndProc)
break;
PVOID Subclass_FindNextHook (HWND hTarget, PVOID wndProc)
{
- for (size_t iTarget = 0; iTarget < nTargets; ++iTarget)
+ size_t iTarget;
+ for (iTarget = 0; iTarget < nTargets; ++iTarget)
{
if (aTargets[ iTarget ].hTarget == hTarget)
break;
if (iTarget >= nTargets)
return NULL;
- for (size_t iHook = 0; iHook < aTargets[iTarget].nHooks; ++iHook)
+ size_t iHook;
+ for (iHook = 0; iHook < aTargets[iTarget].nHooks; ++iHook)
{
if (aTargets[ iTarget ].aHooks[ iHook ].wndProc == wndProc)
break;
LONG CALLBACK Subclass_WndProc (HWND hTarget, UINT msg, WPARAM wp, LPARAM lp)
{
- for (size_t iTarget = 0; iTarget < nTargets; ++iTarget)
+ size_t iTarget;
+ for (iTarget = 0; iTarget < nTargets; ++iTarget)
{
if (aTargets[ iTarget ].hTarget == hTarget)
break;
if (iTarget >= nTargets)
return DefWindowProc (hTarget, msg, wp, lp);
- for (size_t iHook = 0; iHook < aTargets[iTarget].nHooks; ++iHook)
+ size_t iHook;
+ for (iHook = 0; iHook < aTargets[iTarget].nHooks; ++iHook)
{
if (aTargets[ iTarget ].aHooks[ iHook ].wndProc != NULL)
break;
//
for (LPTSTR psz = wp.wpBosLogGet.pszLogData; psz && *psz; )
{
- for (LPTSTR pszNext = psz; *pszNext && (*pszNext != TEXT('\r')) && (*pszNext != TEXT('\n')); ++pszNext)
+ LPTSTR pszNext;
+ for (pszNext = psz; *pszNext && (*pszNext != TEXT('\r')) && (*pszNext != TEXT('\n')); ++pszNext)
;
DWORD cbWrite;
DWORD cbWrote;
if (lpList)
{
- for (size_t iEntry = 0; iEntry < lpList->cEntries; ++iEntry)
+ size_t iEntry;
+ for (iEntry = 0; iEntry < lpList->cEntries; ++iEntry)
{
if (!lpList->aEntries[ iEntry ].szAdmin[0])
break;
if (lpList)
{
- for (size_t iEntry = 0; iEntry < lpList->cEntries; ++iEntry)
+ size_t iEntry;
+ for (iEntry = 0; iEntry < lpList->cEntries; ++iEntry)
{
if (!lpList->aEntries[ iEntry ].szHost[0])
break;
void CELL::FreeUsers (BOOL fNotify)
{
- for (LPENUM pEnum = m_lGroups->FindLast(); pEnum; pEnum = pEnum->FindPrevious())
+ LPENUM pEnum;
+ for (pEnum = m_lGroups->FindLast(); pEnum; pEnum = pEnum->FindPrevious())
{
LPPTSGROUP lpGroup = (LPPTSGROUP)(pEnum->GetObject());
if (fNotify)
}
size_t cServers = 0;
- for (LPENUM pEnum = m_lServers->FindFirst(); pEnum; pEnum = pEnum->FindNext())
+ LPENUM pEnum;
+ for (pEnum = m_lServers->FindFirst(); pEnum; pEnum = pEnum->FindNext())
++cServers;
if (cServers)
//
if (fNotify)
{
- for (LPENUM pEnum = m_lGroups->FindFirst(); pEnum; pEnum = pEnum->FindNext())
+ LPENUM pEnum;
+ for (pEnum = m_lGroups->FindFirst(); pEnum; pEnum = pEnum->FindNext())
{
LPPTSGROUP lpGroup = (LPPTSGROUP)(pEnum->GetObject());
NOTIFYCALLBACK::SendNotificationToAll (evtCreate, lpGroup->GetIdentifier());
{
procSupplied = procUser;
lpSupplied = lpUser;
+ size_t iNotify;
- for (size_t iNotify = 0; iNotify < nNotifyList; ++iNotify)
+ for (iNotify = 0; iNotify < nNotifyList; ++iNotify)
{
if (aNotifyList[ iNotify ] == NULL)
break;
void SERVER::SendDeleteNotifications (void)
{
- for (LPENUM pEnum = m_lAggregates->FindFirst(); pEnum; pEnum = pEnum->FindNext())
+ LPENUM pEnum;
+ for (pEnum = m_lAggregates->FindFirst(); pEnum; pEnum = pEnum->FindNext())
{
LPAGGREGATE lpAggregate = (LPAGGREGATE)(pEnum->GetObject());
lpAggregate->SendDeleteNotifications ();
// First thing is to forget about what aggregates we think we have
// now.
//
- for (LPENUM pEnum = m_lAggregates->FindLast(); pEnum; pEnum = pEnum->FindPrevious())
+ LPENUM pEnum;
+ for (pEnum = m_lAggregates->FindLast(); pEnum; pEnum = pEnum->FindPrevious())
{
LPAGGREGATE lpAggregate = (LPAGGREGATE)(pEnum->GetObject());
lpAggregate->SendDeleteNotifications();
// First thing is to forget about what services we think we have now.
//
- for (LPENUM pEnum = m_lServices->FindLast(); pEnum; pEnum = pEnum->FindPrevious())
+ LPENUM pEnum;
+ for (pEnum = m_lServices->FindLast(); pEnum; pEnum = pEnum->FindPrevious())
{
LPSERVICE lpService = (LPSERVICE)(pEnum->GetObject());
lpService->SendDeleteNotifications();
AfsClass_InitRefreshSections();
EnterCriticalSection (pcsRefSec);
- for (int idSection = 0; idSection < (int)cRefSec; ++idSection)
+ int idSection;
+ for (idSection = 0; idSection < (int)cRefSec; ++idSection)
{
if (!aRefSec[ idSection ].fInUse)
break;
// Wait for that thread to terminate, or for our
// newly-allocated RefSec entry to be marked Canceled.
//
- for (DWORD dw = STILL_ACTIVE; dw == STILL_ACTIVE; )
+ DWORD dw;
+ for (dw = STILL_ACTIVE; dw == STILL_ACTIVE; )
{
EnterCriticalSection (pcsRefSec);
size_t nAggregates = 0;
size_t iAggregate = 0;
HENUM hEnum;
- for (LPAGGREGATE lpAggregate = AggregateFindFirst (&hEnum); lpAggregate; lpAggregate = AggregateFindNext (&hEnum))
+ LPAGGREGATE lpAggregate;
+ for (lpAggregate = AggregateFindFirst (&hEnum); lpAggregate; lpAggregate = AggregateFindNext (&hEnum))
{
++nAggregates;
lpAggregate->Close();
size_t nServices = 0;
size_t iService = 0;
HENUM hEnum;
- for (LPSERVICE lpService = ServiceFindFirst (&hEnum); lpService; lpService = ServiceFindNext (&hEnum))
+ LPSERVICE lpService;
+ for (lpService = ServiceFindFirst (&hEnum); lpService; lpService = ServiceFindNext (&hEnum))
{
++nServices;
lpService->Close();
TCHAR szComponent[ cchRESOURCE ];
lstrcpy (szComponent, pszTime);
- for (LPTSTR pch = szComponent; isdigit(*pch); ++pch)
+ LPTSTR pch;
+ for (pch = szComponent; isdigit(*pch); ++pch)
;
*pch = TEXT('\0');
#include <windows.h>
#include <npapi.h>
#include <ntsecapi.h>
+#include <tchar.h>
#include <strsafe.h>
#define IF_WIZ(x) { if (g_pWiz) (x); }
// Global variables
-static HWND m_hDlg = 0; // Window handle of this dialog
-static BOOL m_bConfiguring = FALSE; // TRUE if configuring
-static BOOL m_bConfigured = FALSE; // TRUE if configuration was successful
-static BOOL m_bConfigFailed = FALSE; // TRUE if configuration failed
-static BOOL m_bCheckCancel = FALSE; // TRUE if user pressed cancel - we will ask for confirmation
-static BOOL m_bCancel = FALSE; // TRUE if user confirmed cancel - we will cancel configuration
-static void* m_hvosServer = 0; // vos library server handle
-static const MAX_STEPS = 34; // Max number of config steps
-static afs_status_t m_nStatus; // Error code if a cfg library function fails
-static int m_nResult; // Boolean return code from cfg library calls
-static int m_nNumSteps; // Number of config steps that will be performed
-static BOOL m_bDbServersRestarted; // TRUE if all Database servers were restarted
-static BOOL m_bMustChangeClientCell; // TRUE if client is in different cell than server
+static HWND m_hDlg = 0; // Window handle of this dialog
+static BOOL m_bConfiguring = FALSE; // TRUE if configuring
+static BOOL m_bConfigured = FALSE; // TRUE if configuration was successful
+static BOOL m_bConfigFailed = FALSE; // TRUE if configuration failed
+static BOOL m_bCheckCancel = FALSE; // TRUE if user pressed cancel - we will ask for confirmation
+static BOOL m_bCancel = FALSE; // TRUE if user confirmed cancel - we will cancel configuration
+static void* m_hvosServer = 0; // vos library server handle
+static const int MAX_STEPS = 34; // Max number of config steps
+static afs_status_t m_nStatus; // Error code if a cfg library function fails
+static int m_nResult; // Boolean return code from cfg library calls
+static int m_nNumSteps; // Number of config steps that will be performed
+static BOOL m_bDbServersRestarted; // TRUE if all Database servers were restarted
+static BOOL m_bMustChangeClientCell; // TRUE if client is in different cell than server
static HANDLE m_hCellServDBUpdateEvent;
-static LPCTSTR m_pszCellServDBUpdateEventName = TEXT("CellServDBUpdateEvent");
-static const m_CallBackID = 6;
-static UINT m_nPartitionID = INVALID_PARTITION_ID;
-static BOOL m_bCellServDbUpdateErr = FALSE;
+static LPCTSTR m_pszCellServDBUpdateEventName = TEXT("CellServDBUpdateEvent");
+static const int m_CallBackID = 6;
+static UINT m_nPartitionID = INVALID_PARTITION_ID;
+static BOOL m_bCellServDbUpdateErr = FALSE;
static TCHAR m_szCellServDbUpdateErrMsg[cchRESOURCE];
-static LONG m_nServerUpdates = 0;
+static LONG m_nServerUpdates = 0;
static char * m_pszCellDbHosts = 0;
-static BOOL m_bNoAuthMode = TRUE;
+static BOOL m_bNoAuthMode = TRUE;
static char m_szVicepName[9];
-static BOOL m_bMustExit;
-static BOOL m_bCfgInfoInvalidated;
-static BOOL m_bUnconfiguringLastDBServer;
-static BOOL m_bClientTokensSet;
-static BOOL m_bRootAfsDriveMappingCreated;
-static char m_szDriveToMapTo[3];
-static BOOL m_bWeCreatedRootAfs;
-static BOOL m_bWeCreatedRootCell;
+static BOOL m_bMustExit;
+static BOOL m_bCfgInfoInvalidated;
+static BOOL m_bUnconfiguringLastDBServer;
+static BOOL m_bClientTokensSet;
+static BOOL m_bRootAfsDriveMappingCreated;
+static char m_szDriveToMapTo[3];
+static BOOL m_bWeCreatedRootAfs;
+static BOOL m_bWeCreatedRootCell;
static CRITICAL_SECTION m_CritSec;
char *psz = pszCellServDB;
- for (int i = 0; *psz; psz += strlen(psz) + 1)
+ int i;
+ for (i = 0; *psz; psz += strlen(psz) + 1)
i++;
if (i == 1) {
static void NextStep(UINT uiMsgID)
{
- static nCurStep = 1;
+ static int nCurStep = 1;
if (bCancel)
return;
PACTION Action_Begin (ACTIONTYPE Type, PNOTIFYPARAMS pParams)
{
- for (size_t ii = 0; ii < l.cActions; ++ii)
+ size_t ii;
+ for (ii = 0; ii < l.cActions; ++ii)
{
if (!l.aActions[ii])
break;
BOOL fNeedBadCredsWarning = FALSE;
BOOL fHaveBadCredsWarning = FALSE;
- for (size_t iAlert = 0; iAlert < lpoaServer->nAlerts; ++iAlert)
+ size_t iAlert;
+ for (iAlert = 0; iAlert < lpoaServer->nAlerts; ++iAlert)
{
if (lpoaServer->aAlerts[ iAlert ].alert == alertSECONDARY)
{
LPOBJECTALERTS lpoa;
if ((lpoa = Alert_GetObjectAlerts (lpiChild, TRUE)) != NULL)
{
- for (size_t iAlert = 0; iAlert < lpoa->nAlerts; )
+ size_t iAlert;
+ for (iAlert = 0; iAlert < lpoa->nAlerts; )
{
if ( (lpoa->aAlerts[ iAlert ].alert == alertSECONDARY) &&
(lpoa->aAlerts[ iAlert ].aiSECONDARY.lpiSecondary == lpiChild) )
if (lpoa->nAlerts && (lpoa->aAlerts[0].alert == alertBADCREDS))
iInsert = 1;
- for (size_t iHole = iInsert; iHole < lpoa->nAlerts; ++iHole)
+ size_t iHole;
+ for (iHole = iInsert; iHole < lpoa->nAlerts; ++iHole)
{
if (lpoa->aAlerts[ iHole ].alert == alertINVALID)
break;
CMDLINEOP ParseCommandLine (LPTSTR pszCmdLine)
{
- for (size_t ii = 0; ii < nSWITCHES; ++ii)
+ size_t ii;
+ for (ii = 0; ii < nSWITCHES; ++ii)
aSWITCHES[ ii ].fPresent = FALSE;
// Search through pszCmdLine for switches; each switch must be
{
TCHAR szCopy[ cchRESOURCE ];
lstrcpy (szCopy, pszCmdLine);
- for (LPTSTR pch = szCopy;
+ LPTSTR pch;
+ for (pch = szCopy;
*pch && !iswhite(*pch) && !(*pch == TEXT('/')) && !(*pch == TEXT(':'));
++pch)
;
return opCLOSEAPP;
}
BOOL fQuoted = FALSE;
- for (LPTSTR pszTarget = aSWITCHES[ ii ].szValue;
+ LPTSTR pszTarget;
+ for (pszTarget = aSWITCHES[ ii ].szValue;
*pszCmdLine && !(*pszCmdLine == TEXT('/') && !fQuoted)
&& !(iswhite(*pszCmdLine) && !fQuoted); )
{
hList = GetDlgItem (hDlg, IDC_COL_AVAIL);
LB_StartChange (hList);
- for (size_t iAvail = 0; iAvail < lpvi->nColsAvail; ++iAvail)
+ size_t iAvail;
+ size_t iShown;
+ for (iAvail = 0; iAvail < lpvi->nColsAvail; ++iAvail)
{
- for (size_t iShown = 0; iShown < lpvi->nColsShown; ++iShown)
+ for (iShown = 0; iShown < lpvi->nColsShown; ++iShown)
{
if (lpvi->aColumns[ iShown ] == iAvail)
break;
hList = GetDlgItem (hDlg, IDC_COL_SHOWN);
LB_StartChange (hList);
- for (size_t iShown = 0; iShown < lpvi->nColsShown; ++iShown)
+ for (iShown = 0; iShown < lpvi->nColsShown; ++iShown)
{
iAvail = lpvi->aColumns[ iShown ];
LB_AddItem (hList, lpvi->idsColumns[ iAvail ], (LPARAM)iAvail);
{
EnterCriticalSection (&csDispatch);
- for (size_t iDispatch = 0; iDispatch < nDispatchList; ++iDispatch)
+ size_t iDispatch;
+ for (iDispatch = 0; iDispatch < nDispatchList; ++iDispatch)
{
if ( (aDispatchList[ iDispatch ].hWnd == hWnd) &&
(aDispatchList[ iDispatch ].when == when) &&
}
EnterCriticalSection (pcsWindowActOnDone);
- for (size_t ii = 0; ii < cWindowActOnDone; ++ii)
+ size_t ii;
+ for (ii = 0; ii < cWindowActOnDone; ++ii)
{
if (aWindowActOnDone[ ii ].hWnd == hWnd)
break;
EnterCriticalSection (pcsDisplayQueue);
- for (size_t idq = 0; idq < cDisplayQueue; ++idq)
+ size_t idq;
+ for (idq = 0; idq < cDisplayQueue; ++idq)
{
if (!aDisplayQueue[idq].hChild)
break;
}
else
{
- for (size_t idq = 0; idq < cDisplayQueue; ++idq)
+ size_t idq;
+ for (idq = 0; idq < cDisplayQueue; ++idq)
{
if (aDisplayQueue[idq].hChild)
{
EnterCriticalSection (pcsWindowList);
- for (size_t ii = 0; !lpdw && ii < cWindowList; ++ii)
+ size_t ii;
+ for (ii = 0; !lpdw && ii < cWindowList; ++ii)
{
if (aWindowList[ ii ].hWnd == hWnd)
lpdw = &aWindowList[ ii ].dw;
++pszKeyword;
// find the end of this word
- for (LPTSTR pszNext = pszKeyword; *pszNext && !iswhite(*pszNext); )
+ LPTSTR pszNext;
+ for (pszNext = pszKeyword; *pszNext && !iswhite(*pszNext); )
++pszNext;
if (!*pszNext) // last word? Gotta use it.
break;
GetDlgItemText (hDlg, 0x051F, szSys, cchRESOURCE);
if ((dw = NextSearch (cmd)) != 0)
{
- for (LPTSTR psz = &szSys[ lstrlen(szSys)-1 ]; *(psz-1) != TEXT('\n'); --psz);
+ LPTSTR psz;
+ for (psz = &szSys[ lstrlen(szSys)-1 ]; *(psz-1) != TEXT('\n'); --psz);
lstrcpy (szSys2, psz);
wsprintf (psz, TEXT("%c%s"), (TCHAR)dw, szSys2);
SetDlgItemText (hDlg, 0x051F, szSys);
}
else // (dw == 0)
{
- for (LPTSTR psz = szSys; *psz && (*psz != TEXT('\n')); ++psz);
+ LPTSTR psz;
+ for (psz = szSys; *psz && (*psz != TEXT('\n')); ++psz);
wsprintf (szSys2, TEXT("%s\n"), 1+psz);
SetDlgItemText (hDlg, 0x051F, szSys2);
}
{
if (!PropCache_Search (pcType, pv))
{
- for (size_t iEntry = 0; iEntry < PropCache_nEntries; ++iEntry)
+ size_t iEntry;
+ for (iEntry = 0; iEntry < PropCache_nEntries; ++iEntry)
{
if (!PropCache_apce[ iEntry ].fInUse)
break;
SetDlgItemText (hDlg, IDC_SVC_TYPE, szText);
LPTSTR pszParams = CloneString (TASKDATA(ptp)->cs.szParams);
- for (LPTSTR pch = pszParams; pch && *pch; ++pch)
+ LPTSTR pch;
+ for (pch = pszParams; pch && *pch; ++pch)
{
if (*pch == TEXT('\r') || *pch == TEXT('\t') || *pch == TEXT('\n'))
*pch = TEXT(' ');
// First see if the new IP address is already in the server's
// list of IP addresses--if so, just delete the old address.
//
- for (size_t iAddr = 0; iAddr < lpp->ssOld.nAddresses; ++iAddr)
+ size_t iAddr;
+ for (iAddr = 0; iAddr < lpp->ssOld.nAddresses; ++iAddr)
{
int OldAddrInt;
AfsClass_AddressToInt (&OldAddrInt, &lpp->ssOld.aAddresses[iAddr]);
if (ModalDialogParam (IDD_SVR_ADDHOST, hDlg, (DLGPROC)Server_AddHost_DlgProc, (LPARAM)pAdd) == IDOK)
{
- for (size_t iEntry = 0; iEntry < lpp->lpList->cEntries; ++iEntry)
+ size_t iEntry;
+ for (iEntry = 0; iEntry < lpp->lpList->cEntries; ++iEntry)
{
LPHOSTLISTENTRY pEntry = &lpp->lpList->aEntries[ iEntry ];
if (pEntry->szHost[0] == TEXT('\0'))
AfsAppLib_FreeCellList (pp.lpcl);
- for (size_t iEntry = 0; iEntry < lpp->lpAdmList->cEntries; ++iEntry)
+ size_t iEntry;
+ for (iEntry = 0; iEntry < lpp->lpAdmList->cEntries; ++iEntry)
{
LPADMINLISTENTRY pEntry = &lpp->lpAdmList->aEntries[ iEntry ];
if (pEntry->szAdmin[0] == TEXT('\0'))
void FormatServerKey (LPTSTR psz, LPENCRYPTIONKEY pKey)
{
- for (size_t ii = 0; ii < ENCRYPTIONKEY_LEN; ++ii)
+ size_t ii;
+ for (ii = 0; ii < ENCRYPTIONKEY_LEN; ++ii)
{
if (pKey->key[ii])
break;
BOOL ScanServerKey (LPENCRYPTIONKEY pKey, LPTSTR psz)
{
- for (size_t ich = 0; psz && *psz; )
+ size_t ich;
+ for (ich = 0; psz && *psz; )
{
if (ich == ENCRYPTIONKEY_LEN)
return FALSE;
void Browse_OnEndTask_EnumObjects (HWND hDlg, LPTASKPACKET ptp)
{
LPBROWSE_PARAMS lpp;
+ size_t ii;
if ((lpp = (LPBROWSE_PARAMS)GetWindowLong (hDlg, DWL_USER)) != NULL)
{
HWND hList = GetDlgItem (hDlg, IDC_BROWSE_LIST);
{
LPHASHLIST pListToSkip = New (HASHLIST);
- for (size_t ii = 0; ii < lpp->pObjectsToSkip->cEntries; ++ii)
+ for (ii = 0; ii < lpp->pObjectsToSkip->cEntries; ++ii)
pListToSkip->AddUnique ((PVOID)(lpp->pObjectsToSkip->aEntries[ii].idObject));
for (ii = 0; ii < TASKDATA(ptp)->pAsidList->cEntries; )
// OK, we're ready to go--populate that list!
//
- for (size_t ii = 0; ii < TASKDATA(ptp)->pAsidList->cEntries; ++ii)
+ for (ii = 0; ii < TASKDATA(ptp)->pAsidList->cEntries; ++ii)
{
ULONG status;
ASOBJPROP Properties;
CMDLINEOP ParseCommandLine (LPTSTR pszCmdLine)
{
- for (size_t ii = 0; ii < nSWITCHES; ++ii)
+ size_t ii;
+ for (ii = 0; ii < nSWITCHES; ++ii)
aSWITCHES[ ii ].fPresent = FALSE;
// Search through pszCmdLine for switches; each switch must be
{
TCHAR szCopy[ cchRESOURCE ];
lstrcpy (szCopy, pszCmdLine);
- for (LPTSTR pch = szCopy;
+ LPTSTR pch;
+ for (pch = szCopy;
*pch && !iswhite(*pch) && !(*pch == TEXT('/')) && !(*pch == TEXT(':'));
++pch)
;
return opCLOSEAPP;
}
BOOL fQuoted = FALSE;
- for (LPTSTR pszTarget = aSWITCHES[ ii ].szValue;
+ LPTSTR pszTarget;
+ for (pszTarget = aSWITCHES[ ii ].szValue;
*pszCmdLine && !(*pszCmdLine == TEXT('/') && !fQuoted)
&& !(iswhite(*pszCmdLine) && !fQuoted); )
{
hList = GetDlgItem (hDlg, IDC_COL_AVAIL);
LB_StartChange (hList);
- for (size_t iAvail = 0; iAvail < lpvi->nColsAvail; ++iAvail)
+ size_t iAvail;
+ size_t iShown;
+ for (iAvail = 0; iAvail < lpvi->nColsAvail; ++iAvail)
{
- for (size_t iShown = 0; iShown < lpvi->nColsShown; ++iShown)
+ for (iShown = 0; iShown < lpvi->nColsShown; ++iShown)
{
if (lpvi->aColumns[ iShown ] == iAvail)
break;
hList = GetDlgItem (hDlg, IDC_COL_SHOWN);
LB_StartChange (hList);
- for (size_t iShown = 0; iShown < lpvi->nColsShown; ++iShown)
+ for (iShown = 0; iShown < lpvi->nColsShown; ++iShown)
{
iAvail = lpvi->aColumns[ iShown ];
LB_AddItem (hList, lpvi->idsColumns[ iAvail ], (LPARAM)iAvail);
void FormatServerKey (LPTSTR psz, PBYTE pKey)
{
- for (size_t ii = 0; ii < ENCRYPTIONKEYLENGTH; ++ii)
+ size_t ii;
+ for (ii = 0; ii < ENCRYPTIONKEYLENGTH; ++ii)
{
if (pKey[ii])
break;
BOOL ScanServerKey (PBYTE pKey, LPTSTR psz)
{
- for (size_t ich = 0; psz && *psz; )
+ size_t ich;
+ for (ich = 0; psz && *psz; )
{
if (ich == ENCRYPTIONKEYLENGTH)
return FALSE;
++pszKeyword;
// find the end of this word
- for (LPTSTR pszNext = pszKeyword; *pszNext && !iswhite(*pszNext); )
+ LPTSTR pszNext;
+ for (pszNext = pszKeyword; *pszNext && !iswhite(*pszNext); )
++pszNext;
if (!*pszNext) // last word? Gotta use it.
break;
DWORD dw;
TCHAR szSys[cchRESOURCE];
TCHAR szSys2[cchRESOURCE];
+ LPTSTR psz;
GetDlgItemText (hDlg, 0x07E6, szSys, cchRESOURCE);
if ((dw = NextSearch (cmd)) != 0)
{
- for (LPTSTR psz = &szSys[ lstrlen(szSys)-1 ]; *(psz-1) != TEXT('\n'); --psz);
+ for (psz = &szSys[ lstrlen(szSys)-1 ]; *(psz-1) != TEXT('\n'); --psz);
lstrcpy (szSys2, psz);
wsprintf (psz, TEXT("%c%s"), (TCHAR)dw, szSys2);
SetDlgItemText (hDlg, 0x07E6, szSys);
}
else // (dw == 0)
{
- for (LPTSTR psz = szSys; *psz && (*psz != TEXT('\n')); ++psz);
+ for (psz = szSys; *psz && (*psz != TEXT('\n')); ++psz);
wsprintf (szSys2, TEXT("%s\n"), 1+psz);
SetDlgItemText (hDlg, 0x07E6, szSys2);
}
// test it for inclusion of a particular group.
//
LPHASHLIST pGroupsAllow = New (HASHLIST);
- for (size_t iGroup = 0; iGroup < lpp->pGroups->cEntries; ++iGroup)
+ size_t iGroup;
+ for (iGroup = 0; iGroup < lpp->pGroups->cEntries; ++iGroup)
pGroupsAllow->AddUnique ((PVOID)(lpp->pGroups->aEntries[ iGroup ].idObject));
// We'll have to do this next bit for each user in the supplied user-list
// test it to see if a particular member should remain in a group.
//
LPHASHLIST pMembersAllow = New (HASHLIST);
- for (size_t iMember = 0; iMember < lpp->pMembers->cEntries; ++iMember)
+ size_t iMember;
+ for (iMember = 0; iMember < lpp->pMembers->cEntries; ++iMember)
pMembersAllow->AddUnique ((PVOID)(lpp->pMembers->aEntries[ iMember ].idObject));
// We'll have to do this next bit for each group in the supplied group-list
// quickly test it for inclusion of a particular group.
//
LPHASHLIST pGroupsAllow = New (HASHLIST);
- for (size_t iGroup = 0; iGroup < lpp->pOwnedGroups->cEntries; ++iGroup)
+ size_t iGroup;
+ for (iGroup = 0; iGroup < lpp->pOwnedGroups->cEntries; ++iGroup)
pGroupsAllow->AddUnique ((PVOID)(lpp->pOwnedGroups->aEntries[ iGroup ].idObject));
// Obtain the current list-of-groups-owned for this group
{
// See if this window is already in the list
//
- for (size_t ii = 0; ii < cWindowList; ++ii)
+ size_t ii;
+ for (ii = 0; ii < cWindowList; ++ii)
{
if (aWindowList[ ii ].hWnd == hWnd)
return;
static DWORD log2 (DWORD dwValue)
{
- for (DWORD dwLog = 0; (DWORD)(1<<dwLog) < dwValue; ++dwLog)
+ DWORD dwLog;
+ for (dwLog = 0; (DWORD)(1<<dwLog) < dwValue; ++dwLog)
;
return dwLog;
}
{
Config_WriteUserNum (TEXT("ShowTrayIcon"), fFlag);
- for (HWND hSearch = GetWindow (GetDesktopWindow(), GW_CHILD);
+ HWND hSearch;
+ for (hSearch = GetWindow (GetDesktopWindow(), GW_CHILD);
hSearch && IsWindow(hSearch);
hSearch = GetWindow (hSearch, GW_HWNDNEXT))
{
if (pPrefs)
{
size_t cChanged = 0;
- for (size_t ii = 0; ii < pPrefs->cPrefs; ++ii)
+ size_t ii;
+ for (ii = 0; ii < pPrefs->cPrefs; ++ii)
{
if (pPrefs->aPrefs[ ii ].fChanged)
++cChanged;
if ( submountPath[0] != TEXT('\0') ) {
AdjustAfsPath (Submount.szMapping, submountPath, FALSE, TRUE);
- for (size_t ii = 0; ii < pList->cSubmounts; ++ii)
+ size_t ii;
+ for (ii = 0; ii < pList->cSubmounts; ++ii)
{
if (!pList->aSubmounts[ii].szSubmount[0])
break;
static DWORD log2 (DWORD dwValue)
{
- for (DWORD dwLog = 0; (DWORD)(1<<dwLog) < dwValue; ++dwLog)
+ DWORD dwLog;
+ for (dwLog = 0; (DWORD)(1<<dwLog) < dwValue; ++dwLog)
;
return dwLog;
}
// and the ranking.
//
TCHAR szServer[ MAX_PATH ];
- for (LPTSTR pszOut = szServer; *pszStart && !iswhite(*pszStart); )
+ LPTSTR pszOut;
+ for (pszOut = szServer; *pszStart && !iswhite(*pszStart); )
*pszOut++ = *pszStart++;
*pszOut = TEXT('\0');
LPHASHLIST pList = New (HASHLIST);
LPHASHLISTKEY pKey = pList->CreateKey (TEXT("IP Address"), IPKey_Compare, IPKey_HashObject, IPKey_HashData);
- for (size_t ii = 0; ii < pGlobal->cPrefs; ++ii)
+ size_t ii;
+ for (ii = 0; ii < pGlobal->cPrefs; ++ii)
{
if (!pGlobal->aPrefs[ ii ].ipServer)
continue;
BOOL fVLServers = IsDlgButtonChecked (hDlg, IDC_SHOW_VLS);
PSERVERPREFS pPrefs = (fVLServers) ? g.Configuration.pVLServers : g.Configuration.pFServers;
- for (size_t ii = 0; ii < pPrefs->cPrefs; ++ii)
+ size_t ii;
+ for (ii = 0; ii < pPrefs->cPrefs; ++ii)
{
if (pPrefs->aPrefs[ ii ].ipServer == pPref->ipServer)
break;
// credentials within a certain cell under the certain name.
// Stick that knowledge in our g.aCreds array.
//
- for (size_t iCreds = 0; iCreds < g.cCreds; ++iCreds)
+ size_t iCreds;
+ for (iCreds = 0; iCreds < g.cCreds; ++iCreds)
{
if (!lstrcmpi (g.aCreds[ iCreds ].szCell, szCell))
break;
{
LPTSTR pszCell = (LPTSTR)GetWindowLong (hDlg, DWL_USER);
lock_ObtainMutex(&g.credsLock);
- for (size_t iCreds = 0; iCreds < g.cCreds; ++iCreds)
+ size_t iCreds;
+ for (iCreds = 0; iCreds < g.cCreds; ++iCreds)
{
if (!lstrcmpi (g.aCreds[ iCreds ].szCell, pszCell))
break;
}
lock_ObtainMutex(&g.credsLock);
- for (size_t iCreds = 0; iCreds < g.cCreds; ++iCreds)
+ size_t iCreds;
+ for (iCreds = 0; iCreds < g.cCreds; ++iCreds)
{
if (!lstrcmpi (g.aCreds[ iCreds ].szCell, pszCell))
break;
}
lock_ObtainMutex(&g.credsLock);
- for (size_t iCreds = 0; iCreds < g.cCreds; ++iCreds)
+ size_t iCreds;
+ for (iCreds = 0; iCreds < g.cCreds; ++iCreds)
{
if (*pszCell && !lstrcmpi (g.aCreds[ iCreds ].szCell, pszCell))
break;
if (hChildDlg)
CheckDlgButton (hChildDlg, IDC_CREDS_REMIND, FALSE);
- }
+ }
}
rc = ppf->Save (pszTarget, TRUE);
#else
WORD wsz[ MAX_PATH ];
- MultiByteToWideChar (CP_ACP, 0, pszTarget, -1, wsz, MAX_PATH);
- rc = ppf->Save (wsz, TRUE);
+ MultiByteToWideChar (CP_ACP, 0, pszTarget, -1, (LPWSTR)wsz, MAX_PATH);
+ rc = ppf->Save ((LPCOLESTR)wsz, TRUE);
#endif
}
}
{
BOOL fRemind = FALSE;
lock_ObtainMutex(&g.credsLock);
- for (size_t iCreds = 0; iCreds < g.cCreds; ++iCreds)
+ size_t iCreds;
+ for (iCreds = 0; iCreds < g.cCreds; ++iCreds)
{
if (g.aCreds[ iCreds ].fRemind)
fRemind = TRUE;
size_t nCreds = 0;
lock_ObtainMutex(&g.credsLock);
- for (size_t iCreds = 0; iCreds < g.cCreds; ++iCreds)
+ size_t iCreds;
+ for (iCreds = 0; iCreds < g.cCreds; ++iCreds)
{
if (g.aCreds[ iCreds ].szCell[0])
++nCreds;
{
if (g.aCreds[ iCreds ].szCell[0])
{
- for (size_t ii = 0; ii < iTabOut; ++ii)
+ size_t ii;
+ for (ii = 0; ii < iTabOut; ++ii)
{
if (!ISCELLTAB (aTabs[ii]))
continue;
extern void Die(int, char *);
-static SetVolCmd(struct cmd_syndesc *);
+static int SetVolCmd(struct cmd_syndesc *);
#endif /* FS_H_ENV */
}
/* tell if a name is 23 or -45 (digits or minus digits), which are bad names we must prune */
-static BadName(register char *aname)
+static int BadName(register char *aname)
{
register int tc;
pAcl = EmptyAcl(strCellName);
// Set its normal rights
- for (int i = 0; i < normal.GetSize(); i += 2) {
+ int i;
+ for (i = 0; i < normal.GetSize(); i += 2) {
rights = Convert(normal[i + 1], 0, &rtype);
ChangeList(pAcl, TRUE, normal[i], rights);
}
enum rtype rtype;
// Set normal rights
- for (int i = 0; i < normal.GetSize(); i += 2) {
+ int i;
+ for (i = 0; i < normal.GetSize(); i += 2) {
LONG rights = Convert(normal[i + 1], 0, &rtype);
ChangeList(pToAcl, TRUE, normal[i], rights);
}
m_NormalRights.SetTabStops(58);
m_NegativeRights.SetTabStops(58);
- for (int i = 0; i < m_Normal.GetSize(); i += 2)
+ int i;
+ for (i = 0; i < m_Normal.GetSize(); i += 2)
m_NormalRights.AddString(m_Normal[i + 1] + "\t" + m_Normal[i]);
for (i = 0; i < m_Negative.GetSize(); i += 2)
extern long osi_UnregisterFDType(char *);
-extern osi_AddFDFormatInfo(osi_fdType_t *typep, long region, long index,
+extern int osi_AddFDFormatInfo(osi_fdType_t *typep, long region, long index,
char *labelp, long format);
-extern osi_InitFD(void);
+extern int osi_InitFD(void);
extern osi_fd_t *osi_AllocFD(char *);
extern osi_fd_t *osi_FindFD(long);
-extern osi_CloseFD(osi_fd_t *);
+extern int osi_CloseFD(osi_fd_t *);
extern long osi_FDTypeCreate(osi_fdType_t *, osi_fd_t **);
// so, remove it (its priority may be changing, or we may actually
// have been asked to remove it).
//
- for (size_t iModule = 0; iModule < l_cModules; ++iModule)
+ size_t iModule;
+ for (iModule = 0; iModule < l_cModules; ++iModule)
{
if (l_aModules[ iModule ].wPriority == 0) // end of list?
break;
break;
}
- for (size_t iTarget = iModule; iTarget < l_cModules; ++iTarget)
+ size_t iTarget;
+ for (iTarget = iModule; iTarget < l_cModules; ++iTarget)
{
if (l_aModules[ iTarget ].wPriority == 0) // end of list?
break;
#include <afs/stds.h>
}
+#include <windows.h>
+#include <windowsx.h>
#include <WINNT/talocale.h>
#include <stdlib.h>
if ((psz = (LPTSTR)lstrchr (&szFmt[1], TEXT('%'))) != NULL)
*psz = 0;
- for (int ii = 1; szFmt[ii] == TEXT('-') || szFmt[ii] == TEXT(','); ii++)
+ int ii;
+ for (ii = 1; szFmt[ii] == TEXT('-') || szFmt[ii] == TEXT(','); ii++)
;
cchMin = _ttol (&szFmt[ii]);
{
lstrcpy (szFormat, pszFormatUser);
- for (LPTSTR pch = &szFormat[1]; *pch; ++pch)
+ LPTSTR pch;
+ for (pch = &szFormat[1]; *pch; ++pch)
{
if (!isfmtgarbage(*pch))
{
// Cheesy bit: if all we have are 0's and "."'s, just
// make the number read "0".
//
-
- for (TCHAR *pch = szJustTheNumber; *pch; ++pch)
+ TCHAR * pch;
+ for (pch = szJustTheNumber; *pch; ++pch)
{
if (*pch != TEXT('0') && *pch != TEXT('.'))
break;
{
lstrcpy (szFormat, pszFormat);
- for (LPTSTR pch = &szFormat[1]; *pch; ++pch)
+ LPTSTR pch;
+ for (pch = &szFormat[1]; *pch; ++pch)
{
if (!isfmtgarbage(*pch))
{
extern void lsplitpath (LPCTSTR pszSource,
LPTSTR pszDrive, LPTSTR pszPath, LPTSTR pszBase, LPTSTR pszExt);
-
-
#endif