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.

49 lines
1.8 KiB

  1. ////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Filename : Global.cpp
  4. // Purpose : Global Initalization.
  5. //
  6. // Project : WordBreakers
  7. // Component: English word breaker
  8. //
  9. // Author : yairh
  10. //
  11. // Log:
  12. //
  13. // May 30 2000 yairh creation
  14. //
  15. ////////////////////////////////////////////////////////////////////////////////
  16. #include "base.h"
  17. #include "tokenizer.h"
  18. #include "formats.h"
  19. #include "synchro.h"
  20. extern CAutoClassPointer<CPropArray> g_pPropArray;
  21. extern CAutoClassPointer<CSyncCriticalSection> g_apcsSpanishDictInit;
  22. void InitializeGlobalData()
  23. {
  24. CAutoClassPointer<CPropArray> apPropArray = new CPropArray;
  25. CAutoClassPointer<CClitics> apClitics = new CClitics;
  26. CAutoClassPointer<CSpecialAbbreviationSet> apEngAbbList = new CSpecialAbbreviationSet(g_aEngAbbList);
  27. CAutoClassPointer<CSpecialAbbreviationSet> apFrnAbbList = new CSpecialAbbreviationSet(g_aFrenchAbbList);
  28. CAutoClassPointer<CSpecialAbbreviationSet> apSpnAbbList = new CSpecialAbbreviationSet(g_aSpanishAbbList);
  29. CAutoClassPointer<CSpecialAbbreviationSet> apItlAbbList = new CSpecialAbbreviationSet(g_aItalianAbbList);
  30. CAutoClassPointer<CDateFormat> apDateFormat = new CDateFormat;
  31. CAutoClassPointer<CTimeFormat> apTimeFormat = new CTimeFormat;
  32. CAutoClassPointer<CSyncCriticalSection> apcsSpanishDictInit = new CSyncCriticalSection;
  33. g_pPropArray = apPropArray.Detach();
  34. g_pClitics = apClitics.Detach();
  35. g_pEngAbbList = apEngAbbList.Detach() ;
  36. g_pFrnAbbList = apFrnAbbList.Detach();
  37. g_pSpnAbbList = apSpnAbbList.Detach() ;
  38. g_pItlAbbList = apItlAbbList.Detach() ;
  39. g_pDateFormat = apDateFormat.Detach();
  40. g_pTimeFormat = apTimeFormat.Detach();
  41. g_apcsSpanishDictInit = apcsSpanishDictInit.Detach();
  42. }