Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.1 KiB

  1. /*++
  2. Copyright (c) 1994 Microsoft Corporation
  3. All rights reserved.
  4. Module Name:
  5. splutil.cxx
  6. Abstract:
  7. Common utils.
  8. Author:
  9. Albert Ting (AlbertT) 29-May-1994
  10. Revision History:
  11. --*/
  12. #include "spllibp.hxx"
  13. #pragma hdrstop
  14. #if DBG
  15. VOID
  16. LinkListDump(
  17. PDLINK pdlinkHead,
  18. DWORD offset,
  19. LPCSTR pcszType,
  20. LPCSTR pcszName
  21. )
  22. {
  23. PDLINK pdlinkT;
  24. DbgMsg( " [Dump LL %s::%s (offset %d)]\n",
  25. pcszType,
  26. pcszName,
  27. offset);
  28. for( pdlinkT = pdlinkHead;
  29. pdlinkT != pdlinkHead;
  30. pdlinkT = pdlinkT->FLink ){
  31. DbgMsg( " %x\n", (PBYTE)pdlinkT + offset );
  32. }
  33. }
  34. #endif
  35. MEntry*
  36. MEntry::
  37. pFindEntry(
  38. PDLINK pdlink,
  39. LPCTSTR pszName
  40. )
  41. {
  42. PDLINK pdlinkT;
  43. MEntry* pEntry;
  44. for( pdlinkT = pdlink->FLink;
  45. pdlinkT != pdlink;
  46. pdlinkT = pdlinkT->FLink ){
  47. pEntry = MEntry::Entry_pConvert( pdlinkT );
  48. if( pEntry->_strName == pszName ){
  49. return pEntry;
  50. }
  51. }
  52. return NULL;
  53. }