Source code of Windows XP (NT5)
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.

52 lines
1.1 KiB

  1. #include "stdafx.h"
  2. #include "allowed.h"
  3. using namespace std;
  4. ModulesAndImports::~ModulesAndImports ()
  5. {
  6. /*
  7. while (!m_modules.IsEmpty())
  8. delete (ImportsModule*)m_modules.RemoveTail();
  9. */
  10. }
  11. BOOL
  12. ModulesAndImports::IsModule (LPCSTR name)
  13. {
  14. CString str;
  15. m_curr_module = name;
  16. return m_imports.Lookup (name, str);
  17. /*
  18. CString strname (name);
  19. strname.MakeUpper ();
  20. for (POSITION pos = m_modules.GetHeadPosition();pos != NULL;m_modules.GetNext(pos)) {
  21. m_curr_module = (ImportsModule*)m_modules.GetAt(pos);
  22. // cerr << "comparing " << (LPCSTR)strname << " and " << (LPCSTR)(*m_curr_module) << endl;
  23. if (strname == *m_curr_module)
  24. return TRUE;
  25. }
  26. m_curr_module = NULL;
  27. return FALSE;
  28. */
  29. }
  30. BOOL
  31. ModulesAndImports::Lookup (LPCSTR name, CString& msg)
  32. {
  33. /*
  34. if (m_curr_module) {
  35. // cerr << "checking for " << name << endl;
  36. return m_curr_module->Lookup (name);
  37. }
  38. return FALSE;
  39. */
  40. msg = "";
  41. return m_imports.Lookup (m_curr_module+CString("!")+CString(name), msg);
  42. }