~ubuntu-branches/ubuntu/utopic/tesseract/utopic-proposed

« back to all changes in this revision

Viewing changes to ccutil/ccutil.cpp

  • Committer: Package Import Robot
  • Author(s): Jeff Breidenbach
  • Date: 2012-10-23 23:25:05 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20121023232505-01pfq6trlgqtagwj
Tags: 3.02.02-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
  params_(),
9
9
  STRING_INIT_MEMBER(m_data_sub_dir,
10
10
                     "tessdata/", "Directory for data files", &params_),
11
 
#ifdef __MSW32__
12
 
  STRING_INIT_MEMBER(tessedit_module_name, "tessdll.dll",
 
11
#ifdef _WIN32
 
12
  STRING_INIT_MEMBER(tessedit_module_name, WINDLLNAME,
13
13
                     "Module colocated with tessdata dir", &params_),
14
14
#endif
15
15
  INT_INIT_MEMBER(ambigs_debug_level, 0, "Debug level for unichar ambiguities",
25
25
 
26
26
 
27
27
CCUtilMutex::CCUtilMutex() {
28
 
#ifdef WIN32
 
28
#ifdef _WIN32
29
29
  mutex_ = CreateMutex(0, FALSE, 0);
30
30
#else
31
31
  pthread_mutex_init(&mutex_, NULL);
33
33
}
34
34
 
35
35
void CCUtilMutex::Lock() {
36
 
#ifdef WIN32
 
36
#ifdef _WIN32
37
37
  WaitForSingleObject(mutex_, INFINITE);
38
38
#else
39
39
  pthread_mutex_lock(&mutex_);
41
41
}
42
42
 
43
43
void CCUtilMutex::Unlock() {
44
 
#ifdef WIN32
 
44
#ifdef _WIN32
45
45
  ReleaseMutex(mutex_);
46
46
#else
47
47
  pthread_mutex_unlock(&mutex_);