~ubuntu-branches/debian/stretch/spice/stretch

« back to all changes in this revision

Viewing changes to common/canvas_base.c

  • Committer: Package Import Robot
  • Author(s): Liang Guo, Liang Guo, Michael Tokarev
  • Date: 2011-11-29 14:37:08 UTC
  • mfrom: (0.6.1) (0.4.2) (2.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20111129143708-jptkxyjl3a4rds2r
Tags: 0.10.0-1
[ Liang Guo ]
* New upstream release (Closes: #651262)
* Refresh debian/copyright
* Remove fix-typo-in-cmd_line_parser-cpp.patch, applied upstream
* Remove fix-typo-in-record-cpp.patch, applied upstream
* Remove use-requires-private-for-libspice-pkgconfig.patch, applied upstream
* Change Build-Depends on libspice-protocol-dev to (>= 0.9.1~)
* Refresh libspice-server1.symbols
* Update debian/rules clean target
* Ignore common/win/my_getopt-1.5/Makefile change when building package
* debian/control: set DMUA

[ Michael Tokarev ]
* use `rm -f' instead of `-rm' in debian/rules clean targets
* remove python_modules/*.pyc in clean target

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
   License along with this library; if not, see <http://www.gnu.org/licenses/>.
17
17
*/
18
18
 
 
19
#ifndef SPICE_CANVAS_INTERNAL
 
20
#error "This file shouldn't be compiled directly"
 
21
#endif
 
22
 
 
23
#ifdef HAVE_CONFIG_H
 
24
#include <config.h>
 
25
#endif
 
26
 
19
27
#include <stdarg.h>
20
28
#include <stdlib.h>
21
29
#include <setjmp.h>
42
50
}
43
51
#endif
44
52
 
45
 
#ifndef ASSERT
46
 
#define ASSERT(x) if (!(x)) {                               \
47
 
    printf("%s: ASSERT %s failed\n", __FUNCTION__, #x);     \
48
 
    abort();                                                \
49
 
}
50
 
#endif
51
 
 
52
53
#ifndef WARN
53
54
#define WARN(x) printf("warning: %s\n", x)
54
55
#endif
55
56
 
56
 
#define PANIC(str) {                                \
57
 
    printf("%s: panic: %s", __FUNCTION__, str);     \
58
 
    abort();                                        \
59
 
}
60
 
 
61
57
#ifndef DBG
62
58
#define DBG(level, format, ...) printf("%s: debug: " format "\n", __FUNCTION__, ## __VA_ARGS__);
63
59
#endif
115
111
 
116
112
    return ret;
117
113
}
118
 
#ifdef WIN32
 
114
#if defined(WIN32) && defined(GDI_CANVAS)
119
115
static HDC create_compatible_dc()
120
116
{
121
117
    HDC dc = CreateCompatibleDC(NULL);
146
142
    jmp_buf jmp_env;
147
143
    char message_buf[512];
148
144
    SpiceChunks *chunks;
149
 
    int current_chunk;
 
145
    uint32_t current_chunk;
150
146
} QuicData;
151
147
 
152
148
typedef struct CanvasBase {
807
803
        CANVAS_ERROR("unexpected LZ image type");
808
804
    }
809
805
 
810
 
    ASSERT(width == image->descriptor.width);
811
 
    ASSERT(height == image->descriptor.height);
 
806
    ASSERT((unsigned)width == image->descriptor.width);
 
807
    ASSERT((unsigned)height == image->descriptor.height);
812
808
 
813
809
    ASSERT((image->descriptor.type == SPICE_IMAGE_TYPE_LZ_PLT) || (n_comp_pixels == width * height));
814
810
#ifdef WIN32
3297
3293
inline static void canvas_base_init_ops(SpiceCanvasOps *ops)
3298
3294
{
3299
3295
    void **ops_cast;
3300
 
    int i;
 
3296
    unsigned i;
3301
3297
 
3302
3298
    ops_cast = (void **)ops;
3303
3299
    for (i = 0; i < sizeof(SpiceCanvasOps) / sizeof(void *); i++) {