File: PlatformTests.cxx

package info (click to toggle)
fltk1.1 1.1.9-6
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 14,100 kB
  • ctags: 14,636
  • sloc: cpp: 76,576; ansic: 40,657; makefile: 1,694; sh: 441
file content (81 lines) | stat: -rw-r--r-- 1,400 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#ifdef HAVE_LIBZ

#include <zlib.h>

int main()
{
	unsigned long compressedSize = 0;
	unsigned char cd[100];
	const unsigned char ud[100] = "";
	unsigned long uncompressedSize = 0;

	// Call zlib's compress function.
	if(compress(cd, &compressedSize, ud, uncompressedSize) != Z_OK)
		{
		return 0;
		}
	return 1;
}


#endif

#ifdef HAVE_LIBJPEG

#include <stdio.h>
#include <jpeglib.h>

int main()
{
	struct jpeg_decompress_struct cinfo;
	jpeg_create_decompress(&cinfo);
	jpeg_read_header(&cinfo, TRUE);
	return 1;
}

#endif

#ifdef HAVE_LIBPNG
#include <png.h>
int main()
{
	png_structp png_ptr = png_create_read_struct
		(PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
		 NULL, NULL);
	png_infop info_ptr = png_create_info_struct(png_ptr);
	png_set_sig_bytes(png_ptr, 8);
	png_read_info(png_ptr, info_ptr);

	return 0;
}
#endif

#ifdef HAVE_PNG_H
#include <png.h>
int main() { retunr 0;}
#endif

#ifdef HAVE_PNG_GET_VALID
#include <png.h>
int main()
{
	png_structp png_ptr = png_create_read_struct
		(PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
		 NULL, NULL);
	png_infop info_ptr = png_create_info_struct(png_ptr);
	png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS);
	return 0;
}
#endif

#ifdef HAVE_PNG_SET_TRNS_TO_ALPHA
#include <png.h>
int main()
{
	png_structp png_ptr = png_create_read_struct
		(PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
		 NULL, NULL);
	png_set_tRNS_to_alpha(png_ptr);
	return 0;
}
#endif