diff options
author | marha <marha@users.sourceforge.net> | 2012-10-30 08:08:23 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-10-30 08:08:23 +0100 |
commit | 7b3f315a5d8b90dcb0db5512ed91fa700027cb7a (patch) | |
tree | 5d8a2f4983d9814c71325059d75e6de2af1a3b3e | |
parent | 8d86f8c566c4181c846a872a5a2f88718e635a72 (diff) | |
download | vcxsrv-7b3f315a5d8b90dcb0db5512ed91fa700027cb7a.tar.gz vcxsrv-7b3f315a5d8b90dcb0db5512ed91fa700027cb7a.tar.bz2 vcxsrv-7b3f315a5d8b90dcb0db5512ed91fa700027cb7a.zip |
fontconfig xserver mesa git update 30 oct 2012
fontconfig: bdaef0b80dc27f4ab7a9d9bcedcfd8b5724b3cfd
xserver: 1ca096d5e07221025c4c4110528772b7d94f15ee
mesa: 0a66ced8f822b0d5478b0cd6d72c1a6ad70647a2
61 files changed, 878 insertions, 830 deletions
diff --git a/fontconfig/m4/.gitkeep b/fontconfig/m4/.gitkeep new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/fontconfig/m4/.gitkeep diff --git a/mesalib/scons/llvm.py b/mesalib/scons/llvm.py index f87766af1..e1ed76022 100644 --- a/mesalib/scons/llvm.py +++ b/mesalib/scons/llvm.py @@ -183,6 +183,9 @@ def generate(env): if llvm_version >= distutils.version.LooseVersion('3.1'): components.append('mcjit') + if llvm_version >= distutils.version.LooseVersion('3.2'): + env.Append(CXXFLAGS = ('-fno-rtti',)) + env.ParseConfig('llvm-config --libs ' + ' '.join(components)) env.ParseConfig('llvm-config --ldflags') except OSError: diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.c b/mesalib/src/gallium/auxiliary/util/u_blitter.c index 4d6cdd7a2..f4ac4aa86 100644 --- a/mesalib/src/gallium/auxiliary/util/u_blitter.c +++ b/mesalib/src/gallium/auxiliary/util/u_blitter.c @@ -359,6 +359,14 @@ void util_blitter_destroy(struct blitter_context *blitter) FREE(ctx); } +void util_blitter_set_texture_multisample(struct blitter_context *blitter, + boolean supported) +{ + struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; + + ctx->has_texture_multisample = supported; +} + static void blitter_set_running_flag(struct blitter_context_priv *ctx) { if (ctx->base.running) { diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.h b/mesalib/src/gallium/auxiliary/util/u_blitter.h index de0639377..c49faaad7 100644 --- a/mesalib/src/gallium/auxiliary/util/u_blitter.h +++ b/mesalib/src/gallium/auxiliary/util/u_blitter.h @@ -135,6 +135,12 @@ struct pipe_context *util_blitter_get_pipe(struct blitter_context *blitter) return blitter->pipe; } +/** + * Override PIPE_CAP_TEXTURE_MULTISAMPLE as reported by the driver. + */ +void util_blitter_set_texture_multisample(struct blitter_context *blitter, + boolean supported); + /* The default function to draw a rectangle. This can only be used * inside of the draw_rectangle callback if the driver overrides it. */ void util_blitter_draw_rectangle(struct blitter_context *blitter, diff --git a/mesalib/src/mesa/drivers/SConscript b/mesalib/src/mesa/drivers/SConscript index ab0f89432..f1c4da6b8 100644 --- a/mesalib/src/mesa/drivers/SConscript +++ b/mesalib/src/mesa/drivers/SConscript @@ -2,5 +2,8 @@ Import('*') SConscript('osmesa/SConscript') +if env['x11']: + SConscript('x11/SConscript') + if env['platform'] == 'windows': SConscript('windows/gdi/SConscript') diff --git a/mesalib/src/mesa/drivers/dri/common/utils.c b/mesalib/src/mesa/drivers/dri/common/utils.c index 6d8cb4e29..3e99f3d1e 100644 --- a/mesalib/src/mesa/drivers/dri/common/utils.c +++ b/mesalib/src/mesa/drivers/dri/common/utils.c @@ -31,6 +31,7 @@ #include <string.h> #include <stdlib.h> +#include <stdbool.h> #include "main/mtypes.h" #include "main/cpuinfo.h" #include "main/extensions.h" @@ -185,143 +186,57 @@ driGetRendererString( char * buffer, const char * hardware_name, * \c GL_4HALF_16_16_16_16, etc. We can cross that bridge when we come to it. */ __DRIconfig ** -driCreateConfigs(GLenum fb_format, GLenum fb_type, +driCreateConfigs(gl_format format, const uint8_t * depth_bits, const uint8_t * stencil_bits, unsigned num_depth_stencil_bits, const GLenum * db_modes, unsigned num_db_modes, const uint8_t * msaa_samples, unsigned num_msaa_modes, GLboolean enable_accum) { - static const uint8_t bits_table[4][4] = { - /* R G B A */ - { 3, 3, 2, 0 }, /* Any GL_UNSIGNED_BYTE_3_3_2 */ - { 5, 6, 5, 0 }, /* Any GL_UNSIGNED_SHORT_5_6_5 */ - { 8, 8, 8, 0 }, /* Any RGB with any GL_UNSIGNED_INT_8_8_8_8 */ - { 8, 8, 8, 8 } /* Any RGBA with any GL_UNSIGNED_INT_8_8_8_8 */ + static const uint32_t masks_table[][4] = { + /* MESA_FORMAT_RGB565 */ + { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, + /* MESA_FORMAT_XRGB8888 */ + { 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 }, + /* MESA_FORMAT_ARGB8888 */ + { 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000 }, }; - static const uint32_t masks_table_rgb[6][4] = { - { 0x000000E0, 0x0000001C, 0x00000003, 0x00000000 }, /* 3_3_2 */ - { 0x00000007, 0x00000038, 0x000000C0, 0x00000000 }, /* 2_3_3_REV */ - { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5 */ - { 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5_REV */ - { 0xFF000000, 0x00FF0000, 0x0000FF00, 0x00000000 }, /* 8_8_8_8 */ - { 0x000000FF, 0x0000FF00, 0x00FF0000, 0x00000000 } /* 8_8_8_8_REV */ - }; - - static const uint32_t masks_table_rgba[6][4] = { - { 0x000000E0, 0x0000001C, 0x00000003, 0x00000000 }, /* 3_3_2 */ - { 0x00000007, 0x00000038, 0x000000C0, 0x00000000 }, /* 2_3_3_REV */ - { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5 */ - { 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5_REV */ - { 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF }, /* 8_8_8_8 */ - { 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000 }, /* 8_8_8_8_REV */ - }; - - static const uint32_t masks_table_bgr[6][4] = { - { 0x00000007, 0x00000038, 0x000000C0, 0x00000000 }, /* 3_3_2 */ - { 0x000000E0, 0x0000001C, 0x00000003, 0x00000000 }, /* 2_3_3_REV */ - { 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5 */ - { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5_REV */ - { 0x0000FF00, 0x00FF0000, 0xFF000000, 0x00000000 }, /* 8_8_8_8 */ - { 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 }, /* 8_8_8_8_REV */ - }; - - static const uint32_t masks_table_bgra[6][4] = { - { 0x00000007, 0x00000038, 0x000000C0, 0x00000000 }, /* 3_3_2 */ - { 0x000000E0, 0x0000001C, 0x00000003, 0x00000000 }, /* 2_3_3_REV */ - { 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5 */ - { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5_REV */ - { 0x0000FF00, 0x00FF0000, 0xFF000000, 0x000000FF }, /* 8_8_8_8 */ - { 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000 }, /* 8_8_8_8_REV */ - }; - - static const uint8_t bytes_per_pixel[6] = { - 1, /* 3_3_2 */ - 1, /* 2_3_3_REV */ - 2, /* 5_6_5 */ - 2, /* 5_6_5_REV */ - 4, /* 8_8_8_8 */ - 4 /* 8_8_8_8_REV */ - }; - - const uint8_t * bits; const uint32_t * masks; - int index; __DRIconfig **configs, **c; struct gl_config *modes; unsigned i, j, k, h; unsigned num_modes; unsigned num_accum_bits = (enable_accum) ? 2 : 1; - - switch ( fb_type ) { - case GL_UNSIGNED_BYTE_3_3_2: - index = 0; - break; - case GL_UNSIGNED_BYTE_2_3_3_REV: - index = 1; - break; - case GL_UNSIGNED_SHORT_5_6_5: - index = 2; - break; - case GL_UNSIGNED_SHORT_5_6_5_REV: - index = 3; - break; - case GL_UNSIGNED_INT_8_8_8_8: - index = 4; - break; - case GL_UNSIGNED_INT_8_8_8_8_REV: - index = 5; - break; - default: - fprintf( stderr, "[%s:%u] Unknown framebuffer type 0x%04x.\n", - __FUNCTION__, __LINE__, fb_type ); - return NULL; - } - - - /* Valid types are GL_UNSIGNED_SHORT_5_6_5 and GL_UNSIGNED_INT_8_8_8_8 and - * the _REV versions. - * - * Valid formats are GL_RGBA, GL_RGB, and GL_BGRA. - */ - - switch ( fb_format ) { - case GL_RGB: - masks = masks_table_rgb[ index ]; - break; - - case GL_RGBA: - masks = masks_table_rgba[ index ]; - break; - - case GL_BGR: - masks = masks_table_bgr[ index ]; - break; - - case GL_BGRA: - masks = masks_table_bgra[ index ]; - break; - - default: - fprintf( stderr, "[%s:%u] Unknown framebuffer format 0x%04x.\n", - __FUNCTION__, __LINE__, fb_format ); - return NULL; + int red_bits; + int green_bits; + int blue_bits; + int alpha_bits; + bool is_srgb; + + switch (format) { + case MESA_FORMAT_RGB565: + masks = masks_table[0]; + break; + case MESA_FORMAT_XRGB8888: + masks = masks_table[1]; + break; + case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_SARGB8: + masks = masks_table[2]; + break; + default: + fprintf(stderr, "[%s:%u] Unknown framebuffer type %s (%d).\n", + __FUNCTION__, __LINE__, + _mesa_get_format_name(format), format); + return NULL; } - switch ( bytes_per_pixel[ index ] ) { - case 1: - bits = bits_table[0]; - break; - case 2: - bits = bits_table[1]; - break; - default: - bits = ((fb_format == GL_RGB) || (fb_format == GL_BGR)) - ? bits_table[2] - : bits_table[3]; - break; - } + red_bits = _mesa_get_format_bits(format, GL_RED_BITS); + green_bits = _mesa_get_format_bits(format, GL_GREEN_BITS); + blue_bits = _mesa_get_format_bits(format, GL_BLUE_BITS); + alpha_bits = _mesa_get_format_bits(format, GL_ALPHA_BITS); + is_srgb = _mesa_get_format_color_encoding(format) == GL_SRGB; num_modes = num_depth_stencil_bits * num_db_modes * num_accum_bits * num_msaa_modes; configs = calloc(1, (num_modes + 1) * sizeof *configs); @@ -338,10 +253,10 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type, c++; memset(modes, 0, sizeof *modes); - modes->redBits = bits[0]; - modes->greenBits = bits[1]; - modes->blueBits = bits[2]; - modes->alphaBits = bits[3]; + modes->redBits = red_bits; + modes->greenBits = green_bits; + modes->blueBits = blue_bits; + modes->alphaBits = alpha_bits; modes->redMask = masks[0]; modes->greenMask = masks[1]; modes->blueMask = masks[2]; @@ -393,7 +308,7 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type, __DRI_ATTRIB_TEXTURE_2D_BIT | __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT; - modes->sRGBCapable = GL_FALSE; + modes->sRGBCapable = is_srgb; } } } diff --git a/mesalib/src/mesa/drivers/dri/common/utils.h b/mesalib/src/mesa/drivers/dri/common/utils.h index 9d6eb3037..e3b3940da 100644 --- a/mesalib/src/mesa/drivers/dri/common/utils.h +++ b/mesalib/src/mesa/drivers/dri/common/utils.h @@ -48,7 +48,7 @@ struct __DRIconfigRec { }; extern __DRIconfig ** -driCreateConfigs(GLenum fb_format, GLenum fb_type, +driCreateConfigs(gl_format format, const uint8_t * depth_bits, const uint8_t * stencil_bits, unsigned num_depth_stencil_bits, const GLenum * db_modes, unsigned num_db_modes, diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast.c b/mesalib/src/mesa/drivers/dri/swrast/swrast.c index 7596973b0..eeeb81c01 100644 --- a/mesalib/src/mesa/drivers/dri/swrast/swrast.c +++ b/mesalib/src/mesa/drivers/dri/swrast/swrast.c @@ -125,8 +125,7 @@ swrastFillInModes(__DRIscreen *psp, __DRIconfig **configs; unsigned depth_buffer_factor; unsigned back_buffer_factor; - GLenum fb_format; - GLenum fb_type; + gl_format format; /* GLX_SWAP_COPY_OML is only supported because the Intel driver doesn't * support pageflipping at all. @@ -161,21 +160,14 @@ swrastFillInModes(__DRIscreen *psp, back_buffer_factor = 2; switch (pixel_bits) { - case 8: - fb_format = GL_RGB; - fb_type = GL_UNSIGNED_BYTE_2_3_3_REV; - break; case 16: - fb_format = GL_RGB; - fb_type = GL_UNSIGNED_SHORT_5_6_5; + format = MESA_FORMAT_RGB565; break; case 24: - fb_format = GL_BGR; - fb_type = GL_UNSIGNED_INT_8_8_8_8_REV; + format = MESA_FORMAT_XRGB8888; break; case 32: - fb_format = GL_BGRA; - fb_type = GL_UNSIGNED_INT_8_8_8_8_REV; + format = MESA_FORMAT_ARGB8888; break; default: fprintf(stderr, "[%s:%u] bad depth %d\n", __func__, __LINE__, @@ -183,7 +175,7 @@ swrastFillInModes(__DRIscreen *psp, return NULL; } - configs = driCreateConfigs(fb_format, fb_type, + configs = driCreateConfigs(format, depth_bits_array, stencil_bits_array, depth_buffer_factor, back_buffer_modes, back_buffer_factor, msaa_samples_array, 1, diff --git a/mesalib/src/mesa/main/accum.c b/mesalib/src/mesa/main/accum.c index 8b71640df..e2d7726b5 100644 --- a/mesalib/src/mesa/main/accum.c +++ b/mesalib/src/mesa/main/accum.c @@ -205,7 +205,7 @@ accum_scale_or_bias(struct gl_context *ctx, GLfloat value, if (accRb->Format == MESA_FORMAT_SIGNED_RGBA_16) { const GLshort incr = (GLshort) (value * 32767.0f); - GLuint i, j; + GLint i, j; if (bias) { for (j = 0; j < height; j++) { GLshort *acc = (GLshort *) accMap; @@ -283,7 +283,7 @@ accum_or_load(struct gl_context *ctx, GLfloat value, if (accRb->Format == MESA_FORMAT_SIGNED_RGBA_16) { const GLfloat scale = value * 32767.0f; - GLuint i, j; + GLint i, j; GLfloat (*rgba)[4]; rgba = malloc(width * 4 * sizeof(GLfloat)); diff --git a/mesalib/src/mesa/main/config.h b/mesalib/src/mesa/main/config.h index 1b72b5449..99910d7f3 100644 --- a/mesalib/src/mesa/main/config.h +++ b/mesalib/src/mesa/main/config.h @@ -187,7 +187,7 @@ #define MAX_PROGRAM_CALL_DEPTH 8 #define MAX_PROGRAM_TEMPS 256 #define MAX_PROGRAM_ADDRESS_REGS 2 -#define MAX_VARYING 16 /**< number of float[4] vectors */ +#define MAX_VARYING 32 /**< number of float[4] vectors */ #define MAX_SAMPLERS MAX_TEXTURE_IMAGE_UNITS #define MAX_PROGRAM_INPUTS 32 #define MAX_PROGRAM_OUTPUTS 64 diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c index b00c64233..a51073843 100644 --- a/mesalib/src/mesa/main/context.c +++ b/mesalib/src/mesa/main/context.c @@ -614,7 +614,7 @@ _mesa_init_constants(struct gl_context *ctx) ctx->Const.MaxVertexTextureImageUnits = MAX_VERTEX_TEXTURE_IMAGE_UNITS; ctx->Const.MaxCombinedTextureImageUnits = MAX_COMBINED_TEXTURE_IMAGE_UNITS; - ctx->Const.MaxVarying = MAX_VARYING; + ctx->Const.MaxVarying = 16; /* old limit not to break tnl and swrast */ ctx->Const.MaxGeometryTextureImageUnits = MAX_GEOMETRY_TEXTURE_IMAGE_UNITS; ctx->Const.MaxVertexVaryingComponents = MAX_VERTEX_VARYING_COMPONENTS; ctx->Const.MaxGeometryVaryingComponents = MAX_GEOMETRY_VARYING_COMPONENTS; diff --git a/mesalib/src/mesa/main/format_unpack.c b/mesalib/src/mesa/main/format_unpack.c index 7b46dfc79..04fd1d698 100644 --- a/mesalib/src/mesa/main/format_unpack.c +++ b/mesalib/src/mesa/main/format_unpack.c @@ -633,7 +633,7 @@ unpack_Z24_S8(const void *src, GLfloat dst[][4], GLuint n) for (i = 0; i < n; i++) { dst[i][0] = dst[i][1] = - dst[i][2] = (s[i] >> 8) * scale; + dst[i][2] = (GLfloat) ((s[i] >> 8) * scale); dst[i][3] = 1.0F; ASSERT(dst[i][0] >= 0.0F); ASSERT(dst[i][0] <= 1.0F); @@ -650,7 +650,7 @@ unpack_S8_Z24(const void *src, GLfloat dst[][4], GLuint n) for (i = 0; i < n; i++) { dst[i][0] = dst[i][1] = - dst[i][2] = (s[i] & 0x00ffffff) * scale; + dst[i][2] = (float) ((s[i] & 0x00ffffff) * scale); dst[i][3] = 1.0F; ASSERT(dst[i][0] >= 0.0F); ASSERT(dst[i][0] <= 1.0F); @@ -2856,7 +2856,7 @@ unpack_float_z_Z24_X8(GLuint n, const void *src, GLfloat *dst) const GLdouble scale = 1.0 / (GLdouble) 0xffffff; GLuint i; for (i = 0; i < n; i++) { - dst[i] = (s[i] >> 8) * scale; + dst[i] = (GLfloat) ((s[i] >> 8) * scale); ASSERT(dst[i] >= 0.0F); ASSERT(dst[i] <= 1.0F); } @@ -2870,7 +2870,7 @@ unpack_float_z_X8_Z24(GLuint n, const void *src, GLfloat *dst) const GLdouble scale = 1.0 / (GLdouble) 0xffffff; GLuint i; for (i = 0; i < n; i++) { - dst[i] = (s[i] & 0x00ffffff) * scale; + dst[i] = (GLfloat) ((s[i] & 0x00ffffff) * scale); ASSERT(dst[i] >= 0.0F); ASSERT(dst[i] <= 1.0F); } diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c index e38d594e2..805f0f978 100644 --- a/mesalib/src/mesa/main/get.c +++ b/mesalib/src/mesa/main/get.c @@ -1149,7 +1149,7 @@ _mesa_GetFloatv(GLenum pname, GLfloat *params) break; case TYPE_DOUBLEN: - params[0] = ((GLdouble *) p)[0]; + params[0] = (GLfloat) (((GLdouble *) p)[0]); break; case TYPE_INT_4: @@ -1170,7 +1170,7 @@ _mesa_GetFloatv(GLenum pname, GLfloat *params) break; case TYPE_INT64: - params[0] = ((GLint64 *) p)[0]; + params[0] = (GLfloat) (((GLint64 *) p)[0]); break; case TYPE_BOOLEAN: @@ -1449,7 +1449,7 @@ _mesa_GetDoublev(GLenum pname, GLdouble *params) break; case TYPE_INT64: - params[0] = ((GLint64 *) p)[0]; + params[0] = (GLdouble) (((GLint64 *) p)[0]); break; case TYPE_BOOLEAN: diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h index c3378cd99..7f2adc773 100644 --- a/mesalib/src/mesa/main/mtypes.h +++ b/mesalib/src/mesa/main/mtypes.h @@ -2763,12 +2763,12 @@ struct gl_program_constants */ struct gl_constants { - GLint MaxTextureMbytes; /**< Max memory per image, in MB */ - GLint MaxTextureLevels; /**< Max mipmap levels. */ - GLint Max3DTextureLevels; /**< Max mipmap levels for 3D textures */ - GLint MaxCubeTextureLevels; /**< Max mipmap levels for cube textures */ - GLint MaxArrayTextureLayers; /**< Max layers in array textures */ - GLint MaxTextureRectSize; /**< Max rectangle texture size, in pixes */ + GLuint MaxTextureMbytes; /**< Max memory per image, in MB */ + GLuint MaxTextureLevels; /**< Max mipmap levels. */ + GLuint Max3DTextureLevels; /**< Max mipmap levels for 3D textures */ + GLuint MaxCubeTextureLevels; /**< Max mipmap levels for cube textures */ + GLuint MaxArrayTextureLayers; /**< Max layers in array textures */ + GLuint MaxTextureRectSize; /**< Max rectangle texture size, in pixes */ GLuint MaxTextureCoordUnits; GLuint MaxTextureImageUnits; GLuint MaxVertexTextureImageUnits; diff --git a/mesalib/src/mesa/main/shared.c b/mesalib/src/mesa/main/shared.c index fab2995a4..2d2f7bd1d 100644 --- a/mesalib/src/mesa/main/shared.c +++ b/mesalib/src/mesa/main/shared.c @@ -89,7 +89,7 @@ _mesa_alloc_shared_state(struct gl_context *ctx) /* Create default texture objects */ for (i = 0; i < NUM_TEXTURE_TARGETS; i++) { /* NOTE: the order of these enums matches the TEXTURE_x_INDEX values */ - static const GLenum targets[NUM_TEXTURE_TARGETS] = { + static const GLenum targets[] = { GL_TEXTURE_BUFFER, GL_TEXTURE_2D_ARRAY_EXT, GL_TEXTURE_1D_ARRAY_EXT, diff --git a/mesalib/src/mesa/main/texstorage.c b/mesalib/src/mesa/main/texstorage.c index ca02ef301..283aefad3 100644 --- a/mesalib/src/mesa/main/texstorage.c +++ b/mesalib/src/mesa/main/texstorage.c @@ -284,7 +284,7 @@ tex_storage_error_check(struct gl_context *ctx, GLuint dims, GLenum target, } /* check levels against maximum (note different error than above) */ - if (levels > _mesa_max_texture_levels(ctx, target)) { + if (levels > (GLint) _mesa_max_texture_levels(ctx, target)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glTexStorage%uD(levels too large)", dims); return GL_TRUE; diff --git a/mesalib/src/mesa/main/transformfeedback.c b/mesalib/src/mesa/main/transformfeedback.c index 0669b3a25..1afc0dccb 100644 --- a/mesalib/src/mesa/main/transformfeedback.c +++ b/mesalib/src/mesa/main/transformfeedback.c @@ -277,7 +277,7 @@ _mesa_BeginTransformFeedback(GLenum mode) { struct gl_transform_feedback_object *obj; struct gl_transform_feedback_info *info; - int i; + GLuint i; GET_CURRENT_CONTEXT(ctx); obj = ctx->TransformFeedback.CurrentObject; @@ -537,7 +537,7 @@ _mesa_TransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar **varyings, GLenum bufferMode) { struct gl_shader_program *shProg; - GLuint i; + GLint i; GET_CURRENT_CONTEXT(ctx); switch (bufferMode) { @@ -648,7 +648,7 @@ _mesa_GetTransformFeedbackVarying(GLuint program, GLuint index, } linked_xfb_info = &shProg->LinkedTransformFeedback; - if (index >= linked_xfb_info->NumVarying) { + if (index >= (GLuint) linked_xfb_info->NumVarying) { _mesa_error(ctx, GL_INVALID_VALUE, "glGetTransformFeedbackVaryings(index=%u)", index); return; diff --git a/mesalib/src/mesa/program/hash_table.c b/mesalib/src/mesa/program/hash_table.c index 7dabadc50..f45ed46af 100644 --- a/mesalib/src/mesa/program/hash_table.c +++ b/mesalib/src/mesa/program/hash_table.c @@ -193,7 +193,7 @@ hash_table_call_foreach(struct hash_table *ht, void *closure), void *closure) { - int bucket; + unsigned bucket; for (bucket = 0; bucket < ht->num_buckets; bucket++) { struct node *node, *temp; diff --git a/mesalib/src/mesa/program/prog_print.c b/mesalib/src/mesa/program/prog_print.c index a83cce4e3..dbaa4d017 100644 --- a/mesalib/src/mesa/program/prog_print.c +++ b/mesalib/src/mesa/program/prog_print.c @@ -158,7 +158,23 @@ arb_input_attrib_string(GLint index, GLenum progType) "fragment.varying[12]", "fragment.varying[13]", "fragment.varying[14]", - "fragment.varying[15]" /* MAX_VARYING = 16 */ + "fragment.varying[15]", + "fragment.varying[16]", + "fragment.varying[17]", + "fragment.varying[18]", + "fragment.varying[19]", + "fragment.varying[20]", + "fragment.varying[21]", + "fragment.varying[22]", + "fragment.varying[23]", + "fragment.varying[24]", + "fragment.varying[25]", + "fragment.varying[26]", + "fragment.varying[27]", + "fragment.varying[28]", + "fragment.varying[29]", + "fragment.varying[30]", + "fragment.varying[31]", /* MAX_VARYING = 32 */ }; /* sanity checks */ @@ -262,7 +278,23 @@ arb_output_attrib_string(GLint index, GLenum progType) "result.varying[12]", "result.varying[13]", "result.varying[14]", - "result.varying[15]" /* MAX_VARYING = 16 */ + "result.varying[15]", + "result.varying[16]", + "result.varying[17]", + "result.varying[18]", + "result.varying[19]", + "result.varying[20]", + "result.varying[21]", + "result.varying[22]", + "result.varying[23]", + "result.varying[24]", + "result.varying[25]", + "result.varying[26]", + "result.varying[27]", + "result.varying[28]", + "result.varying[29]", + "result.varying[30]", + "result.varying[31]", /* MAX_VARYING = 32 */ }; static const char *const fragResults[] = { "result.depth", /* FRAG_RESULT_DEPTH */ diff --git a/mesalib/src/mesa/vbo/vbo_attrib_tmp.h b/mesalib/src/mesa/vbo/vbo_attrib_tmp.h index d3fc77eef..884844535 100644 --- a/mesalib/src/mesa/vbo/vbo_attrib_tmp.h +++ b/mesalib/src/mesa/vbo/vbo_attrib_tmp.h @@ -61,12 +61,12 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. static inline float conv_ui10_to_norm_float(unsigned ui10) { - return (float)(ui10) / 1023.0; + return ui10 / 1023.0f; } static inline float conv_ui2_to_norm_float(unsigned ui2) { - return (float)(ui2) / 3.0; + return ui2 / 3.0f; } #define ATTRUI10_1( A, UI ) ATTR( A, 1, (UI) & 0x3ff, 0, 0, 1 ) diff --git a/xorg-server/autogen.sh b/xorg-server/autogen.sh index 8b6f58f69..dd0731ad9 100644 --- a/xorg-server/autogen.sh +++ b/xorg-server/autogen.sh @@ -9,4 +9,6 @@ cd $srcdir autoreconf --force -v --install || exit 1 cd $ORIGDIR || exit $? -$srcdir/configure "$@" +if test -z "$NOCONFIGURE"; then + exec $srcdir/configure "$@" +fi diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac index e6866140e..b6ed92cb3 100644 --- a/xorg-server/configure.ac +++ b/xorg-server/configure.ac @@ -811,7 +811,7 @@ LIBPCIACCESS="pciaccess >= 0.12.901" LIBUDEV="libudev >= 143" LIBSELINUX="libselinux >= 2.0.86" LIBDBUS="dbus-1 >= 1.0" -LIBPIXMAN="pixman-1 >= 0.21.8" +LIBPIXMAN="pixman-1 >= 0.27.2" dnl Pixman is always required, but we separate it out so we can link dnl specific modules against it diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c index 66d440683..fd4916a3a 100644 --- a/xorg-server/dix/devices.c +++ b/xorg-server/dix/devices.c @@ -443,6 +443,7 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent) if (*prev != dev) return FALSE; + TouchEndPhysicallyActiveTouches(dev); ReleaseButtonsAndKeys(dev); SyncRemoveDeviceIdleTime(dev->idle_counter); dev->idle_counter = NULL; diff --git a/xorg-server/dix/grabs.c b/xorg-server/dix/grabs.c index 55bf64f2c..fe7967415 100644 --- a/xorg-server/dix/grabs.c +++ b/xorg-server/dix/grabs.c @@ -179,7 +179,7 @@ UngrabAllDevices(Bool kill_client) continue; PrintDeviceGrabInfo(dev); client = clients[CLIENT_ID(dev->deviceGrab.grab->resource)]; - if (!client || client->clientGone) + if (!kill_client || !client || client->clientGone) dev->deviceGrab.DeactivateGrab(dev); if (kill_client) CloseDownClient(client); diff --git a/xorg-server/dix/touch.c b/xorg-server/dix/touch.c index 497ad7dac..e64a6262c 100644 --- a/xorg-server/dix/touch.c +++ b/xorg-server/dix/touch.c @@ -1029,3 +1029,31 @@ TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode, return TouchListenerAcceptReject(dev, ti, i, mode); } + +/** + * End physically active touches for a device. + */ +void +TouchEndPhysicallyActiveTouches(DeviceIntPtr dev) +{ + InternalEvent *eventlist = InitEventList(GetMaximumEventsNum()); + int i; + + OsBlockSignals(); + mieqProcessInputEvents(); + for (i = 0; i < dev->last.num_touches; i++) { + DDXTouchPointInfoPtr ddxti = dev->last.touches + i; + + if (ddxti->active) { + int j; + int nevents = GetTouchEvents(eventlist, dev, ddxti->ddx_id, + XI_TouchEnd, 0, NULL); + + for (j = 0; j < nevents; j++) + mieqProcessDeviceEvent(dev, eventlist + j, NULL); + } + } + OsReleaseSignals(); + + FreeEventList(eventlist, GetMaximumEventsNum()); +} diff --git a/xorg-server/exa/exa_priv.h b/xorg-server/exa/exa_priv.h index 70075786a..1f5605687 100644 --- a/xorg-server/exa/exa_priv.h +++ b/xorg-server/exa/exa_priv.h @@ -208,6 +208,7 @@ typedef struct { RegionRec srcReg; RegionRec maskReg; PixmapPtr srcPix; + PixmapPtr maskPix; DevPrivateKeyRec pixmapPrivateKeyRec; DevPrivateKeyRec gcPrivateKeyRec; diff --git a/xorg-server/exa/exa_unaccel.c b/xorg-server/exa/exa_unaccel.c index 571613886..b0a0011cb 100644 --- a/xorg-server/exa/exa_unaccel.c +++ b/xorg-server/exa/exa_unaccel.c @@ -442,6 +442,13 @@ ExaSrcValidate(DrawablePtr pDrawable, RegionPtr dst; int xoff, yoff; + if (pExaScr->srcPix == pPix) + dst = &pExaScr->srcReg; + else if (pExaScr->maskPix == pPix) + dst = &pExaScr->maskReg; + else + return; + exaGetDrawableDeltas(pDrawable, pPix, &xoff, &yoff); box.x1 = x + xoff; @@ -449,8 +456,6 @@ ExaSrcValidate(DrawablePtr pDrawable, box.x2 = box.x1 + width; box.y2 = box.y1 + height; - dst = (pExaScr->srcPix == pPix) ? &pExaScr->srcReg : &pExaScr->maskReg; - RegionInit(®, &box, 1); RegionUnion(dst, dst, ®); RegionUninit(®); @@ -495,16 +500,19 @@ ExaPrepareCompositeReg(ScreenPtr pScreen, if (pSrc != pDst) RegionTranslate(pSrc->pCompositeClip, -pSrc->pDrawable->x, -pSrc->pDrawable->y); - } + } else + pExaScr->srcPix = NULL; if (pMask && pMask->pDrawable) { pMaskPix = exaGetDrawablePixmap(pMask->pDrawable); RegionNull(&pExaScr->maskReg); maskReg = &pExaScr->maskReg; + pExaScr->maskPix = pMaskPix; if (pMask != pDst && pMask != pSrc) RegionTranslate(pMask->pCompositeClip, -pMask->pDrawable->x, -pMask->pDrawable->y); - } + } else + pExaScr->maskPix = NULL; RegionTranslate(pDst->pCompositeClip, -pDst->pDrawable->x, -pDst->pDrawable->y); diff --git a/xorg-server/fb/fb.h b/xorg-server/fb/fb.h index 75596c58e..b869d122c 100644 --- a/xorg-server/fb/fb.h +++ b/xorg-server/fb/fb.h @@ -1344,6 +1344,9 @@ extern _X_EXPORT void extern _X_EXPORT Bool fbPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats); +extern _X_EXPORT void +fbDestroyGlyphCache(void); + /* * fbpixmap.c */ diff --git a/xorg-server/fb/fbpict.c b/xorg-server/fb/fbpict.c index 097a1a6bd..2804ff481 100644 --- a/xorg-server/fb/fbpict.c +++ b/xorg-server/fb/fbpict.c @@ -70,6 +70,156 @@ fbComposite(CARD8 op, free_pixman_pict(pDst, dest); } +static pixman_glyph_cache_t *glyphCache; + +void +fbDestroyGlyphCache(void) +{ + if (glyphCache) + { + pixman_glyph_cache_destroy (glyphCache); + glyphCache = NULL; + } +} + +static void +fbUnrealizeGlyph(ScreenPtr pScreen, + GlyphPtr pGlyph) +{ + if (glyphCache) + pixman_glyph_cache_remove (glyphCache, pGlyph, NULL); +} + +static void +fbGlyphs(CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, + INT16 ySrc, int nlist, + GlyphListPtr list, + GlyphPtr *glyphs) +{ +#define N_STACK_GLYPHS 512 + ScreenPtr pScreen = pDst->pDrawable->pScreen; + pixman_glyph_t stack_glyphs[N_STACK_GLYPHS]; + pixman_glyph_t *pglyphs = stack_glyphs; + pixman_image_t *srcImage, *dstImage; + int srcXoff, srcYoff, dstXoff, dstYoff; + GlyphPtr glyph; + int n_glyphs; + int x, y; + int i, n; + int xDst = list->xOff, yDst = list->yOff; + + miCompositeSourceValidate(pSrc); + + n_glyphs = 0; + for (i = 0; i < nlist; ++i) + n_glyphs += list[i].len; + + if (!glyphCache) + glyphCache = pixman_glyph_cache_create(); + + pixman_glyph_cache_freeze (glyphCache); + + if (n_glyphs > N_STACK_GLYPHS) { + if (!(pglyphs = malloc (n_glyphs * sizeof (pixman_glyph_t)))) + goto out; + } + + i = 0; + x = y = 0; + while (nlist--) { + x += list->xOff; + y += list->yOff; + n = list->len; + while (n--) { + const void *g; + + glyph = *glyphs++; + + if (!(g = pixman_glyph_cache_lookup (glyphCache, glyph, NULL))) { + pixman_image_t *glyphImage; + PicturePtr pPicture; + int xoff, yoff; + + pPicture = GetGlyphPicture(glyph, pScreen); + if (!pPicture) { + n_glyphs--; + goto next; + } + + if (!(glyphImage = image_from_pict(pPicture, FALSE, &xoff, &yoff))) + goto out; + + g = pixman_glyph_cache_insert(glyphCache, glyph, NULL, + glyph->info.x, + glyph->info.y, + glyphImage); + + free_pixman_pict(pPicture, glyphImage); + + if (!g) + goto out; + } + + pglyphs[i].x = x; + pglyphs[i].y = y; + pglyphs[i].glyph = g; + i++; + + next: + x += glyph->info.xOff; + y += glyph->info.yOff; + } + list++; + } + + if (!(srcImage = image_from_pict(pSrc, FALSE, &srcXoff, &srcYoff))) + goto out; + + if (!(dstImage = image_from_pict(pDst, TRUE, &dstXoff, &dstYoff))) + goto out_free_src; + + if (maskFormat) { + pixman_format_code_t format; + pixman_box32_t extents; + int x, y; + + format = maskFormat->format | (maskFormat->depth << 24); + + pixman_glyph_get_extents(glyphCache, n_glyphs, pglyphs, &extents); + + x = extents.x1; + y = extents.y1; + + pixman_composite_glyphs(op, srcImage, dstImage, format, + xSrc + srcXoff + xDst, ySrc + srcYoff + yDst, + x, y, + x + dstXoff, y + dstYoff, + extents.x2 - extents.x1, + extents.y2 - extents.y1, + glyphCache, n_glyphs, pglyphs); + } + else { + pixman_composite_glyphs_no_mask(op, srcImage, dstImage, + xSrc + srcXoff - xDst, ySrc + srcYoff - yDst, + dstXoff, dstYoff, + glyphCache, n_glyphs, pglyphs); + } + + free_pixman_pict(pDst, dstImage); + +out_free_src: + free_pixman_pict(pSrc, srcImage); + +out: + pixman_glyph_cache_thaw(glyphCache); + if (pglyphs != stack_glyphs) + free(pglyphs); +} + static pixman_image_t * create_solid_fill_image(PicturePtr pict) { @@ -357,7 +507,8 @@ fbPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats) return FALSE; ps = GetPictureScreen(pScreen); ps->Composite = fbComposite; - ps->Glyphs = miGlyphs; + ps->Glyphs = fbGlyphs; + ps->UnrealizeGlyph = fbUnrealizeGlyph; ps->CompositeRects = miCompositeRects; ps->RasterizeTrapezoid = fbRasterizeTrapezoid; ps->Trapezoids = fbTrapezoids; diff --git a/xorg-server/fb/fbscreen.c b/xorg-server/fb/fbscreen.c index 7c7d6560e..f9080a445 100644 --- a/xorg-server/fb/fbscreen.c +++ b/xorg-server/fb/fbscreen.c @@ -32,6 +32,7 @@ fbCloseScreen(ScreenPtr pScreen) int d; DepthPtr depths = pScreen->allowedDepths; + fbDestroyGlyphCache(); for (d = 0; d < pScreen->numDepths; d++) free(depths[d].vids); free(depths); diff --git a/xorg-server/hw/xfree86/common/xf86str.h b/xorg-server/hw/xfree86/common/xf86str.h index 059026243..4c2d147a2 100644 --- a/xorg-server/hw/xfree86/common/xf86str.h +++ b/xorg-server/hw/xfree86/common/xf86str.h @@ -347,7 +347,7 @@ typedef struct _DriverRec { */ /* Tolerate prior #include <linux/input.h> */ -#if defined(linux) && defined(_INPUT_H) +#if defined(linux) #undef BUS_NONE #undef BUS_PCI #undef BUS_SBUS diff --git a/xorg-server/hw/xwin/InitOutput.c b/xorg-server/hw/xwin/InitOutput.c index 1cf0f02eb..4bcd3a006 100644 --- a/xorg-server/hw/xwin/InitOutput.c +++ b/xorg-server/hw/xwin/InitOutput.c @@ -77,11 +77,6 @@ static void winClipboardShutdown(void); #endif -#if defined(DDXOSVERRORF) -void - OsVendorVErrorF(const char *pszFormat, va_list va_args); -#endif - static Bool winCheckDisplayNumber(void); @@ -299,11 +294,11 @@ winCheckMount(void) } while ((ent = getmntent(mnt)) != NULL) { - BOOL system = (winCheckMntOpt(ent, "user") != NULL); + BOOL sys = (winCheckMntOpt(ent, "user") != NULL); BOOL root = (strcmp(ent->mnt_dir, "/") == 0); BOOL tmp = (strcmp(ent->mnt_dir, "/tmp") == 0); - if (system) { + if (sys) { if (root) curlevel = sys_root; else if (tmp) @@ -897,7 +892,7 @@ ddxUseMsg(void) */ void -InitOutput(ScreenInfo * screenInfo, int argc, char *argv[]) +InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[]) { int i; @@ -940,15 +935,15 @@ InitOutput(ScreenInfo * screenInfo, int argc, char *argv[]) LoadPreferences(); /* Setup global screen info parameters */ - screenInfo->imageByteOrder = IMAGE_BYTE_ORDER; - screenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; - screenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; - screenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; - screenInfo->numPixmapFormats = NUMFORMATS; + pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER; + pScreenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; + pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; + pScreenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; + pScreenInfo->numPixmapFormats = NUMFORMATS; /* Describe how we want common pixmap formats padded */ for (i = 0; i < NUMFORMATS; i++) { - screenInfo->formats[i] = g_PixmapFormats[i]; + pScreenInfo->formats[i] = g_PixmapFormats[i]; } /* Load pointers to DirectDraw functions */ diff --git a/xorg-server/hw/xwin/Makefile.am b/xorg-server/hw/xwin/Makefile.am index 33729a906..99dc55631 100644 --- a/xorg-server/hw/xwin/Makefile.am +++ b/xorg-server/hw/xwin/Makefile.am @@ -95,7 +95,6 @@ SRCS = InitInput.c \ winprefsyacc.y \ winprefslex.l \ winprocarg.c \ - winregistry.c \ winscrinit.c \ winshaddd.c \ winshadddnl.c \ diff --git a/xorg-server/hw/xwin/glx/gen_gl_wrappers.py b/xorg-server/hw/xwin/glx/gen_gl_wrappers.py index 15f7ef868..2273589c9 100644 --- a/xorg-server/hw/xwin/glx/gen_gl_wrappers.py +++ b/xorg-server/hw/xwin/glx/gen_gl_wrappers.py @@ -146,9 +146,8 @@ for line in glspec : arglist_use = m1.group(2) wrappers[function] = {} - # near and far might be reserved words or macros so can't be used as formal parameter names - arglist_use = arglist_use.replace('near','zNear') - arglist_use = arglist_use.replace('far','zFar') + # ensure formal parameter names don't collide with reserved names or shadow global declarations + arglist_use = ',' .join([i.rstrip() + '_' for i in arglist_use.split(",")]) wrappers[function]['arglist_use'] = arglist_use param_count = 0 @@ -217,9 +216,8 @@ for w in sorted(wrappers.keys()) : if k.startswith('param') : l = wrappers[w][k].split() - # near and far might be reserved words or macros so can't be used as formal parameter names - l[0] = l[0].replace('near','zNear') - l[0] = l[0].replace('far','zFar') + # ensure formal parameter names don't collide with reserved names or shadow global declarations + l[0] = l[0] + '_' if l[2] == 'in' : if l[3] == 'array' : diff --git a/xorg-server/hw/xwin/glx/glwrap.c b/xorg-server/hw/xwin/glx/glwrap.c index 690b82926..73cff3cc1 100644 --- a/xorg-server/hw/xwin/glx/glwrap.c +++ b/xorg-server/hw/xwin/glx/glwrap.c @@ -67,7 +67,7 @@ glWinCallDelta(void) } static PROC -glWinResolveHelper(PROC * cache, char *symbol) +glWinResolveHelper(PROC * cache, const char *symbol) { PROC proc = NULL; diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c index 97b6045b7..c0069a20f 100644 --- a/xorg-server/hw/xwin/glx/indirect.c +++ b/xorg-server/hw/xwin/glx/indirect.c @@ -1626,15 +1626,15 @@ glxWinCreateContext(__GLXscreen * screen, */ static int -GetShift(int Mask) +GetShift(int mask) { - int Shift = 0; + int shift = 0; - while ((Mask &1) == 0) { - Shift++; - Mask >>=1; + while ((mask &1) == 0) { + shift++; + mask >>=1; } - return Shift; + return shift; } static int diff --git a/xorg-server/hw/xwin/win.h b/xorg-server/hw/xwin/win.h index 08d0d3f92..7b34e84d9 100644 --- a/xorg-server/hw/xwin/win.h +++ b/xorg-server/hw/xwin/win.h @@ -857,11 +857,13 @@ void #ifdef DDXOSVERRORF void - OSVenderVErrorF(const char *pszFormat, va_list va_args); +OsVendorVErrorF(const char *pszFormat, va_list va_args) +_X_ATTRIBUTE_PRINTF(1, 0); #endif void - winMessageBoxF(const char *pszError, UINT uType, ...); +winMessageBoxF(const char *pszError, UINT uType, ...) +_X_ATTRIBUTE_PRINTF(1, 3); #ifdef XWIN_NATIVEGDI /* @@ -1052,18 +1054,6 @@ void winPolyLineNativeGDI(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt); #endif - -#ifdef XWIN_NATIVEGDI -/* - * winpushpxl.c - */ - -void - -winPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable, - int dx, int dy, int xOrg, int yOrg); -#endif - /* * winscrinit.c */ diff --git a/xorg-server/hw/xwin/winallpriv.c b/xorg-server/hw/xwin/winallpriv.c index ea3126fa0..cc3b3d1ba 100644 --- a/xorg-server/hw/xwin/winallpriv.c +++ b/xorg-server/hw/xwin/winallpriv.c @@ -110,7 +110,7 @@ winAllocatePrivates(ScreenPtr pScreen) */ Bool -winInitCmapPrivates(ColormapPtr pcmap, int index) +winInitCmapPrivates(ColormapPtr pcmap, int i) { #if CYGDEBUG winDebug("winInitCmapPrivates\n"); diff --git a/xorg-server/hw/xwin/winclipboard.h b/xorg-server/hw/xwin/winclipboard.h index 27eb2f96f..2cd775d6b 100644 --- a/xorg-server/hw/xwin/winclipboard.h +++ b/xorg-server/hw/xwin/winclipboard.h @@ -79,7 +79,6 @@ */ extern char *display; -extern void ErrorF(const char * /*f */ , ...); extern void winDebug(const char *format, ...); extern void winErrorFVerb(int verb, const char *format, ...); @@ -100,7 +99,7 @@ void winClipboardDOStoUNIX(char *pszData, int iLength); void - winClipboardUNIXtoDOS(unsigned char **ppszData, int iLength); + winClipboardUNIXtoDOS(char **ppszData, int iLength); /* * winclipboardthread.c diff --git a/xorg-server/hw/xwin/winclipboardtextconv.c b/xorg-server/hw/xwin/winclipboardtextconv.c index 74a351b17..fd405a02e 100644 --- a/xorg-server/hw/xwin/winclipboardtextconv.c +++ b/xorg-server/hw/xwin/winclipboardtextconv.c @@ -38,7 +38,7 @@ void winClipboardDOStoUNIX(char *pszSrc, int iLength); void - winClipboardUNIXtoDOS(unsigned char **ppszData, int iLength); + winClipboardUNIXtoDOS(char **ppszData, int iLength); /* * Convert \r\n to \n @@ -75,12 +75,12 @@ winClipboardDOStoUNIX(char *pszSrc, int iLength) */ void -winClipboardUNIXtoDOS(unsigned char **ppszData, int iLength) +winClipboardUNIXtoDOS(char **ppszData, int iLength) { int iNewlineCount = 0; - unsigned char *pszSrc = *ppszData; - unsigned char *pszEnd = pszSrc + iLength; - unsigned char *pszDest = NULL, *pszDestBegin = NULL; + char *pszSrc = *ppszData; + char *pszEnd = pszSrc + iLength; + char *pszDest = NULL, *pszDestBegin = NULL; winDebug("UNIXtoDOS () - Original data:'%s'\n", *ppszData); diff --git a/xorg-server/hw/xwin/winclipboardthread.c b/xorg-server/hw/xwin/winclipboardthread.c index f2e8e6d6f..891278279 100644 --- a/xorg-server/hw/xwin/winclipboardthread.c +++ b/xorg-server/hw/xwin/winclipboardthread.c @@ -47,7 +47,6 @@ */ extern Bool g_fUnicodeClipboard; -extern unsigned long serverGeneration; extern Bool g_fClipboardStarted; extern Bool g_fClipboardLaunched; extern Bool g_fClipboard; @@ -413,7 +412,7 @@ winClipboardProc(void *pvNotUsed) ("winClipboardProc - the clipboard thread has restarted %d times and seems to be unstable, disabling clipboard integration\n", clipboardRestarts); g_fClipboard = FALSE; - return; + return NULL; } if (g_fClipboard) { @@ -422,7 +421,7 @@ winClipboardProc(void *pvNotUsed) /* Create the clipboard client thread */ if (!winInitClipboard()) { ErrorF("winClipboardProc - winClipboardInit failed.\n"); - return; + return NULL; } winDebug("winClipboardProc - winInitClipboard returned.\n"); diff --git a/xorg-server/hw/xwin/winclipboardwrappers.c b/xorg-server/hw/xwin/winclipboardwrappers.c index 1118f4ff8..008088b6a 100644 --- a/xorg-server/hw/xwin/winclipboardwrappers.c +++ b/xorg-server/hw/xwin/winclipboardwrappers.c @@ -49,10 +49,6 @@ * Local function prototypes */ -int winProcEstablishConnection(ClientPtr /* client */ ); -int winProcQueryTree(ClientPtr /* client */ ); -int winProcSetSelectionOwner(ClientPtr /* client */ ); - DISPATCH_PROC(winProcEstablishConnection); DISPATCH_PROC(winProcSetSelectionOwner); @@ -60,10 +56,8 @@ DISPATCH_PROC(winProcSetSelectionOwner); * References to external symbols */ -extern int g_iNumScreens; extern unsigned int g_uiAuthDataLen; extern char *g_pAuthData; -extern Bool g_fXdmcpEnabled; extern Bool g_fClipboardLaunched; extern Bool g_fClipboardStarted; extern Bool g_fClipboard; @@ -71,9 +65,6 @@ extern Window g_iClipboardWindow; extern Atom g_atomLastOwnedSelection; extern HWND g_hwndClipboard; -extern winDispatchProcPtr winProcEstablishConnectionOrig; -extern winDispatchProcPtr winProcQueryTreeOrig; -extern winDispatchProcPtr winProcSetSelectionOwnerOrig; /* * Wrapper for internal EstablishConnection function. diff --git a/xorg-server/hw/xwin/wincursor.c b/xorg-server/hw/xwin/wincursor.c index b56104fde..b5ea0db1b 100644 --- a/xorg-server/hw/xwin/wincursor.c +++ b/xorg-server/hw/xwin/wincursor.c @@ -158,7 +158,6 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen) HBITMAP hAnd, hXor; ICONINFO ii; unsigned char *pCur; - int x, y; unsigned char bit; HDC hDC; BITMAPV4HEADER bi; @@ -262,6 +261,7 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen) sizeof(unsigned long)); if (lpBits) { + int y; for (y = 0; y < nCY; y++) { unsigned long *src, *dst; @@ -305,6 +305,7 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen) pCur = (unsigned char *) lpBits; if (lpBits) { + int x, y; for (y = 0; y < pScreenPriv->cursor.sm_cy; y++) { for (x = 0; x < pScreenPriv->cursor.sm_cx; x++) { if (x >= nCX || y >= nCY) /* Outside of X11 icon bounds */ diff --git a/xorg-server/hw/xwin/winerror.c b/xorg-server/hw/xwin/winerror.c index 56c1e34e7..6645469fc 100644 --- a/xorg-server/hw/xwin/winerror.c +++ b/xorg-server/hw/xwin/winerror.c @@ -36,10 +36,6 @@ #include "win.h" #ifdef DDXOSVERRORF -/* Prototype */ -void - OsVendorVErrorF(const char *pszFormat, va_list va_args); - void OsVendorVErrorF(const char *pszFormat, va_list va_args) { diff --git a/xorg-server/hw/xwin/wingc.c b/xorg-server/hw/xwin/wingc.c index 8b7c7040c..7ac305d06 100644 --- a/xorg-server/hw/xwin/wingc.c +++ b/xorg-server/hw/xwin/wingc.c @@ -33,11 +33,6 @@ #endif #include "win.h" -void - -winPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable, int dx, - int dy, int xOrg, int yOrg); - /* * Local prototypes */ diff --git a/xorg-server/hw/xwin/winlayouts.h b/xorg-server/hw/xwin/winlayouts.h index d8875ceb5..8b6b98407 100644 --- a/xorg-server/hw/xwin/winlayouts.h +++ b/xorg-server/hw/xwin/winlayouts.h @@ -30,11 +30,11 @@ typedef struct { unsigned int winlayout; int winkbtype; - char *xkbmodel; - char *xkblayout; - char *xkbvariant; - char *xkboptions; - char *layoutname; + const char *xkbmodel; + const char *xkblayout; + const char *xkbvariant; + const char *xkboptions; + const char *layoutname; } WinKBLayoutRec, *WinKBLayoutPtr; /* diff --git a/xorg-server/hw/xwin/winmonitors.c b/xorg-server/hw/xwin/winmonitors.c index 07532f6f5..955fb9214 100644 --- a/xorg-server/hw/xwin/winmonitors.c +++ b/xorg-server/hw/xwin/winmonitors.c @@ -27,6 +27,10 @@ from The Open Group. */ +#ifdef HAVE_XWIN_CONFIG_H +#include <xwin-config.h> +#endif + #include "win.h" #include "winmonitors.h" @@ -55,13 +59,13 @@ getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _data) } Bool -QueryMonitor(int index, struct GetMonitorInfoData *data) +QueryMonitor(int i, struct GetMonitorInfoData *data) { /* prepare data */ if (data == NULL) return FALSE; memset(data, 0, sizeof(*data)); - data->requestedMonitor = index; + data->requestedMonitor = i; /* query information */ EnumDisplayMonitors(NULL, NULL, getMonitorInfo, (LPARAM) data); diff --git a/xorg-server/hw/xwin/winmsg.c b/xorg-server/hw/xwin/winmsg.c index 07c2f30eb..57c1d1888 100644 --- a/xorg-server/hw/xwin/winmsg.c +++ b/xorg-server/hw/xwin/winmsg.c @@ -38,7 +38,9 @@ #endif #include <stdarg.h> -void winVMsg(int, MessageType, int verb, const char *, va_list); +void +winVMsg(int, MessageType, int verb, const char *, va_list) +_X_ATTRIBUTE_PRINTF(4, 0); void winVMsg(int scrnIndex, MessageType type, int verb, const char *format, diff --git a/xorg-server/hw/xwin/winmsg.h b/xorg-server/hw/xwin/winmsg.h index ec285ba1f..b638f2cb3 100644 --- a/xorg-server/hw/xwin/winmsg.h +++ b/xorg-server/hw/xwin/winmsg.h @@ -34,15 +34,29 @@ * Function prototypes */ -void winDrvMsgVerb(int scrnIndex, - MessageType type, int verb, const char *format, ...); -void winDrvMsg(int scrnIndex, MessageType type, const char *format, ...); -void winMsgVerb(MessageType type, int verb, const char *format, ...); -void winMsg(MessageType type, const char *format, ...); -void winDebug(const char *format, ...); -void winTrace(const char *format, ...); +void +winDrvMsgVerb(int scrnIndex, + MessageType type, int verb, const char *format, ...) +_X_ATTRIBUTE_PRINTF(4, 5); +void +winDrvMsg(int scrnIndex, MessageType type, const char *format, ...) +_X_ATTRIBUTE_PRINTF(3, 4); +void +winMsgVerb(MessageType type, int verb, const char *format, ...) +_X_ATTRIBUTE_PRINTF(3, 4); +void +winMsg(MessageType type, const char *format, ...) +_X_ATTRIBUTE_PRINTF(2, 3); +void +winDebug(const char *format, ...) +_X_ATTRIBUTE_PRINTF(1, 2); +void +winTrace(const char *format, ...) +_X_ATTRIBUTE_PRINTF(1, 2); -void winErrorFVerb(int verb, const char *format, ...); +void +winErrorFVerb(int verb, const char *format, ...) +_X_ATTRIBUTE_PRINTF(2, 3); void winW32Error(int verb, const char *message); void winW32ErrorEx(int verb, const char *message, DWORD errorcode); void winDebugWin32Message(const char *function, HWND hwnd, UINT message, diff --git a/xorg-server/hw/xwin/winmultiwindowwm.c b/xorg-server/hw/xwin/winmultiwindowwm.c index ffb7c2d0f..ac9d57976 100644 --- a/xorg-server/hw/xwin/winmultiwindowwm.c +++ b/xorg-server/hw/xwin/winmultiwindowwm.c @@ -132,13 +132,6 @@ typedef struct _XMsgProcArgRec { } XMsgProcArgRec, *XMsgProcArgPtr; /* - * References to external symbols - */ - -extern char *display; -extern void ErrorF(const char * /*f */ , ...); - -/* * Prototypes for local functions */ @@ -526,7 +519,6 @@ getHwnd(WMInfoPtr pWMInfo, Window iWindow) static void UpdateName(WMInfoPtr pWMInfo, Window iWindow) { - wchar_t *pszName; HWND hWnd; XWindowAttributes attr; diff --git a/xorg-server/hw/xwin/winprefs.c b/xorg-server/hw/xwin/winprefs.c index faa97c351..dbc5b5228 100644 --- a/xorg-server/hw/xwin/winprefs.c +++ b/xorg-server/hw/xwin/winprefs.c @@ -57,9 +57,6 @@ extern int parse_file(FILE * fp); /* Currently in use command ID, incremented each new menu item created */ static int g_cmdid = STARTMENUID; -/* Defined in DIX */ -extern char *display; - /* Local function to handle comma-ified icon names */ static HICON LoadImageComma(char *fname, int sx, int sy, int flags); @@ -330,12 +327,12 @@ HandleCustomWM_COMMAND(unsigned long hwndIn, int command) case CMD_EXEC: if (fork() == 0) { struct rlimit rl; - unsigned long i; + int fd; /* Close any open descriptors except for STD* */ getrlimit(RLIMIT_NOFILE, &rl); - for (i = STDERR_FILENO + 1; i < rl.rlim_cur; i++) - close(i); + for (fd = STDERR_FILENO + 1; fd < rl.rlim_cur; fd++) + close(fd); /* Disassociate any TTYs */ setsid(); @@ -538,21 +535,21 @@ static HICON LoadImageComma(char *fname, int sx, int sy, int flags) { HICON hicon; - int index; + int i; char file[PATH_MAX + NAME_MAX + 2]; /* Some input error checking */ if (!fname || !fname[0]) return NULL; - index = 0; + i = 0; hicon = NULL; if (fname[0] == ',') { /* It's the XWIN.EXE resource they want */ - index = atoi(fname + 1); + i = atoi(fname + 1); hicon = LoadImage(g_hInstance, - MAKEINTRESOURCE(index), IMAGE_ICON, sx, sy, flags); + MAKEINTRESOURCE(i), IMAGE_ICON, sx, sy, flags); } else { file[0] = 0; @@ -569,8 +566,8 @@ LoadImageComma(char *fname, int sx, int sy, int flags) /* Specified as <fname>,<index> */ *(strrchr(file, ',')) = 0; /* End string at comma */ - index = atoi(strrchr(fname, ',') + 1); - hicon = ExtractIcon(g_hInstance, file, index); + i = atoi(strrchr(fname, ',') + 1); + hicon = ExtractIcon(g_hInstance, file, i); } else { /* Just an .ico file... */ diff --git a/xorg-server/hw/xwin/winprefslex.l b/xorg-server/hw/xwin/winprefslex.l index ba8aea696..15f707766 100644 --- a/xorg-server/hw/xwin/winprefslex.l +++ b/xorg-server/hw/xwin/winprefslex.l @@ -37,14 +37,10 @@ #include <string.h> #include "winprefsyacc.h" -extern YYSTYPE yylval; -extern char *yytext; extern int yyparse(void); extern void ErrorF (const char* /*f*/, ...); -int yylineno; - /* Copy the parsed string, must be free()d in yacc parser */ static char *makestr(char *str) { @@ -62,6 +58,9 @@ static char *makestr(char *str) %} %option yylineno +%option nounput +%option noinput +%option never-interactive %% \#.*[\r\n] { /* comment */ return NEWLINE; } diff --git a/xorg-server/hw/xwin/winprefsyacc.y b/xorg-server/hw/xwin/winprefsyacc.y index d23c32da4..3b376b3e7 100644 --- a/xorg-server/hw/xwin/winprefsyacc.y +++ b/xorg-server/hw/xwin/winprefsyacc.y @@ -1,457 +1,457 @@ -%{
-/*
- * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
- * Copyright (C) Colin Harrison 2005-2008
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project
- * shall not be used in advertising or otherwise to promote the sale, use
- * or other dealings in this Software without prior written authorization
- * from the XFree86 Project.
- *
- * Authors: Earle F. Philhower, III
- * Colin Harrison
- */
-/* $XFree86: $ */
-
-#ifdef HAVE_XWIN_CONFIG_H
-#include <xwin-config.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "winprefs.h"
-
-/* The following give better error messages in bison at the cost of a few KB */
-#define YYERROR_VERBOSE 1
-
-/* YYLTYPE_IS_TRIVIAL and YYENABLE_NLS defined to suppress warnings */
-#define YYLTYPE_IS_TRIVIAL 1
-#define YYENABLE_NLS 0
-
-/* The global pref settings */
-WINPREFS pref;
-
-/* The working menu */
-static MENUPARSED menu;
-
-/* Functions for parsing the tokens into out structure */
-/* Defined at the end section of this file */
-
-static void SetIconDirectory (char *path);
-static void SetDefaultIcon (char *fname);
-static void SetRootMenu (char *menu);
-static void SetDefaultSysMenu (char *menu, int pos);
-static void SetTrayIcon (char *fname);
-
-static void OpenMenu(char *menuname);
-static void AddMenuLine(char *name, MENUCOMMANDTYPE cmd, char *param);
-static void CloseMenu(void);
-
-static void OpenIcons(void);
-static void AddIconLine(char *matchstr, char *iconfile);
-static void CloseIcons(void);
-
-static void OpenStyles(void);
-static void AddStyleLine(char *matchstr, unsigned long style);
-static void CloseStyles(void);
-
-static void OpenSysMenu(void);
-static void AddSysMenuLine(char *matchstr, char *menuname, int pos);
-static void CloseSysMenu(void);
-
-static int yyerror (char *s);
-
-extern void ErrorF (const char* /*f*/, ...);
-extern char *yytext;
-extern int yylex(void);
-
-%}
-
-%union {
- char *sVal;
- unsigned long uVal;
- int iVal;
-}
-
-%token NEWLINE
-%token MENU
-%token LB
-%token RB
-%token ICONDIRECTORY
-%token DEFAULTICON
-%token ICONS
-%token STYLES
-%token TOPMOST
-%token MAXIMIZE
-%token MINIMIZE
-%token BOTTOM
-%token NOTITLE
-%token OUTLINE
-%token NOFRAME
-%token DEFAULTSYSMENU
-%token SYSMENU
-%token ROOTMENU
-%token SEPARATOR
-%token ATSTART
-%token ATEND
-%token EXEC
-%token ALWAYSONTOP
-%token DEBUGOUTPUT "DEBUG"
-%token RELOAD
-%token TRAYICON
-%token FORCEEXIT
-%token SILENTEXIT
-
-%token <sVal> STRING
-%type <uVal> group1
-%type <uVal> group2
-%type <uVal> stylecombo
-%type <iVal> atspot
-
-%%
-
-input: /* empty */
- | input line
- ;
-
-line: NEWLINE
- | command
- ;
-
-
-newline_or_nada:
- | NEWLINE newline_or_nada
- ;
-
-command: defaulticon
- | icondirectory
- | menu
- | icons
- | styles
- | sysmenu
- | rootmenu
- | defaultsysmenu
- | debug
- | trayicon
- | forceexit
- | silentexit
- ;
-
-trayicon: TRAYICON STRING NEWLINE { SetTrayIcon($2); free($2); }
- ;
-
-rootmenu: ROOTMENU STRING NEWLINE { SetRootMenu($2); free($2); }
- ;
-
-defaultsysmenu: DEFAULTSYSMENU STRING atspot NEWLINE { SetDefaultSysMenu($2, $3); free($2); }
- ;
-
-defaulticon: DEFAULTICON STRING NEWLINE { SetDefaultIcon($2); free($2); }
- ;
-
-icondirectory: ICONDIRECTORY STRING NEWLINE { SetIconDirectory($2); free($2); }
- ;
-
-menuline: SEPARATOR NEWLINE newline_or_nada { AddMenuLine("-", CMD_SEPARATOR, ""); }
- | STRING ALWAYSONTOP NEWLINE newline_or_nada { AddMenuLine($1, CMD_ALWAYSONTOP, ""); free($1); }
- | STRING EXEC STRING NEWLINE newline_or_nada { AddMenuLine($1, CMD_EXEC, $3); free($1); free($3); }
- | STRING MENU STRING NEWLINE newline_or_nada { AddMenuLine($1, CMD_MENU, $3); free($1); free($3); }
- | STRING RELOAD NEWLINE newline_or_nada { AddMenuLine($1, CMD_RELOAD, ""); free($1); }
- ;
-
-menulist: menuline
- | menuline menulist
- ;
-
-menu: MENU STRING LB { OpenMenu($2); free($2); } newline_or_nada menulist RB {CloseMenu();}
- ;
-
-iconline: STRING STRING NEWLINE newline_or_nada { AddIconLine($1, $2); free($1); free($2); }
- ;
-
-iconlist: iconline
- | iconline iconlist
- ;
-
-icons: ICONS LB {OpenIcons();} newline_or_nada iconlist RB {CloseIcons();}
- ;
-
-group1: TOPMOST { $$=STYLE_TOPMOST; }
- | MAXIMIZE { $$=STYLE_MAXIMIZE; }
- | MINIMIZE { $$=STYLE_MINIMIZE; }
- | BOTTOM { $$=STYLE_BOTTOM; }
- ;
-
-group2: NOTITLE { $$=STYLE_NOTITLE; }
- | OUTLINE { $$=STYLE_OUTLINE; }
- | NOFRAME { $$=STYLE_NOFRAME; }
- ;
-
-stylecombo: group1 { $$=$1; }
- | group2 { $$=$1; }
- | group1 group2 { $$=$1|$2; }
- | group2 group1 { $$=$1|$2; }
- ;
-
-styleline: STRING stylecombo NEWLINE newline_or_nada { AddStyleLine($1, $2); free($1); }
- ;
-
-stylelist: styleline
- | styleline stylelist
- ;
-
-styles: STYLES LB {OpenStyles();} newline_or_nada stylelist RB {CloseStyles();}
- ;
-
-atspot: { $$=AT_END; }
- | ATSTART { $$=AT_START; }
- | ATEND { $$=AT_END; }
- ;
-
-sysmenuline: STRING STRING atspot NEWLINE newline_or_nada { AddSysMenuLine($1, $2, $3); free($1); free($2); }
- ;
-
-sysmenulist: sysmenuline
- | sysmenuline sysmenulist
- ;
-
-sysmenu: SYSMENU LB NEWLINE {OpenSysMenu();} newline_or_nada sysmenulist RB {CloseSysMenu();}
- ;
-
-forceexit: FORCEEXIT NEWLINE { pref.fForceExit = TRUE; }
- ;
-
-silentexit: SILENTEXIT NEWLINE { pref.fSilentExit = TRUE; }
- ;
-
-debug: DEBUGOUTPUT STRING NEWLINE { ErrorF("LoadPreferences: %s\n", $2); free($2); }
- ;
-
-
-%%
-/*
- * Errors in parsing abort and print log messages
- */
-static int
-yyerror (char *s)
-{
- extern int yylineno; /* Handled by flex internally */
-
- ErrorF("LoadPreferences: %s line %d\n", s, yylineno);
- return 1;
-}
-
-/* Miscellaneous functions to store TOKENs into the structure */
-static void
-SetIconDirectory (char *path)
-{
- strncpy (pref.iconDirectory, path, PATH_MAX);
- pref.iconDirectory[PATH_MAX] = 0;
-}
-
-static void
-SetDefaultIcon (char *fname)
-{
- strncpy (pref.defaultIconName, fname, NAME_MAX);
- pref.defaultIconName[NAME_MAX] = 0;
-}
-
-static void
-SetTrayIcon (char *fname)
-{
- strncpy (pref.trayIconName, fname, NAME_MAX);
- pref.trayIconName[NAME_MAX] = 0;
-}
-
-static void
-SetRootMenu (char *menu)
-{
- strncpy (pref.rootMenuName, menu, MENU_MAX);
- pref.rootMenuName[MENU_MAX] = 0;
-}
-
-static void
-SetDefaultSysMenu (char *menu, int pos)
-{
- strncpy (pref.defaultSysMenuName, menu, MENU_MAX);
- pref.defaultSysMenuName[MENU_MAX] = 0;
- pref.defaultSysMenuPos = pos;
-}
-
-static void
-OpenMenu (char *menuname)
-{
- if (menu.menuItem) free(menu.menuItem);
- menu.menuItem = NULL;
- strncpy(menu.menuName, menuname, MENU_MAX);
- menu.menuName[MENU_MAX] = 0;
- menu.menuItems = 0;
-}
-
-static void
-AddMenuLine (char *text, MENUCOMMANDTYPE cmd, char *param)
-{
- if (menu.menuItem==NULL)
- menu.menuItem = (MENUITEM*)malloc(sizeof(MENUITEM));
- else
- menu.menuItem = (MENUITEM*)
- realloc(menu.menuItem, sizeof(MENUITEM)*(menu.menuItems+1));
-
- strncpy (menu.menuItem[menu.menuItems].text, text, MENU_MAX);
- menu.menuItem[menu.menuItems].text[MENU_MAX] = 0;
-
- menu.menuItem[menu.menuItems].cmd = cmd;
-
- strncpy(menu.menuItem[menu.menuItems].param, param, PARAM_MAX);
- menu.menuItem[menu.menuItems].param[PARAM_MAX] = 0;
-
- menu.menuItem[menu.menuItems].commandID = 0;
-
- menu.menuItems++;
-}
-
-static void
-CloseMenu (void)
-{
- if (menu.menuItem==NULL || menu.menuItems==0)
- {
- ErrorF("LoadPreferences: Empty menu detected\n");
- return;
- }
-
- if (pref.menuItems)
- pref.menu = (MENUPARSED*)
- realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED));
- else
- pref.menu = (MENUPARSED*)malloc (sizeof(MENUPARSED));
-
- memcpy (pref.menu+pref.menuItems, &menu, sizeof(MENUPARSED));
- pref.menuItems++;
-
- memset (&menu, 0, sizeof(MENUPARSED));
-}
-
-static void
-OpenIcons (void)
-{
- if (pref.icon != NULL) {
- ErrorF("LoadPreferences: Redefining icon mappings\n");
- free(pref.icon);
- pref.icon = NULL;
- }
- pref.iconItems = 0;
-}
-
-static void
-AddIconLine (char *matchstr, char *iconfile)
-{
- if (pref.icon==NULL)
- pref.icon = (ICONITEM*)malloc(sizeof(ICONITEM));
- else
- pref.icon = (ICONITEM*)
- realloc(pref.icon, sizeof(ICONITEM)*(pref.iconItems+1));
-
- strncpy(pref.icon[pref.iconItems].match, matchstr, MENU_MAX);
- pref.icon[pref.iconItems].match[MENU_MAX] = 0;
-
- strncpy(pref.icon[pref.iconItems].iconFile, iconfile, PATH_MAX+NAME_MAX+1);
- pref.icon[pref.iconItems].iconFile[PATH_MAX+NAME_MAX+1] = 0;
-
- pref.icon[pref.iconItems].hicon = 0;
-
- pref.iconItems++;
-}
-
-static void
-CloseIcons (void)
-{
-}
-
-static void
-OpenStyles (void)
-{
- if (pref.style != NULL) {
- ErrorF("LoadPreferences: Redefining window style\n");
- free(pref.style);
- pref.style = NULL;
- }
- pref.styleItems = 0;
-}
-
-static void
-AddStyleLine (char *matchstr, unsigned long style)
-{
- if (pref.style==NULL)
- pref.style = (STYLEITEM*)malloc(sizeof(STYLEITEM));
- else
- pref.style = (STYLEITEM*)
- realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1));
-
- strncpy(pref.style[pref.styleItems].match, matchstr, MENU_MAX);
- pref.style[pref.styleItems].match[MENU_MAX] = 0;
-
- pref.style[pref.styleItems].type = style;
-
- pref.styleItems++;
-}
-
-static void
-CloseStyles (void)
-{
-}
-
-static void
-OpenSysMenu (void)
-{
- if (pref.sysMenu != NULL) {
- ErrorF("LoadPreferences: Redefining system menu\n");
- free(pref.sysMenu);
- pref.sysMenu = NULL;
- }
- pref.sysMenuItems = 0;
-}
-
-static void
-AddSysMenuLine (char *matchstr, char *menuname, int pos)
-{
- if (pref.sysMenu==NULL)
- pref.sysMenu = (SYSMENUITEM*)malloc(sizeof(SYSMENUITEM));
- else
- pref.sysMenu = (SYSMENUITEM*)
- realloc(pref.sysMenu, sizeof(SYSMENUITEM)*(pref.sysMenuItems+1));
-
- strncpy (pref.sysMenu[pref.sysMenuItems].match, matchstr, MENU_MAX);
- pref.sysMenu[pref.sysMenuItems].match[MENU_MAX] = 0;
-
- strncpy (pref.sysMenu[pref.sysMenuItems].menuName, menuname, MENU_MAX);
- pref.sysMenu[pref.sysMenuItems].menuName[MENU_MAX] = 0;
-
- pref.sysMenu[pref.sysMenuItems].menuPos = pos;
-
- pref.sysMenuItems++;
-}
-
-static void
-CloseSysMenu (void)
-{
-}
-
+%{ +/* + * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. + * Copyright (C) Colin Harrison 2005-2008 + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name of the XFree86 Project + * shall not be used in advertising or otherwise to promote the sale, use + * or other dealings in this Software without prior written authorization + * from the XFree86 Project. + * + * Authors: Earle F. Philhower, III + * Colin Harrison + */ +/* $XFree86: $ */ + +#ifdef HAVE_XWIN_CONFIG_H +#include <xwin-config.h> +#endif +#include <stdio.h> +#include <stdlib.h> +#define _STDLIB_H 1 /* bison checks this to know if stdlib has been included */ +#include <string.h> +#include "winprefs.h" + +/* The following give better error messages in bison at the cost of a few KB */ +#define YYERROR_VERBOSE 1 + +/* YYLTYPE_IS_TRIVIAL and YYENABLE_NLS defined to suppress warnings */ +#define YYLTYPE_IS_TRIVIAL 1 +#define YYENABLE_NLS 0 + +/* The global pref settings */ +WINPREFS pref; + +/* The working menu */ +static MENUPARSED menu; + +/* Functions for parsing the tokens into out structure */ +/* Defined at the end section of this file */ + +static void SetIconDirectory (char *path); +static void SetDefaultIcon (char *fname); +static void SetRootMenu (char *menu); +static void SetDefaultSysMenu (char *menu, int pos); +static void SetTrayIcon (char *fname); + +static void OpenMenu(char *menuname); +static void AddMenuLine(char *name, MENUCOMMANDTYPE cmd, char *param); +static void CloseMenu(void); + +static void OpenIcons(void); +static void AddIconLine(char *matchstr, char *iconfile); +static void CloseIcons(void); + +static void OpenStyles(void); +static void AddStyleLine(char *matchstr, unsigned long style); +static void CloseStyles(void); + +static void OpenSysMenu(void); +static void AddSysMenuLine(char *matchstr, char *menuname, int pos); +static void CloseSysMenu(void); + +static int yyerror (char *s); + +extern char *yytext; +extern int yylex(void); + +%} + +%union { + char *sVal; + unsigned long uVal; + int iVal; +} + +%token NEWLINE +%token MENU +%token LB +%token RB +%token ICONDIRECTORY +%token DEFAULTICON +%token ICONS +%token STYLES +%token TOPMOST +%token MAXIMIZE +%token MINIMIZE +%token BOTTOM +%token NOTITLE +%token OUTLINE +%token NOFRAME +%token DEFAULTSYSMENU +%token SYSMENU +%token ROOTMENU +%token SEPARATOR +%token ATSTART +%token ATEND +%token EXEC +%token ALWAYSONTOP +%token DEBUGOUTPUT "DEBUG" +%token RELOAD +%token TRAYICON +%token FORCEEXIT +%token SILENTEXIT + +%token <sVal> STRING +%type <uVal> group1 +%type <uVal> group2 +%type <uVal> stylecombo +%type <iVal> atspot + +%% + +input: /* empty */ + | input line + ; + +line: NEWLINE + | command + ; + + +newline_or_nada: + | NEWLINE newline_or_nada + ; + +command: defaulticon + | icondirectory + | menu + | icons + | styles + | sysmenu + | rootmenu + | defaultsysmenu + | debug + | trayicon + | forceexit + | silentexit + ; + +trayicon: TRAYICON STRING NEWLINE { SetTrayIcon($2); free($2); } + ; + +rootmenu: ROOTMENU STRING NEWLINE { SetRootMenu($2); free($2); } + ; + +defaultsysmenu: DEFAULTSYSMENU STRING atspot NEWLINE { SetDefaultSysMenu($2, $3); free($2); } + ; + +defaulticon: DEFAULTICON STRING NEWLINE { SetDefaultIcon($2); free($2); } + ; + +icondirectory: ICONDIRECTORY STRING NEWLINE { SetIconDirectory($2); free($2); } + ; + +menuline: SEPARATOR NEWLINE newline_or_nada { AddMenuLine("-", CMD_SEPARATOR, ""); } + | STRING ALWAYSONTOP NEWLINE newline_or_nada { AddMenuLine($1, CMD_ALWAYSONTOP, ""); free($1); } + | STRING EXEC STRING NEWLINE newline_or_nada { AddMenuLine($1, CMD_EXEC, $3); free($1); free($3); } + | STRING MENU STRING NEWLINE newline_or_nada { AddMenuLine($1, CMD_MENU, $3); free($1); free($3); } + | STRING RELOAD NEWLINE newline_or_nada { AddMenuLine($1, CMD_RELOAD, ""); free($1); } + ; + +menulist: menuline + | menuline menulist + ; + +menu: MENU STRING LB { OpenMenu($2); free($2); } newline_or_nada menulist RB {CloseMenu();} + ; + +iconline: STRING STRING NEWLINE newline_or_nada { AddIconLine($1, $2); free($1); free($2); } + ; + +iconlist: iconline + | iconline iconlist + ; + +icons: ICONS LB {OpenIcons();} newline_or_nada iconlist RB {CloseIcons();} + ; + +group1: TOPMOST { $$=STYLE_TOPMOST; } + | MAXIMIZE { $$=STYLE_MAXIMIZE; } + | MINIMIZE { $$=STYLE_MINIMIZE; } + | BOTTOM { $$=STYLE_BOTTOM; } + ; + +group2: NOTITLE { $$=STYLE_NOTITLE; } + | OUTLINE { $$=STYLE_OUTLINE; } + | NOFRAME { $$=STYLE_NOFRAME; } + ; + +stylecombo: group1 { $$=$1; } + | group2 { $$=$1; } + | group1 group2 { $$=$1|$2; } + | group2 group1 { $$=$1|$2; } + ; + +styleline: STRING stylecombo NEWLINE newline_or_nada { AddStyleLine($1, $2); free($1); } + ; + +stylelist: styleline + | styleline stylelist + ; + +styles: STYLES LB {OpenStyles();} newline_or_nada stylelist RB {CloseStyles();} + ; + +atspot: { $$=AT_END; } + | ATSTART { $$=AT_START; } + | ATEND { $$=AT_END; } + ; + +sysmenuline: STRING STRING atspot NEWLINE newline_or_nada { AddSysMenuLine($1, $2, $3); free($1); free($2); } + ; + +sysmenulist: sysmenuline + | sysmenuline sysmenulist + ; + +sysmenu: SYSMENU LB NEWLINE {OpenSysMenu();} newline_or_nada sysmenulist RB {CloseSysMenu();} + ; + +forceexit: FORCEEXIT NEWLINE { pref.fForceExit = TRUE; } + ; + +silentexit: SILENTEXIT NEWLINE { pref.fSilentExit = TRUE; } + ; + +debug: DEBUGOUTPUT STRING NEWLINE { ErrorF("LoadPreferences: %s\n", $2); free($2); } + ; + + +%% +/* + * Errors in parsing abort and print log messages + */ +static int +yyerror (char *s) +{ + extern int yylineno; /* Handled by flex internally */ + + ErrorF("LoadPreferences: %s line %d\n", s, yylineno); + return 1; +} + +/* Miscellaneous functions to store TOKENs into the structure */ +static void +SetIconDirectory (char *path) +{ + strncpy (pref.iconDirectory, path, PATH_MAX); + pref.iconDirectory[PATH_MAX] = 0; +} + +static void +SetDefaultIcon (char *fname) +{ + strncpy (pref.defaultIconName, fname, NAME_MAX); + pref.defaultIconName[NAME_MAX] = 0; +} + +static void +SetTrayIcon (char *fname) +{ + strncpy (pref.trayIconName, fname, NAME_MAX); + pref.trayIconName[NAME_MAX] = 0; +} + +static void +SetRootMenu (char *menuname) +{ + strncpy (pref.rootMenuName, menuname, MENU_MAX); + pref.rootMenuName[MENU_MAX] = 0; +} + +static void +SetDefaultSysMenu (char *menuname, int pos) +{ + strncpy (pref.defaultSysMenuName, menuname, MENU_MAX); + pref.defaultSysMenuName[MENU_MAX] = 0; + pref.defaultSysMenuPos = pos; +} + +static void +OpenMenu (char *menuname) +{ + if (menu.menuItem) free(menu.menuItem); + menu.menuItem = NULL; + strncpy(menu.menuName, menuname, MENU_MAX); + menu.menuName[MENU_MAX] = 0; + menu.menuItems = 0; +} + +static void +AddMenuLine (char *text, MENUCOMMANDTYPE cmd, char *param) +{ + if (menu.menuItem==NULL) + menu.menuItem = (MENUITEM*)malloc(sizeof(MENUITEM)); + else + menu.menuItem = (MENUITEM*) + realloc(menu.menuItem, sizeof(MENUITEM)*(menu.menuItems+1)); + + strncpy (menu.menuItem[menu.menuItems].text, text, MENU_MAX); + menu.menuItem[menu.menuItems].text[MENU_MAX] = 0; + + menu.menuItem[menu.menuItems].cmd = cmd; + + strncpy(menu.menuItem[menu.menuItems].param, param, PARAM_MAX); + menu.menuItem[menu.menuItems].param[PARAM_MAX] = 0; + + menu.menuItem[menu.menuItems].commandID = 0; + + menu.menuItems++; +} + +static void +CloseMenu (void) +{ + if (menu.menuItem==NULL || menu.menuItems==0) + { + ErrorF("LoadPreferences: Empty menu detected\n"); + return; + } + + if (pref.menuItems) + pref.menu = (MENUPARSED*) + realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED)); + else + pref.menu = (MENUPARSED*)malloc (sizeof(MENUPARSED)); + + memcpy (pref.menu+pref.menuItems, &menu, sizeof(MENUPARSED)); + pref.menuItems++; + + memset (&menu, 0, sizeof(MENUPARSED)); +} + +static void +OpenIcons (void) +{ + if (pref.icon != NULL) { + ErrorF("LoadPreferences: Redefining icon mappings\n"); + free(pref.icon); + pref.icon = NULL; + } + pref.iconItems = 0; +} + +static void +AddIconLine (char *matchstr, char *iconfile) +{ + if (pref.icon==NULL) + pref.icon = (ICONITEM*)malloc(sizeof(ICONITEM)); + else + pref.icon = (ICONITEM*) + realloc(pref.icon, sizeof(ICONITEM)*(pref.iconItems+1)); + + strncpy(pref.icon[pref.iconItems].match, matchstr, MENU_MAX); + pref.icon[pref.iconItems].match[MENU_MAX] = 0; + + strncpy(pref.icon[pref.iconItems].iconFile, iconfile, PATH_MAX+NAME_MAX+1); + pref.icon[pref.iconItems].iconFile[PATH_MAX+NAME_MAX+1] = 0; + + pref.icon[pref.iconItems].hicon = 0; + + pref.iconItems++; +} + +static void +CloseIcons (void) +{ +} + +static void +OpenStyles (void) +{ + if (pref.style != NULL) { + ErrorF("LoadPreferences: Redefining window style\n"); + free(pref.style); + pref.style = NULL; + } + pref.styleItems = 0; +} + +static void +AddStyleLine (char *matchstr, unsigned long style) +{ + if (pref.style==NULL) + pref.style = (STYLEITEM*)malloc(sizeof(STYLEITEM)); + else + pref.style = (STYLEITEM*) + realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1)); + + strncpy(pref.style[pref.styleItems].match, matchstr, MENU_MAX); + pref.style[pref.styleItems].match[MENU_MAX] = 0; + + pref.style[pref.styleItems].type = style; + + pref.styleItems++; +} + +static void +CloseStyles (void) +{ +} + +static void +OpenSysMenu (void) +{ + if (pref.sysMenu != NULL) { + ErrorF("LoadPreferences: Redefining system menu\n"); + free(pref.sysMenu); + pref.sysMenu = NULL; + } + pref.sysMenuItems = 0; +} + +static void +AddSysMenuLine (char *matchstr, char *menuname, int pos) +{ + if (pref.sysMenu==NULL) + pref.sysMenu = (SYSMENUITEM*)malloc(sizeof(SYSMENUITEM)); + else + pref.sysMenu = (SYSMENUITEM*) + realloc(pref.sysMenu, sizeof(SYSMENUITEM)*(pref.sysMenuItems+1)); + + strncpy (pref.sysMenu[pref.sysMenuItems].match, matchstr, MENU_MAX); + pref.sysMenu[pref.sysMenuItems].match[MENU_MAX] = 0; + + strncpy (pref.sysMenu[pref.sysMenuItems].menuName, menuname, MENU_MAX); + pref.sysMenu[pref.sysMenuItems].menuName[MENU_MAX] = 0; + + pref.sysMenu[pref.sysMenuItems].menuPos = pos; + + pref.sysMenuItems++; +} + +static void +CloseSysMenu (void) +{ +} + diff --git a/xorg-server/hw/xwin/winprocarg.c b/xorg-server/hw/xwin/winprocarg.c index a5b3c07bf..14056faf0 100644 --- a/xorg-server/hw/xwin/winprocarg.c +++ b/xorg-server/hw/xwin/winprocarg.c @@ -56,10 +56,6 @@ void void winLogVersionInfo(void); -#ifdef DDXOSVERRORF -void OsVendorVErrorF(const char *pszFormat, va_list va_args); -#endif - /* * Process arguments on the command line */ diff --git a/xorg-server/hw/xwin/winregistry.c b/xorg-server/hw/xwin/winregistry.c deleted file mode 100644 index d33f8c363..000000000 --- a/xorg-server/hw/xwin/winregistry.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - *Copyright (C) 2002-2004 Harold L Hunt II All Rights Reserved. - * - *Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - *"Software"), to deal in the Software without restriction, including - *without limitation the rights to use, copy, modify, merge, publish, - *distribute, sublicense, and/or sell copies of the Software, and to - *permit persons to whom the Software is furnished to do so, subject to - *the following conditions: - * - *The above copyright notice and this permission notice shall be - *included in all copies or substantial portions of the Software. - * - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - *NONINFRINGEMENT. IN NO EVENT SHALL HAROLD L HUNT II BE LIABLE FOR - *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF - *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - *Except as contained in this notice, the name of Harold L Hunt II - *shall not be used in advertising or otherwise to promote the sale, use - *or other dealings in this Software without prior written authorization - *from Harold L Hunt II. - * - * Authors: Harold L Hunt II - */ - -#ifdef HAVE_XWIN_CONFIG_H -#include <xwin-config.h> -#endif -#include "win.h" - -/* Prototypes */ -DWORD winGetRegistryDWORD(HKEY hkey, char *pszRegistryKey); - -DWORD -winGetRegistryDWORD(HKEY hkey, char *pszRegistryKey) -{ - HKEY hkResult; - DWORD dwDisposition; - - RegCreateKeyEx(hkey, - pszRegistryKey, - 0, - '\0', - REG_OPTION_NON_VOLATILE, - KEY_READ, NULL, &hkResult, &dwDisposition); - - if (dwDisposition == REG_CREATED_NEW_KEY) { - ErrorF("winGetRegistryDWORD - Created new key: %s\n", pszRegistryKey); - } - else if (dwDisposition == REG_OPENED_EXISTING_KEY) { - ErrorF("winGetRegistryDWORD - Opened existing key: %s\n", - pszRegistryKey); - } - - /* Free the registry key handle */ - RegCloseKey(hkResult); - hkResult = NULL; - - return 0; -} diff --git a/xorg-server/hw/xwin/winscrinit.c b/xorg-server/hw/xwin/winscrinit.c index be25f12af..639a99ca3 100644 --- a/xorg-server/hw/xwin/winscrinit.c +++ b/xorg-server/hw/xwin/winscrinit.c @@ -254,7 +254,7 @@ winCreateScreenResources(ScreenPtr pScreen) /* See Porting Layer Definition - p. 20 */ Bool -winFinishScreenInitFB(int index, ScreenPtr pScreen, int argc, char **argv) +winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; @@ -578,11 +578,11 @@ winFinishScreenInitFB(int index, ScreenPtr pScreen, int argc, char **argv) /* See Porting Layer Definition - p. 20 */ Bool -winFinishScreenInitNativeGDI(int index, +winFinishScreenInitNativeGDI(int i, ScreenPtr pScreen, int argc, char **argv) { winScreenPriv(pScreen); - winScreenInfoPtr pScreenInfo = &g_ScreenInfo[index]; + winScreenInfoPtr pScreenInfo = &g_ScreenInfo[i]; VisualPtr pVisuals = NULL; DepthPtr pDepths = NULL; VisualID rootVisual = 0; diff --git a/xorg-server/hw/xwin/winvalargs.c b/xorg-server/hw/xwin/winvalargs.c index eb6e973b8..edfd71f72 100644 --- a/xorg-server/hw/xwin/winvalargs.c +++ b/xorg-server/hw/xwin/winvalargs.c @@ -57,9 +57,7 @@ Bool winValidateArgs(void) { int i; - int iMaxConsecutiveScreen = 0; BOOL fHasNormalScreen0 = FALSE; - BOOL fImplicitScreenFound = FALSE; /* * Check for a malformed set of -screen parameters. diff --git a/xorg-server/hw/xwin/winwindow.c b/xorg-server/hw/xwin/winwindow.c index 594791789..ab6d8dec2 100644 --- a/xorg-server/hw/xwin/winwindow.c +++ b/xorg-server/hw/xwin/winwindow.c @@ -59,7 +59,6 @@ winCreateWindowNativeGDI(WindowPtr pWin) Bool fResult = TRUE; ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGDEBUG @@ -82,7 +81,6 @@ winDestroyWindowNativeGDI(WindowPtr pWin) Bool fResult = TRUE; ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGDEBUG @@ -105,7 +103,6 @@ winPositionWindowNativeGDI(WindowPtr pWin, int x, int y) Bool fResult = TRUE; ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGDEBUG @@ -210,7 +207,6 @@ winChangeWindowAttributesNativeGDI(WindowPtr pWin, unsigned long mask) Bool fResult = TRUE; ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGDEBUG @@ -238,7 +234,6 @@ winUnmapWindowNativeGDI(WindowPtr pWin) Bool fResult = TRUE; ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGDEBUG @@ -262,7 +257,6 @@ winMapWindowNativeGDI(WindowPtr pWin) Bool fResult = TRUE; ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGDEBUG diff --git a/xorg-server/hw/xwin/winwindowswm.c b/xorg-server/hw/xwin/winwindowswm.c index 88c375733..fbd41aaa8 100644 --- a/xorg-server/hw/xwin/winwindowswm.c +++ b/xorg-server/hw/xwin/winwindowswm.c @@ -82,7 +82,6 @@ static int ProcWindowsWMQueryVersion(ClientPtr client) { xWindowsWMQueryVersionReply rep; - int n; REQUEST_SIZE_MATCH(xWindowsWMQueryVersionReq); rep.type = X_Reply; @@ -491,7 +490,7 @@ ProcWindowsWMFrameSetTitle(ClientPtr client) #endif title_bytes = malloc(title_length + 1); - strncpy(title_bytes, (unsigned char *) &stuff[1], title_length); + strncpy(title_bytes, (char *) &stuff[1], title_length); title_bytes[title_length] = '\0'; pRLWinPriv = (win32RootlessWindowPtr) RootlessFrameForWindow(pWin, FALSE); @@ -562,8 +561,6 @@ SNotifyEvent(xWindowsWMNotifyEvent * from, xWindowsWMNotifyEvent * to) static int SProcWindowsWMQueryVersion(ClientPtr client) { - int n; - REQUEST(xWindowsWMQueryVersionReq); swaps(&stuff->length); return ProcWindowsWMQueryVersion(client); diff --git a/xorg-server/include/input.h b/xorg-server/include/input.h index 5747f3cd2..f8459b8c8 100644 --- a/xorg-server/include/input.h +++ b/xorg-server/include/input.h @@ -579,6 +579,7 @@ extern int TouchListenerAcceptReject(DeviceIntPtr dev, TouchPointInfoPtr ti, int listener, int mode); extern int TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode, uint32_t touchid, Window grab_window, XID *error); +extern void TouchEndPhysicallyActiveTouches(DeviceIntPtr dev); /* misc event helpers */ extern Mask GetEventMask(DeviceIntPtr dev, xEvent *ev, InputClientsPtr clients); diff --git a/xorg-server/include/os.h b/xorg-server/include/os.h index e32421610..c7108a5d3 100644 --- a/xorg-server/include/os.h +++ b/xorg-server/include/os.h @@ -88,7 +88,9 @@ extern void ddxBeforeReset(void); #endif #ifdef DDXOSVERRORF -extern _X_EXPORT void (*OsVendorVErrorFProc) (const char *, va_list args); +extern _X_EXPORT void (*OsVendorVErrorFProc) (const char *, + va_list args) +_X_ATTRIBUTE_PRINTF(1, 0); #endif extern _X_EXPORT int WaitForSomething(int * /*pClientsReady */ |