Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Libpng
提交
27df3a44
T
Third Party Libpng
项目概览
OpenHarmony
/
Third Party Libpng
大约 1 年 前同步成功
通知
4
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Libpng
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
27df3a44
编写于
12月 06, 2010
作者:
G
Glenn Randers-Pehrson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[devel] Added PNG_EXPORTX() and PNG_EXPORTA() macros for testing,
with the objective of improving the cosmetic appearance of png.h.
上级
a4517252
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
51 addition
and
15 deletion
+51
-15
ANNOUNCE
ANNOUNCE
+2
-0
CHANGES
CHANGES
+2
-0
png.h
png.h
+43
-15
pngconf.h
pngconf.h
+4
-0
未找到文件。
ANNOUNCE
浏览文件 @
27df3a44
...
@@ -454,6 +454,8 @@ Version 1.5.0beta55 [November 21, 2010]
...
@@ -454,6 +454,8 @@ Version 1.5.0beta55 [November 21, 2010]
Version 1.5.0beta56 [December 6, 2010]
Version 1.5.0beta56 [December 6, 2010]
Added the private PNG_UNUSED() macro definition in pngpriv.h.
Added the private PNG_UNUSED() macro definition in pngpriv.h.
Added some commentary about PNG_EXPORT in png.h and pngconf.h
Added some commentary about PNG_EXPORT in png.h and pngconf.h
Added PNG_EXPORTX() and PNG_EXPORTA() macros for testing, with the
objective of improving the cosmetic appearance of png.h.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
(subscription required; visit
(subscription required; visit
...
...
CHANGES
浏览文件 @
27df3a44
...
@@ -3092,6 +3092,8 @@ Version 1.5.0beta55 [November 21, 2010]
...
@@ -3092,6 +3092,8 @@ Version 1.5.0beta55 [November 21, 2010]
Version 1.5.0beta56 [December 6, 2010]
Version 1.5.0beta56 [December 6, 2010]
Added the private PNG_UNUSED() macro definition in pngpriv.h.
Added the private PNG_UNUSED() macro definition in pngpriv.h.
Added some commentary about PNG_EXPORT in png.h and pngconf.h
Added some commentary about PNG_EXPORT in png.h and pngconf.h
Added PNG_EXPORTX() and PNG_EXPORTA() macros for testing, with the
objective of improving the cosmetic appearance of png.h.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
(subscription required; visit
...
...
png.h
浏览文件 @
27df3a44
...
@@ -897,23 +897,51 @@ typedef png_struct FAR * FAR * png_structpp;
...
@@ -897,23 +897,51 @@ typedef png_struct FAR * FAR * png_structpp;
* relevant when preprocessing png.h with
* relevant when preprocessing png.h with
* the *.dfn files for building symbol table
* the *.dfn files for building symbol table
* entries.
* entries.
*
* For testing purposes, we also have
* PNG_EXPORTX(ordinal, type, name, (args));
*
* ordinal: ordinal that is used while building
* *.def files. The ordinal value is only
* relevant when preprocessing png.h with
* the *.dfn files for building symbol table
* entries.
* type: return type of the function
* name: function name
* args: function arguments, with types
*
* and
* PNG_EXPORTA(ordinal, type, name, (args), attributes);
*
* ordinal: ordinal that is used while building
* *.def files. The ordinal value is only
* relevant when preprocessing png.h with
* the *.dfn files for building symbol table
* entries.
* type: return type of the function
* name: function name
* args: function arguments, with types
* attributes: function attributes
*
* PNG_EXPORTX and PNG_EXPORTA are currently only used for the
* first 10 headers, below.
*/
*/
/* Returns the version number of the library */
/* Returns the version number of the library */
PNG_EXPORT
(
png_uint_32
,
png_access_version_number
,(
void
),,
1
);
PNG_EXPORT
X
(
1
,
png_uint_32
,
png_access_version_number
,(
void
)
);
/* Tell lib we have already handled the first <num_bytes> magic bytes.
/* Tell lib we have already handled the first <num_bytes> magic bytes.
* Handling more than 8 bytes from the beginning of the file is an error.
* Handling more than 8 bytes from the beginning of the file is an error.
*/
*/
PNG_EXPORT
(
void
,
png_set_sig_bytes
,(
png_structp
png_ptr
,
int
num_bytes
),,
2
);
PNG_EXPORT
X
(
2
,
void
,
png_set_sig_bytes
,(
png_structp
png_ptr
,
int
num_bytes
)
);
/* Check sig[start] through sig[start + num_to_check - 1] to see if it's a
/* Check sig[start] through sig[start + num_to_check - 1] to see if it's a
* PNG file. Returns zero if the supplied bytes match the 8-byte PNG
* PNG file. Returns zero if the supplied bytes match the 8-byte PNG
* signature, and non-zero otherwise. Having num_to_check == 0 or
* signature, and non-zero otherwise. Having num_to_check == 0 or
* start > 7 will always fail (ie return non-zero).
* start > 7 will always fail (ie return non-zero).
*/
*/
PNG_EXPORT
(
int
,
png_sig_cmp
,(
png_const_bytep
sig
,
png_size_t
start
,
PNG_EXPORT
X
(
3
,
int
,
png_sig_cmp
,(
png_const_bytep
sig
,
png_size_t
start
,
png_size_t
num_to_check
)
,,
3
);
png_size_t
num_to_check
));
/* Simple signature checking function. This is the same as calling
/* Simple signature checking function. This is the same as calling
* png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n).
* png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n).
...
@@ -921,19 +949,19 @@ PNG_EXPORT(int,png_sig_cmp,(png_const_bytep sig, png_size_t start,
...
@@ -921,19 +949,19 @@ PNG_EXPORT(int,png_sig_cmp,(png_const_bytep sig, png_size_t start,
#define png_check_sig(sig,n) !png_sig_cmp((sig), 0, (n))
#define png_check_sig(sig,n) !png_sig_cmp((sig), 0, (n))
/* Allocate and initialize png_ptr struct for reading, and any other memory. */
/* Allocate and initialize png_ptr struct for reading, and any other memory. */
PNG_EXPORT
(
png_structp
,
png_create_read_struct
,(
png_const_charp
user_png_ver
,
PNG_EXPORT
A
(
4
,
png_structp
,
png_create_read_struct
,(
png_const_charp
user_png_ver
,
png_voidp
error_ptr
,
png_error_ptr
error_fn
,
png_error_ptr
warn_fn
),
png_voidp
error_ptr
,
png_error_ptr
error_fn
,
png_error_ptr
warn_fn
),
PNG_ALLOCATED
,
4
);
PNG_ALLOCATED
);
/* Allocate and initialize png_ptr struct for writing, and any other memory */
/* Allocate and initialize png_ptr struct for writing, and any other memory */
PNG_EXPORT
(
png_structp
,
png_create_write_struct
,(
png_const_charp
user_png_ver
,
PNG_EXPORT
A
(
5
,
png_structp
,
png_create_write_struct
,(
png_const_charp
user_png_ver
,
png_voidp
error_ptr
,
png_error_ptr
error_fn
,
png_error_ptr
warn_fn
),
png_voidp
error_ptr
,
png_error_ptr
error_fn
,
png_error_ptr
warn_fn
),
PNG_ALLOCATED
,
5
);
PNG_ALLOCATED
);
PNG_EXPORT
(
png_size_t
,
png_get_compression_buffer_size
,(
png_structp
png_ptr
),,
6
);
PNG_EXPORT
X
(
6
,
png_size_t
,
png_get_compression_buffer_size
,(
png_structp
png_ptr
)
);
PNG_EXPORT
(
void
,
png_set_compression_buffer_size
,(
png_structp
png_ptr
,
PNG_EXPORT
X
(
7
,
void
,
png_set_compression_buffer_size
,(
png_structp
png_ptr
,
png_size_t
size
)
,,
7
);
png_size_t
size
));
/* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp
/* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp
* match up.
* match up.
...
@@ -946,8 +974,8 @@ PNG_EXPORT(void,png_set_compression_buffer_size,(png_structp png_ptr,
...
@@ -946,8 +974,8 @@ PNG_EXPORT(void,png_set_compression_buffer_size,(png_structp png_ptr,
* allocated by the library - the call will return NULL on a mismatch
* allocated by the library - the call will return NULL on a mismatch
* indicating an ABI mismatch.
* indicating an ABI mismatch.
*/
*/
PNG_EXPORT
(
jmp_buf
*
,
png_set_longjmp_fn
,(
png_structp
png_ptr
,
PNG_EXPORT
X
(
8
,
jmp_buf
*
,
png_set_longjmp_fn
,(
png_structp
png_ptr
,
png_longjmp_ptr
longjmp_fn
,
size_t
jmp_buf_size
)
,,
8
);
png_longjmp_ptr
longjmp_fn
,
size_t
jmp_buf_size
));
# define png_jmpbuf(png_ptr) \
# define png_jmpbuf(png_ptr) \
(*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf)))
(*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf)))
#else
#else
...
@@ -959,11 +987,11 @@ PNG_EXPORT(jmp_buf*,png_set_longjmp_fn,(png_structp png_ptr,
...
@@ -959,11 +987,11 @@ PNG_EXPORT(jmp_buf*,png_set_longjmp_fn,(png_structp png_ptr,
* will use it; otherwise it will call PNG_ABORT(). This function was
* will use it; otherwise it will call PNG_ABORT(). This function was
* added in libpng-1.5.0.
* added in libpng-1.5.0.
*/
*/
PNG_EXPORT
(
void
,
png_longjmp
,(
png_structp
png_ptr
,
int
val
),
PNG_NORETURN
,
9
);
PNG_EXPORT
A
(
9
,
void
,
png_longjmp
,(
png_structp
png_ptr
,
int
val
),
PNG_NORETURN
);
#ifdef PNG_READ_SUPPORTED
#ifdef PNG_READ_SUPPORTED
/* Reset the compression stream */
/* Reset the compression stream */
PNG_EXPORT
(
int
,
png_reset_zstream
,(
png_structp
png_ptr
),,
10
);
PNG_EXPORT
X
(
10
,
int
,
png_reset_zstream
,(
png_structp
png_ptr
)
);
#endif
#endif
/* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */
/* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */
...
...
pngconf.h
浏览文件 @
27df3a44
...
@@ -313,6 +313,10 @@
...
@@ -313,6 +313,10 @@
# define PNG_EXPORT(type, name, args, attributes, ordinal)\
# define PNG_EXPORT(type, name, args, attributes, ordinal)\
extern PNG_FUNCTION(PNG_EXPORT_TYPE(type),(PNGAPI name),PNGARG(args),\
extern PNG_FUNCTION(PNG_EXPORT_TYPE(type),(PNGAPI name),PNGARG(args),\
attributes)
attributes)
# define PNG_EXPORTX(ordinal, type, name, args)\
PNG_EXPORT(type, name, args,, ordinal )
# define PNG_EXPORTA(ordinal, type, name, args, attributes)\
PNG_EXPORT(type, name, args, attributes, ordinal)
#endif
#endif
/* Use PNG_REMOVED to comment out a removed interface. */
/* Use PNG_REMOVED to comment out a removed interface. */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录