Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
ea5e8a02
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
1 年多 前同步成功
通知
0
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ea5e8a02
编写于
3月 19, 2014
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[util] Plug minor leak
上级
09732cc6
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
24 addition
and
17 deletion
+24
-17
util/hb-shape.cc
util/hb-shape.cc
+3
-3
util/helper-cairo.cc
util/helper-cairo.cc
+12
-9
util/helper-cairo.hh
util/helper-cairo.hh
+1
-1
util/options.cc
util/options.cc
+5
-1
util/options.hh
util/options.hh
+3
-3
未找到文件。
util/hb-shape.cc
浏览文件 @
ea5e8a02
...
...
@@ -31,8 +31,7 @@
struct
output_buffer_t
{
output_buffer_t
(
option_parser_t
*
parser
)
:
options
(
parser
,
g_strjoinv
(
"/"
,
(
gchar
**
)
hb_buffer_serialize_list_formats
())),
:
options
(
parser
,
hb_buffer_serialize_list_formats
()),
format
(
parser
),
gs
(
NULL
),
line_no
(
0
),
...
...
@@ -53,7 +52,8 @@ struct output_buffer_t
{
if
(
options
.
explicit_output_format
)
fail
(
false
,
"Unknown output format `%s'; supported formats are: %s"
,
options
.
output_format
,
options
.
supported_formats
);
options
.
output_format
,
g_strjoinv
(
"/"
,
const_cast
<
char
**>
(
options
.
supported_formats
)));
else
/* Just default to TEXT if not explicitly requested and the
* file extension is not recognized. */
...
...
util/helper-cairo.cc
浏览文件 @
ea5e8a02
...
...
@@ -246,24 +246,26 @@ stdio_write_func (void *closure,
return
CAIRO_STATUS_SUCCESS
;
}
const
char
helper_cairo_supported_formats
[]
=
"ansi"
const
char
*
helper_cairo_supported_formats
[]
=
{
"ansi"
,
#ifdef CAIRO_HAS_PNG_FUNCTIONS
"
/png"
"
png"
,
#endif
#ifdef CAIRO_HAS_SVG_SURFACE
"
/svg"
"
svg"
,
#endif
#ifdef CAIRO_HAS_PDF_SURFACE
"
/pdf"
"
pdf"
,
#endif
#ifdef CAIRO_HAS_PS_SURFACE
"
/ps"
"
ps"
,
#ifdef HAS_EPS
"
/eps"
"
eps"
,
#endif
#endif
;
NULL
};
cairo_t
*
helper_cairo_create_context
(
double
w
,
double
h
,
...
...
@@ -343,7 +345,8 @@ helper_cairo_create_context (double w, double h,
surface
=
constructor2
(
stdio_write_func
,
f
,
w
,
h
,
content
);
else
fail
(
false
,
"Unknown output format `%s'; supported formats are: %s%s"
,
extension
,
helper_cairo_supported_formats
,
extension
,
g_strjoinv
(
"/"
,
const_cast
<
char
**>
(
helper_cairo_supported_formats
)),
out_opts
->
explicit_output_format
?
""
:
"
\n
Try setting format using --output-format"
);
...
...
util/helper-cairo.hh
浏览文件 @
ea5e8a02
...
...
@@ -36,7 +36,7 @@ cairo_scaled_font_t *
helper_cairo_create_scaled_font
(
const
font_options_t
*
font_opts
,
double
font_size
);
extern
const
char
helper_cairo_supported_formats
[];
extern
const
char
*
helper_cairo_supported_formats
[];
cairo_t
*
helper_cairo_create_context
(
double
w
,
double
h
,
...
...
util/options.cc
浏览文件 @
ea5e8a02
...
...
@@ -374,7 +374,11 @@ output_options_t::add_options (option_parser_t *parser)
if
(
NULL
==
supported_formats
)
text
=
"Set output format"
;
else
text
=
text_free
=
g_strdup_printf
(
"Set output format
\n\n
Supported formats are: %s"
,
supported_formats
);
{
char
*
items
=
g_strjoinv
(
"/"
,
const_cast
<
char
**>
(
supported_formats
));
text
=
text_free
=
g_strdup_printf
(
"Set output format
\n\n
Supported formats are: %s"
,
items
);
g_free
(
items
);
}
GOptionEntry
entries
[]
=
{
...
...
util/options.hh
浏览文件 @
ea5e8a02
...
...
@@ -65,7 +65,7 @@ template <typename Type> static inline Type MIN (const Type &a, const Type &b) {
template
<
typename
Type
>
static
inline
Type
MAX
(
const
Type
&
a
,
const
Type
&
b
)
{
return
a
>
b
?
a
:
b
;
}
void
fail
(
hb_bool_t
suggest_help
,
const
char
*
format
,
...)
G_GNUC_NORETURN
;
void
fail
(
hb_bool_t
suggest_help
,
const
char
*
format
,
...)
G_GNUC_NORETURN
G_GNUC_PRINTF
(
2
,
3
)
;
extern
hb_bool_t
debug
;
...
...
@@ -318,7 +318,7 @@ struct text_options_t : option_group_t
struct
output_options_t
:
option_group_t
{
output_options_t
(
option_parser_t
*
parser
,
const
char
*
supported_formats_
=
NULL
)
{
const
char
*
*
supported_formats_
=
NULL
)
{
output_file
=
NULL
;
output_format
=
NULL
;
supported_formats
=
supported_formats_
;
...
...
@@ -354,7 +354,7 @@ struct output_options_t : option_group_t
const
char
*
output_file
;
const
char
*
output_format
;
const
char
*
supported_formats
;
const
char
*
*
supported_formats
;
bool
explicit_output_format
;
mutable
FILE
*
fp
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录