Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
a7660331a
tesseract
提交
945590d5
T
tesseract
项目概览
a7660331a
/
tesseract
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
tesseract
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
945590d5
编写于
6月 03, 2017
作者:
E
Egor Pugin
提交者:
GitHub
6月 03, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #968 from stweil/autoconf
Remove unused code
上级
42066ce6
8ec67a94
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
0 addition
and
157 deletion
+0
-157
training/CMakeLists.txt
training/CMakeLists.txt
+0
-3
training/Makefile.am
training/Makefile.am
+0
-2
training/pango_font_info.cpp
training/pango_font_info.cpp
+0
-12
training/pango_font_info.h
training/pango_font_info.h
+0
-2
vs2010/port/strcasestr.cpp
vs2010/port/strcasestr.cpp
+0
-79
vs2010/port/strcasestr.h
vs2010/port/strcasestr.h
+0
-59
未找到文件。
training/CMakeLists.txt
浏览文件 @
945590d5
...
...
@@ -257,9 +257,6 @@ set(text2image_src
util.h
icuerrorcode.h
)
if
(
CYGWIN
)
set
(
text2image_src
${
text2image_src
}
../vs2010/port/strcasestr.cpp
)
endif
()
add_executable
(
text2image
${
text2image_src
}
)
target_link_libraries
(
text2image unicharset_training
)
...
...
training/Makefile.am
浏览文件 @
945590d5
...
...
@@ -347,8 +347,6 @@ text2image_LDADD += -lws2_32
wordlist2dawg_LDADD
+=
-lws2_32
AM_CPPFLAGS
+=
-I
$(top_srcdir)
/vs2010/port
noinst_HEADERS
+=
../vs2010/port/strcasestr.h
libtesseract_training_la_SOURCES
+=
../vs2010/port/strcasestr.cpp
endif
ambiguous_words_LDFLAGS
=
$(OPENCL_LDFLAGS)
...
...
training/pango_font_info.cpp
浏览文件 @
945590d5
...
...
@@ -26,15 +26,7 @@
// workaround for stdlib.h and putenv
#undef __STRICT_ANSI__
#if (defined __MINGW32__)
#include "strcasestr.h"
#elif !defined(_GNU_SOURCE)
// needed for strcasestr in string.h
#define _GNU_SOURCE
#endif
#elif defined(_MSC_VER)
#include "strcasestr.h"
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#endif
...
...
@@ -234,10 +226,6 @@ bool PangoFontInfo::ParseFontDescription(const PangoFontDescription *desc) {
==
PANGO_VARIANT_SMALL_CAPS
);
is_bold_
=
(
pango_font_description_get_weight
(
desc
)
>=
PANGO_WEIGHT_BOLD
);
// We don't have a way to detect whether a font is of type Fraktur. The fonts
// we currently use all have "Fraktur" in their family name, so we do a
// fragile but functional check for that here.
is_fraktur_
=
(
strcasestr
(
family
,
"Fraktur"
)
!=
nullptr
);
return
true
;
}
...
...
training/pango_font_info.h
浏览文件 @
945590d5
...
...
@@ -109,7 +109,6 @@ class PangoFontInfo {
bool
is_italic
()
const
{
return
is_italic_
;
}
bool
is_smallcaps
()
const
{
return
is_smallcaps_
;
}
bool
is_monospace
()
const
{
return
is_monospace_
;
}
bool
is_fraktur
()
const
{
return
is_fraktur_
;
}
FontTypeEnum
font_type
()
const
{
return
font_type_
;
}
int
resolution
()
const
{
return
resolution_
;
}
...
...
@@ -132,7 +131,6 @@ class PangoFontInfo {
bool
is_italic_
;
bool
is_smallcaps_
;
bool
is_monospace_
;
bool
is_fraktur_
;
FontTypeEnum
font_type_
;
// The Pango description that was used to initialize the instance.
PangoFontDescription
*
desc_
;
...
...
vs2010/port/strcasestr.cpp
已删除
100644 → 0
浏览文件 @
42066ce6
/*
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies of the Software and its Copyright notices. In addition publicly
documented acknowledgment must be given that this software has been used if no
source code of this software is made available publicly. Making the source
available publicly means including the source for this software with the
distribution, or a method to get this software via some reasonable mechanism
(electronic transfer via a network or media) as well as making an offer to
supply the source on request. This Copyright notice serves as an offer to
supply the source on on request as well. Instead of this, supplying
acknowledgments of use of this software in either Copyright notices, Manuals,
Publicity and Marketing documents or any documentation provided with any
product containing this software. This License does not apply to any software
that links to the libraries provided by this software (statically or
dynamically), but only to the software provided.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Source:
Evil 1.7.4
The Evil library tried to port some convenient Unix functions
to the Windows (XP or CE) platform. They are planned to be used
http://git.enlightenment.org/legacy/evil.git/tree/src/lib/evil_string.c?id=eeaddf80d0d547d4c216974038c0599b34359695
*/
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
char
*
strcasestr
(
const
char
*
haystack
,
const
char
*
needle
)
{
size_t
length_needle
;
size_t
length_haystack
;
size_t
i
;
if
(
!
haystack
||
!
needle
)
return
NULL
;
length_needle
=
strlen
(
needle
);
length_haystack
=
strlen
(
haystack
);
if
(
length_haystack
<
length_needle
)
return
NULL
;
length_haystack
-=
length_needle
;
for
(
i
=
0
;
i
<=
length_haystack
;
i
++
)
{
size_t
j
;
for
(
j
=
0
;
j
<
length_needle
;
j
++
)
{
unsigned
char
c1
;
unsigned
char
c2
;
c1
=
haystack
[
i
+
j
];
c2
=
needle
[
j
];
if
(
toupper
(
c1
)
!=
toupper
(
c2
))
goto
next
;
}
return
(
char
*
)
haystack
+
i
;
next:
;
}
return
NULL
;
}
vs2010/port/strcasestr.h
已删除
100644 → 0
浏览文件 @
42066ce6
/*
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies of the Software and its Copyright notices. In addition publicly
documented acknowledgment must be given that this software has been used if no
source code of this software is made available publicly. Making the source
available publicly means including the source for this software with the
distribution, or a method to get this software via some reasonable mechanism
(electronic transfer via a network or media) as well as making an offer to
supply the source on request. This Copyright notice serves as an offer to
supply the source on on request as well. Instead of this, supplying
acknowledgments of use of this software in either Copyright notices, Manuals,
Publicity and Marketing documents or any documentation provided with any
product containing this software. This License does not apply to any software
that links to the libraries provided by this software (statically or
dynamically), but only to the software provided.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Source:
Evil 1.7.4
The Evil library tried to port some convenient Unix functions
to the Windows (XP or CE) platform. They are planned to be used
http://git.enlightenment.org/legacy/evil.git/tree/src/lib/evil_string.h?id=eeaddf80d0d547d4c216974038c0599b34359695
*/
#ifndef VS2010_PORT_STRCASESTR_H_
#define VS2010_PORT_STRCASESTR_H_
/**
* @brief Locatea substring into a string, ignoring case.
*
* @param haystack The string to search in.
* @param needle The substring to find.
* @return
*
* This function locates the string @p needle into the string @p haystack,
* ignoring the case of the characters. It returns apointer to the
* beginning of the substring, or NULL if the substring is not found.
* If @p haystack or @p needle are @c NULL, this function returns @c NULL.
*
* Conformity: Non applicable.
*
* Supported OS: Windows XP, Windows CE
*/
char
*
strcasestr
(
const
char
*
haystack
,
const
char
*
needle
);
#endif
/* VS2010_PORT_STRCASESTR_H_ */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录