~ubuntu-branches/ubuntu/precise/gwenview/precise-proposed

« back to all changes in this revision

Viewing changes to lib/libjpeg-80/jinclude.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-15 14:17:54 UTC
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: package-import@ubuntu.com-20111215141754-z043hyx69dulbggf
Tags: upstream-4.7.90
ImportĀ upstreamĀ versionĀ 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 * JPEG library.  Most applications need only include jpeglib.h.
15
15
 */
16
16
 
17
 
 
18
17
/* Include auto-config file to find out which system include files we need. */
19
18
 
20
 
#include "jconfig.h"            /* auto configuration options */
21
 
#define JCONFIG_INCLUDED        /* so that jpeglib.h doesn't do it again */
 
19
#include "jconfig.h"        /* auto configuration options */
 
20
#define JCONFIG_INCLUDED    /* so that jpeglib.h doesn't do it again */
22
21
 
23
22
/*
24
23
 * We need the NULL macro and size_t typedef.
58
57
#ifdef NEED_BSD_STRINGS
59
58
 
60
59
#include <strings.h>
61
 
#define MEMZERO(target,size)    bzero((void *)(target), (size_t)(size))
62
 
#define MEMCOPY(dest,src,size)  bcopy((const void *)(src), (void *)(dest), (size_t)(size))
 
60
#define MEMZERO(target,size)    bzero((void *)(target), (size_t)(size))
 
61
#define MEMCOPY(dest,src,size)  bcopy((const void *)(src), (void *)(dest), (size_t)(size))
63
62
 
64
63
#else /* not BSD, assume ANSI/SysV string lib */
65
64
 
66
65
#include <string.h>
67
 
#define MEMZERO(target,size)    memset((void *)(target), 0, (size_t)(size))
68
 
#define MEMCOPY(dest,src,size)  memcpy((void *)(dest), (const void *)(src), (size_t)(size))
 
66
#define MEMZERO(target,size)    memset((void *)(target), 0, (size_t)(size))
 
67
#define MEMCOPY(dest,src,size)  memcpy((void *)(dest), (const void *)(src), (size_t)(size))
69
68
 
70
69
#endif
71
70
 
77
76
 * we always use this SIZEOF() macro in place of using sizeof() directly.
78
77
 */
79
78
 
80
 
#define SIZEOF(object)  ((size_t) sizeof(object))
 
79
#define SIZEOF(object)  ((size_t) sizeof(object))
81
80
 
82
81
/*
83
82
 * The modules that use fread() and fwrite() always invoke them through
86
85
 */
87
86
 
88
87
#define JFREAD(file,buf,sizeofbuf)  \
89
 
  ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))
 
88
    ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))
90
89
#define JFWRITE(file,buf,sizeofbuf)  \
91
 
  ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))
 
90
    ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))