Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
bc200457
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看板
提交
bc200457
编写于
4月 29, 2010
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Simplify trace code
上级
807c5b03
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
51 addition
and
63 deletion
+51
-63
src/hb-open-type-private.hh
src/hb-open-type-private.hh
+11
-30
src/hb-ot-layout-gsubgpos-private.hh
src/hb-ot-layout-gsubgpos-private.hh
+6
-19
src/hb-private.h
src/hb-private.h
+34
-14
未找到文件。
src/hb-open-type-private.hh
浏览文件 @
bc200457
...
...
@@ -124,41 +124,22 @@ ASSERT_STATIC (sizeof (Type) + 1 <= sizeof (_Null##Type))
#define HB_DEBUG_SANITIZE HB_DEBUG+0
#endif
static
HB_GNUC_UNUSED
inline
hb_bool_t
/* always returns TRUE */
_hb_trace
(
const
char
*
what
,
const
char
*
function
,
void
*
obj
,
unsigned
int
depth
,
unsigned
int
max_depth
)
{
if
(
depth
<
max_depth
)
fprintf
(
stderr
,
"%s(%p) %-*d-> %s
\n
"
,
what
,
(
obj
==
CharP
(
&
_NullPool
))
?
0
:
obj
,
depth
,
depth
,
function
);
return
TRUE
;
}
#define TRACE_SANITIZE() \
HB_STMT_START { \
if (HB_DEBUG_SANITIZE) \
_hb_trace ("SANITIZE", __PRETTY_FUNCTION__, this, sanitize_depth, HB_DEBUG_SANITIZE); \
} HB_STMT_END
#if HB_DEBUG_SANITIZE
#define TRACE_SANITIZE() _hb_trace ("SANITIZE", __PRETTY_FUNCTION__, this, sanitize_depth, HB_DEBUG_SANITIZE)
#define TRACE_SANITIZE_ARG_DEF , unsigned int sanitize_depth HB_GNUC_UNUSED
#define TRACE_SANITIZE_ARG , sanitize_depth + 1
#define TRACE_SANITIZE_ARG_INIT , 1
#else
#define TRACE_SANITIZE() _hb_trace ("SANITIZE", __PRETTY_FUNCTION__, this, 0, HB_DEBUG_SANITIZE)
#define TRACE_SANITIZE_ARG_DEF
#define TRACE_SANITIZE_ARG
#define TRACE_SANITIZE_ARG_INIT
#endif
#define SANITIZE_ARG_DEF \
hb_sanitize_context_t *context TRACE_SANITIZE_ARG_DEF
hb_sanitize_context_t *context, \
unsigned int sanitize_depth HB_GNUC_UNUSED
#define SANITIZE_ARG \
context TRACE_SANITIZE_ARG
context, \
(HB_DEBUG_SANITIZE ? sanitize_depth + 1 : 0)
#define SANITIZE_ARG_INIT \
&context TRACE_SANITIZE_ARG_INIT
&context, \
1
typedef
struct
_hb_sanitize_context_t
hb_sanitize_context_t
;
struct
_hb_sanitize_context_t
...
...
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
bc200457
...
...
@@ -35,24 +35,11 @@
#define HB_DEBUG_APPLY HB_DEBUG+0
#endif
static
HB_GNUC_UNUSED
inline
hb_bool_t
/* always returns TRUE */
_hb_trace_apply
(
const
char
*
obj
,
unsigned
int
apply_depth
,
const
char
*
function
)
{
/* The following check is written in such a skewed way just
* to quiet compiler warning. The simple version would have been:
* if (apply_depth < HB_DEBUG_APPLY)
*/
if
(
HB_DEBUG_APPLY
&&
(
int
)
apply_depth
<
HB_DEBUG_APPLY
)
fprintf
(
stderr
,
"APPLY(%p) %-*d-> %s
\n
"
,
(
obj
==
CharP
(
&
_NullPool
))
?
0
:
obj
,
apply_depth
,
apply_depth
,
function
);
return
TRUE
;
}
#define TRACE_APPLY() _hb_trace_apply (CharP(this), apply_depth, __PRETTY_FUNCTION__)
#define TRACE_APPLY() \
HB_STMT_START { \
if (HB_DEBUG_APPLY) \
_hb_trace ("APPLY", __PRETTY_FUNCTION__, this, apply_depth, HB_DEBUG_APPLY); \
} HB_STMT_END
#define APPLY_ARG_DEF \
...
...
@@ -70,7 +57,7 @@ _hb_trace_apply (const char *obj,
nesting_level_left, \
lookup_flag, \
property, \
(HB_DEBUG_APPLY ? apply_depth
+
1 : 0)
(HB_DEBUG_APPLY ? apply_depth
+
1 : 0)
#define APPLY_ARG_INIT \
context, \
buffer, \
...
...
src/hb-private.h
浏览文件 @
bc200457
...
...
@@ -31,9 +31,7 @@
#include "config.h"
#endif
#ifndef HB_DEBUG
#define HB_DEBUG 0
#endif
#include "hb-common.h"
#include <stdlib.h>
#include <string.h>
...
...
@@ -46,7 +44,18 @@
#include <stdio.h>
#include <errno.h>
#include "hb-common.h"
/* Essentials */
#ifndef NULL
# define NULL ((void *) 0)
#endif
#undef FALSE
#define FALSE 0
#undef TRUE
#define TRUE 1
/* Basics */
...
...
@@ -61,16 +70,6 @@
# define HB_INTERNAL extern
#endif
#ifndef NULL
# define NULL ((void *) 0)
#endif
#undef FALSE
#define FALSE 0
#undef TRUE
#define TRUE 1
#undef ARRAY_LENGTH
#define ARRAY_LENGTH(__array) ((signed int) (sizeof (__array) / sizeof (__array[0])))
...
...
@@ -81,6 +80,9 @@
#define _ASSERT_STATIC0(_line, _cond) _ASSERT_STATIC1 (_line, (_cond))
#define ASSERT_STATIC(_cond) _ASSERT_STATIC0 (__LINE__, (_cond))
/* Misc */
#define ASSERT_SIZE(_type, _size) ASSERT_STATIC (sizeof (_type) == (_size))
/* Size signifying variable-sized array */
...
...
@@ -223,6 +225,24 @@ typedef int hb_mutex_t;
#define hb_be_uint32_cmp(a,b) (a[0] == b[0] && a[1] == b[1] && a[2] == b[2] && a[3] == b[3])
/* Debug */
#ifndef HB_DEBUG
#define HB_DEBUG 0
#endif
static
HB_GNUC_UNUSED
inline
hb_bool_t
/* always returns TRUE */
_hb_trace
(
const
char
*
what
,
const
char
*
function
,
const
void
*
obj
,
unsigned
int
depth
,
unsigned
int
max_depth
)
{
if
(
depth
<
max_depth
)
fprintf
(
stderr
,
"%s(%p) %-*d-> %s
\n
"
,
what
,
obj
,
depth
,
depth
,
function
);
return
TRUE
;
}
#include "hb-object-private.h"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录