mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-01-05 13:50:26 +00:00
Use SPICE_{BEGIN,END}_DECLS
This commit is contained in:
parent
e800e51d4e
commit
c4482c7ff2
@ -23,9 +23,7 @@
|
||||
|
||||
#include <spice/macros.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
||||
static inline int spice_bit_find_msb(unsigned int val)
|
||||
@ -84,8 +82,6 @@ static INLINE int spice_bit_next_pow2(unsigned int val)
|
||||
return 1 << spice_bit_find_msb(val);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@ -23,6 +23,8 @@
|
||||
#error "This header shouldn't be included directly"
|
||||
#endif
|
||||
|
||||
#include <spice/macros.h>
|
||||
|
||||
#include "pixman_utils.h"
|
||||
#include "lz.h"
|
||||
#include "region.h"
|
||||
@ -31,9 +33,7 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
typedef void (*spice_destroy_fn_t)(void *data);
|
||||
|
||||
@ -320,8 +320,6 @@ struct _SpiceCanvas {
|
||||
SpiceCanvasOps *ops;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@ -24,13 +24,12 @@
|
||||
#endif
|
||||
|
||||
#include <spice/types.h>
|
||||
#include <spice/macros.h>
|
||||
|
||||
#include "pixman_utils.h"
|
||||
#include "lz.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
typedef struct PixmanData {
|
||||
#ifdef WIN32
|
||||
@ -73,8 +72,7 @@ typedef struct LzDecodeUsrData {
|
||||
pixman_image_t *alloc_lz_image_surface(LzDecodeUsrData *canvas_data,
|
||||
pixman_format_code_t pixman_format, int width,
|
||||
int height, int gross_pixels, int top_down);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@ -31,13 +31,12 @@
|
||||
#ifndef _H_SPICE_DRAW
|
||||
#define _H_SPICE_DRAW
|
||||
|
||||
#include <spice/macros.h>
|
||||
#include <spice/types.h>
|
||||
#include <spice/enums.h>
|
||||
#include "mem.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
#define SPICE_GET_ADDRESS(addr) ((void *)(uintptr_t)(addr))
|
||||
#define SPICE_SET_ADDRESS(addr, val) ((addr) = (uintptr_t)(val))
|
||||
@ -274,8 +273,6 @@ typedef struct SpiceCursorHeader {
|
||||
uint16_t hot_spot_y;
|
||||
} SpiceCursorHeader;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif /* _H_SPICE_DRAW */
|
||||
|
||||
@ -24,15 +24,14 @@
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <spice/macros.h>
|
||||
|
||||
#include "pixman_utils.h"
|
||||
#include "canvas_base.h"
|
||||
#include "region.h"
|
||||
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
SpiceCanvas *gdi_canvas_create(int width, int height,
|
||||
HDC dc, class RecurciveMutex *lock, uint32_t format,
|
||||
SpiceImageCache *bits_cache,
|
||||
@ -44,8 +43,6 @@ SpiceCanvas *gdi_canvas_create(int width, int height,
|
||||
|
||||
void gdi_canvas_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@ -16,6 +16,8 @@
|
||||
License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <spice/macros.h>
|
||||
|
||||
#include "glc.h"
|
||||
#include "canvas_base.h"
|
||||
#include "region.h"
|
||||
@ -27,9 +29,7 @@
|
||||
#ifndef _H__GL_CANVAS
|
||||
#define _H__GL_CANVAS
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
SpiceCanvas *gl_canvas_create(int width, int height, uint32_t format
|
||||
#ifdef SW_CANVAS_CACHE
|
||||
@ -46,8 +46,6 @@ SpiceCanvas *gl_canvas_create(int width, int height, uint32_t format
|
||||
void gl_canvas_set_textures_lost(SpiceCanvas *canvas, int textures_lost);
|
||||
void gl_canvas_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@ -20,11 +20,11 @@
|
||||
|
||||
#ifndef GL_UTILS_H
|
||||
#define GL_UTILS_H
|
||||
|
||||
#include <spice/macros.h>
|
||||
#include "spice_common.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
#ifdef RED_DEBUG
|
||||
#define GLC_ERROR_TEST_FLUSH { \
|
||||
@ -55,8 +55,6 @@ extern "C" {
|
||||
#define find_msb spice_bit_find_msb
|
||||
#define gl_get_to_power_two spice_bit_next_pow2
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@ -22,10 +22,9 @@
|
||||
#define _H_GL_CANVASE
|
||||
|
||||
#include <stdint.h>
|
||||
#include <spice/macros.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
typedef void * GLCCtx;
|
||||
typedef void * GLCPattern;
|
||||
@ -160,8 +159,6 @@ void glc_clear(GLCCtx glc);
|
||||
GLCCtx glc_create(int width, int height);
|
||||
void glc_destroy(GLCCtx glc, int textures_lost);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@ -52,11 +52,11 @@ SOFTWARE.
|
||||
#include <pixman_utils.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <spice/macros.h>
|
||||
|
||||
#include "draw.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
typedef struct lineGC lineGC;
|
||||
|
||||
@ -131,8 +131,6 @@ extern int spice_canvas_clip_spans(pixman_region32_t *clip_region,
|
||||
int *new_widths,
|
||||
int sorted);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif /* LINES_H */
|
||||
|
||||
10
common/lz.h
10
common/lz.h
@ -6,14 +6,14 @@
|
||||
#ifndef __LZ_H
|
||||
#define __LZ_H
|
||||
|
||||
#include <spice/macros.h>
|
||||
|
||||
#include "lz_common.h"
|
||||
#include "lz_config.h"
|
||||
#include "draw.h"
|
||||
#include "macros.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
typedef void *LzContext;
|
||||
|
||||
@ -76,8 +76,6 @@ LzContext *lz_create(LzUsrContext *usr);
|
||||
|
||||
void lz_destroy(LzContext *lz);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif // __LZ_H
|
||||
|
||||
@ -23,9 +23,9 @@
|
||||
#ifndef _LZ_COMMON_H
|
||||
#define _LZ_COMMON_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <spice/macros.h>
|
||||
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
//#define DEBUG
|
||||
|
||||
@ -62,8 +62,6 @@ static const int RGB_BYTES_PER_PIXEL[] = {0, 1, 1, 1, 1, 1, 2, 3, 4, 4, 4};
|
||||
#define LZ_VERSION_MINOR 1U
|
||||
#define LZ_VERSION ((LZ_VERSION_MAJOR << 16) | (LZ_VERSION_MINOR & 0xffff))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif // _LZ_COMMON_H
|
||||
|
||||
@ -19,15 +19,14 @@
|
||||
#ifndef _H_MARSHALLER
|
||||
#define _H_MARSHALLER
|
||||
|
||||
#include <spice/macros.h>
|
||||
#include <spice/types.h>
|
||||
#include "mem.h"
|
||||
#ifndef WIN32
|
||||
#include <sys/uio.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
typedef struct SpiceMarshaller SpiceMarshaller;
|
||||
typedef void (*spice_marshaller_item_free_func)(uint8_t *data, void *opaque);
|
||||
@ -67,8 +66,6 @@ void *spice_marshaller_add_int8(SpiceMarshaller *m, int8_t v);
|
||||
|
||||
void spice_marshaller_set_uint32(SpiceMarshaller *m, void *ref, uint32_t v);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@ -26,9 +26,7 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
@ -156,7 +154,6 @@ void spice_buffer_append(SpiceBuffer *buffer, const void *data, size_t len);
|
||||
size_t spice_buffer_copy(SpiceBuffer *buffer, void *dest, size_t len);
|
||||
size_t spice_buffer_remove(SpiceBuffer *buffer, size_t len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@ -32,11 +32,15 @@
|
||||
#define _H_MESSAGES
|
||||
|
||||
#include <spice/protocol.h>
|
||||
#include <spice/macros.h>
|
||||
|
||||
#ifdef USE_SMARTCARD
|
||||
#include <vscard_common.h>
|
||||
#endif
|
||||
|
||||
#include "draw.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
typedef struct SpiceMsgData {
|
||||
uint32_t data_size;
|
||||
@ -518,8 +522,6 @@ typedef struct SpiceMsgcTunnelSocketTokens {
|
||||
uint32_t num_tokens;
|
||||
} SpiceMsgcTunnelSocketTokens;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif /* _H_SPICE_PROTOCOL */
|
||||
|
||||
@ -19,9 +19,9 @@
|
||||
#ifndef _H_MUTEX
|
||||
#define _H_MUTEX
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <spice/macros.h>
|
||||
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
@ -37,8 +37,6 @@ typedef pthread_mutex_t mutex_t;
|
||||
#define MUTEX_UNLOCK(mutex) pthread_mutex_unlock(&mutex)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif // _H_MUTEX
|
||||
|
||||
@ -19,9 +19,9 @@
|
||||
#ifndef _H_GLCTX
|
||||
#define _H_GLCTX
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <spice/macros.h>
|
||||
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
typedef struct OGLCtx OGLCtx;
|
||||
|
||||
@ -31,8 +31,6 @@ OGLCtx *pbuf_create(int width, int heigth);
|
||||
OGLCtx *pixmap_create(int width, int heigth);
|
||||
void oglctx_destroy(OGLCtx *ctx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@ -20,15 +20,14 @@
|
||||
#define _H__PIXMAN_UTILS
|
||||
|
||||
#include <spice/types.h>
|
||||
#include <spice/macros.h>
|
||||
#include <stdlib.h>
|
||||
#define PIXMAN_DONT_DEFINE_STDINT
|
||||
#include <pixman.h>
|
||||
|
||||
#include "draw.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
/* This lists all possible 2 argument binary raster ops.
|
||||
* This enum has the same values as the X11 GXcopy type
|
||||
@ -129,8 +128,6 @@ void spice_pixman_copy_rect(pixman_image_t *image,
|
||||
int w, int h,
|
||||
int dest_x, int dest_y);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif /* _H__PIXMAN_UTILS */
|
||||
|
||||
@ -19,12 +19,11 @@
|
||||
#ifndef __QUIC_H
|
||||
#define __QUIC_H
|
||||
|
||||
#include <spice/macros.h>
|
||||
#include "quic_config.h"
|
||||
#include "macros.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
typedef enum {
|
||||
QUIC_IMAGE_TYPE_INVALID,
|
||||
@ -66,8 +65,6 @@ void quic_destroy(QuicContext *quic);
|
||||
|
||||
void quic_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@ -22,9 +22,7 @@
|
||||
#include <spice/types.h>
|
||||
#include <spice/macros.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
#ifdef __GNUC__
|
||||
#include <string.h>
|
||||
@ -41,8 +39,6 @@ extern "C" {
|
||||
#endif // QXLDD
|
||||
#endif //__GNUC__
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@ -19,12 +19,10 @@
|
||||
#ifndef _H_RECT
|
||||
#define _H_RECT
|
||||
|
||||
#include "draw.h"
|
||||
#include <spice/macros.h>
|
||||
#include "draw.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
static INLINE void rect_sect(SpiceRect* r, const SpiceRect* bounds)
|
||||
{
|
||||
@ -76,9 +74,7 @@ static INLINE int rect_is_same_size(const SpiceRect *r1, const SpiceRect *r2)
|
||||
r1->bottom - r1->top == r2->bottom - r2->top;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@ -117,6 +113,6 @@ static inline int rect_is_same_size(const SpiceRect& r1, const SpiceRect& r2)
|
||||
return rect_is_same_size(&r1, &r2);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif
|
||||
|
||||
@ -20,12 +20,12 @@
|
||||
#define _H_REGION
|
||||
|
||||
#include <stdint.h>
|
||||
#include "draw.h"
|
||||
#include <pixman_utils.h>
|
||||
#include <spice/macros.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "draw.h"
|
||||
#include "pixman_utils.h"
|
||||
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
typedef pixman_region32_t QRegion;
|
||||
|
||||
@ -63,8 +63,6 @@ void region_offset(QRegion *rgn, int32_t dx, int32_t dy);
|
||||
|
||||
void region_dump(const QRegion *rgn, const char *prefix);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@ -19,11 +19,10 @@
|
||||
#ifndef _H_RING2
|
||||
#define _H_RING2
|
||||
|
||||
#include <spice/macros.h>
|
||||
#include "spice_common.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
typedef struct Ring RingItem;
|
||||
typedef struct Ring {
|
||||
@ -165,8 +164,6 @@ static inline unsigned int ring_get_length(Ring *ring)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@ -20,13 +20,12 @@
|
||||
#define _H_ROP3
|
||||
|
||||
#include <stdint.h>
|
||||
#include <spice/macros.h>
|
||||
|
||||
#include "draw.h"
|
||||
#include "pixman_utils.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
void do_rop3_with_pattern(uint8_t rop3, pixman_image_t *d, pixman_image_t *s, SpicePoint *src_pos,
|
||||
pixman_image_t *p, SpicePoint *pat_pos);
|
||||
@ -35,8 +34,6 @@ void do_rop3_with_color(uint8_t rop3, pixman_image_t *d, pixman_image_t *s, Spic
|
||||
|
||||
void rop3_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@ -35,9 +35,9 @@
|
||||
#endif
|
||||
#include <openssl/x509v3.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <spice/macros.h>
|
||||
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
typedef enum {
|
||||
SPICE_SSL_VERIFY_OP_NONE = 0,
|
||||
@ -63,7 +63,6 @@ SpiceOpenSSLVerify* spice_openssl_verify_new(SSL *ssl, SPICE_SSL_VERIFY_OP verif
|
||||
const char *subject);
|
||||
void spice_openssl_verify_free(SpiceOpenSSLVerify* verify);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif // SSL_VERIFY_H
|
||||
|
||||
@ -24,15 +24,14 @@
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <spice/macros.h>
|
||||
|
||||
#include "draw.h"
|
||||
#include "pixman_utils.h"
|
||||
#include "canvas_base.h"
|
||||
#include "region.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
SpiceCanvas *canvas_create(int width, int height, uint32_t format
|
||||
#ifdef SW_CANVAS_CACHE
|
||||
@ -63,8 +62,6 @@ SpiceCanvas *canvas_create_for_data(int width, int height, uint32_t format, uint
|
||||
|
||||
void sw_canvas_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user