1 /*
2  * Copyright © 2008 Red Hat, Inc.
3  *
4  * Permission to use, copy, modify, distribute, and sell this software
5  * and its documentation for any purpose is hereby granted without
6  * fee, provided that the above copyright notice appear in all copies
7  * and that both that copyright notice and this permission notice
8  * appear in supporting documentation, and that the name of
9  * Red Hat, Inc. not be used in advertising or publicity pertaining to
10  * distribution of the software without specific, written prior
11  * permission. Red Hat, Inc. makes no representations about the
12  * suitability of this software for any purpose.  It is provided "as
13  * is" without express or implied warranty.
14  *
15  * RED HAT, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
16  * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
17  * FITNESS, IN NO EVENT SHALL RED HAT, INC. BE LIABLE FOR ANY SPECIAL,
18  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
19  * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
20  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
21  * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22  *
23  * Author: Soren Sandmann <sandmann@redhat.com>
24  */
25 
26 /* taken from pixman 0.34
27    altered to compile without all of pixman */
28 
29 #if defined(HAVE_CONFIG_H)
30 #include "config_ac.h"
31 #endif
32 #include <stdio.h>
33 #include <stdlib.h>
34 #include <string.h>
35 #if defined(HAVE_STDINT_H)
36 #include <stdint.h>
37 #endif
38 #include "pixman-region.h"
39 
40 #if !defined(UINT32_MAX)
41 #define UINT32_MAX  (4294967295U)
42 #endif
43 #if !defined(INT16_MIN)
44 #define INT16_MIN   (-32767-1)
45 #endif
46 #if !defined(INT16_MAX)
47 #define INT16_MAX   (32767)
48 #endif
49 
50 #define PIXMAN_EXPORT
51 #define FALSE 0
52 #define TRUE 1
53 
54 #define MIN(x1, x2) ((x1) < (x2) ? (x1) : (x2))
55 #define MAX(x1, x2) ((x1) > (x2) ? (x1) : (x2))
56 
57 typedef pixman_box16_t                  box_type_t;
58 typedef pixman_region16_data_t          region_data_type_t;
59 typedef pixman_region16_t               region_type_t;
60 typedef signed int                      overflow_int_t;
61 
62 #define PREFIX(x) pixman_region##x
63 
64 #define PIXMAN_REGION_MAX INT16_MAX
65 #define PIXMAN_REGION_MIN INT16_MIN
66 
67 #define FUNC "func"
68 
69 #define critical_if_fail(expr)
70 
_pixman_log_error(const char * func,const char * format,...)71 int _pixman_log_error(const char *func, const char *format, ...)
72 {
73     return 0;
74 }
75 
76 #include "pixman-region.c"
77 
78