Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Libpng
提交
ea3bcd70
T
Third Party Libpng
项目概览
OpenHarmony
/
Third Party Libpng
接近 2 年 前同步成功
通知
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看板
提交
ea3bcd70
编写于
3月 07, 1998
作者:
G
Glenn Randers-Pehrson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Imported from libpng-0.99k.tar
上级
983ec160
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
43 addition
and
48 deletion
+43
-48
CHANGES
CHANGES
+5
-0
TODO
TODO
+1
-0
pngmem.c
pngmem.c
+4
-4
pngpread.c
pngpread.c
+1
-1
pngread.c
pngread.c
+1
-1
pngrutil.c
pngrutil.c
+2
-2
pngtest.c
pngtest.c
+14
-26
pngwrite.c
pngwrite.c
+3
-2
pngwutil.c
pngwutil.c
+3
-3
scripts/makefile.dec
scripts/makefile.dec
+1
-1
scripts/makefile.dj2
scripts/makefile.dj2
+1
-1
scripts/makefile.knr
scripts/makefile.knr
+2
-2
scripts/makefile.lnx
scripts/makefile.lnx
+1
-1
scripts/makefile.mip
scripts/makefile.mip
+1
-1
scripts/makefile.sgi
scripts/makefile.sgi
+1
-1
scripts/makefile.std
scripts/makefile.std
+1
-1
scripts/makefile.sun
scripts/makefile.sun
+1
-1
未找到文件。
CHANGES
浏览文件 @
ea3bcd70
...
...
@@ -262,3 +262,8 @@ version 0.99h [March 6, 1998, evening]
version 1.00 [March 7, 1998]
Changed several typedefs in pngrutil.c
Added makefile.wat (Pawel Mrochen), updated makefile.tc3 (Willem van Schaik)
replaced "while(1)" with "for(;;)"
added PNGARG() to prototypes in pngtest.c and removed some prototypes
updated some of the makefiles (Tom Lane)
changed some typedefs (s_start, etc.) in pngrutil.c
fixed dimensions of "short_months" array in pngwrite.c
TODO
浏览文件 @
ea3bcd70
TODO - list of things to do for libpng
fix problem with C++ and EXTERN "C"
add "grayscale->palette" transformation and "palette->grayscale" detection
improved dithering
multi-lingual error and warning message support
...
...
pngmem.c
浏览文件 @
ea3bcd70
...
...
@@ -19,11 +19,11 @@
/* The following "hides" PNG_MALLOC and PNG_FREE thus allowing the pngtest
application to put a wrapper on top of them. */
#ifdef PNGTEST_MEMORY_DEBUG
#define PNG_MALLOC png_debug_malloc
#define PNG_FREE png_debug_free
#define PNG_MALLOC png_debug_malloc
#define PNG_FREE png_debug_free
#else
#define PNG_MALLOC png_malloc
#define PNG_FREE png_free
#define PNG_MALLOC png_malloc
#define PNG_FREE png_free
#endif
/* Borland DOS special memory handler */
...
...
pngpread.c
浏览文件 @
ea3bcd70
...
...
@@ -591,7 +591,7 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer,
png_ptr
->
zstream
.
next_in
=
buffer
;
png_ptr
->
zstream
.
avail_in
=
(
uInt
)
buffer_length
;
while
(
1
)
for
(;;
)
{
ret
=
inflate
(
&
png_ptr
->
zstream
,
Z_PARTIAL_FLUSH
);
if
(
ret
==
Z_STREAM_END
)
...
...
pngread.c
浏览文件 @
ea3bcd70
...
...
@@ -154,7 +154,7 @@ png_read_info(png_structp png_ptr, png_infop info_ptr)
}
}
while
(
1
)
for
(;;
)
{
png_byte
chunk_length
[
4
];
png_uint_32
length
;
...
...
pngrutil.c
浏览文件 @
ea3bcd70
...
...
@@ -2059,7 +2059,7 @@ png_read_finish_row(png_structp png_ptr)
png_ptr
->
zstream
.
next_out
=
(
Byte
*
)
&
extra
;
png_ptr
->
zstream
.
avail_out
=
(
uInt
)
1
;
do
for
(;;)
{
if
(
!
(
png_ptr
->
zstream
.
avail_in
))
{
...
...
@@ -2102,7 +2102,7 @@ png_read_finish_row(png_structp png_ptr)
if
(
!
(
png_ptr
->
zstream
.
avail_out
))
png_error
(
png_ptr
,
"Extra compressed data"
);
}
while
(
1
);
}
png_ptr
->
zstream
.
avail_out
=
0
;
}
...
...
pngtest.c
浏览文件 @
ea3bcd70
...
...
@@ -32,12 +32,12 @@
/* Makes pngtest verbose so we can find problems (needs to be before png.h) */
#ifndef PNG_DEBUG
#endif
#define PNG_DEBUG 0
#endif
#include "png.h"
int
test_one_file
(
PNG_CONST
char
*
inname
,
PNG_CONST
char
*
outname
);
int
test_one_file
PNGARG
((
PNG_CONST
char
*
inname
,
PNG_CONST
char
*
outname
)
);
#ifdef __TURBOC__
#include <mem.h>
...
...
@@ -51,7 +51,7 @@ int test_one_file(PNG_CONST char *inname, PNG_CONST char *outname);
static
int
status_pass
=
1
;
static
int
status_dots_requested
=
0
;
static
int
status_dots
=
1
;
void
read_row_callback
(
png_structp
png_ptr
,
png_uint_32
row_number
,
int
pass
);
void
read_row_callback
(
png_structp
png_ptr
,
png_uint_32
row_number
,
int
pass
)
{
if
(
png_ptr
==
NULL
||
row_number
>
0x3fffffffL
)
return
;
...
...
@@ -69,7 +69,7 @@ void read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
}
fprintf
(
stdout
,
"r"
);
}
void
write_row_callback
(
png_structp
png_ptr
,
png_uint_32
row_number
,
int
pass
);
void
write_row_callback
(
png_structp
png_ptr
,
png_uint_32
row_number
,
int
pass
)
{
if
(
png_ptr
==
NULL
||
row_number
>
0x3fffffffL
||
pass
>
7
)
return
;
...
...
@@ -83,10 +83,9 @@ void write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
but merely count the black pixels) */
static
png_uint_32
black_pixels
;
void
count_black_pixels
(
png_structp
png_ptr
,
png_row_infop
row_info
,
png_bytep
data
);
void
count_black_pixels
(
png_structp
png_ptr
,
png_row_infop
row_info
,
png_bytep
data
)
png_bytep
data
)
{
png_bytep
dp
=
data
;
if
(
png_ptr
==
NULL
)
return
;
...
...
@@ -180,8 +179,6 @@ static int wrote_question = 0;
than changing the library. */
#ifndef USE_FAR_KEYWORD
static
void
png_default_read_data
(
png_structp
png_ptr
,
png_bytep
data
,
png_size_t
length
);
static
void
png_default_read_data
(
png_structp
png_ptr
,
png_bytep
data
,
png_size_t
length
)
{
png_size_t
check
;
...
...
@@ -206,10 +203,8 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
#define NEAR_BUF_SIZE 1024
#define MIN(a,b) (a <= b ? a : b)
static
void
png_default_read_data
(
png_structp
png_ptr
,
png_bytep
data
,
png_size_t
length
);
static
void
png_default_read_data
(
png_structp
png_ptr
,
png_bytep
data
,
png_size_t
length
)
static
void
png_default_read_data
(
png_structp
png_ptr
,
png_bytep
data
,
png_size_t
length
)
{
int
check
;
png_byte
*
n_data
;
...
...
@@ -250,10 +245,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
#endif
/* USE_FAR_KEYWORD */
#if defined(PNG_WRITE_FLUSH_SUPPORTED)
static
void
png_default_flush
(
png_structp
png_ptr
);
static
void
png_default_flush
(
png_structp
png_ptr
)
static
void
png_default_flush
(
png_structp
png_ptr
)
{
FILE
*
io_ptr
;
io_ptr
=
(
FILE
*
)
CVT_PTR
((
png_ptr
->
io_ptr
));
...
...
@@ -268,8 +260,6 @@ png_default_flush(png_structp png_ptr)
than changing the library. */
#ifndef USE_FAR_KEYWORD
static
void
png_default_write_data
(
png_structp
png_ptr
,
png_bytep
data
,
png_size_t
length
);
static
void
png_default_write_data
(
png_structp
png_ptr
,
png_bytep
data
,
png_size_t
length
)
{
png_uint_32
check
;
...
...
@@ -289,8 +279,6 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
#define NEAR_BUF_SIZE 1024
#define MIN(a,b) (a <= b ? a : b)
static
void
png_default_write_data
(
png_structp
png_ptr
,
png_bytep
data
,
png_size_t
length
);
static
void
png_default_write_data
(
png_structp
png_ptr
,
png_bytep
data
,
png_size_t
length
)
{
...
...
@@ -808,7 +796,7 @@ int test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
return
(
1
);
}
while
(
1
)
for
(;;
)
{
png_size_t
num_in
,
num_out
;
...
...
@@ -886,13 +874,13 @@ main(int argc, char *argv[])
not sure this matters, but it is nice to know, the first of these
tests should be impossible because of the way the macros are set
in pngconf.h */
#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)
#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)
fprintf
(
STDERR
,
" NOTE: Zlib compiled for max 64k, libpng not
\n
"
);
#endif
#endif
/* I think the following can happen. */
#if !defined(MAXSEG_64K) && defined(PNG_MAX_MALLOC_64K)
#if !defined(MAXSEG_64K) && defined(PNG_MAX_MALLOC_64K)
fprintf
(
STDERR
,
" NOTE: libpng compiled for max 64k, zlib not
\n
"
);
#endif
#endif
if
(
strcmp
(
png_libpng_ver
,
PNG_LIBPNG_VER_STRING
))
{
...
...
pngwrite.c
浏览文件 @
ea3bcd70
...
...
@@ -225,8 +225,9 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
png_charp
png_convert_to_rfc1123
(
png_structp
png_ptr
,
png_timep
ptime
)
{
const
char
*
short_months
[
12
]
=
{
"Jan"
,
"Feb"
,
"Mar"
,
"Apr"
,
"May"
,
"Jun"
,
"Jul"
,
"Aug"
,
"Sep"
,
"Oct"
,
"Nov"
,
"Dec"
};
static
const
char
*
short_months
[
12
][
4
]
=
{
"Jan"
,
"Feb"
,
"Mar"
,
"Apr"
,
"May"
,
"Jun"
,
"Jul"
,
"Aug"
,
"Sep"
,
"Oct"
,
"Nov"
,
"Dec"
};
if
(
png_ptr
->
time_buffer
==
NULL
)
{
...
...
pngwutil.c
浏览文件 @
ea3bcd70
...
...
@@ -1383,10 +1383,10 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
* been specified by the application, and then writes the row out with the
* chosen filter.
*/
#define PNG_MAXSUM (
png_uint_32)(~0x0UL
>> 1)
#define PNG_MAXSUM (
~((png_uint_32)0)
>> 1)
#define PNG_HISHIFT 10
#define PNG_LOMASK (
png_uint_32)0xffffL
#define PNG_HIMASK (
png_uint_32)(~PNG_LOMASK >> PNG_HISHIFT
)
#define PNG_LOMASK (
(png_uint_32)0xffffL)
#define PNG_HIMASK (
(png_uint_32)(~PNG_LOMASK >> PNG_HISHIFT)
)
void
png_write_find_filter
(
png_structp
png_ptr
,
png_row_infop
row_info
)
{
...
...
scripts/makefile.dec
浏览文件 @
ea3bcd70
...
...
@@ -29,7 +29,7 @@ libpng.a: $(OBJS)
$(RANLIB)
$@
pngtest
:
pngtest.o libpng.a
$(CC)
-o
pngtest
$(C
C
FLAGS)
pngtest.o
$(LDFLAGS)
$(CC)
-o
pngtest
$(CFLAGS)
pngtest.o
$(LDFLAGS)
test
:
pngtest
./pngtest
...
...
scripts/makefile.dj2
浏览文件 @
ea3bcd70
...
...
@@ -23,7 +23,7 @@ libpng.a: $(OBJS)
$(RANLIB)
$@
pngtest
:
pngtest.o libpng.a
$(CC)
-o
pngtest
$(C
C
FLAGS)
pngtest.o
$(LDFLAGS)
$(CC)
-o
pngtest
$(CFLAGS)
pngtest.o
$(LDFLAGS)
coff2exe pngtest
test
:
pngtest
...
...
scripts/makefile.knr
浏览文件 @
ea3bcd70
...
...
@@ -34,8 +34,8 @@ libpng.a: ansi2knr $(OBJS)
ar rc
$@
$(OBJS)
$(RANLIB)
$@
pngtest
:
pngtest.o libpng.a
ansi2knr
cc
-o
pngtest
$(C
CFLAGS)
pngtest.o
$(LDFLAGS)
pngtest
:
pngtest.o libpng.a
$(CC)
-o
pngtest
$(
CFLAGS)
pngtest.o
$(LDFLAGS)
test
:
pngtest
./pngtest
...
...
scripts/makefile.lnx
浏览文件 @
ea3bcd70
...
...
@@ -56,7 +56,7 @@ libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
ln
-sf
libpng.so.
$(PNGVER)
libpng.so.
$(PNGMAJ)
libpng.so.$(PNGVER)
:
$(OBJSDLL)
gcc
-shared
-Wl
,-soname,libpng.so.
$(PNGMAJ)
-o
libpng.so.
$(PNGVER)
\
$(CC)
-shared
-Wl
,-soname,libpng.so.
$(PNGMAJ)
-o
libpng.so.
$(PNGVER)
\
$(OBJSDLL)
pngtest
:
pngtest.o libpng.so
...
...
scripts/makefile.mip
浏览文件 @
ea3bcd70
...
...
@@ -24,7 +24,7 @@ libpng.a: $(OBJS)
$(RANLIB)
$@
pngtest
:
pngtest.o libpng.a
cc
-o
pngtest
$(C
CFLAGS)
pngtest.o
$(LDFLAGS)
$(CC)
-o
pngtest
$(
CFLAGS)
pngtest.o
$(LDFLAGS)
test
:
pngtest
./pngtest
...
...
scripts/makefile.sgi
浏览文件 @
ea3bcd70
...
...
@@ -30,7 +30,7 @@ libpng.a: $(OBJS)
$(RANLIB)
$@
pngtest
:
pngtest.o libpng.a
$(CC)
-o
pngtest
$(C
C
FLAGS)
pngtest.o
$(LDFLAGS)
$(CC)
-o
pngtest
$(CFLAGS)
pngtest.o
$(LDFLAGS)
test
:
pngtest
./pngtest
...
...
scripts/makefile.std
浏览文件 @
ea3bcd70
...
...
@@ -29,7 +29,7 @@ libpng.a: $(OBJS)
$(RANLIB)
$@
pngtest
:
pngtest.o libpng.a
$(CC)
-o
pngtest
$(C
C
FLAGS)
pngtest.o
$(LDFLAGS)
$(CC)
-o
pngtest
$(CFLAGS)
pngtest.o
$(LDFLAGS)
test
:
pngtest
./pngtest
...
...
scripts/makefile.sun
浏览文件 @
ea3bcd70
...
...
@@ -33,7 +33,7 @@ libpng.a: $(OBJS)
$(RANLIB)
$@
pngtest
:
pngtest.o libpng.a
$(CC)
-o
pngtest
$(C
C
FLAGS)
pngtest.o
$(LDFLAGS)
$(CC)
-o
pngtest
$(CFLAGS)
pngtest.o
$(LDFLAGS)
test
:
pngtest
./pngtest
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录