Subversion Repositories Kolibri OS

Rev

Rev 6779 | Rev 6881 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6779 Rev 6780
Line 741... Line 741...
741
; the place to find out how to use libpng.  See libpng-manual.txt for the
741
; the place to find out how to use libpng.  See libpng-manual.txt for the
742
; full explanation, see example.c for the summary.  This just provides
742
; full explanation, see example.c for the summary.  This just provides
743
; a simple one line description of the use of each function.
743
; a simple one line description of the use of each function.
744
 
744
 
Line 745... Line -...
745
; The PNG_EXPORT() and PNG_EXPORTA() macros used below are defined in
-
 
746
; pngconf.h and in the *.dfn files in the scripts directory.
-
 
Line 747... Line -...
747
 
-
 
748
;   PNG_EXPORT(ordinal, type, name, (args));
-
 
749
 
-
 
750
;       ordinal:    ordinal that is used while building
-
 
751
;                   *.def files. The ordinal value is only
-
 
752
;                   relevant when preprocessing png.h with
-
 
753
;                   the *.dfn files for building symbol table
-
 
754
;                   entries, and are removed by pngconf.h.
-
 
755
;       type:       return type of the function
-
 
756
;       name:       function name
-
 
757
;       args:       function arguments, with types
-
 
758
 
-
 
759
; When we wish to append attributes to a function prototype we use
-
 
760
; the PNG_EXPORTA() macro instead.
-
 
761
 
-
 
762
;   PNG_EXPORTA(ordinal, type, name, (args), attributes);
-
 
763
 
-
 
764
;       ordinal, type, name, and args: same as in PNG_EXPORT().
-
 
765
;       attributes: function attributes
-
 
766
 
-
 
767
macro PNG_EXPORT ordinal, typ, nam, arg
-
 
768
{
-
 
769
align 4
-
 
770
nam:
-
 
771
local .end_t
-
 
772
local .m_txt
-
 
773
jmp .end_t
-
 
774
	.m_txt db `nam,13,10,0
-
 
775
.end_t:
-
 
776
	stdcall dbg_print,txt_zv,.m_txt
-
 
777
ret
-
 
Line 778... Line 745...
778
}
745
 
779
 
746
 
Line 780... Line 747...
780
; Simple signature checking function.  This is the same as calling
747
; Simple signature checking function.  This is the same as calling
Line 941... Line 908...
941
PNG_FILTER_HEURISTIC_UNWEIGHTED equ 1 ;Used by libpng < 0.95
908
PNG_FILTER_HEURISTIC_UNWEIGHTED equ 1 ;Used by libpng < 0.95
942
PNG_FILTER_HEURISTIC_WEIGHTED  equ 2 ;Experimental feature
909
PNG_FILTER_HEURISTIC_WEIGHTED  equ 2 ;Experimental feature
943
PNG_FILTER_HEURISTIC_LAST      equ 3 ;Not a valid value
910
PNG_FILTER_HEURISTIC_LAST      equ 3 ;Not a valid value
944
 
911
 
Line 945... Line -...
945
; These next functions are called for input/output, memory, and error
-
 
946
; handling.  They are in the file pngrio.c, pngwio.c, and pngerror.c,
-
 
947
; and call standard C I/O routines such as fread(), fwrite(), and
-
 
948
; fprintf().  These functions can be made to use other I/O routines
-
 
949
; at run time for those applications that need to handle I/O in a
-
 
950
; different manner by calling png_set_???_fn().  See libpng-manual.txt for
-
 
951
; more information.
-
 
952
 
-
 
953
 
-
 
954
; Replace the default data input function with a user supplied one.
-
 
955
PNG_EXPORT 78, void, png_set_read_fn, '(png_structrp png_ptr, voidp io_ptr, png_rw_ptr read_data_fn)'
-
 
956
 
-
 
957
 
-
 
958
; Reassign responsibility for freeing existing data, whether allocated
-
 
959
; by libpng or by the application; this works on the png_info structure passed
-
 
960
; in, it does not change the state for other png_info structures.
-
 
961
 
-
 
962
; It is unlikely that this function works correctly as of 1.6.0 and using it
912
; It is unlikely that this function works correctly as of 1.6.0 and using it
963
; may result either in memory leaks or double free of allocated data.
913
; may result either in memory leaks or double free of allocated data.
Line 964... Line 914...
964
 
914
 
965
; Assignments for png_data_freer
915
; Assignments for png_data_freer
Line 983... Line 933...
983
PNG_FREE_ALL  equ 0x7fff
933
PNG_FREE_ALL  equ 0x7fff
984
PNG_FREE_MUL  equ 0x4220 ;PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN
934
PNG_FREE_MUL  equ 0x4220 ;PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN
985
 
935
 
Line 986... Line 936...
986
;if PNG_ERROR_TEXT_SUPPORTED
936
;if PNG_ERROR_TEXT_SUPPORTED
987
; The same, but the chunk name is prepended to the error string.
-
 
988
;PNG_EXPORTA(103, void, png_chunk_error, (png_const_structrp png_ptr,
-
 
989
;    charp error_message), PNG_NORETURN);
-
 
Line 990... Line 937...
990
 
937
 
991
;#else
-
 
992
; Fatal error in PNG image of libpng - can't continue
-
 
993
;PNG_EXPORTA(104, void, png_err, (png_const_structrp png_ptr), PNG_NORETURN);
938
;#else
994
;#  define png_chunk_error(s1,s2) png_err(s1)
939
;#  define png_chunk_error(s1,s2) png_err(s1)
Line 995... Line -...
995
;end if
-
 
996
 
-
 
997
; Non-fatal error in libpng, chunk name is prepended to message.
940
;end if
998
PNG_EXPORT 106, void, png_chunk_warning, '(png_const_structrp png_ptr, charp warning_message)'
941
 
999
;#else
942
;#else
Line 1000... Line -...
1000
;#  define png_warning(s1,s2) ((void)(s1))
-
 
1001
;#  define png_chunk_warning(s1,s2) ((void)(s1))
-
 
1002
 
-
 
1003
; Benign error in libpng.  Can continue, but may have a problem.
-
 
1004
; User can choose whether to handle as a fatal error or as a warning.
943
;#  define png_warning(s1,s2) ((void)(s1))
1005
PNG_EXPORT 107, void, png_benign_error, '(png_const_structrp png_ptr, charp warning_message)'
-
 
1006
 
-
 
Line 1007... Line 944...
1007
;if PNG_READ_SUPPORTED
944
;#  define png_chunk_warning(s1,s2) ((void)(s1))
1008
; Same, chunk name is prepended to message (only during read)
945
 
1009
PNG_EXPORT 108, void, png_chunk_benign_error, '(png_const_structrp png_ptr, charp warning_message)'
946
;if PNG_READ_SUPPORTED
1010
 
947