aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-28 12:59:46 +0000
committermarha <marha@users.sourceforge.net>2011-03-28 12:59:46 +0000
commit3015123fd2904d907896b1aefbe32c267baa2dc2 (patch)
tree3adc12a65779305c5fb676be577667ff7e33c389
parent0d9293f57738117231d77df831b6569d4f0739f2 (diff)
parent0b9b391c5a7acb31e5d8061169649043a38d6d0e (diff)
downloadvcxsrv-3015123fd2904d907896b1aefbe32c267baa2dc2.tar.gz
vcxsrv-3015123fd2904d907896b1aefbe32c267baa2dc2.tar.bz2
vcxsrv-3015123fd2904d907896b1aefbe32c267baa2dc2.zip
svn merge ^/branches/released .
-rw-r--r--mesalib/src/glsl/ast_to_hir.cpp13
-rw-r--r--mesalib/src/glsl/glsl_parser_extras.h4
-rw-r--r--mesalib/src/glsl/ir_print_visitor.cpp45
-rw-r--r--mesalib/src/glsl/ir_print_visitor.h177
-rw-r--r--mesalib/src/glsl/ir_validate.cpp15
-rw-r--r--mesalib/src/glsl/ir_variable.cpp1085
-rw-r--r--mesalib/src/mapi/glapi/gen/GL3x.xml4
-rw-r--r--mesalib/src/mapi/glapi/glapi_mapi_tmp.h6
-rw-r--r--mesalib/src/mapi/glapi/glapitable.h2
-rw-r--r--mesalib/src/mapi/glapi/glapitemp.h2
-rw-r--r--mesalib/src/mesa/main/api_arrayelt.c272
-rw-r--r--mesalib/src/mesa/main/compiler.h30
-rw-r--r--mesalib/src/mesa/main/dlist.c2
-rw-r--r--mesalib/src/mesa/main/glapidispatch.h2
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_blit.c3
-rw-r--r--xorg-server/Xi/chgdctl.c542
-rw-r--r--xorg-server/Xi/exevents.c24
-rw-r--r--xorg-server/Xi/getdctl.c75
-rw-r--r--xorg-server/Xi/stubs.c12
-rw-r--r--xorg-server/config/udev.c4
-rw-r--r--xorg-server/configure.ac5
-rw-r--r--xorg-server/dix/devices.c32
-rw-r--r--xorg-server/dix/window.c103
-rw-r--r--xorg-server/glx/glapi.c2186
-rw-r--r--xorg-server/glx/glapi.h4
-rw-r--r--xorg-server/glx/glthread.h504
-rw-r--r--xorg-server/hw/kdrive/src/kdrive.c93
-rw-r--r--xorg-server/hw/kdrive/src/kdrive.h3
-rw-r--r--xorg-server/hw/kdrive/src/kinput.c3
-rw-r--r--xorg-server/hw/xfree86/common/xf86Helper.c104
-rw-r--r--xorg-server/hw/xfree86/common/xf86Xinput.c6
-rw-r--r--xorg-server/hw/xfree86/dri/dri.c4
-rw-r--r--xorg-server/hw/xquartz/applewm.c2
-rw-r--r--xorg-server/hw/xquartz/darwin.c112
-rw-r--r--xorg-server/hw/xquartz/darwin.h1
-rw-r--r--xorg-server/hw/xquartz/darwinXinput.c12
-rw-r--r--xorg-server/hw/xquartz/quartz.c2
-rw-r--r--xorg-server/hw/xquartz/threadSafety.h112
-rw-r--r--xorg-server/hw/xquartz/xpr/xprScreen.c2
-rw-r--r--xorg-server/hw/xwin/winrandr.c542
-rw-r--r--xorg-server/hw/xwin/winwndproc.c4
-rw-r--r--xorg-server/include/dix-config.h.in3
-rw-r--r--xorg-server/include/input.h5
-rw-r--r--xorg-server/include/inputstr.h25
-rw-r--r--xorg-server/include/window.h539
-rw-r--r--xorg-server/os/client.c619
-rw-r--r--xorg-server/test/Makefile.am4
-rw-r--r--xorg-server/test/xi2/Makefile.am4
-rw-r--r--xorg-server/xkeyboard-config/NEWS93
-rw-r--r--xorg-server/xkeyboard-config/configure.in2
-rw-r--r--xorg-server/xkeyboard-config/rules/base.xml.in1228
-rw-r--r--xorg-server/xkeyboard-config/symbols/mm105
52 files changed, 4215 insertions, 4567 deletions
diff --git a/mesalib/src/glsl/ast_to_hir.cpp b/mesalib/src/glsl/ast_to_hir.cpp
index 344d76b57..5e1851c11 100644
--- a/mesalib/src/glsl/ast_to_hir.cpp
+++ b/mesalib/src/glsl/ast_to_hir.cpp
@@ -1577,7 +1577,7 @@ ast_expression::hir(exec_list *instructions,
*/
ir_variable *v = array->whole_variable_referenced();
if (v != NULL)
- v->max_array_access = array->type->array_size();
+ v->max_array_access = array->type->array_size() - 1;
}
}
@@ -2676,17 +2676,24 @@ ast_declarator_list::hir(exec_list *instructions,
* preceded by one of these precision qualifiers [...] Literal
* constants do not have precision qualifiers. Neither do Boolean
* variables.
+ *
+ * In GLSL ES, sampler types are also allowed.
+ *
+ * From page 87 of the GLSL ES spec:
+ * "RESOLUTION: Allow sampler types to take a precision qualifier."
*/
if (this->type->specifier->precision != ast_precision_none
&& !var->type->is_float()
&& !var->type->is_integer()
+ && !(var->type->is_sampler() && state->es_shader)
&& !(var->type->is_array()
&& (var->type->fields.array->is_float()
|| var->type->fields.array->is_integer()))) {
_mesa_glsl_error(&loc, state,
- "precision qualifiers apply only to floating point "
- "and integer types");
+ "precision qualifiers apply only to floating point"
+ "%s types", state->es_shader ? ", integer, and sampler"
+ : "and integer");
}
/* Process the initializer and add its instructions to a temporary
diff --git a/mesalib/src/glsl/glsl_parser_extras.h b/mesalib/src/glsl/glsl_parser_extras.h
index 6351413f1..59515b5c3 100644
--- a/mesalib/src/glsl/glsl_parser_extras.h
+++ b/mesalib/src/glsl/glsl_parser_extras.h
@@ -272,8 +272,8 @@ extern "C" {
extern int preprocess(void *ctx, const char **shader, char **info_log,
const struct gl_extensions *extensions, int api);
-extern void _mesa_destroy_shader_compiler();
-extern void _mesa_destroy_shader_compiler_caches();
+extern void _mesa_destroy_shader_compiler(void);
+extern void _mesa_destroy_shader_compiler_caches(void);
#ifdef __cplusplus
}
diff --git a/mesalib/src/glsl/ir_print_visitor.cpp b/mesalib/src/glsl/ir_print_visitor.cpp
index 3c5c4fd20..ba95103ea 100644
--- a/mesalib/src/glsl/ir_print_visitor.cpp
+++ b/mesalib/src/glsl/ir_print_visitor.cpp
@@ -25,6 +25,10 @@
#include "glsl_types.h"
#include "glsl_parser_extras.h"
+extern "C" {
+#include "program/hash_table.h"
+}
+
static void print_type(const glsl_type *t);
void
@@ -67,6 +71,21 @@ _mesa_print_ir(exec_list *instructions,
printf("\n)");
}
+ir_print_visitor::ir_print_visitor()
+{
+ indentation = 0;
+ printable_names =
+ hash_table_ctor(32, hash_table_pointer_hash, hash_table_pointer_compare);
+ symbols = _mesa_symbol_table_ctor();
+ mem_ctx = ralloc_context(NULL);
+}
+
+ir_print_visitor::~ir_print_visitor()
+{
+ hash_table_dtor(printable_names);
+ _mesa_symbol_table_dtor(symbols);
+ ralloc_free(mem_ctx);
+}
void ir_print_visitor::indent(void)
{
@@ -74,6 +93,26 @@ void ir_print_visitor::indent(void)
printf(" ");
}
+const char *
+ir_print_visitor::unique_name(ir_variable *var)
+{
+ /* Do we already have a name for this variable? */
+ const char *name = (const char *) hash_table_find(this->printable_names, var);
+ if (name != NULL)
+ return name;
+
+ /* If there's no conflict, just use the original name */
+ if (_mesa_symbol_table_find_symbol(this->symbols, -1, var->name) == NULL) {
+ name = var->name;
+ } else {
+ static unsigned i = 1;
+ name = ralloc_asprintf(this->mem_ctx, "%s@%u", var->name, ++i);
+ }
+ hash_table_insert(this->printable_names, (void *) name, var);
+ _mesa_symbol_table_add_symbol(this->symbols, -1, name, var);
+ return name;
+}
+
static void
print_type(const glsl_type *t)
{
@@ -104,12 +143,13 @@ void ir_print_visitor::visit(ir_variable *ir)
cent, inv, mode[ir->mode], interp[ir->interpolation]);
print_type(ir->type);
- printf(" %s@%p)", ir->name, (void *) ir);
+ printf(" %s)", unique_name(ir));
}
void ir_print_visitor::visit(ir_function_signature *ir)
{
+ _mesa_symbol_table_push_scope(symbols);
printf("(signature ");
indentation++;
@@ -148,6 +188,7 @@ void ir_print_visitor::visit(ir_function_signature *ir)
indent();
printf("))\n");
indentation--;
+ _mesa_symbol_table_pop_scope(symbols);
}
@@ -265,7 +306,7 @@ void ir_print_visitor::visit(ir_swizzle *ir)
void ir_print_visitor::visit(ir_dereference_variable *ir)
{
ir_variable *var = ir->variable_referenced();
- printf("(var_ref %s@%p) ", var->name, (void *) var);
+ printf("(var_ref %s) ", unique_name(var));
}
diff --git a/mesalib/src/glsl/ir_print_visitor.h b/mesalib/src/glsl/ir_print_visitor.h
index 4feeb8c18..ec4d00843 100644
--- a/mesalib/src/glsl/ir_print_visitor.h
+++ b/mesalib/src/glsl/ir_print_visitor.h
@@ -1,83 +1,94 @@
-/* -*- c++ -*- */
-/*
- * Copyright © 2010 Intel Corporation
- *
- * 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 (including the next
- * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
- */
-
-#pragma once
-#ifndef IR_PRINT_VISITOR_H
-#define IR_PRINT_VISITOR_H
-
-#include "ir.h"
-#include "ir_visitor.h"
-
-extern void _mesa_print_ir(exec_list *instructions,
- struct _mesa_glsl_parse_state *state);
-
-/**
- * Abstract base class of visitors of IR instruction trees
- */
-class ir_print_visitor : public ir_visitor {
-public:
- ir_print_visitor()
- {
- indentation = 0;
- }
-
- virtual ~ir_print_visitor()
- {
- /* empty */
- }
-
- void indent(void);
-
- /**
- * \name Visit methods
- *
- * As typical for the visitor pattern, there must be one \c visit method for
- * each concrete subclass of \c ir_instruction. Virtual base classes within
- * the hierarchy should not have \c visit methods.
- */
- /*@{*/
- virtual void visit(ir_variable *);
- virtual void visit(ir_function_signature *);
- virtual void visit(ir_function *);
- virtual void visit(ir_expression *);
- virtual void visit(ir_texture *);
- virtual void visit(ir_swizzle *);
- virtual void visit(ir_dereference_variable *);
- virtual void visit(ir_dereference_array *);
- virtual void visit(ir_dereference_record *);
- virtual void visit(ir_assignment *);
- virtual void visit(ir_constant *);
- virtual void visit(ir_call *);
- virtual void visit(ir_return *);
- virtual void visit(ir_discard *);
- virtual void visit(ir_if *);
- virtual void visit(ir_loop *);
- virtual void visit(ir_loop_jump *);
- /*@}*/
-
-private:
- int indentation;
-};
-
-#endif /* IR_PRINT_VISITOR_H */
+/* -*- c++ -*- */
+/*
+ * Copyright © 2010 Intel Corporation
+ *
+ * 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 (including the next
+ * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
+ */
+
+#pragma once
+#ifndef IR_PRINT_VISITOR_H
+#define IR_PRINT_VISITOR_H
+
+#include "ir.h"
+#include "ir_visitor.h"
+
+extern "C" {
+#include "program/symbol_table.h"
+}
+
+extern void _mesa_print_ir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state);
+
+/**
+ * Abstract base class of visitors of IR instruction trees
+ */
+class ir_print_visitor : public ir_visitor {
+public:
+ ir_print_visitor();
+ virtual ~ir_print_visitor();
+
+ void indent(void);
+
+ /**
+ * \name Visit methods
+ *
+ * As typical for the visitor pattern, there must be one \c visit method for
+ * each concrete subclass of \c ir_instruction. Virtual base classes within
+ * the hierarchy should not have \c visit methods.
+ */
+ /*@{*/
+ virtual void visit(ir_variable *);
+ virtual void visit(ir_function_signature *);
+ virtual void visit(ir_function *);
+ virtual void visit(ir_expression *);
+ virtual void visit(ir_texture *);
+ virtual void visit(ir_swizzle *);
+ virtual void visit(ir_dereference_variable *);
+ virtual void visit(ir_dereference_array *);
+ virtual void visit(ir_dereference_record *);
+ virtual void visit(ir_assignment *);
+ virtual void visit(ir_constant *);
+ virtual void visit(ir_call *);
+ virtual void visit(ir_return *);
+ virtual void visit(ir_discard *);
+ virtual void visit(ir_if *);
+ virtual void visit(ir_loop *);
+ virtual void visit(ir_loop_jump *);
+ /*@}*/
+
+private:
+ /**
+ * Fetch/generate a unique name for ir_variable.
+ *
+ * GLSL IR permits multiple ir_variables to share the same name. This works
+ * fine until we try to print it, when we really need a unique one.
+ */
+ const char *unique_name(ir_variable *var);
+
+ /** A mapping from ir_variable * -> unique printable names. */
+ hash_table *printable_names;
+ _mesa_symbol_table *symbols;
+
+ void *mem_ctx;
+
+ int indentation;
+};
+
+#endif /* IR_PRINT_VISITOR_H */
diff --git a/mesalib/src/glsl/ir_validate.cpp b/mesalib/src/glsl/ir_validate.cpp
index fe6ef8145..7757f5ecd 100644
--- a/mesalib/src/glsl/ir_validate.cpp
+++ b/mesalib/src/glsl/ir_validate.cpp
@@ -473,6 +473,21 @@ ir_validate::visit(ir_variable *ir)
assert(ralloc_parent(ir->name) == ir);
hash_table_insert(ht, ir, ir);
+
+
+ /* If a variable is an array, verify that the maximum array index is in
+ * bounds. There was once an error in AST-to-HIR conversion that set this
+ * to be out of bounds.
+ */
+ if (ir->type->array_size() > 0) {
+ if (ir->max_array_access >= ir->type->length) {
+ printf("ir_variable has maximum access out of bounds (%d vs %d)\n",
+ ir->max_array_access, ir->type->length - 1);
+ ir->print();
+ abort();
+ }
+ }
+
return visit_continue;
}
diff --git a/mesalib/src/glsl/ir_variable.cpp b/mesalib/src/glsl/ir_variable.cpp
index 18a3e0fb0..a9a2e4c70 100644
--- a/mesalib/src/glsl/ir_variable.cpp
+++ b/mesalib/src/glsl/ir_variable.cpp
@@ -1,541 +1,544 @@
-/*
- * Copyright © 2010 Intel Corporation
- *
- * 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 (including the next
- * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
- */
-
-#include "ir.h"
-#include "glsl_parser_extras.h"
-#include "glsl_symbol_table.h"
-#include "builtin_variables.h"
-
-static void generate_ARB_draw_buffers_variables(exec_list *,
- struct _mesa_glsl_parse_state *,
- bool, _mesa_glsl_parser_targets);
-
-static void
-generate_ARB_draw_instanced_variables(exec_list *,
- struct _mesa_glsl_parse_state *,
- bool, _mesa_glsl_parser_targets);
-
-static ir_variable *
-add_variable(const char *name, enum ir_variable_mode mode, int slot,
- const glsl_type *type, exec_list *instructions,
- glsl_symbol_table *symtab)
-{
- ir_variable *var = new(symtab) ir_variable(type, name, mode);
-
- switch (var->mode) {
- case ir_var_auto:
- case ir_var_in:
- case ir_var_const_in:
- case ir_var_uniform:
- case ir_var_system_value:
- var->read_only = true;
- break;
- case ir_var_inout:
- case ir_var_out:
- break;
- default:
- assert(0);
- break;
- }
-
- var->location = slot;
- var->explicit_location = (slot >= 0);
-
- /* Once the variable is created an initialized, add it to the symbol table
- * and add the declaration to the IR stream.
- */
- instructions->push_tail(var);
-
- symtab->add_variable(var);
- return var;
-}
-
-static ir_variable *
-add_uniform(exec_list *instructions,
- struct _mesa_glsl_parse_state *state,
- const char *name, const glsl_type *type)
-{
- return add_variable(name, ir_var_uniform, -1, type, instructions,
- state->symbols);
-}
-
-static void
-add_builtin_variable(const builtin_variable *proto, exec_list *instructions,
- glsl_symbol_table *symtab)
-{
- /* Create a new variable declaration from the description supplied by
- * the caller.
- */
- const glsl_type *const type = symtab->get_type(proto->type);
-
- assert(type != NULL);
-
- add_variable(proto->name, proto->mode, proto->slot, type, instructions,
- symtab);
-}
-
-static void
-add_builtin_constant(exec_list *instructions,
- struct _mesa_glsl_parse_state *state,
- const char *name, int value)
-{
- ir_variable *const var = add_variable(name, ir_var_auto,
- -1, glsl_type::int_type,
- instructions, state->symbols);
- var->constant_value = new(var) ir_constant(value);
-}
-
-/* Several constants in GLSL ES have different names than normal desktop GLSL.
- * Therefore, this function should only be called on the ES path.
- */
-static void
-generate_100ES_uniforms(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
-{
- add_builtin_constant(instructions, state, "gl_MaxVertexAttribs",
- state->Const.MaxVertexAttribs);
- add_builtin_constant(instructions, state, "gl_MaxVertexUniformVectors",
- state->Const.MaxVertexUniformComponents);
- add_builtin_constant(instructions, state, "gl_MaxVaryingVectors",
- state->Const.MaxVaryingFloats / 4);
- add_builtin_constant(instructions, state, "gl_MaxVertexTextureImageUnits",
- state->Const.MaxVertexTextureImageUnits);
- add_builtin_constant(instructions, state, "gl_MaxCombinedTextureImageUnits",
- state->Const.MaxCombinedTextureImageUnits);
- add_builtin_constant(instructions, state, "gl_MaxTextureImageUnits",
- state->Const.MaxTextureImageUnits);
- add_builtin_constant(instructions, state, "gl_MaxFragmentUniformVectors",
- state->Const.MaxFragmentUniformComponents);
-
- add_uniform(instructions, state, "gl_DepthRange",
- state->symbols->get_type("gl_DepthRangeParameters"));
-}
-
-static void
-generate_110_uniforms(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
-{
- for (unsigned i = 0
- ; i < Elements(builtin_110_deprecated_uniforms)
- ; i++) {
- add_builtin_variable(& builtin_110_deprecated_uniforms[i],
- instructions, state->symbols);
- }
-
- add_builtin_constant(instructions, state, "gl_MaxLights",
- state->Const.MaxLights);
- add_builtin_constant(instructions, state, "gl_MaxClipPlanes",
- state->Const.MaxClipPlanes);
- add_builtin_constant(instructions, state, "gl_MaxTextureUnits",
- state->Const.MaxTextureUnits);
- add_builtin_constant(instructions, state, "gl_MaxTextureCoords",
- state->Const.MaxTextureCoords);
- add_builtin_constant(instructions, state, "gl_MaxVertexAttribs",
- state->Const.MaxVertexAttribs);
- add_builtin_constant(instructions, state, "gl_MaxVertexUniformComponents",
- state->Const.MaxVertexUniformComponents);
- add_builtin_constant(instructions, state, "gl_MaxVaryingFloats",
- state->Const.MaxVaryingFloats);
- add_builtin_constant(instructions, state, "gl_MaxVertexTextureImageUnits",
- state->Const.MaxVertexTextureImageUnits);
- add_builtin_constant(instructions, state, "gl_MaxCombinedTextureImageUnits",
- state->Const.MaxCombinedTextureImageUnits);
- add_builtin_constant(instructions, state, "gl_MaxTextureImageUnits",
- state->Const.MaxTextureImageUnits);
- add_builtin_constant(instructions, state, "gl_MaxFragmentUniformComponents",
- state->Const.MaxFragmentUniformComponents);
-
- const glsl_type *const mat4_array_type =
- glsl_type::get_array_instance(glsl_type::mat4_type,
- state->Const.MaxTextureCoords);
-
- add_uniform(instructions, state, "gl_TextureMatrix", mat4_array_type);
- add_uniform(instructions, state, "gl_TextureMatrixInverse", mat4_array_type);
- add_uniform(instructions, state, "gl_TextureMatrixTranspose", mat4_array_type);
- add_uniform(instructions, state, "gl_TextureMatrixInverseTranspose", mat4_array_type);
-
- add_uniform(instructions, state, "gl_DepthRange",
- state->symbols->get_type("gl_DepthRangeParameters"));
-
- add_uniform(instructions, state, "gl_ClipPlane",
- glsl_type::get_array_instance(glsl_type::vec4_type,
- state->Const.MaxClipPlanes));
- add_uniform(instructions, state, "gl_Point",
- state->symbols->get_type("gl_PointParameters"));
-
- const glsl_type *const material_parameters_type =
- state->symbols->get_type("gl_MaterialParameters");
- add_uniform(instructions, state, "gl_FrontMaterial", material_parameters_type);
- add_uniform(instructions, state, "gl_BackMaterial", material_parameters_type);
-
- const glsl_type *const light_source_array_type =
- glsl_type::get_array_instance(state->symbols->get_type("gl_LightSourceParameters"), state->Const.MaxLights);
-
- add_uniform(instructions, state, "gl_LightSource", light_source_array_type);
-
- const glsl_type *const light_model_products_type =
- state->symbols->get_type("gl_LightModelProducts");
- add_uniform(instructions, state, "gl_FrontLightModelProduct",
- light_model_products_type);
- add_uniform(instructions, state, "gl_BackLightModelProduct",
- light_model_products_type);
-
- const glsl_type *const light_products_type =
- glsl_type::get_array_instance(state->symbols->get_type("gl_LightProducts"),
- state->Const.MaxLights);
- add_uniform(instructions, state, "gl_FrontLightProduct", light_products_type);
- add_uniform(instructions, state, "gl_BackLightProduct", light_products_type);
-
- add_uniform(instructions, state, "gl_TextureEnvColor",
- glsl_type::get_array_instance(glsl_type::vec4_type,
- state->Const.MaxTextureUnits));
-
- const glsl_type *const texcoords_vec4 =
- glsl_type::get_array_instance(glsl_type::vec4_type,
- state->Const.MaxTextureCoords);
- add_uniform(instructions, state, "gl_EyePlaneS", texcoords_vec4);
- add_uniform(instructions, state, "gl_EyePlaneT", texcoords_vec4);
- add_uniform(instructions, state, "gl_EyePlaneR", texcoords_vec4);
- add_uniform(instructions, state, "gl_EyePlaneQ", texcoords_vec4);
- add_uniform(instructions, state, "gl_ObjectPlaneS", texcoords_vec4);
- add_uniform(instructions, state, "gl_ObjectPlaneT", texcoords_vec4);
- add_uniform(instructions, state, "gl_ObjectPlaneR", texcoords_vec4);
- add_uniform(instructions, state, "gl_ObjectPlaneQ", texcoords_vec4);
-
- add_uniform(instructions, state, "gl_Fog",
- state->symbols->get_type("gl_FogParameters"));
-}
-
-/* This function should only be called for ES, not desktop GL. */
-static void
-generate_100ES_vs_variables(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
-{
- for (unsigned i = 0; i < Elements(builtin_core_vs_variables); i++) {
- add_builtin_variable(& builtin_core_vs_variables[i],
- instructions, state->symbols);
- }
-
- generate_100ES_uniforms(instructions, state);
-
- generate_ARB_draw_buffers_variables(instructions, state, false,
- vertex_shader);
-}
-
-
-static void
-generate_110_vs_variables(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
-{
- for (unsigned i = 0; i < Elements(builtin_core_vs_variables); i++) {
- add_builtin_variable(& builtin_core_vs_variables[i],
- instructions, state->symbols);
- }
-
- for (unsigned i = 0
- ; i < Elements(builtin_110_deprecated_vs_variables)
- ; i++) {
- add_builtin_variable(& builtin_110_deprecated_vs_variables[i],
- instructions, state->symbols);
- }
- generate_110_uniforms(instructions, state);
-
- /* From page 54 (page 60 of the PDF) of the GLSL 1.20 spec:
- *
- * "As with all arrays, indices used to subscript gl_TexCoord must
- * either be an integral constant expressions, or this array must be
- * re-declared by the shader with a size. The size can be at most
- * gl_MaxTextureCoords. Using indexes close to 0 may aid the
- * implementation in preserving varying resources."
- */
- const glsl_type *const vec4_array_type =
- glsl_type::get_array_instance(glsl_type::vec4_type, 0);
-
- add_variable("gl_TexCoord", ir_var_out, VERT_RESULT_TEX0, vec4_array_type,
- instructions, state->symbols);
-
- generate_ARB_draw_buffers_variables(instructions, state, false,
- vertex_shader);
-}
-
-
-static void
-generate_120_vs_variables(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
-{
- /* GLSL version 1.20 did not add any built-in variables in the vertex
- * shader.
- */
- generate_110_vs_variables(instructions, state);
-}
-
-
-static void
-generate_130_vs_variables(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
-{
- generate_120_vs_variables(instructions, state);
-
- for (unsigned i = 0; i < Elements(builtin_130_vs_variables); i++) {
- add_builtin_variable(& builtin_130_vs_variables[i],
- instructions, state->symbols);
- }
-
- const glsl_type *const clip_distance_array_type =
- glsl_type::get_array_instance(glsl_type::float_type,
- state->Const.MaxClipPlanes);
-
- /* FINISHME: gl_ClipDistance needs a real location assigned. */
- add_variable("gl_ClipDistance", ir_var_out, -1, clip_distance_array_type,
- instructions, state->symbols);
-
-}
-
-
-static void
-initialize_vs_variables(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
-{
-
- switch (state->language_version) {
- case 100:
- generate_100ES_vs_variables(instructions, state);
- break;
- case 110:
- generate_110_vs_variables(instructions, state);
- break;
- case 120:
- generate_120_vs_variables(instructions, state);
- break;
- case 130:
- generate_130_vs_variables(instructions, state);
- break;
- }
-
- if (state->ARB_draw_instanced_enable)
- generate_ARB_draw_instanced_variables(instructions, state, false,
- vertex_shader);
-}
-
-
-/* This function should only be called for ES, not desktop GL. */
-static void
-generate_100ES_fs_variables(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
-{
- for (unsigned i = 0; i < Elements(builtin_core_fs_variables); i++) {
- add_builtin_variable(& builtin_core_fs_variables[i],
- instructions, state->symbols);
- }
-
- for (unsigned i = 0; i < Elements(builtin_100ES_fs_variables); i++) {
- add_builtin_variable(& builtin_100ES_fs_variables[i],
- instructions, state->symbols);
- }
-
- generate_100ES_uniforms(instructions, state);
-
- generate_ARB_draw_buffers_variables(instructions, state, false,
- fragment_shader);
-}
-
-static void
-generate_110_fs_variables(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
-{
- for (unsigned i = 0; i < Elements(builtin_core_fs_variables); i++) {
- add_builtin_variable(& builtin_core_fs_variables[i],
- instructions, state->symbols);
- }
-
- for (unsigned i = 0; i < Elements(builtin_110_fs_variables); i++) {
- add_builtin_variable(& builtin_110_fs_variables[i],
- instructions, state->symbols);
- }
-
- for (unsigned i = 0
- ; i < Elements(builtin_110_deprecated_fs_variables)
- ; i++) {
- add_builtin_variable(& builtin_110_deprecated_fs_variables[i],
- instructions, state->symbols);
- }
- generate_110_uniforms(instructions, state);
-
- /* From page 54 (page 60 of the PDF) of the GLSL 1.20 spec:
- *
- * "As with all arrays, indices used to subscript gl_TexCoord must
- * either be an integral constant expressions, or this array must be
- * re-declared by the shader with a size. The size can be at most
- * gl_MaxTextureCoords. Using indexes close to 0 may aid the
- * implementation in preserving varying resources."
- */
- const glsl_type *const vec4_array_type =
- glsl_type::get_array_instance(glsl_type::vec4_type, 0);
-
- add_variable("gl_TexCoord", ir_var_in, FRAG_ATTRIB_TEX0, vec4_array_type,
- instructions, state->symbols);
-
- generate_ARB_draw_buffers_variables(instructions, state, false,
- fragment_shader);
-}
-
-
-static void
-generate_ARB_draw_buffers_variables(exec_list *instructions,
- struct _mesa_glsl_parse_state *state,
- bool warn, _mesa_glsl_parser_targets target)
-{
- /* gl_MaxDrawBuffers is available in all shader stages.
- */
- ir_variable *const mdb =
- add_variable("gl_MaxDrawBuffers", ir_var_auto, -1,
- glsl_type::int_type, instructions, state->symbols);
-
- if (warn)
- mdb->warn_extension = "GL_ARB_draw_buffers";
-
- mdb->constant_value = new(mdb)
- ir_constant(int(state->Const.MaxDrawBuffers));
-
-
- /* gl_FragData is only available in the fragment shader.
- */
- if (target == fragment_shader) {
- const glsl_type *const vec4_array_type =
- glsl_type::get_array_instance(glsl_type::vec4_type,
- state->Const.MaxDrawBuffers);
-
- ir_variable *const fd =
- add_variable("gl_FragData", ir_var_out, FRAG_RESULT_DATA0,
- vec4_array_type, instructions, state->symbols);
-
- if (warn)
- fd->warn_extension = "GL_ARB_draw_buffers";
- }
-}
-
-
-static void
-generate_ARB_draw_instanced_variables(exec_list *instructions,
- struct _mesa_glsl_parse_state *state,
- bool warn,
- _mesa_glsl_parser_targets target)
-{
- /* gl_InstanceIDARB is only available in the vertex shader.
- */
- if (target == vertex_shader) {
- ir_variable *const inst =
- add_variable("gl_InstanceIDARB", ir_var_system_value,
- SYSTEM_VALUE_INSTANCE_ID,
- glsl_type::int_type, instructions, state->symbols);
-
- if (warn)
- inst->warn_extension = "GL_ARB_draw_instanced";
- }
-}
-
-
-static void
-generate_ARB_shader_stencil_export_variables(exec_list *instructions,
- struct _mesa_glsl_parse_state *state,
- bool warn)
-{
- /* gl_FragStencilRefARB is only available in the fragment shader.
- */
- ir_variable *const fd =
- add_variable("gl_FragStencilRefARB", ir_var_out, FRAG_RESULT_STENCIL,
- glsl_type::int_type, instructions, state->symbols);
-
- if (warn)
- fd->warn_extension = "GL_ARB_shader_stencil_export";
-}
-
-static void
-generate_120_fs_variables(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
-{
- generate_110_fs_variables(instructions, state);
-
- for (unsigned i = 0
- ; i < Elements(builtin_120_fs_variables)
- ; i++) {
- add_builtin_variable(& builtin_120_fs_variables[i],
- instructions, state->symbols);
- }
-}
-
-static void
-generate_130_fs_variables(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
-{
- generate_120_fs_variables(instructions, state);
-
- const glsl_type *const clip_distance_array_type =
- glsl_type::get_array_instance(glsl_type::float_type,
- state->Const.MaxClipPlanes);
-
- /* FINISHME: gl_ClipDistance needs a real location assigned. */
- add_variable("gl_ClipDistance", ir_var_in, -1, clip_distance_array_type,
- instructions, state->symbols);
-}
-
-static void
-initialize_fs_variables(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
-{
-
- switch (state->language_version) {
- case 100:
- generate_100ES_fs_variables(instructions, state);
- break;
- case 110:
- generate_110_fs_variables(instructions, state);
- break;
- case 120:
- generate_120_fs_variables(instructions, state);
- break;
- case 130:
- generate_130_fs_variables(instructions, state);
- break;
- }
-
- if (state->ARB_shader_stencil_export_enable)
- generate_ARB_shader_stencil_export_variables(instructions, state,
- state->ARB_shader_stencil_export_warn);
-}
-
-void
-_mesa_glsl_initialize_variables(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
-{
- switch (state->target) {
- case vertex_shader:
- initialize_vs_variables(instructions, state);
- break;
- case geometry_shader:
- break;
- case fragment_shader:
- initialize_fs_variables(instructions, state);
- break;
- }
-}
+/*
+ * Copyright © 2010 Intel Corporation
+ *
+ * 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 (including the next
+ * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
+ */
+
+#include "ir.h"
+#include "glsl_parser_extras.h"
+#include "glsl_symbol_table.h"
+#include "builtin_variables.h"
+
+static void generate_ARB_draw_buffers_variables(exec_list *,
+ struct _mesa_glsl_parse_state *,
+ bool, _mesa_glsl_parser_targets);
+
+static void
+generate_ARB_draw_instanced_variables(exec_list *,
+ struct _mesa_glsl_parse_state *,
+ bool, _mesa_glsl_parser_targets);
+
+static ir_variable *
+add_variable(exec_list *instructions, glsl_symbol_table *symtab,
+ const char *name, const glsl_type *type,
+ enum ir_variable_mode mode, int slot)
+{
+ ir_variable *var = new(symtab) ir_variable(type, name, mode);
+
+ switch (var->mode) {
+ case ir_var_auto:
+ case ir_var_in:
+ case ir_var_const_in:
+ case ir_var_uniform:
+ case ir_var_system_value:
+ var->read_only = true;
+ break;
+ case ir_var_inout:
+ case ir_var_out:
+ break;
+ default:
+ assert(0);
+ break;
+ }
+
+ var->location = slot;
+ var->explicit_location = (slot >= 0);
+
+ /* Once the variable is created an initialized, add it to the symbol table
+ * and add the declaration to the IR stream.
+ */
+ instructions->push_tail(var);
+
+ symtab->add_variable(var);
+ return var;
+}
+
+static ir_variable *
+add_uniform(exec_list *instructions, glsl_symbol_table *symtab,
+ const char *name, const glsl_type *type)
+{
+ return add_variable(instructions, symtab, name, type, ir_var_uniform, -1);
+}
+
+static void
+add_builtin_variable(exec_list *instructions, glsl_symbol_table *symtab,
+ const builtin_variable *proto)
+{
+ /* Create a new variable declaration from the description supplied by
+ * the caller.
+ */
+ const glsl_type *const type = symtab->get_type(proto->type);
+
+ assert(type != NULL);
+
+ add_variable(instructions, symtab, proto->name, type, proto->mode,
+ proto->slot);
+}
+
+static void
+add_builtin_constant(exec_list *instructions, glsl_symbol_table *symtab,
+ const char *name, int value)
+{
+ ir_variable *const var = add_variable(instructions, symtab,
+ name, glsl_type::int_type,
+ ir_var_auto, -1);
+ var->constant_value = new(var) ir_constant(value);
+}
+
+/* Several constants in GLSL ES have different names than normal desktop GLSL.
+ * Therefore, this function should only be called on the ES path.
+ */
+static void
+generate_100ES_uniforms(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ glsl_symbol_table *const symtab = state->symbols;
+
+ add_builtin_constant(instructions, symtab, "gl_MaxVertexAttribs",
+ state->Const.MaxVertexAttribs);
+ add_builtin_constant(instructions, symtab, "gl_MaxVertexUniformVectors",
+ state->Const.MaxVertexUniformComponents);
+ add_builtin_constant(instructions, symtab, "gl_MaxVaryingVectors",
+ state->Const.MaxVaryingFloats / 4);
+ add_builtin_constant(instructions, symtab, "gl_MaxVertexTextureImageUnits",
+ state->Const.MaxVertexTextureImageUnits);
+ add_builtin_constant(instructions, symtab, "gl_MaxCombinedTextureImageUnits",
+ state->Const.MaxCombinedTextureImageUnits);
+ add_builtin_constant(instructions, symtab, "gl_MaxTextureImageUnits",
+ state->Const.MaxTextureImageUnits);
+ add_builtin_constant(instructions, symtab, "gl_MaxFragmentUniformVectors",
+ state->Const.MaxFragmentUniformComponents);
+
+ add_uniform(instructions, symtab, "gl_DepthRange",
+ state->symbols->get_type("gl_DepthRangeParameters"));
+}
+
+static void
+generate_110_uniforms(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ glsl_symbol_table *const symtab = state->symbols;
+
+ for (unsigned i = 0
+ ; i < Elements(builtin_110_deprecated_uniforms)
+ ; i++) {
+ add_builtin_variable(instructions, symtab,
+ & builtin_110_deprecated_uniforms[i]);
+ }
+
+ add_builtin_constant(instructions, symtab, "gl_MaxLights",
+ state->Const.MaxLights);
+ add_builtin_constant(instructions, symtab, "gl_MaxClipPlanes",
+ state->Const.MaxClipPlanes);
+ add_builtin_constant(instructions, symtab, "gl_MaxTextureUnits",
+ state->Const.MaxTextureUnits);
+ add_builtin_constant(instructions, symtab, "gl_MaxTextureCoords",
+ state->Const.MaxTextureCoords);
+ add_builtin_constant(instructions, symtab, "gl_MaxVertexAttribs",
+ state->Const.MaxVertexAttribs);
+ add_builtin_constant(instructions, symtab, "gl_MaxVertexUniformComponents",
+ state->Const.MaxVertexUniformComponents);
+ add_builtin_constant(instructions, symtab, "gl_MaxVaryingFloats",
+ state->Const.MaxVaryingFloats);
+ add_builtin_constant(instructions, symtab, "gl_MaxVertexTextureImageUnits",
+ state->Const.MaxVertexTextureImageUnits);
+ add_builtin_constant(instructions, symtab, "gl_MaxCombinedTextureImageUnits",
+ state->Const.MaxCombinedTextureImageUnits);
+ add_builtin_constant(instructions, symtab, "gl_MaxTextureImageUnits",
+ state->Const.MaxTextureImageUnits);
+ add_builtin_constant(instructions, symtab, "gl_MaxFragmentUniformComponents",
+ state->Const.MaxFragmentUniformComponents);
+
+ const glsl_type *const mat4_array_type =
+ glsl_type::get_array_instance(glsl_type::mat4_type,
+ state->Const.MaxTextureCoords);
+
+ add_uniform(instructions, symtab, "gl_TextureMatrix", mat4_array_type);
+ add_uniform(instructions, symtab, "gl_TextureMatrixInverse", mat4_array_type);
+ add_uniform(instructions, symtab, "gl_TextureMatrixTranspose", mat4_array_type);
+ add_uniform(instructions, symtab, "gl_TextureMatrixInverseTranspose", mat4_array_type);
+
+ add_uniform(instructions, symtab, "gl_DepthRange",
+ symtab->get_type("gl_DepthRangeParameters"));
+
+ add_uniform(instructions, symtab, "gl_ClipPlane",
+ glsl_type::get_array_instance(glsl_type::vec4_type,
+ state->Const.MaxClipPlanes));
+ add_uniform(instructions, symtab, "gl_Point",
+ symtab->get_type("gl_PointParameters"));
+
+ const glsl_type *const material_parameters_type =
+ symtab->get_type("gl_MaterialParameters");
+ add_uniform(instructions, symtab, "gl_FrontMaterial", material_parameters_type);
+ add_uniform(instructions, symtab, "gl_BackMaterial", material_parameters_type);
+
+ const glsl_type *const light_source_array_type =
+ glsl_type::get_array_instance(symtab->get_type("gl_LightSourceParameters"), state->Const.MaxLights);
+
+ add_uniform(instructions, symtab, "gl_LightSource", light_source_array_type);
+
+ const glsl_type *const light_model_products_type =
+ symtab->get_type("gl_LightModelProducts");
+ add_uniform(instructions, symtab, "gl_FrontLightModelProduct",
+ light_model_products_type);
+ add_uniform(instructions, symtab, "gl_BackLightModelProduct",
+ light_model_products_type);
+
+ const glsl_type *const light_products_type =
+ glsl_type::get_array_instance(symtab->get_type("gl_LightProducts"),
+ state->Const.MaxLights);
+ add_uniform(instructions, symtab, "gl_FrontLightProduct", light_products_type);
+ add_uniform(instructions, symtab, "gl_BackLightProduct", light_products_type);
+
+ add_uniform(instructions, symtab, "gl_TextureEnvColor",
+ glsl_type::get_array_instance(glsl_type::vec4_type,
+ state->Const.MaxTextureUnits));
+
+ const glsl_type *const texcoords_vec4 =
+ glsl_type::get_array_instance(glsl_type::vec4_type,
+ state->Const.MaxTextureCoords);
+ add_uniform(instructions, symtab, "gl_EyePlaneS", texcoords_vec4);
+ add_uniform(instructions, symtab, "gl_EyePlaneT", texcoords_vec4);
+ add_uniform(instructions, symtab, "gl_EyePlaneR", texcoords_vec4);
+ add_uniform(instructions, symtab, "gl_EyePlaneQ", texcoords_vec4);
+ add_uniform(instructions, symtab, "gl_ObjectPlaneS", texcoords_vec4);
+ add_uniform(instructions, symtab, "gl_ObjectPlaneT", texcoords_vec4);
+ add_uniform(instructions, symtab, "gl_ObjectPlaneR", texcoords_vec4);
+ add_uniform(instructions, symtab, "gl_ObjectPlaneQ", texcoords_vec4);
+
+ add_uniform(instructions, symtab, "gl_Fog",
+ symtab->get_type("gl_FogParameters"));
+}
+
+/* This function should only be called for ES, not desktop GL. */
+static void
+generate_100ES_vs_variables(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ for (unsigned i = 0; i < Elements(builtin_core_vs_variables); i++) {
+ add_builtin_variable(instructions, state->symbols,
+ & builtin_core_vs_variables[i]);
+ }
+
+ generate_100ES_uniforms(instructions, state);
+
+ generate_ARB_draw_buffers_variables(instructions, state, false,
+ vertex_shader);
+}
+
+
+static void
+generate_110_vs_variables(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ for (unsigned i = 0; i < Elements(builtin_core_vs_variables); i++) {
+ add_builtin_variable(instructions, state->symbols,
+ & builtin_core_vs_variables[i]);
+ }
+
+ for (unsigned i = 0
+ ; i < Elements(builtin_110_deprecated_vs_variables)
+ ; i++) {
+ add_builtin_variable(instructions, state->symbols,
+ & builtin_110_deprecated_vs_variables[i]);
+ }
+ generate_110_uniforms(instructions, state);
+
+ /* From page 54 (page 60 of the PDF) of the GLSL 1.20 spec:
+ *
+ * "As with all arrays, indices used to subscript gl_TexCoord must
+ * either be an integral constant expressions, or this array must be
+ * re-declared by the shader with a size. The size can be at most
+ * gl_MaxTextureCoords. Using indexes close to 0 may aid the
+ * implementation in preserving varying resources."
+ */
+ const glsl_type *const vec4_array_type =
+ glsl_type::get_array_instance(glsl_type::vec4_type, 0);
+
+ add_variable(instructions, state->symbols,
+ "gl_TexCoord", vec4_array_type, ir_var_out, VERT_RESULT_TEX0);
+
+ generate_ARB_draw_buffers_variables(instructions, state, false,
+ vertex_shader);
+}
+
+
+static void
+generate_120_vs_variables(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ /* GLSL version 1.20 did not add any built-in variables in the vertex
+ * shader.
+ */
+ generate_110_vs_variables(instructions, state);
+}
+
+
+static void
+generate_130_vs_variables(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ generate_120_vs_variables(instructions, state);
+
+ for (unsigned i = 0; i < Elements(builtin_130_vs_variables); i++) {
+ add_builtin_variable(instructions, state->symbols,
+ & builtin_130_vs_variables[i]);
+ }
+
+ const glsl_type *const clip_distance_array_type =
+ glsl_type::get_array_instance(glsl_type::float_type,
+ state->Const.MaxClipPlanes);
+
+ /* FINISHME: gl_ClipDistance needs a real location assigned. */
+ add_variable(instructions, state->symbols,
+ "gl_ClipDistance", clip_distance_array_type, ir_var_out, -1);
+
+}
+
+
+static void
+initialize_vs_variables(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+
+ switch (state->language_version) {
+ case 100:
+ generate_100ES_vs_variables(instructions, state);
+ break;
+ case 110:
+ generate_110_vs_variables(instructions, state);
+ break;
+ case 120:
+ generate_120_vs_variables(instructions, state);
+ break;
+ case 130:
+ generate_130_vs_variables(instructions, state);
+ break;
+ }
+
+ if (state->ARB_draw_instanced_enable)
+ generate_ARB_draw_instanced_variables(instructions, state, false,
+ vertex_shader);
+}
+
+
+/* This function should only be called for ES, not desktop GL. */
+static void
+generate_100ES_fs_variables(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ for (unsigned i = 0; i < Elements(builtin_core_fs_variables); i++) {
+ add_builtin_variable(instructions, state->symbols,
+ & builtin_core_fs_variables[i]);
+ }
+
+ for (unsigned i = 0; i < Elements(builtin_100ES_fs_variables); i++) {
+ add_builtin_variable(instructions, state->symbols,
+ & builtin_100ES_fs_variables[i]);
+ }
+
+ generate_100ES_uniforms(instructions, state);
+
+ generate_ARB_draw_buffers_variables(instructions, state, false,
+ fragment_shader);
+}
+
+static void
+generate_110_fs_variables(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ for (unsigned i = 0; i < Elements(builtin_core_fs_variables); i++) {
+ add_builtin_variable(instructions, state->symbols,
+ & builtin_core_fs_variables[i]);
+ }
+
+ for (unsigned i = 0; i < Elements(builtin_110_fs_variables); i++) {
+ add_builtin_variable(instructions, state->symbols,
+ & builtin_110_fs_variables[i]);
+ }
+
+ for (unsigned i = 0
+ ; i < Elements(builtin_110_deprecated_fs_variables)
+ ; i++) {
+ add_builtin_variable(instructions, state->symbols,
+ & builtin_110_deprecated_fs_variables[i]);
+ }
+ generate_110_uniforms(instructions, state);
+
+ /* From page 54 (page 60 of the PDF) of the GLSL 1.20 spec:
+ *
+ * "As with all arrays, indices used to subscript gl_TexCoord must
+ * either be an integral constant expressions, or this array must be
+ * re-declared by the shader with a size. The size can be at most
+ * gl_MaxTextureCoords. Using indexes close to 0 may aid the
+ * implementation in preserving varying resources."
+ */
+ const glsl_type *const vec4_array_type =
+ glsl_type::get_array_instance(glsl_type::vec4_type, 0);
+
+ add_variable(instructions, state->symbols,
+ "gl_TexCoord", vec4_array_type, ir_var_in, FRAG_ATTRIB_TEX0);
+
+ generate_ARB_draw_buffers_variables(instructions, state, false,
+ fragment_shader);
+}
+
+
+static void
+generate_ARB_draw_buffers_variables(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state,
+ bool warn, _mesa_glsl_parser_targets target)
+{
+ /* gl_MaxDrawBuffers is available in all shader stages.
+ */
+ ir_variable *const mdb =
+ add_variable(instructions, state->symbols,
+ "gl_MaxDrawBuffers", glsl_type::int_type, ir_var_auto, -1);
+
+ if (warn)
+ mdb->warn_extension = "GL_ARB_draw_buffers";
+
+ mdb->constant_value = new(mdb)
+ ir_constant(int(state->Const.MaxDrawBuffers));
+
+
+ /* gl_FragData is only available in the fragment shader.
+ */
+ if (target == fragment_shader) {
+ const glsl_type *const vec4_array_type =
+ glsl_type::get_array_instance(glsl_type::vec4_type,
+ state->Const.MaxDrawBuffers);
+
+ ir_variable *const fd =
+ add_variable(instructions, state->symbols,
+ "gl_FragData", vec4_array_type,
+ ir_var_out, FRAG_RESULT_DATA0);
+
+ if (warn)
+ fd->warn_extension = "GL_ARB_draw_buffers";
+ }
+}
+
+
+static void
+generate_ARB_draw_instanced_variables(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state,
+ bool warn,
+ _mesa_glsl_parser_targets target)
+{
+ /* gl_InstanceIDARB is only available in the vertex shader.
+ */
+ if (target == vertex_shader) {
+ ir_variable *const inst =
+ add_variable(instructions, state->symbols,
+ "gl_InstanceIDARB", glsl_type::int_type,
+ ir_var_system_value, SYSTEM_VALUE_INSTANCE_ID);
+
+ if (warn)
+ inst->warn_extension = "GL_ARB_draw_instanced";
+ }
+}
+
+
+static void
+generate_ARB_shader_stencil_export_variables(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state,
+ bool warn)
+{
+ /* gl_FragStencilRefARB is only available in the fragment shader.
+ */
+ ir_variable *const fd =
+ add_variable(instructions, state->symbols,
+ "gl_FragStencilRefARB", glsl_type::int_type,
+ ir_var_out, FRAG_RESULT_STENCIL);
+
+ if (warn)
+ fd->warn_extension = "GL_ARB_shader_stencil_export";
+}
+
+static void
+generate_120_fs_variables(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ generate_110_fs_variables(instructions, state);
+
+ for (unsigned i = 0
+ ; i < Elements(builtin_120_fs_variables)
+ ; i++) {
+ add_builtin_variable(instructions, state->symbols,
+ & builtin_120_fs_variables[i]);
+ }
+}
+
+static void
+generate_130_fs_variables(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ generate_120_fs_variables(instructions, state);
+
+ const glsl_type *const clip_distance_array_type =
+ glsl_type::get_array_instance(glsl_type::float_type,
+ state->Const.MaxClipPlanes);
+
+ /* FINISHME: gl_ClipDistance needs a real location assigned. */
+ add_variable(instructions, state->symbols,
+ "gl_ClipDistance", clip_distance_array_type, ir_var_in, -1);
+}
+
+static void
+initialize_fs_variables(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+
+ switch (state->language_version) {
+ case 100:
+ generate_100ES_fs_variables(instructions, state);
+ break;
+ case 110:
+ generate_110_fs_variables(instructions, state);
+ break;
+ case 120:
+ generate_120_fs_variables(instructions, state);
+ break;
+ case 130:
+ generate_130_fs_variables(instructions, state);
+ break;
+ }
+
+ if (state->ARB_shader_stencil_export_enable)
+ generate_ARB_shader_stencil_export_variables(instructions, state,
+ state->ARB_shader_stencil_export_warn);
+}
+
+void
+_mesa_glsl_initialize_variables(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ switch (state->target) {
+ case vertex_shader:
+ initialize_vs_variables(instructions, state);
+ break;
+ case geometry_shader:
+ break;
+ case fragment_shader:
+ initialize_fs_variables(instructions, state);
+ break;
+ }
+}
diff --git a/mesalib/src/mapi/glapi/gen/GL3x.xml b/mesalib/src/mapi/glapi/gen/GL3x.xml
index da6af5c8b..148635c37 100644
--- a/mesalib/src/mapi/glapi/gen/GL3x.xml
+++ b/mesalib/src/mapi/glapi/gen/GL3x.xml
@@ -133,8 +133,8 @@
<function name="ClearBufferfi" offset="assign">
<param name="buffer" type="GLenum"/>
<param name="drawbuffer" type="GLint"/>
- <param name="depth" type="const GLfloat"/>
- <param name="stencil" type="const GLint"/>
+ <param name="depth" type="GLfloat"/>
+ <param name="stencil" type="GLint"/>
</function>
<function name="GetStringi" offset="assign">
diff --git a/mesalib/src/mapi/glapi/glapi_mapi_tmp.h b/mesalib/src/mapi/glapi/glapi_mapi_tmp.h
index 0c6ecff3d..62440a708 100644
--- a/mesalib/src/mapi/glapi/glapi_mapi_tmp.h
+++ b/mesalib/src/mapi/glapi/glapi_mapi_tmp.h
@@ -522,7 +522,7 @@ GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix3x4fv)(GLint location, GLsizei cou
GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix4x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix4x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
GLAPI void APIENTRY GLAPI_PREFIX(ClampColor)(GLenum target, GLenum clamp);
-GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferfi)(GLenum buffer, GLint drawbuffer, const GLfloat depth, const GLint stencil);
+GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferfi)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferfv)(GLenum buffer, GLint drawbuffer, const GLfloat *value);
GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferiv)(GLenum buffer, GLint drawbuffer, const GLint *value);
GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferuiv)(GLenum buffer, GLint drawbuffer, const GLuint *value);
@@ -4751,11 +4751,11 @@ GLAPI void APIENTRY GLAPI_PREFIX(ClampColor)(GLenum target, GLenum clamp)
((void (APIENTRY *)(GLenum target, GLenum clamp)) _func)(target, clamp);
}
-GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferfi)(GLenum buffer, GLint drawbuffer, const GLfloat depth, const GLint stencil)
+GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferfi)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
{
const struct mapi_table *_tbl = entry_current_get();
mapi_func _func = ((const mapi_func *) _tbl)[431];
- ((void (APIENTRY *)(GLenum buffer, GLint drawbuffer, const GLfloat depth, const GLint stencil)) _func)(buffer, drawbuffer, depth, stencil);
+ ((void (APIENTRY *)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)) _func)(buffer, drawbuffer, depth, stencil);
}
GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferfv)(GLenum buffer, GLint drawbuffer, const GLfloat *value)
diff --git a/mesalib/src/mapi/glapi/glapitable.h b/mesalib/src/mapi/glapi/glapitable.h
index 9b419ba77..e5110ecfc 100644
--- a/mesalib/src/mapi/glapi/glapitable.h
+++ b/mesalib/src/mapi/glapi/glapitable.h
@@ -471,7 +471,7 @@ struct _glapi_table
void (GLAPIENTRYP UniformMatrix4x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 428 */
void (GLAPIENTRYP UniformMatrix4x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 429 */
void (GLAPIENTRYP ClampColor)(GLenum target, GLenum clamp); /* 430 */
- void (GLAPIENTRYP ClearBufferfi)(GLenum buffer, GLint drawbuffer, const GLfloat depth, const GLint stencil); /* 431 */
+ void (GLAPIENTRYP ClearBufferfi)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); /* 431 */
void (GLAPIENTRYP ClearBufferfv)(GLenum buffer, GLint drawbuffer, const GLfloat * value); /* 432 */
void (GLAPIENTRYP ClearBufferiv)(GLenum buffer, GLint drawbuffer, const GLint * value); /* 433 */
void (GLAPIENTRYP ClearBufferuiv)(GLenum buffer, GLint drawbuffer, const GLuint * value); /* 434 */
diff --git a/mesalib/src/mapi/glapi/glapitemp.h b/mesalib/src/mapi/glapi/glapitemp.h
index 4101a63d3..5f6b91f2c 100644
--- a/mesalib/src/mapi/glapi/glapitemp.h
+++ b/mesalib/src/mapi/glapi/glapitemp.h
@@ -2637,7 +2637,7 @@ KEYWORD1 void KEYWORD2 NAME(ClampColor)(GLenum target, GLenum clamp)
DISPATCH(ClampColor, (target, clamp), (F, "glClampColor(0x%x, 0x%x);\n", target, clamp));
}
-KEYWORD1 void KEYWORD2 NAME(ClearBufferfi)(GLenum buffer, GLint drawbuffer, const GLfloat depth, const GLint stencil)
+KEYWORD1 void KEYWORD2 NAME(ClearBufferfi)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
{
DISPATCH(ClearBufferfi, (buffer, drawbuffer, depth, stencil), (F, "glClearBufferfi(0x%x, %d, %f, %d);\n", buffer, drawbuffer, depth, stencil));
}
diff --git a/mesalib/src/mesa/main/api_arrayelt.c b/mesalib/src/mesa/main/api_arrayelt.c
index 3c59e9be3..ed0361742 100644
--- a/mesalib/src/mesa/main/api_arrayelt.c
+++ b/mesalib/src/mesa/main/api_arrayelt.c
@@ -175,31 +175,31 @@ static int FogCoordFuncs[NUM_TYPES];
/* GL_BYTE attributes */
-static void
+static void GLAPIENTRY
VertexAttrib1NbvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0])));
}
-static void
+static void GLAPIENTRY
VertexAttrib1bvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void
+static void GLAPIENTRY
VertexAttrib2NbvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1])));
}
-static void
+static void GLAPIENTRY
VertexAttrib2bvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1]));
}
-static void
+static void GLAPIENTRY
VertexAttrib3NbvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]),
@@ -207,13 +207,13 @@ VertexAttrib3NbvNV(GLuint index, const GLbyte *v)
BYTE_TO_FLOAT(v[2])));
}
-static void
+static void GLAPIENTRY
VertexAttrib3bvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2]));
}
-static void
+static void GLAPIENTRY
VertexAttrib4NbvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]),
@@ -222,7 +222,7 @@ VertexAttrib4NbvNV(GLuint index, const GLbyte *v)
BYTE_TO_FLOAT(v[3])));
}
-static void
+static void GLAPIENTRY
VertexAttrib4bvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3]));
@@ -230,46 +230,46 @@ VertexAttrib4bvNV(GLuint index, const GLbyte *v)
/* GL_UNSIGNED_BYTE attributes */
-static void
+static void GLAPIENTRY
VertexAttrib1NubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0])));
}
-static void
+static void GLAPIENTRY
VertexAttrib1ubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void
+static void GLAPIENTRY
VertexAttrib2NubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]),
UBYTE_TO_FLOAT(v[1])));
}
-static void
+static void GLAPIENTRY
VertexAttrib2ubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1]));
}
-static void
+static void GLAPIENTRY
VertexAttrib3NubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]),
UBYTE_TO_FLOAT(v[1]),
UBYTE_TO_FLOAT(v[2])));
}
-static void
+static void GLAPIENTRY
VertexAttrib3ubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0],
(GLfloat)v[1], (GLfloat)v[2]));
}
-static void
+static void GLAPIENTRY
VertexAttrib4NubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]),
@@ -278,7 +278,7 @@ VertexAttrib4NubvNV(GLuint index, const GLubyte *v)
UBYTE_TO_FLOAT(v[3])));
}
-static void
+static void GLAPIENTRY
VertexAttrib4ubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0],
@@ -288,32 +288,32 @@ VertexAttrib4ubvNV(GLuint index, const GLubyte *v)
/* GL_SHORT attributes */
-static void
+static void GLAPIENTRY
VertexAttrib1NsvNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0])));
}
-static void
+static void GLAPIENTRY
VertexAttrib1svNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void
+static void GLAPIENTRY
VertexAttrib2NsvNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]),
SHORT_TO_FLOAT(v[1])));
}
-static void
+static void GLAPIENTRY
VertexAttrib2svNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1]));
}
-static void
+static void GLAPIENTRY
VertexAttrib3NsvNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]),
@@ -321,14 +321,14 @@ VertexAttrib3NsvNV(GLuint index, const GLshort *v)
SHORT_TO_FLOAT(v[2])));
}
-static void
+static void GLAPIENTRY
VertexAttrib3svNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
(GLfloat)v[2]));
}
-static void
+static void GLAPIENTRY
VertexAttrib4NsvNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]),
@@ -337,7 +337,7 @@ VertexAttrib4NsvNV(GLuint index, const GLshort *v)
SHORT_TO_FLOAT(v[3])));
}
-static void
+static void GLAPIENTRY
VertexAttrib4svNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
@@ -346,33 +346,33 @@ VertexAttrib4svNV(GLuint index, const GLshort *v)
/* GL_UNSIGNED_SHORT attributes */
-static void
+static void GLAPIENTRY
VertexAttrib1NusvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0])));
}
-static void
+static void GLAPIENTRY
VertexAttrib1usvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void
+static void GLAPIENTRY
VertexAttrib2NusvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]),
USHORT_TO_FLOAT(v[1])));
}
-static void
+static void GLAPIENTRY
VertexAttrib2usvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0],
(GLfloat)v[1]));
}
-static void
+static void GLAPIENTRY
VertexAttrib3NusvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]),
@@ -380,14 +380,14 @@ VertexAttrib3NusvNV(GLuint index, const GLushort *v)
USHORT_TO_FLOAT(v[2])));
}
-static void
+static void GLAPIENTRY
VertexAttrib3usvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
(GLfloat)v[2]));
}
-static void
+static void GLAPIENTRY
VertexAttrib4NusvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]),
@@ -396,7 +396,7 @@ VertexAttrib4NusvNV(GLuint index, const GLushort *v)
USHORT_TO_FLOAT(v[3])));
}
-static void
+static void GLAPIENTRY
VertexAttrib4usvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
@@ -405,32 +405,32 @@ VertexAttrib4usvNV(GLuint index, const GLushort *v)
/* GL_INT attributes */
-static void
+static void GLAPIENTRY
VertexAttrib1NivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0])));
}
-static void
+static void GLAPIENTRY
VertexAttrib1ivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void
+static void GLAPIENTRY
VertexAttrib2NivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]),
INT_TO_FLOAT(v[1])));
}
-static void
+static void GLAPIENTRY
VertexAttrib2ivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1]));
}
-static void
+static void GLAPIENTRY
VertexAttrib3NivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]),
@@ -438,14 +438,14 @@ VertexAttrib3NivNV(GLuint index, const GLint *v)
INT_TO_FLOAT(v[2])));
}
-static void
+static void GLAPIENTRY
VertexAttrib3ivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
(GLfloat)v[2]));
}
-static void
+static void GLAPIENTRY
VertexAttrib4NivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]),
@@ -454,7 +454,7 @@ VertexAttrib4NivNV(GLuint index, const GLint *v)
INT_TO_FLOAT(v[3])));
}
-static void
+static void GLAPIENTRY
VertexAttrib4ivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
@@ -463,33 +463,33 @@ VertexAttrib4ivNV(GLuint index, const GLint *v)
/* GL_UNSIGNED_INT attributes */
-static void
+static void GLAPIENTRY
VertexAttrib1NuivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0])));
}
-static void
+static void GLAPIENTRY
VertexAttrib1uivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void
+static void GLAPIENTRY
VertexAttrib2NuivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]),
UINT_TO_FLOAT(v[1])));
}
-static void
+static void GLAPIENTRY
VertexAttrib2uivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0],
(GLfloat)v[1]));
}
-static void
+static void GLAPIENTRY
VertexAttrib3NuivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]),
@@ -497,14 +497,14 @@ VertexAttrib3NuivNV(GLuint index, const GLuint *v)
UINT_TO_FLOAT(v[2])));
}
-static void
+static void GLAPIENTRY
VertexAttrib3uivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
(GLfloat)v[2]));
}
-static void
+static void GLAPIENTRY
VertexAttrib4NuivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]),
@@ -513,7 +513,7 @@ VertexAttrib4NuivNV(GLuint index, const GLuint *v)
UINT_TO_FLOAT(v[3])));
}
-static void
+static void GLAPIENTRY
VertexAttrib4uivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
@@ -522,25 +522,25 @@ VertexAttrib4uivNV(GLuint index, const GLuint *v)
/* GL_FLOAT attributes */
-static void
+static void GLAPIENTRY
VertexAttrib1fvNV(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib1fvNV(GET_DISPATCH(), (index, v));
}
-static void
+static void GLAPIENTRY
VertexAttrib2fvNV(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib2fvNV(GET_DISPATCH(), (index, v));
}
-static void
+static void GLAPIENTRY
VertexAttrib3fvNV(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib3fvNV(GET_DISPATCH(), (index, v));
}
-static void
+static void GLAPIENTRY
VertexAttrib4fvNV(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib4fvNV(GET_DISPATCH(), (index, v));
@@ -548,25 +548,25 @@ VertexAttrib4fvNV(GLuint index, const GLfloat *v)
/* GL_DOUBLE attributes */
-static void
+static void GLAPIENTRY
VertexAttrib1dvNV(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib1dvNV(GET_DISPATCH(), (index, v));
}
-static void
+static void GLAPIENTRY
VertexAttrib2dvNV(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib2dvNV(GET_DISPATCH(), (index, v));
}
-static void
+static void GLAPIENTRY
VertexAttrib3dvNV(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib3dvNV(GET_DISPATCH(), (index, v));
}
-static void
+static void GLAPIENTRY
VertexAttrib4dvNV(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib4dvNV(GET_DISPATCH(), (index, v));
@@ -680,31 +680,31 @@ static attrib_func AttribFuncsNV[2][4][NUM_TYPES] = {
/* GL_BYTE attributes */
-static void
+static void GLAPIENTRY
VertexAttrib1NbvARB(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0])));
}
-static void
+static void GLAPIENTRY
VertexAttrib1bvARB(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void
+static void GLAPIENTRY
VertexAttrib2NbvARB(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1])));
}
-static void
+static void GLAPIENTRY
VertexAttrib2bvARB(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1]));
}
-static void
+static void GLAPIENTRY
VertexAttrib3NbvARB(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]),
@@ -712,13 +712,13 @@ VertexAttrib3NbvARB(GLuint index, const GLbyte *v)
BYTE_TO_FLOAT(v[2])));
}
-static void
+static void GLAPIENTRY
VertexAttrib3bvARB(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2]));
}
-static void
+static void GLAPIENTRY
VertexAttrib4NbvARB(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]),
@@ -727,7 +727,7 @@ VertexAttrib4NbvARB(GLuint index, const GLbyte *v)
BYTE_TO_FLOAT(v[3])));
}
-static void
+static void GLAPIENTRY
VertexAttrib4bvARB(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3]));
@@ -735,19 +735,19 @@ VertexAttrib4bvARB(GLuint index, const GLbyte *v)
/* GL_UNSIGNED_BYTE attributes */
-static void
+static void GLAPIENTRY
VertexAttrib1NubvARB(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0])));
}
-static void
+static void GLAPIENTRY
VertexAttrib1ubvARB(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void
+static void GLAPIENTRY
VertexAttrib2NubvARB(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib2fARB(GET_DISPATCH(), (index,
@@ -755,14 +755,14 @@ VertexAttrib2NubvARB(GLuint index, const GLubyte *v)
UBYTE_TO_FLOAT(v[1])));
}
-static void
+static void GLAPIENTRY
VertexAttrib2ubvARB(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib2fARB(GET_DISPATCH(), (index,
(GLfloat)v[0], (GLfloat)v[1]));
}
-static void
+static void GLAPIENTRY
VertexAttrib3NubvARB(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib3fARB(GET_DISPATCH(), (index,
@@ -770,7 +770,7 @@ VertexAttrib3NubvARB(GLuint index, const GLubyte *v)
UBYTE_TO_FLOAT(v[1]),
UBYTE_TO_FLOAT(v[2])));
}
-static void
+static void GLAPIENTRY
VertexAttrib3ubvARB(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib3fARB(GET_DISPATCH(), (index,
@@ -779,7 +779,7 @@ VertexAttrib3ubvARB(GLuint index, const GLubyte *v)
(GLfloat)v[2]));
}
-static void
+static void GLAPIENTRY
VertexAttrib4NubvARB(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib4fARB(GET_DISPATCH(),
@@ -790,7 +790,7 @@ VertexAttrib4NubvARB(GLuint index, const GLubyte *v)
UBYTE_TO_FLOAT(v[3])));
}
-static void
+static void GLAPIENTRY
VertexAttrib4ubvARB(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib4fARB(GET_DISPATCH(),
@@ -801,19 +801,19 @@ VertexAttrib4ubvARB(GLuint index, const GLubyte *v)
/* GL_SHORT attributes */
-static void
+static void GLAPIENTRY
VertexAttrib1NsvARB(GLuint index, const GLshort *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0])));
}
-static void
+static void GLAPIENTRY
VertexAttrib1svARB(GLuint index, const GLshort *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void
+static void GLAPIENTRY
VertexAttrib2NsvARB(GLuint index, const GLshort *v)
{
CALL_VertexAttrib2fARB(GET_DISPATCH(),
@@ -821,14 +821,14 @@ VertexAttrib2NsvARB(GLuint index, const GLshort *v)
SHORT_TO_FLOAT(v[1])));
}
-static void
+static void GLAPIENTRY
VertexAttrib2svARB(GLuint index, const GLshort *v)
{
CALL_VertexAttrib2fARB(GET_DISPATCH(),
(index, (GLfloat)v[0], (GLfloat)v[1]));
}
-static void
+static void GLAPIENTRY
VertexAttrib3NsvARB(GLuint index, const GLshort *v)
{
CALL_VertexAttrib3fARB(GET_DISPATCH(),
@@ -838,7 +838,7 @@ VertexAttrib3NsvARB(GLuint index, const GLshort *v)
SHORT_TO_FLOAT(v[2])));
}
-static void
+static void GLAPIENTRY
VertexAttrib3svARB(GLuint index, const GLshort *v)
{
CALL_VertexAttrib3fARB(GET_DISPATCH(),
@@ -846,7 +846,7 @@ VertexAttrib3svARB(GLuint index, const GLshort *v)
(GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2]));
}
-static void
+static void GLAPIENTRY
VertexAttrib4NsvARB(GLuint index, const GLshort *v)
{
CALL_VertexAttrib4fARB(GET_DISPATCH(),
@@ -857,7 +857,7 @@ VertexAttrib4NsvARB(GLuint index, const GLshort *v)
SHORT_TO_FLOAT(v[3])));
}
-static void
+static void GLAPIENTRY
VertexAttrib4svARB(GLuint index, const GLshort *v)
{
CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
@@ -866,33 +866,33 @@ VertexAttrib4svARB(GLuint index, const GLshort *v)
/* GL_UNSIGNED_SHORT attributes */
-static void
+static void GLAPIENTRY
VertexAttrib1NusvARB(GLuint index, const GLushort *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0])));
}
-static void
+static void GLAPIENTRY
VertexAttrib1usvARB(GLuint index, const GLushort *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void
+static void GLAPIENTRY
VertexAttrib2NusvARB(GLuint index, const GLushort *v)
{
CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]),
USHORT_TO_FLOAT(v[1])));
}
-static void
+static void GLAPIENTRY
VertexAttrib2usvARB(GLuint index, const GLushort *v)
{
CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0],
(GLfloat)v[1]));
}
-static void
+static void GLAPIENTRY
VertexAttrib3NusvARB(GLuint index, const GLushort *v)
{
CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]),
@@ -900,14 +900,14 @@ VertexAttrib3NusvARB(GLuint index, const GLushort *v)
USHORT_TO_FLOAT(v[2])));
}
-static void
+static void GLAPIENTRY
VertexAttrib3usvARB(GLuint index, const GLushort *v)
{
CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0],
(GLfloat)v[1], (GLfloat)v[2]));
}
-static void
+static void GLAPIENTRY
VertexAttrib4NusvARB(GLuint index, const GLushort *v)
{
CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]),
@@ -916,7 +916,7 @@ VertexAttrib4NusvARB(GLuint index, const GLushort *v)
USHORT_TO_FLOAT(v[3])));
}
-static void
+static void GLAPIENTRY
VertexAttrib4usvARB(GLuint index, const GLushort *v)
{
CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3]));
@@ -924,33 +924,33 @@ VertexAttrib4usvARB(GLuint index, const GLushort *v)
/* GL_INT attributes */
-static void
+static void GLAPIENTRY
VertexAttrib1NivARB(GLuint index, const GLint *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0])));
}
-static void
+static void GLAPIENTRY
VertexAttrib1ivARB(GLuint index, const GLint *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void
+static void GLAPIENTRY
VertexAttrib2NivARB(GLuint index, const GLint *v)
{
CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]),
INT_TO_FLOAT(v[1])));
}
-static void
+static void GLAPIENTRY
VertexAttrib2ivARB(GLuint index, const GLint *v)
{
CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0],
(GLfloat)v[1]));
}
-static void
+static void GLAPIENTRY
VertexAttrib3NivARB(GLuint index, const GLint *v)
{
CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]),
@@ -958,14 +958,14 @@ VertexAttrib3NivARB(GLuint index, const GLint *v)
INT_TO_FLOAT(v[2])));
}
-static void
+static void GLAPIENTRY
VertexAttrib3ivARB(GLuint index, const GLint *v)
{
CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0],
(GLfloat)v[1], (GLfloat)v[2]));
}
-static void
+static void GLAPIENTRY
VertexAttrib4NivARB(GLuint index, const GLint *v)
{
CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]),
@@ -974,7 +974,7 @@ VertexAttrib4NivARB(GLuint index, const GLint *v)
INT_TO_FLOAT(v[3])));
}
-static void
+static void GLAPIENTRY
VertexAttrib4ivARB(GLuint index, const GLint *v)
{
CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
@@ -983,33 +983,33 @@ VertexAttrib4ivARB(GLuint index, const GLint *v)
/* GL_UNSIGNED_INT attributes */
-static void
+static void GLAPIENTRY
VertexAttrib1NuivARB(GLuint index, const GLuint *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0])));
}
-static void
+static void GLAPIENTRY
VertexAttrib1uivARB(GLuint index, const GLuint *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void
+static void GLAPIENTRY
VertexAttrib2NuivARB(GLuint index, const GLuint *v)
{
CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]),
UINT_TO_FLOAT(v[1])));
}
-static void
+static void GLAPIENTRY
VertexAttrib2uivARB(GLuint index, const GLuint *v)
{
CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0],
(GLfloat)v[1]));
}
-static void
+static void GLAPIENTRY
VertexAttrib3NuivARB(GLuint index, const GLuint *v)
{
CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]),
@@ -1017,14 +1017,14 @@ VertexAttrib3NuivARB(GLuint index, const GLuint *v)
UINT_TO_FLOAT(v[2])));
}
-static void
+static void GLAPIENTRY
VertexAttrib3uivARB(GLuint index, const GLuint *v)
{
CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0],
(GLfloat)v[1], (GLfloat)v[2]));
}
-static void
+static void GLAPIENTRY
VertexAttrib4NuivARB(GLuint index, const GLuint *v)
{
CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]),
@@ -1033,7 +1033,7 @@ VertexAttrib4NuivARB(GLuint index, const GLuint *v)
UINT_TO_FLOAT(v[3])));
}
-static void
+static void GLAPIENTRY
VertexAttrib4uivARB(GLuint index, const GLuint *v)
{
CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
@@ -1042,25 +1042,25 @@ VertexAttrib4uivARB(GLuint index, const GLuint *v)
/* GL_FLOAT attributes */
-static void
+static void GLAPIENTRY
VertexAttrib1fvARB(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib1fvARB(GET_DISPATCH(), (index, v));
}
-static void
+static void GLAPIENTRY
VertexAttrib2fvARB(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib2fvARB(GET_DISPATCH(), (index, v));
}
-static void
+static void GLAPIENTRY
VertexAttrib3fvARB(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib3fvARB(GET_DISPATCH(), (index, v));
}
-static void
+static void GLAPIENTRY
VertexAttrib4fvARB(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib4fvARB(GET_DISPATCH(), (index, v));
@@ -1068,25 +1068,25 @@ VertexAttrib4fvARB(GLuint index, const GLfloat *v)
/* GL_DOUBLE attributes */
-static void
+static void GLAPIENTRY
VertexAttrib1dvARB(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib1dvARB(GET_DISPATCH(), (index, v));
}
-static void
+static void GLAPIENTRY
VertexAttrib2dvARB(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib2dvARB(GET_DISPATCH(), (index, v));
}
-static void
+static void GLAPIENTRY
VertexAttrib3dvARB(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib3dvARB(GET_DISPATCH(), (index, v));
}
-static void
+static void GLAPIENTRY
VertexAttrib4dvARB(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib4dvARB(GET_DISPATCH(), (index, v));
@@ -1096,50 +1096,50 @@ VertexAttrib4dvARB(GLuint index, const GLdouble *v)
/**
* Integer-valued attributes
*/
-static void
+static void GLAPIENTRY
VertexAttribI1bv(GLuint index, const GLbyte *v)
{
CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index, v[0]));
}
-static void
+static void GLAPIENTRY
VertexAttribI2bv(GLuint index, const GLbyte *v)
{
CALL_VertexAttribI2iEXT(GET_DISPATCH(), (index, v[0], v[1]));
}
-static void
+static void GLAPIENTRY
VertexAttribI3bv(GLuint index, const GLbyte *v)
{
CALL_VertexAttribI3iEXT(GET_DISPATCH(), (index, v[0], v[1], v[2]));
}
-static void
+static void GLAPIENTRY
VertexAttribI4bv(GLuint index, const GLbyte *v)
{
CALL_VertexAttribI4bvEXT(GET_DISPATCH(), (index, v));
}
-static void
+static void GLAPIENTRY
VertexAttribI1ubv(GLuint index, const GLubyte *v)
{
CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index, v[0]));
}
-static void
+static void GLAPIENTRY
VertexAttribI2ubv(GLuint index, const GLubyte *v)
{
CALL_VertexAttribI2uiEXT(GET_DISPATCH(), (index, v[0], v[1]));
}
-static void
+static void GLAPIENTRY
VertexAttribI3ubv(GLuint index, const GLubyte *v)
{
CALL_VertexAttribI3uiEXT(GET_DISPATCH(), (index, v[0], v[1], v[2]));
}
-static void
+static void GLAPIENTRY
VertexAttribI4ubv(GLuint index, const GLubyte *v)
{
CALL_VertexAttribI4ubvEXT(GET_DISPATCH(), (index, v));
@@ -1147,50 +1147,50 @@ VertexAttribI4ubv(GLuint index, const GLubyte *v)
-static void
+static void GLAPIENTRY
VertexAttribI1sv(GLuint index, const GLshort *v)
{
CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index, v[0]));
}
-static void
+static void GLAPIENTRY
VertexAttribI2sv(GLuint index, const GLshort *v)
{
CALL_VertexAttribI2iEXT(GET_DISPATCH(), (index, v[0], v[1]));
}
-static void
+static void GLAPIENTRY
VertexAttribI3sv(GLuint index, const GLshort *v)
{
CALL_VertexAttribI3iEXT(GET_DISPATCH(), (index, v[0], v[1], v[2]));
}
-static void
+static void GLAPIENTRY
VertexAttribI4sv(GLuint index, const GLshort *v)
{
CALL_VertexAttribI4svEXT(GET_DISPATCH(), (index, v));
}
-static void
+static void GLAPIENTRY
VertexAttribI1usv(GLuint index, const GLushort *v)
{
CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index, v[0]));
}
-static void
+static void GLAPIENTRY
VertexAttribI2usv(GLuint index, const GLushort *v)
{
CALL_VertexAttribI2uiEXT(GET_DISPATCH(), (index, v[0], v[1]));
}
-static void
+static void GLAPIENTRY
VertexAttribI3usv(GLuint index, const GLushort *v)
{
CALL_VertexAttribI3uiEXT(GET_DISPATCH(), (index, v[0], v[1], v[2]));
}
-static void
+static void GLAPIENTRY
VertexAttribI4usv(GLuint index, const GLushort *v)
{
CALL_VertexAttribI4usvEXT(GET_DISPATCH(), (index, v));
@@ -1198,50 +1198,50 @@ VertexAttribI4usv(GLuint index, const GLushort *v)
-static void
+static void GLAPIENTRY
VertexAttribI1iv(GLuint index, const GLint *v)
{
CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index, v[0]));
}
-static void
+static void GLAPIENTRY
VertexAttribI2iv(GLuint index, const GLint *v)
{
CALL_VertexAttribI2iEXT(GET_DISPATCH(), (index, v[0], v[1]));
}
-static void
+static void GLAPIENTRY
VertexAttribI3iv(GLuint index, const GLint *v)
{
CALL_VertexAttribI3iEXT(GET_DISPATCH(), (index, v[0], v[1], v[2]));
}
-static void
+static void GLAPIENTRY
VertexAttribI4iv(GLuint index, const GLint *v)
{
CALL_VertexAttribI4ivEXT(GET_DISPATCH(), (index, v));
}
-static void
+static void GLAPIENTRY
VertexAttribI1uiv(GLuint index, const GLuint *v)
{
CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index, v[0]));
}
-static void
+static void GLAPIENTRY
VertexAttribI2uiv(GLuint index, const GLuint *v)
{
CALL_VertexAttribI2uiEXT(GET_DISPATCH(), (index, v[0], v[1]));
}
-static void
+static void GLAPIENTRY
VertexAttribI3uiv(GLuint index, const GLuint *v)
{
CALL_VertexAttribI3uiEXT(GET_DISPATCH(), (index, v[0], v[1], v[2]));
}
-static void
+static void GLAPIENTRY
VertexAttribI4uiv(GLuint index, const GLuint *v)
{
CALL_VertexAttribI4uivEXT(GET_DISPATCH(), (index, v));
diff --git a/mesalib/src/mesa/main/compiler.h b/mesalib/src/mesa/main/compiler.h
index c1d773b18..f2b344fd1 100644
--- a/mesalib/src/mesa/main/compiler.h
+++ b/mesalib/src/mesa/main/compiler.h
@@ -149,12 +149,14 @@ extern "C" {
* We also need to define a USED attribute, so the optimizer doesn't
* inline a static function that we later use in an alias. - ajax
*/
-#if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
-# define PUBLIC __attribute__((visibility("default")))
-# define USED __attribute__((used))
-#else
-# define PUBLIC
-# define USED
+#ifndef PUBLIC
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+# define PUBLIC __attribute__((visibility("default")))
+# define USED __attribute__((used))
+# else
+# define PUBLIC
+# define USED
+# endif
#endif
@@ -173,15 +175,17 @@ extern "C" {
* __builtin_expect macros
*/
#if !defined(__GNUC__)
-# define __builtin_expect(x, y) x
+# define __builtin_expect(x, y) (x)
#endif
-#ifdef __GNUC__
-#define likely(x) __builtin_expect(!!(x), 1)
-#define unlikely(x) __builtin_expect(!!(x), 0)
-#else
-#define likely(x) !!(x)
-#define unlikely(x) !!(x)
+#ifndef likely
+# ifdef __GNUC__
+# define likely(x) __builtin_expect(!!(x), 1)
+# define unlikely(x) __builtin_expect(!!(x), 0)
+# else
+# define likely(x) (x)
+# define unlikely(x) (x)
+# endif
#endif
/**
diff --git a/mesalib/src/mesa/main/dlist.c b/mesalib/src/mesa/main/dlist.c
index 3c8474591..3a963b981 100644
--- a/mesalib/src/mesa/main/dlist.c
+++ b/mesalib/src/mesa/main/dlist.c
@@ -7036,7 +7036,7 @@ save_VertexAttribDivisor(GLuint index, GLuint divisor)
/* GL_NV_texture_barrier */
static void
-save_TextureBarrierNV()
+save_TextureBarrierNV(void)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
diff --git a/mesalib/src/mesa/main/glapidispatch.h b/mesalib/src/mesa/main/glapidispatch.h
index ae7f80d89..809f84904 100644
--- a/mesalib/src/mesa/main/glapidispatch.h
+++ b/mesalib/src/mesa/main/glapidispatch.h
@@ -3227,7 +3227,7 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define CALL_ClampColor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_ClampColor, parameters)
#define GET_ClampColor(disp) GET_by_offset(disp, _gloffset_ClampColor)
#define SET_ClampColor(disp, fn) SET_by_offset(disp, _gloffset_ClampColor, fn)
-#define CALL_ClearBufferfi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLfloat, const GLint)), _gloffset_ClearBufferfi, parameters)
+#define CALL_ClearBufferfi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLfloat, GLint)), _gloffset_ClearBufferfi, parameters)
#define GET_ClearBufferfi(disp) GET_by_offset(disp, _gloffset_ClearBufferfi)
#define SET_ClearBufferfi(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferfi, fn)
#define CALL_ClearBufferfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLfloat *)), _gloffset_ClearBufferfv, parameters)
diff --git a/mesalib/src/mesa/state_tracker/st_cb_blit.c b/mesalib/src/mesa/state_tracker/st_cb_blit.c
index 39499450d..4c3d561a4 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_blit.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_blit.c
@@ -39,6 +39,7 @@
#include "st_texture.h"
#include "st_cb_blit.h"
#include "st_cb_fbo.h"
+#include "st_atom.h"
#include "util/u_blit.h"
@@ -75,6 +76,8 @@ st_BlitFramebuffer(struct gl_context *ctx,
struct gl_framebuffer *readFB = ctx->ReadBuffer;
struct gl_framebuffer *drawFB = ctx->DrawBuffer;
+ st_validate_state(st);
+
if (!_mesa_clip_blit(ctx, &srcX0, &srcY0, &srcX1, &srcY1,
&dstX0, &dstY0, &dstX1, &dstY1)) {
return; /* nothing to draw/blit */
diff --git a/xorg-server/Xi/chgdctl.c b/xorg-server/Xi/chgdctl.c
index 901a0e419..b5580803b 100644
--- a/xorg-server/Xi/chgdctl.c
+++ b/xorg-server/Xi/chgdctl.c
@@ -1,304 +1,238 @@
-/************************************************************
-
-Copyright 1989, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 Open Group 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 Open Group.
-
-Copyright 1989 by Hewlett-Packard Company, Palo Alto, California.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Hewlett-Packard not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-********************************************************/
-
-/********************************************************************
- *
- * Change Device control attributes for an extension device.
- *
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "inputstr.h" /* DeviceIntPtr */
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XIproto.h> /* control constants */
-#include "XIstubs.h"
-
-#include "exglobals.h"
-#include "exevents.h"
-
-#include "chgdctl.h"
-
-/***********************************************************************
- *
- * This procedure changes the control attributes for an extension device,
- * for clients on machines with a different byte ordering than the server.
- *
- */
-
-int
-SProcXChangeDeviceControl(ClientPtr client)
-{
- char n;
- xDeviceCtl *ctl;
- xDeviceAbsCalibCtl *calib;
- xDeviceAbsAreaCtl *area;
-
- REQUEST(xChangeDeviceControlReq);
- swaps(&stuff->length, n);
- REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq);
- swaps(&stuff->control, n);
- ctl = (xDeviceCtl*)&stuff[1];
- swaps(&ctl->control, n);
- swaps(&ctl->length, n);
- switch(stuff->control) {
- case DEVICE_ABS_CALIB:
- calib = (xDeviceAbsCalibCtl*)ctl;
- swaps(&calib->length, n);
- swapl(&calib->min_x, n);
- swapl(&calib->max_x, n);
- swapl(&calib->min_y, n);
- swapl(&calib->max_y, n);
- swapl(&calib->flip_x, n);
- swapl(&calib->flip_y, n);
- swapl(&calib->rotation, n);
- swapl(&calib->button_threshold, n);
- break;
- case DEVICE_ABS_AREA:
- area = (xDeviceAbsAreaCtl*)ctl;
- swapl(&area->offset_x, n);
- swapl(&area->offset_y, n);
- swapl(&area->width, n);
- swapl(&area->height, n);
- swapl(&area->screen, n);
- swapl(&area->following, n);
- break;
- case DEVICE_CORE:
- case DEVICE_ENABLE:
- case DEVICE_RESOLUTION:
- /* hmm. beer. *drool* */
- break;
-
- }
- return (ProcXChangeDeviceControl(client));
-}
-
-/***********************************************************************
- *
- * Change the control attributes.
- *
- */
-
-int
-ProcXChangeDeviceControl(ClientPtr client)
-{
- unsigned len;
- int i, status, ret = BadValue;
- DeviceIntPtr dev;
- xDeviceResolutionCtl *r;
- xChangeDeviceControlReply rep;
- AxisInfoPtr a;
- CARD32 *resolution;
- xDeviceAbsCalibCtl *calib;
- xDeviceAbsAreaCtl *area;
- xDeviceEnableCtl *e;
- devicePresenceNotify dpn;
-
- REQUEST(xChangeDeviceControlReq);
- REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq);
-
- len = stuff->length - bytes_to_int32(sizeof(xChangeDeviceControlReq));
- ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
- if (ret != Success)
- goto out;
-
- rep.repType = X_Reply;
- rep.RepType = X_ChangeDeviceControl;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
-
- switch (stuff->control) {
- case DEVICE_RESOLUTION:
- r = (xDeviceResolutionCtl *) & stuff[1];
- if ((len < bytes_to_int32(sizeof(xDeviceResolutionCtl))) ||
- (len != bytes_to_int32(sizeof(xDeviceResolutionCtl)) + r->num_valuators)) {
- ret = BadLength;
- goto out;
- }
- if (!dev->valuator) {
- ret = BadMatch;
- goto out;
- }
- if ((dev->deviceGrab.grab) && !SameClient(dev->deviceGrab.grab, client)) {
- rep.status = AlreadyGrabbed;
- ret = Success;
- goto out;
- }
- resolution = (CARD32 *) (r + 1);
- if (r->first_valuator + r->num_valuators > dev->valuator->numAxes) {
- ret = BadValue;
- goto out;
- }
- status = ChangeDeviceControl(client, dev, (xDeviceCtl *) r);
- if (status == Success) {
- a = &dev->valuator->axes[r->first_valuator];
- for (i = 0; i < r->num_valuators; i++)
- if (*(resolution + i) < (a + i)->min_resolution ||
- *(resolution + i) > (a + i)->max_resolution)
- return BadValue;
- for (i = 0; i < r->num_valuators; i++)
- (a++)->resolution = *resolution++;
-
- ret = Success;
- } else if (status == DeviceBusy) {
- rep.status = DeviceBusy;
- ret = Success;
- } else {
- ret = BadMatch;
- }
- break;
- case DEVICE_ABS_CALIB:
- calib = (xDeviceAbsCalibCtl *)&stuff[1];
-
- if (calib->button_threshold < 0 || calib->button_threshold > 255) {
- ret = BadValue;
- goto out;
- }
-
- status = ChangeDeviceControl(client, dev, (xDeviceCtl *) calib);
-
- if (status == Success) {
- dev->absolute->min_x = calib->min_x;
- dev->absolute->max_x = calib->max_x;
- dev->absolute->min_y = calib->min_y;
- dev->absolute->max_y = calib->max_y;
- dev->absolute->flip_x = calib->flip_x;
- dev->absolute->flip_y = calib->flip_y;
- dev->absolute->rotation = calib->rotation;
- dev->absolute->button_threshold = calib->button_threshold;
- ret = Success;
- } else if (status == DeviceBusy || status == BadValue) {
- rep.status = status;
- ret = Success;
- } else {
- ret = BadMatch;
- }
-
- break;
- case DEVICE_ABS_AREA:
- area = (xDeviceAbsAreaCtl *)&stuff[1];
-
- status = ChangeDeviceControl(client, dev, (xDeviceCtl *) area);
-
- if (status == Success) {
- dev->absolute->offset_x = area->offset_x;
- dev->absolute->offset_y = area->offset_y;
- dev->absolute->width = area->width;
- dev->absolute->height = area->height;
- dev->absolute->screen = area->screen;
- dev->absolute->following = area->following;
- ret = Success;
- } else if (status == DeviceBusy || status == BadValue) {
- rep.status = status;
- ret = Success;
- } else {
- ret = Success;
- }
-
- break;
- case DEVICE_CORE:
- /* Sorry, no device core switching no more. If you want a device to
- * send core events, attach it to a master device */
- ret = BadMatch;
- break;
- case DEVICE_ENABLE:
- e = (xDeviceEnableCtl *)&stuff[1];
-
- status = ChangeDeviceControl(client, dev, (xDeviceCtl *) e);
-
- if (status == Success) {
- if (e->enable)
- EnableDevice(dev, TRUE);
- else
- DisableDevice(dev, TRUE);
- ret = Success;
- } else if (status == DeviceBusy) {
- rep.status = DeviceBusy;
- ret = Success;
- } else {
- ret = BadMatch;
- }
-
- break;
- default:
- ret = BadValue;
- }
-
-out:
- if (ret == Success) {
- dpn.type = DevicePresenceNotify;
- dpn.time = currentTime.milliseconds;
- dpn.devchange = DeviceControlChanged;
- dpn.deviceid = dev->id;
- dpn.control = stuff->control;
- SendEventToAllWindows(dev, DevicePresenceNotifyMask,
- (xEvent *) &dpn, 1);
-
- WriteReplyToClient(client, sizeof(xChangeDeviceControlReply), &rep);
- }
-
- return ret;
-}
-
-/***********************************************************************
- *
- * This procedure writes the reply for the xChangeDeviceControl function,
- * if the client and server have a different byte ordering.
- *
- */
-
-void
-SRepXChangeDeviceControl(ClientPtr client, int size,
- xChangeDeviceControlReply * rep)
-{
- char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
- WriteToClient(client, size, (char *)rep);
-}
+/************************************************************
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+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
+OPEN GROUP 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 Open Group 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 Open Group.
+
+Copyright 1989 by Hewlett-Packard Company, Palo Alto, California.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Hewlett-Packard not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+********************************************************/
+
+/********************************************************************
+ *
+ * Change Device control attributes for an extension device.
+ *
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "inputstr.h" /* DeviceIntPtr */
+#include <X11/extensions/XI.h>
+#include <X11/extensions/XIproto.h> /* control constants */
+#include "XIstubs.h"
+
+#include "exglobals.h"
+#include "exevents.h"
+
+#include "chgdctl.h"
+
+/***********************************************************************
+ *
+ * This procedure changes the control attributes for an extension device,
+ * for clients on machines with a different byte ordering than the server.
+ *
+ */
+
+int
+SProcXChangeDeviceControl(ClientPtr client)
+{
+ char n;
+ xDeviceCtl *ctl;
+
+ REQUEST(xChangeDeviceControlReq);
+ swaps(&stuff->length, n);
+ REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq);
+ swaps(&stuff->control, n);
+ ctl = (xDeviceCtl*)&stuff[1];
+ swaps(&ctl->control, n);
+ swaps(&ctl->length, n);
+ switch(stuff->control) {
+ case DEVICE_ABS_CALIB:
+ case DEVICE_ABS_AREA:
+ case DEVICE_CORE:
+ case DEVICE_ENABLE:
+ case DEVICE_RESOLUTION:
+ /* hmm. beer. *drool* */
+ break;
+
+ }
+ return (ProcXChangeDeviceControl(client));
+}
+
+/***********************************************************************
+ *
+ * Change the control attributes.
+ *
+ */
+
+int
+ProcXChangeDeviceControl(ClientPtr client)
+{
+ unsigned len;
+ int i, status, ret = BadValue;
+ DeviceIntPtr dev;
+ xDeviceResolutionCtl *r;
+ xChangeDeviceControlReply rep;
+ AxisInfoPtr a;
+ CARD32 *resolution;
+ xDeviceEnableCtl *e;
+ devicePresenceNotify dpn;
+
+ REQUEST(xChangeDeviceControlReq);
+ REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq);
+
+ len = stuff->length - bytes_to_int32(sizeof(xChangeDeviceControlReq));
+ ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
+ if (ret != Success)
+ goto out;
+
+ rep.repType = X_Reply;
+ rep.RepType = X_ChangeDeviceControl;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+
+ switch (stuff->control) {
+ case DEVICE_RESOLUTION:
+ r = (xDeviceResolutionCtl *) & stuff[1];
+ if ((len < bytes_to_int32(sizeof(xDeviceResolutionCtl))) ||
+ (len != bytes_to_int32(sizeof(xDeviceResolutionCtl)) + r->num_valuators)) {
+ ret = BadLength;
+ goto out;
+ }
+ if (!dev->valuator) {
+ ret = BadMatch;
+ goto out;
+ }
+ if ((dev->deviceGrab.grab) && !SameClient(dev->deviceGrab.grab, client)) {
+ rep.status = AlreadyGrabbed;
+ ret = Success;
+ goto out;
+ }
+ resolution = (CARD32 *) (r + 1);
+ if (r->first_valuator + r->num_valuators > dev->valuator->numAxes) {
+ ret = BadValue;
+ goto out;
+ }
+ status = ChangeDeviceControl(client, dev, (xDeviceCtl *) r);
+ if (status == Success) {
+ a = &dev->valuator->axes[r->first_valuator];
+ for (i = 0; i < r->num_valuators; i++)
+ if (*(resolution + i) < (a + i)->min_resolution ||
+ *(resolution + i) > (a + i)->max_resolution)
+ return BadValue;
+ for (i = 0; i < r->num_valuators; i++)
+ (a++)->resolution = *resolution++;
+
+ ret = Success;
+ } else if (status == DeviceBusy) {
+ rep.status = DeviceBusy;
+ ret = Success;
+ } else {
+ ret = BadMatch;
+ }
+ break;
+ case DEVICE_ABS_CALIB:
+ case DEVICE_ABS_AREA:
+ /* Calibration is now done through properties, and never had any effect
+ * on anything (in the open-source world). Thus, be honest. */
+ ret = BadMatch;
+ break;
+ case DEVICE_CORE:
+ /* Sorry, no device core switching no more. If you want a device to
+ * send core events, attach it to a master device */
+ ret = BadMatch;
+ break;
+ case DEVICE_ENABLE:
+ e = (xDeviceEnableCtl *)&stuff[1];
+
+ status = ChangeDeviceControl(client, dev, (xDeviceCtl *) e);
+
+ if (status == Success) {
+ if (e->enable)
+ EnableDevice(dev, TRUE);
+ else
+ DisableDevice(dev, TRUE);
+ ret = Success;
+ } else if (status == DeviceBusy) {
+ rep.status = DeviceBusy;
+ ret = Success;
+ } else {
+ ret = BadMatch;
+ }
+
+ break;
+ default:
+ ret = BadValue;
+ }
+
+out:
+ if (ret == Success) {
+ dpn.type = DevicePresenceNotify;
+ dpn.time = currentTime.milliseconds;
+ dpn.devchange = DeviceControlChanged;
+ dpn.deviceid = dev->id;
+ dpn.control = stuff->control;
+ SendEventToAllWindows(dev, DevicePresenceNotifyMask,
+ (xEvent *) &dpn, 1);
+
+ WriteReplyToClient(client, sizeof(xChangeDeviceControlReply), &rep);
+ }
+
+ return ret;
+}
+
+/***********************************************************************
+ *
+ * This procedure writes the reply for the xChangeDeviceControl function,
+ * if the client and server have a different byte ordering.
+ *
+ */
+
+void
+SRepXChangeDeviceControl(ClientPtr client, int size,
+ xChangeDeviceControlReply * rep)
+{
+ char n;
+
+ swaps(&rep->sequenceNumber, n);
+ swapl(&rep->length, n);
+ WriteToClient(client, size, (char *)rep);
+}
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c
index b17b61990..87a40fa66 100644
--- a/xorg-server/Xi/exevents.c
+++ b/xorg-server/Xi/exevents.c
@@ -628,30 +628,6 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to)
classes->proximity = to->proximity;
to->proximity = NULL;
}
-
- if (from->absolute)
- {
- if (!to->absolute)
- {
- classes = to->unused_classes;
- to->absolute = classes->absolute;
- if (!to->absolute)
- {
- to->absolute = calloc(1, sizeof(AbsoluteClassRec));
- if (!to->absolute)
- FatalError("[Xi] no memory for class shift.\n");
- } else
- classes->absolute = NULL;
- }
- memcpy(to->absolute, from->absolute, sizeof(AbsoluteClassRec));
- to->absolute->sourceid = from->id;
- } else if (to->absolute)
- {
- ClassesPtr classes;
- classes = to->unused_classes;
- classes->absolute = to->absolute;
- to->absolute = NULL;
- }
}
/**
diff --git a/xorg-server/Xi/getdctl.c b/xorg-server/Xi/getdctl.c
index 35ddd3f8e..c334c77aa 100644
--- a/xorg-server/Xi/getdctl.c
+++ b/xorg-server/Xi/getdctl.c
@@ -118,64 +118,6 @@ CopySwapDeviceResolution(ClientPtr client, ValuatorClassPtr v, char *buf,
}
}
-static void CopySwapDeviceAbsCalib (ClientPtr client, AbsoluteClassPtr dts,
- char *buf)
-{
- char n;
- xDeviceAbsCalibState *calib = (xDeviceAbsCalibState *) buf;
-
- calib->control = DEVICE_ABS_CALIB;
- calib->length = sizeof(xDeviceAbsCalibState);
- calib->min_x = dts->min_x;
- calib->max_x = dts->max_x;
- calib->min_y = dts->min_y;
- calib->max_y = dts->max_y;
- calib->flip_x = dts->flip_x;
- calib->flip_y = dts->flip_y;
- calib->rotation = dts->rotation;
- calib->button_threshold = dts->button_threshold;
-
- if (client->swapped) {
- swaps(&calib->control, n);
- swaps(&calib->length, n);
- swapl(&calib->min_x, n);
- swapl(&calib->max_x, n);
- swapl(&calib->min_y, n);
- swapl(&calib->max_y, n);
- swapl(&calib->flip_x, n);
- swapl(&calib->flip_y, n);
- swapl(&calib->rotation, n);
- swapl(&calib->button_threshold, n);
- }
-}
-
-static void CopySwapDeviceAbsArea (ClientPtr client, AbsoluteClassPtr dts,
- char *buf)
-{
- char n;
- xDeviceAbsAreaState *area = (xDeviceAbsAreaState *) buf;
-
- area->control = DEVICE_ABS_AREA;
- area->length = sizeof(xDeviceAbsAreaState);
- area->offset_x = dts->offset_x;
- area->offset_y = dts->offset_y;
- area->width = dts->width;
- area->height = dts->height;
- area->screen = dts->screen;
- area->following = dts->following;
-
- if (client->swapped) {
- swaps(&area->control, n);
- swaps(&area->length, n);
- swapl(&area->offset_x, n);
- swapl(&area->offset_y, n);
- swapl(&area->width, n);
- swapl(&area->height, n);
- swapl(&area->screen, n);
- swapl(&area->following, n);
- }
-}
-
static void CopySwapDeviceCore (ClientPtr client, DeviceIntPtr dev, char *buf)
{
char n;
@@ -260,17 +202,8 @@ ProcXGetDeviceControl(ClientPtr client)
(3 * sizeof(int) * dev->valuator->numAxes);
break;
case DEVICE_ABS_CALIB:
- if (!dev->absolute)
- return BadMatch;
-
- total_length = sizeof(xDeviceAbsCalibState);
- break;
case DEVICE_ABS_AREA:
- if (!dev->absolute)
- return BadMatch;
-
- total_length = sizeof(xDeviceAbsAreaState);
- break;
+ return BadMatch;
case DEVICE_CORE:
total_length = sizeof(xDeviceCoreState);
break;
@@ -290,12 +223,6 @@ ProcXGetDeviceControl(ClientPtr client)
case DEVICE_RESOLUTION:
CopySwapDeviceResolution(client, dev->valuator, buf, total_length);
break;
- case DEVICE_ABS_CALIB:
- CopySwapDeviceAbsCalib(client, dev->absolute, buf);
- break;
- case DEVICE_ABS_AREA:
- CopySwapDeviceAbsArea(client, dev->absolute, buf);
- break;
case DEVICE_CORE:
CopySwapDeviceCore(client, dev, buf);
break;
diff --git a/xorg-server/Xi/stubs.c b/xorg-server/Xi/stubs.c
index f69b34b2e..ec6be9361 100644
--- a/xorg-server/Xi/stubs.c
+++ b/xorg-server/Xi/stubs.c
@@ -115,17 +115,7 @@ int
ChangeDeviceControl(ClientPtr client, DeviceIntPtr dev,
xDeviceCtl * control)
{
- switch (control->control) {
- case DEVICE_RESOLUTION:
- return BadMatch;
- case DEVICE_ABS_CALIB:
- case DEVICE_ABS_AREA:
- return BadMatch;
- case DEVICE_CORE:
- return BadMatch;
- default:
- return BadMatch;
- }
+ return BadMatch;
}
diff --git a/xorg-server/config/udev.c b/xorg-server/config/udev.c
index 44319e4db..c810b6b5e 100644
--- a/xorg-server/config/udev.c
+++ b/xorg-server/config/udev.c
@@ -255,6 +255,10 @@ wakeup_handler(pointer data, int err, pointer read_mask)
device_added(udev_device);
else if (!strcmp(action, "remove"))
device_removed(udev_device);
+ else if (!strcmp(action, "change")) {
+ device_removed(udev_device);
+ device_added(udev_device);
+ }
}
udev_device_unref(udev_device);
}
diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac
index 6e12f3555..27aed8ecb 100644
--- a/xorg-server/configure.ac
+++ b/xorg-server/configure.ac
@@ -590,7 +590,10 @@ AC_ARG_ENABLE(aiglx, AS_HELP_STRING([--enable-aiglx], [Build accelerate
[AIGLX=yes])
AX_TLS
AC_ARG_ENABLE(glx-tls, AS_HELP_STRING([--enable-glx-tls], [Build GLX with TLS support (default: auto)]),
- [GLX_USE_TLS=$enableval],
+ [GLX_USE_TLS=$enableval
+ if test "x$GLX_USE_TLS" = "xyes" && test "${ac_cv_tls}" = "none" ; then
+ AC_MSG_ERROR([GLX with TLS support requested, but the compiler does not support it.])
+ fi],
[GLX_USE_TLS=no
if test "${ac_cv_tls}" != "none" ; then
GLX_USE_TLS=yes
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index 925cf0979..8af202164 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -1344,34 +1344,10 @@ InitPointerAccelerationScheme(DeviceIntPtr dev,
Bool
InitAbsoluteClassDeviceStruct(DeviceIntPtr dev)
{
- AbsoluteClassPtr abs;
-
- abs = malloc(sizeof(AbsoluteClassRec));
- if (!abs)
- return FALSE;
-
- /* we don't do anything sensible with these, but should */
- abs->min_x = NO_AXIS_LIMITS;
- abs->min_y = NO_AXIS_LIMITS;
- abs->max_x = NO_AXIS_LIMITS;
- abs->max_y = NO_AXIS_LIMITS;
- abs->flip_x = 0;
- abs->flip_y = 0;
- abs->rotation = 0;
- abs->button_threshold = 0;
-
- abs->offset_x = 0;
- abs->offset_y = 0;
- abs->width = NO_AXIS_LIMITS;
- abs->height = NO_AXIS_LIMITS;
- abs->following = 0;
- abs->screen = 0;
-
- abs->sourceid = dev->id;
-
- dev->absolute = abs;
-
- return TRUE;
+ /* This is an API-preserving noop. Instructions: Kill when no more drivers
+ * call it. The infrastructure behind hasn't really been used, so any calls
+ * are likely just a declaration that the device is absolute. */
+ return FALSE;
}
Bool
diff --git a/xorg-server/dix/window.c b/xorg-server/dix/window.c
index 821c815f7..31fc7b6e4 100644
--- a/xorg-server/dix/window.c
+++ b/xorg-server/dix/window.c
@@ -116,6 +116,7 @@ Equipment Corporation.
#include "dixstruct.h"
#include "gcstruct.h"
#include "servermd.h"
+#include "mivalidate.h"
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
@@ -3684,3 +3685,105 @@ WindowParentHasDeviceCursor(WindowPtr pWin,
}
return FALSE;
}
+
+/*
+ * SetRootClip --
+ * Enable or disable rendering to the screen by
+ * setting the root clip list and revalidating
+ * all of the windows
+ */
+void
+SetRootClip(ScreenPtr pScreen, Bool enable)
+{
+ WindowPtr pWin = pScreen->root;
+ WindowPtr pChild;
+ Bool WasViewable;
+ Bool anyMarked = FALSE;
+ WindowPtr pLayerWin;
+ BoxRec box;
+
+ if (!pWin)
+ return;
+ WasViewable = (Bool)(pWin->viewable);
+ if (WasViewable)
+ {
+ for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib)
+ {
+ (void) (*pScreen->MarkOverlappedWindows)(pChild,
+ pChild,
+ &pLayerWin);
+ }
+ (*pScreen->MarkWindow) (pWin);
+ anyMarked = TRUE;
+ if (pWin->valdata)
+ {
+ if (HasBorder (pWin))
+ {
+ RegionPtr borderVisible;
+
+ borderVisible = RegionCreate(NullBox, 1);
+ RegionSubtract(borderVisible,
+ &pWin->borderClip, &pWin->winSize);
+ pWin->valdata->before.borderVisible = borderVisible;
+ }
+ pWin->valdata->before.resized = TRUE;
+ }
+ }
+
+ /*
+ * Use REGION_BREAK to avoid optimizations in ValidateTree
+ * that assume the root borderClip can't change well, normally
+ * it doesn't...)
+ */
+ if (enable)
+ {
+ box.x1 = 0;
+ box.y1 = 0;
+ box.x2 = pScreen->width;
+ box.y2 = pScreen->height;
+ RegionInit(&pWin->winSize, &box, 1);
+ RegionInit(&pWin->borderSize, &box, 1);
+ if (WasViewable)
+ RegionReset(&pWin->borderClip, &box);
+ pWin->drawable.width = pScreen->width;
+ pWin->drawable.height = pScreen->height;
+ RegionBreak(&pWin->clipList);
+ }
+ else
+ {
+ RegionEmpty(&pWin->borderClip);
+ RegionBreak(&pWin->clipList);
+ }
+
+ ResizeChildrenWinSize (pWin, 0, 0, 0, 0);
+
+ if (WasViewable)
+ {
+ if (pWin->firstChild)
+ {
+ anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
+ pWin->firstChild,
+ (WindowPtr *)NULL);
+ }
+ else
+ {
+ (*pScreen->MarkWindow) (pWin);
+ anyMarked = TRUE;
+ }
+
+
+ if (anyMarked)
+ (*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
+ }
+
+ if (WasViewable)
+ {
+ if (anyMarked)
+ (*pScreen->HandleExposures)(pWin);
+ if (anyMarked && pScreen->PostValidateTree)
+ (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
+ }
+ if (pWin->realized)
+ WindowsRestructured ();
+ FlushAllOutput();
+}
diff --git a/xorg-server/glx/glapi.c b/xorg-server/glx/glapi.c
index 7c75d2d5a..d95374dd1 100644
--- a/xorg-server/glx/glapi.c
+++ b/xorg-server/glx/glapi.c
@@ -1,1093 +1,1093 @@
-/*
- * Mesa 3-D graphics library
- * Version: 7.1
- *
- * Copyright (C) 1999-2008 Brian Paul 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
- * BRIAN PAUL 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.
- */
-
-
-/*
- * This file manages the OpenGL API dispatch layer.
- * The dispatch table (struct _glapi_table) is basically just a list
- * of function pointers.
- * There are functions to set/get the current dispatch table for the
- * current thread and to manage registration/dispatch of dynamically
- * added extension functions.
- *
- * It's intended that this file and the other glapi*.[ch] files are
- * flexible enough to be reused in several places: XFree86, DRI-
- * based libGL.so, and perhaps the SGI SI.
- *
- * NOTE: There are no dependencies on Mesa in this code.
- *
- * Versions (API changes):
- * 2000/02/23 - original version for Mesa 3.3 and XFree86 4.0
- * 2001/01/16 - added dispatch override feature for Mesa 3.5
- * 2002/06/28 - added _glapi_set_warning_func(), Mesa 4.1.
- * 2002/10/01 - _glapi_get_proc_address() will now generate new entrypoints
- * itself (using offset ~0). _glapi_add_entrypoint() can be
- * called afterward and it'll fill in the correct dispatch
- * offset. This allows DRI libGL to avoid probing for DRI
- * drivers! No changes to the public glapi interface.
- */
-
-
-
-#ifdef HAVE_DIX_CONFIG_H
-
-#include <dix-config.h>
-#include <X11/Xfuncproto.h>
-#ifdef _MSC_VER
-#define PUBLIC _declspec(dllexport)
-#else
-#define PUBLIC _X_EXPORT
-#endif
-
-#else
-
-#include "glheader.h"
-
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#ifdef DEBUG
-#include <assert.h>
-#endif
-#include <unistd.h>
-
-#include "glapi.h"
-#include "GL/gl.h"
-#include "GL/glext.h"
-#include "glapitable.h"
-
-#define FIRST_DYNAMIC_OFFSET (sizeof(struct _glapi_table) / sizeof(void *))
-
-/***** BEGIN NO-OP DISPATCH *****/
-
-static GLboolean WarnFlag = GL_FALSE;
-static _glapi_proc warning_func;
-
-#if defined(PTHREADS) || defined(GLX_USE_TLS)
-static void init_glapi_relocs(void);
-#endif
-
-static _glapi_proc generate_entrypoint(GLuint functionOffset);
-static void fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset);
-static void init_glapi_relocs_once( void );
-
-void _GLAPI_EXPORT
-_glapi_noop_enable_warnings(unsigned char enable)
-{
-}
-
-void _GLAPI_EXPORT
-_glapi_set_warning_func(_glapi_proc func)
-{
-}
-
-#ifdef DEBUG
-
-/**
- * Called by each of the no-op GL entrypoints.
- */
-static int
-Warn(const char *func)
-{
-#if !defined(_WIN32_WCE)
- if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) {
- fprintf(stderr, "GL User Error: gl%s called without a rendering context\n",
- func);
- }
-#endif
- return 0;
-}
-
-
-/**
- * This is called if the user somehow calls an unassigned GL dispatch function.
- */
-static GLint
-NoOpUnused(void)
-{
- return Warn(" function");
-}
-
-/*
- * Defines for the glapitemp.h functions.
- */
-#define KEYWORD1 static
-#define KEYWORD1_ALT static
-#define KEYWORD2 GLAPIENTRY
-#define NAME(func) NoOp##func
-#define DISPATCH(func, args, msg) Warn(#func);
-#define RETURN_DISPATCH(func, args, msg) Warn(#func); return 0
-
-
-/*
- * Defines for the table of no-op entry points.
- */
-#define TABLE_ENTRY(name) (_glapi_proc) NoOp##name
-
-#else
-
-static int
-NoOpGeneric(void)
-{
-#if !defined(_WIN32_WCE)
- if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) {
- fprintf(stderr, "GL User Error: calling GL function without a rendering context\n");
- }
-#endif
- return 0;
-}
-
-#define TABLE_ENTRY(name) (_glapi_proc) NoOpGeneric
-
-#endif
-
-#define DISPATCH_TABLE_NAME __glapi_noop_table
-#define UNUSED_TABLE_NAME __unused_noop_functions
-
-#include "glapitemp.h"
-
-/***** END NO-OP DISPATCH *****/
-
-
-
-/**
- * \name Current dispatch and current context control variables
- *
- * Depending on whether or not multithreading is support, and the type of
- * support available, several variables are used to store the current context
- * pointer and the current dispatch table pointer. In the non-threaded case,
- * the variables \c _glapi_Dispatch and \c _glapi_Context are used for this
- * purpose.
- *
- * In the "normal" threaded case, the variables \c _glapi_Dispatch and
- * \c _glapi_Context will be \c NULL if an application is detected as being
- * multithreaded. Single-threaded applications will use \c _glapi_Dispatch
- * and \c _glapi_Context just like the case without any threading support.
- * When \c _glapi_Dispatch and \c _glapi_Context are \c NULL, the thread state
- * data \c _gl_DispatchTSD and \c ContextTSD are used. Drivers and the
- * static dispatch functions access these variables via \c _glapi_get_dispatch
- * and \c _glapi_get_context.
- *
- * There is a race condition in setting \c _glapi_Dispatch to \c NULL. It is
- * possible for the original thread to be setting it at the same instant a new
- * thread, perhaps running on a different processor, is clearing it. Because
- * of that, \c ThreadSafe, which can only ever be changed to \c GL_TRUE, is
- * used to determine whether or not the application is multithreaded.
- *
- * In the TLS case, the variables \c _glapi_Dispatch and \c _glapi_Context are
- * hardcoded to \c NULL. Instead the TLS variables \c _glapi_tls_Dispatch and
- * \c _glapi_tls_Context are used. Having \c _glapi_Dispatch and
- * \c _glapi_Context be hardcoded to \c NULL maintains binary compatability
- * between TLS enabled loaders and non-TLS DRI drivers.
- */
-/*@{*/
-#if defined(GLX_USE_TLS)
-
-PUBLIC __thread struct _glapi_table * _glapi_tls_Dispatch
- __attribute__((tls_model("initial-exec")))
- = (struct _glapi_table *) __glapi_noop_table;
-
-PUBLIC __thread void * _glapi_tls_Context
- __attribute__((tls_model("initial-exec")));
-
-PUBLIC const struct _glapi_table *_glapi_Dispatch = NULL;
-
-PUBLIC const void *_glapi_Context = NULL;
-
-#else
-
-#if defined(THREADS)
-
-_glthread_TSD _gl_DispatchTSD; /**< Per-thread dispatch pointer */
-
-static _glthread_TSD ContextTSD; /**< Per-thread context pointer */
-
-#endif /* defined(THREADS) */
-
-PUBLIC struct _glapi_table *_glapi_Dispatch = (struct _glapi_table *) __glapi_noop_table;
-
-PUBLIC void *_glapi_Context = NULL;
-
-#endif /* defined(GLX_USE_TLS) */
-/*@}*/
-
-
-
-#if defined(THREADS) && !defined(GLX_USE_TLS)
-
-void
-_glapi_init_multithread(void)
-{
- _glthread_InitTSD(&_gl_DispatchTSD);
- _glthread_InitTSD(&ContextTSD);
-}
-
-void
-_glapi_destroy_multithread(void)
-{
-#ifdef WIN32_THREADS
- _glthread_DestroyTSD(&_gl_DispatchTSD);
- _glthread_DestroyTSD(&ContextTSD);
-#endif
-}
-
-/**
- * Mutex for multithread check.
- */
-#ifdef WIN32_THREADS
-/* _glthread_DECLARE_STATIC_MUTEX is broken on windows. There will be race! */
-#define CHECK_MULTITHREAD_LOCK()
-#define CHECK_MULTITHREAD_UNLOCK()
-#else
-_glthread_DECLARE_STATIC_MUTEX(ThreadCheckMutex);
-#define CHECK_MULTITHREAD_LOCK() _glthread_LOCK_MUTEX(ThreadCheckMutex)
-#define CHECK_MULTITHREAD_UNLOCK() _glthread_UNLOCK_MUTEX(ThreadCheckMutex)
-#endif
-/**
- * xserver's gl is not multithreaded, we promise.
- */
-PUBLIC void
-_glapi_check_multithread(void)
-{
-}
-#else
-
-void
-_glapi_init_multithread(void) { }
-
-void
-_glapi_destroy_multithread(void) { }
-
-PUBLIC void
-_glapi_check_multithread(void) { }
-
-#endif
-
-
-
-/**
- * Set the current context pointer for this thread.
- * The context pointer is an opaque type which should be cast to
- * void from the real context pointer type.
- */
-void
-_glapi_set_context(void *context)
-{
-#if defined(GLX_USE_TLS)
- _glapi_tls_Context = context;
-#elif defined(THREADS)
- _glthread_SetTSD(&ContextTSD, context);
- _glapi_Context = context;
-#else
- _glapi_Context = context;
-#endif
-}
-
-
-
-/**
- * Get the current context pointer for this thread.
- * The context pointer is an opaque type which should be cast from
- * void to the real context pointer type.
- */
-void *
-_glapi_get_context(void)
-{
-#if defined(GLX_USE_TLS)
- return _glapi_tls_Context;
-#else
- return _glapi_Context;
-#endif
-}
-
-
-
-/**
- * Set the global or per-thread dispatch table pointer.
- * If the dispatch parameter is NULL we'll plug in the no-op dispatch
- * table (__glapi_noop_table).
- */
-void
-_glapi_set_dispatch(struct _glapi_table *dispatch)
-{
- init_glapi_relocs_once();
-
- if (dispatch == NULL) {
- /* use the no-op functions */
- dispatch = (struct _glapi_table *) __glapi_noop_table;
- }
-
-#if defined(GLX_USE_TLS)
- _glapi_tls_Dispatch = dispatch;
-#else
- _glapi_Dispatch = dispatch;
-#endif
-}
-
-
-
-/**
- * Return pointer to current dispatch table for calling thread.
- */
-struct _glapi_table *
-_glapi_get_dispatch(void)
-{
-#if defined(GLX_USE_TLS)
- return _glapi_tls_Dispatch;
-#else
- return _glapi_Dispatch;
-#endif
-}
-
-
-
-/***
- *** The rest of this file is pretty much concerned with GetProcAddress
- *** functionality.
- ***/
-
-#if defined(USE_X86_ASM)
-# if defined(GLX_USE_TLS)
-# define DISPATCH_FUNCTION_SIZE 16
-# elif defined(THREADS)
-# define DISPATCH_FUNCTION_SIZE 32
-# else
-# define DISPATCH_FUNCTION_SIZE 16
-# endif
-#endif
-
-#if defined(USE_X64_64_ASM)
-# if defined(GLX_USE_TLS)
-# define DISPATCH_FUNCTION_SIZE 16
-# endif
-#endif
-
-#if !defined(DISPATCH_FUNCTION_SIZE) && !defined(XFree86Server) && !defined(XGLServer)
-# define NEED_FUNCTION_POINTER
-#endif
-
-/* The code in this file is auto-generated with Python */
-#include "glprocs.h"
-
-
-/**
- * Search the table of static entrypoint functions for the named function
- * and return the corresponding glprocs_table_t entry.
- */
-static const glprocs_table_t *
-get_static_proc( const char * n )
-{
- GLuint i;
- for (i = 0; static_functions[i].Name_offset >= 0; i++) {
- const char *testName = gl_string_table + static_functions[i].Name_offset;
-#ifdef MANGLE
- /* skip the prefix on the name */
- if (strcmp(testName, n + 1) == 0)
-#else
- if (strcmp(testName, n) == 0)
-#endif
- {
- return &static_functions[i];
- }
- }
- return NULL;
-}
-
-
-/**
- * Return dispatch table offset of the named static (built-in) function.
- * Return -1 if function not found.
- */
-static GLint
-get_static_proc_offset(const char *funcName)
-{
- const glprocs_table_t * const f = get_static_proc( funcName );
- if (f == NULL) {
- return -1;
- }
-
- return f->Offset;
-}
-
-
-/**********************************************************************
- * Extension function management.
- */
-
-/**
- * Number of extension functions which we can dynamically add at runtime.
- *
- * Number of extension functions is also subject to the size of backing exec
- * mem we allocate. For the common case of dispatch stubs with size 16 bytes,
- * the two limits will be hit simultaneously. For larger dispatch function
- * sizes, MAX_EXTENSION_FUNCS is effectively reduced.
- */
-#define MAX_EXTENSION_FUNCS 256
-
-
-/**
- * Track information about a function added to the GL API.
- */
-struct _glapi_function {
- /**
- * Name of the function.
- */
- const char * name;
-
-
- /**
- * Text string that describes the types of the parameters passed to the
- * named function. Parameter types are converted to characters using the
- * following rules:
- * - 'i' for \c GLint, \c GLuint, and \c GLenum
- * - 'p' for any pointer type
- * - 'f' for \c GLfloat and \c GLclampf
- * - 'd' for \c GLdouble and \c GLclampd
- */
- const char * parameter_signature;
-
-
- /**
- * Offset in the dispatch table where the pointer to the real function is
- * located. If the driver has not requested that the named function be
- * added to the dispatch table, this will have the value ~0.
- */
- unsigned dispatch_offset;
-
-
- /**
- * Pointer to the dispatch stub for the named function.
- *
- * \todo
- * The semantic of this field should be changed slightly. Currently, it
- * is always expected to be non-\c NULL. However, it would be better to
- * only allocate the entry-point stub when the application requests the
- * function via \c glXGetProcAddress. This would save memory for all the
- * functions that the driver exports but that the application never wants
- * to call.
- */
- _glapi_proc dispatch_stub;
-};
-
-
-static struct _glapi_function ExtEntryTable[MAX_EXTENSION_FUNCS];
-static GLuint NumExtEntryPoints = 0;
-
-
-static struct _glapi_function *
-get_extension_proc(const char *funcName)
-{
- GLuint i;
- for (i = 0; i < NumExtEntryPoints; i++) {
- if (strcmp(ExtEntryTable[i].name, funcName) == 0) {
- return & ExtEntryTable[i];
- }
- }
- return NULL;
-}
-
-
-static GLint
-get_extension_proc_offset(const char *funcName)
-{
- const struct _glapi_function * const f = get_extension_proc( funcName );
- if (f == NULL) {
- return -1;
- }
-
- return f->dispatch_offset;
-}
-
-
-static _glapi_proc
-get_extension_proc_address(const char *funcName)
-{
- const struct _glapi_function * const f = get_extension_proc( funcName );
- if (f == NULL) {
- return NULL;
- }
-
- return f->dispatch_stub;
-}
-
-
-static const char *
-get_extension_proc_name(GLuint offset)
-{
- GLuint i;
- for (i = 0; i < NumExtEntryPoints; i++) {
- if (ExtEntryTable[i].dispatch_offset == offset) {
- return ExtEntryTable[i].name;
- }
- }
- return NULL;
-}
-
-
-/**
- * strdup() is actually not a standard ANSI C or POSIX routine.
- * Irix will not define it if ANSI mode is in effect.
- */
-static char *
-str_dup(const char *str)
-{
- char *copy;
- copy = (char*) malloc(strlen(str) + 1);
- if (!copy)
- return NULL;
- strcpy(copy, str);
- return copy;
-}
-
-
-/**
- * Generate new entrypoint
- *
- * Use a temporary dispatch offset of ~0 (i.e. -1). Later, when the driver
- * calls \c _glapi_add_dispatch we'll put in the proper offset. If that
- * never happens, and the user calls this function, he'll segfault. That's
- * what you get when you try calling a GL function that doesn't really exist.
- *
- * \param funcName Name of the function to create an entry-point for.
- *
- * \sa _glapi_add_entrypoint
- */
-
-static struct _glapi_function *
-add_function_name( const char * funcName )
-{
- struct _glapi_function * entry = NULL;
- _glapi_proc entrypoint = NULL;
- char * name_dup = NULL;
-
- if (NumExtEntryPoints >= MAX_EXTENSION_FUNCS)
- return NULL;
-
- if (funcName == NULL)
- return NULL;
-
- name_dup = str_dup(funcName);
- if (name_dup == NULL)
- return NULL;
-
- entrypoint = generate_entrypoint(~0);
-
- if (entrypoint == NULL) {
- free(name_dup);
- return NULL;
- }
-
- entry = & ExtEntryTable[NumExtEntryPoints];
- NumExtEntryPoints++;
-
- entry->name = name_dup;
- entry->parameter_signature = NULL;
- entry->dispatch_offset = ~0;
- entry->dispatch_stub = entrypoint;
-
- return entry;
-}
-
-
-static struct _glapi_function *
-set_entry_info( struct _glapi_function * entry, const char * signature, unsigned offset )
-{
- char * sig_dup = NULL;
-
- if (signature == NULL)
- return NULL;
-
- sig_dup = str_dup(signature);
- if (sig_dup == NULL)
- return NULL;
-
- fill_in_entrypoint_offset(entry->dispatch_stub, offset);
-
- entry->parameter_signature = sig_dup;
- entry->dispatch_offset = offset;
-
- return entry;
-}
-
-#if defined(USE_X86_ASM)
-
-/**
- * Perform platform-specific GL API entry-point fixups.
- */
-static void
-init_glapi_relocs( void )
-{
-#if defined(GLX_USE_TLS) && !defined(GLX_X86_READONLY_TEXT)
- extern unsigned long _x86_get_dispatch(void);
- char run_time_patch[] = {
- 0x65, 0xa1, 0, 0, 0, 0 /* movl %gs:0,%eax */
- };
- GLuint *offset = (GLuint *) &run_time_patch[2]; /* 32-bits for x86/32 */
- const GLubyte * const get_disp = (const GLubyte *) run_time_patch;
- GLubyte * curr_func = (GLubyte *) gl_dispatch_functions_start;
-
- *offset = _x86_get_dispatch();
- while ( curr_func != (GLubyte *) gl_dispatch_functions_end ) {
- (void) memcpy( curr_func, get_disp, sizeof(run_time_patch));
- curr_func += DISPATCH_FUNCTION_SIZE;
- }
-#endif
-}
-
-
-/**
- * Generate a dispatch function (entrypoint) which jumps through
- * the given slot number (offset) in the current dispatch table.
- * We need assembly language in order to accomplish this.
- */
-_glapi_proc
-generate_entrypoint(unsigned int functionOffset)
-{
- /* 32 is chosen as something of a magic offset. For x86, the dispatch
- * at offset 32 is the first one where the offset in the
- * "jmp OFFSET*4(%eax)" can't be encoded in a single byte.
- */
- const GLubyte * const template_func = gl_dispatch_functions_start
- + (DISPATCH_FUNCTION_SIZE * 32);
- GLubyte * const code = (GLubyte *) u_execmem_alloc(DISPATCH_FUNCTION_SIZE);
-
-
- if ( code != NULL ) {
- (void) memcpy(code, template_func, DISPATCH_FUNCTION_SIZE);
- fill_in_entrypoint_offset( (_glapi_proc) code, functionOffset );
- }
-
- return (_glapi_proc) code;
-}
-
-
-/**
- * This function inserts a new dispatch offset into the assembly language
- * stub that was generated with the preceeding function.
- */
-void
-fill_in_entrypoint_offset(_glapi_proc entrypoint, unsigned int offset)
-{
- GLubyte * const code = (GLubyte *) entrypoint;
-
-#if defined(GLX_USE_TLS)
- *((unsigned int *)(code + 8)) = 4 * offset;
-#elif defined(THREADS)
- *((unsigned int *)(code + 11)) = 4 * offset;
- *((unsigned int *)(code + 22)) = 4 * offset;
-#else
- *((unsigned int *)(code + 7)) = 4 * offset;
-#endif
-}
-
-
-#elif defined(USE_SPARC_ASM)
-
-extern void __glapi_sparc_icache_flush(unsigned int *);
-
-static void
-init_glapi_relocs( void )
-{
-#if defined(PTHREADS) || defined(GLX_USE_TLS)
- static const unsigned int template[] = {
-#ifdef GLX_USE_TLS
- 0x05000000, /* sethi %hi(_glapi_tls_Dispatch), %g2 */
- 0x8730e00a, /* srl %g3, 10, %g3 */
- 0x8410a000, /* or %g2, %lo(_glapi_tls_Dispatch), %g2 */
-#ifdef __arch64__
- 0xc259c002, /* ldx [%g7 + %g2], %g1 */
- 0xc2584003, /* ldx [%g1 + %g3], %g1 */
-#else
- 0xc201c002, /* ld [%g7 + %g2], %g1 */
- 0xc2004003, /* ld [%g1 + %g3], %g1 */
-#endif
- 0x81c04000, /* jmp %g1 */
- 0x01000000, /* nop */
-#else
-#ifdef __arch64__
- 0x03000000, /* 64-bit 0x00 --> sethi %hh(_glapi_Dispatch), %g1 */
- 0x05000000, /* 64-bit 0x04 --> sethi %lm(_glapi_Dispatch), %g2 */
- 0x82106000, /* 64-bit 0x08 --> or %g1, %hm(_glapi_Dispatch), %g1 */
- 0x8730e00a, /* 64-bit 0x0c --> srl %g3, 10, %g3 */
- 0x83287020, /* 64-bit 0x10 --> sllx %g1, 32, %g1 */
- 0x82004002, /* 64-bit 0x14 --> add %g1, %g2, %g1 */
- 0xc2586000, /* 64-bit 0x18 --> ldx [%g1 + %lo(_glapi_Dispatch)], %g1 */
-#else
- 0x03000000, /* 32-bit 0x00 --> sethi %hi(_glapi_Dispatch), %g1 */
- 0x8730e00a, /* 32-bit 0x04 --> srl %g3, 10, %g3 */
- 0xc2006000, /* 32-bit 0x08 --> ld [%g1 + %lo(_glapi_Dispatch)], %g1 */
-#endif
- 0x80a06000, /* --> cmp %g1, 0 */
- 0x02800005, /* --> be +4*5 */
- 0x01000000, /* --> nop */
-#ifdef __arch64__
- 0xc2584003, /* 64-bit --> ldx [%g1 + %g3], %g1 */
-#else
- 0xc2004003, /* 32-bit --> ld [%g1 + %g3], %g1 */
-#endif
- 0x81c04000, /* --> jmp %g1 */
- 0x01000000, /* --> nop */
-#ifdef __arch64__
- 0x9de3bf80, /* 64-bit --> save %sp, -128, %sp */
-#else
- 0x9de3bfc0, /* 32-bit --> save %sp, -64, %sp */
-#endif
- 0xa0100003, /* --> mov %g3, %l0 */
- 0x40000000, /* --> call _glapi_get_dispatch */
- 0x01000000, /* --> nop */
- 0x82100008, /* --> mov %o0, %g1 */
- 0x86100010, /* --> mov %l0, %g3 */
- 0x10bffff7, /* --> ba -4*9 */
- 0x81e80000, /* --> restore */
-#endif
- };
-#ifdef GLX_USE_TLS
- extern unsigned int __glapi_sparc_tls_stub;
- extern unsigned long __glapi_sparc_get_dispatch(void);
- unsigned int *code = &__glapi_sparc_tls_stub;
- unsigned long dispatch = __glapi_sparc_get_dispatch();
-#else
- extern unsigned int __glapi_sparc_pthread_stub;
- unsigned int *code = &__glapi_sparc_pthread_stub;
- unsigned long dispatch = (unsigned long) &_glapi_Dispatch;
- unsigned long call_dest = (unsigned long ) &_glapi_get_dispatch;
- int idx;
-#endif
-
-#ifdef GLX_USE_TLS
- code[0] = template[0] | (dispatch >> 10);
- code[1] = template[1];
- __glapi_sparc_icache_flush(&code[0]);
- code[2] = template[2] | (dispatch & 0x3ff);
- code[3] = template[3];
- __glapi_sparc_icache_flush(&code[2]);
- code[4] = template[4];
- code[5] = template[5];
- __glapi_sparc_icache_flush(&code[4]);
- code[6] = template[6];
- __glapi_sparc_icache_flush(&code[6]);
-#else
-#if defined(__arch64__)
- code[0] = template[0] | (dispatch >> (32 + 10));
- code[1] = template[1] | ((dispatch & 0xffffffff) >> 10);
- __glapi_sparc_icache_flush(&code[0]);
- code[2] = template[2] | ((dispatch >> 32) & 0x3ff);
- code[3] = template[3];
- __glapi_sparc_icache_flush(&code[2]);
- code[4] = template[4];
- code[5] = template[5];
- __glapi_sparc_icache_flush(&code[4]);
- code[6] = template[6] | (dispatch & 0x3ff);
- idx = 7;
-#else
- code[0] = template[0] | (dispatch >> 10);
- code[1] = template[1];
- __glapi_sparc_icache_flush(&code[0]);
- code[2] = template[2] | (dispatch & 0x3ff);
- idx = 3;
-#endif
- code[idx + 0] = template[idx + 0];
- __glapi_sparc_icache_flush(&code[idx - 1]);
- code[idx + 1] = template[idx + 1];
- code[idx + 2] = template[idx + 2];
- __glapi_sparc_icache_flush(&code[idx + 1]);
- code[idx + 3] = template[idx + 3];
- code[idx + 4] = template[idx + 4];
- __glapi_sparc_icache_flush(&code[idx + 3]);
- code[idx + 5] = template[idx + 5];
- code[idx + 6] = template[idx + 6];
- __glapi_sparc_icache_flush(&code[idx + 5]);
- code[idx + 7] = template[idx + 7];
- code[idx + 8] = template[idx + 8] |
- (((call_dest - ((unsigned long) &code[idx + 8]))
- >> 2) & 0x3fffffff);
- __glapi_sparc_icache_flush(&code[idx + 7]);
- code[idx + 9] = template[idx + 9];
- code[idx + 10] = template[idx + 10];
- __glapi_sparc_icache_flush(&code[idx + 9]);
- code[idx + 11] = template[idx + 11];
- code[idx + 12] = template[idx + 12];
- __glapi_sparc_icache_flush(&code[idx + 11]);
- code[idx + 13] = template[idx + 13];
- __glapi_sparc_icache_flush(&code[idx + 13]);
-#endif
-#endif
-}
-
-
-_glapi_proc
-generate_entrypoint(GLuint functionOffset)
-{
-#if defined(PTHREADS) || defined(GLX_USE_TLS)
- static const unsigned int template[] = {
- 0x07000000, /* sethi %hi(0), %g3 */
- 0x8210000f, /* mov %o7, %g1 */
- 0x40000000, /* call */
- 0x9e100001, /* mov %g1, %o7 */
- };
-#ifdef GLX_USE_TLS
- extern unsigned int __glapi_sparc_tls_stub;
- unsigned long call_dest = (unsigned long ) &__glapi_sparc_tls_stub;
-#else
- extern unsigned int __glapi_sparc_pthread_stub;
- unsigned long call_dest = (unsigned long ) &__glapi_sparc_pthread_stub;
-#endif
- unsigned int *code = (unsigned int *) u_execmem_alloc(sizeof(template));
- if (code) {
- code[0] = template[0] | (functionOffset & 0x3fffff);
- code[1] = template[1];
- __glapi_sparc_icache_flush(&code[0]);
- code[2] = template[2] |
- (((call_dest - ((unsigned long) &code[2]))
- >> 2) & 0x3fffffff);
- code[3] = template[3];
- __glapi_sparc_icache_flush(&code[2]);
- }
- return (_glapi_proc) code;
-#endif
-}
-
-
-void
-fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset)
-{
- unsigned int *code = (unsigned int *) entrypoint;
-
- code[0] &= ~0x3fffff;
- code[0] |= (offset * sizeof(void *)) & 0x3fffff;
- __glapi_sparc_icache_flush(&code[0]);
-}
-
-
-#else /* USE_*_ASM */
-
-static void
-init_glapi_relocs( void )
-{
-}
-
-
-_glapi_proc
-generate_entrypoint(GLuint functionOffset)
-{
- (void) functionOffset;
- return NULL;
-}
-
-
-void
-fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset)
-{
- /* an unimplemented architecture */
- (void) entrypoint;
- (void) offset;
-}
-
-#endif /* USE_*_ASM */
-
-
-void
-init_glapi_relocs_once( void )
-{
-#if defined(PTHREADS) || defined(GLX_USE_TLS)
- static pthread_once_t once_control = PTHREAD_ONCE_INIT;
- pthread_once( & once_control, init_glapi_relocs );
-#endif
-}
-
-/**
- * Fill-in the dispatch stub for the named function.
- *
- * This function is intended to be called by a hardware driver. When called,
- * a dispatch stub may be created created for the function. A pointer to this
- * dispatch function will be returned by glXGetProcAddress.
- *
- * \param function_names Array of pointers to function names that should
- * share a common dispatch offset.
- * \param parameter_signature String representing the types of the parameters
- * passed to the named function. Parameter types
- * are converted to characters using the following
- * rules:
- * - 'i' for \c GLint, \c GLuint, and \c GLenum
- * - 'p' for any pointer type
- * - 'f' for \c GLfloat and \c GLclampf
- * - 'd' for \c GLdouble and \c GLclampd
- *
- * \returns
- * The offset in the dispatch table of the named function. A pointer to the
- * driver's implementation of the named function should be stored at
- * \c dispatch_table[\c offset]. Return -1 if error/problem.
- *
- * \sa glXGetProcAddress
- *
- * \warning
- * This function can only handle up to 8 names at a time. As far as I know,
- * the maximum number of names ever associated with an existing GL function is
- * 4 (\c glPointParameterfSGIS, \c glPointParameterfEXT,
- * \c glPointParameterfARB, and \c glPointParameterf), so this should not be
- * too painful of a limitation.
- *
- * \todo
- * Determine whether or not \c parameter_signature should be allowed to be
- * \c NULL. It doesn't seem like much of a hardship for drivers to have to
- * pass in an empty string.
- *
- * \todo
- * Determine if code should be added to reject function names that start with
- * 'glX'.
- *
- * \bug
- * Add code to compare \c parameter_signature with the parameter signature of
- * a static function. In order to do that, we need to find a way to \b get
- * the parameter signature of a static function.
- */
-
-PUBLIC
-int
-_glapi_add_dispatch( const char * const * function_names,
- const char * parameter_signature )
-{
- static int next_dynamic_offset = FIRST_DYNAMIC_OFFSET;
- const char * const real_sig = (parameter_signature != NULL)
- ? parameter_signature : "";
- struct _glapi_function * entry[8];
- GLboolean is_static[8];
- unsigned i;
- int offset = ~0;
-
- init_glapi_relocs_once();
-
- (void) memset( is_static, 0, sizeof( is_static ) );
- (void) memset( entry, 0, sizeof( entry ) );
-
- /* Find the _single_ dispatch offset for all function names that already
- * exist (and have a dispatch offset).
- */
-
- for ( i = 0 ; function_names[i] != NULL ; i++ ) {
- const char * funcName = function_names[i];
- int static_offset;
- int extension_offset;
-
- if (funcName[0] != 'g' || funcName[1] != 'l')
- return -1;
-
- /* search built-in functions */
- static_offset = get_static_proc_offset(funcName);
-
- if (static_offset >= 0) {
-
- is_static[i] = GL_TRUE;
-
- /* FIXME: Make sure the parameter signatures match! How do we get
- * FIXME: the parameter signature for static functions?
- */
-
- if ( (offset != ~0) && (static_offset != offset) ) {
- return -1;
- }
-
- offset = static_offset;
-
- continue;
- }
-
- /* search added extension functions */
- entry[i] = get_extension_proc(funcName);
-
- if (entry[i] != NULL) {
- extension_offset = entry[i]->dispatch_offset;
-
- /* The offset may be ~0 if the function name was added by
- * glXGetProcAddress but never filled in by the driver.
- */
-
- if (extension_offset == ~0) {
- continue;
- }
-
- if (strcmp(real_sig, entry[i]->parameter_signature) != 0) {
- return -1;
- }
-
- if ( (offset != ~0) && (extension_offset != offset) ) {
- return -1;
- }
-
- offset = extension_offset;
- }
- }
-
- /* If all function names are either new (or with no dispatch offset),
- * allocate a new dispatch offset.
- */
-
- if (offset == ~0) {
- offset = next_dynamic_offset;
- next_dynamic_offset++;
- }
-
- /* Fill in the dispatch offset for the new function names (and those with
- * no dispatch offset).
- */
-
- for ( i = 0 ; function_names[i] != NULL ; i++ ) {
- if (is_static[i]) {
- continue;
- }
-
- /* generate entrypoints for new function names */
- if (entry[i] == NULL) {
- entry[i] = add_function_name( function_names[i] );
- if (entry[i] == NULL) {
- /* FIXME: Possible memory leak here. */
- return -1;
- }
- }
-
- if (entry[i]->dispatch_offset == ~0) {
- set_entry_info( entry[i], real_sig, offset );
- }
- }
-
- return offset;
-}
-
-/**
- * Return size of dispatch table struct as number of functions (or
- * slots).
- */
-GLuint
-_glapi_get_dispatch_table_size(void)
-{
- /*
- * The dispatch table size (number of entries) is the size of the
- * _glapi_table struct plus the number of dynamic entries we can add.
- * The extra slots can be filled in by DRI drivers that register new
- * extension functions.
- */
- return FIRST_DYNAMIC_OFFSET + MAX_EXTENSION_FUNCS;
-}
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.1
+ *
+ * Copyright (C) 1999-2008 Brian Paul 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
+ * BRIAN PAUL 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.
+ */
+
+
+/*
+ * This file manages the OpenGL API dispatch layer.
+ * The dispatch table (struct _glapi_table) is basically just a list
+ * of function pointers.
+ * There are functions to set/get the current dispatch table for the
+ * current thread and to manage registration/dispatch of dynamically
+ * added extension functions.
+ *
+ * It's intended that this file and the other glapi*.[ch] files are
+ * flexible enough to be reused in several places: XFree86, DRI-
+ * based libGL.so, and perhaps the SGI SI.
+ *
+ * NOTE: There are no dependencies on Mesa in this code.
+ *
+ * Versions (API changes):
+ * 2000/02/23 - original version for Mesa 3.3 and XFree86 4.0
+ * 2001/01/16 - added dispatch override feature for Mesa 3.5
+ * 2002/06/28 - added _glapi_set_warning_func(), Mesa 4.1.
+ * 2002/10/01 - _glapi_get_proc_address() will now generate new entrypoints
+ * itself (using offset ~0). _glapi_add_entrypoint() can be
+ * called afterward and it'll fill in the correct dispatch
+ * offset. This allows DRI libGL to avoid probing for DRI
+ * drivers! No changes to the public glapi interface.
+ */
+
+
+
+#ifdef HAVE_DIX_CONFIG_H
+
+#include <dix-config.h>
+#include <X11/Xfuncproto.h>
+#ifdef _MSC_VER
+#define PUBLIC _declspec(dllexport)
+#else
+#define PUBLIC _X_EXPORT
+#endif
+
+#else
+
+#include "glheader.h"
+
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#ifdef DEBUG
+#include <assert.h>
+#endif
+#include <unistd.h>
+
+#include "glapi.h"
+#include "GL/gl.h"
+#include "GL/glext.h"
+#include "glapitable.h"
+
+#define FIRST_DYNAMIC_OFFSET (sizeof(struct _glapi_table) / sizeof(void *))
+
+/***** BEGIN NO-OP DISPATCH *****/
+
+static GLboolean WarnFlag = GL_FALSE;
+static _glapi_proc warning_func;
+
+#if defined(PTHREADS) || defined(GLX_USE_TLS)
+static void init_glapi_relocs(void);
+#endif
+
+static _glapi_proc generate_entrypoint(GLuint functionOffset);
+static void fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset);
+static void init_glapi_relocs_once( void );
+
+void _GLAPI_EXPORT
+_glapi_noop_enable_warnings(unsigned char enable)
+{
+}
+
+void _GLAPI_EXPORT
+_glapi_set_warning_func(_glapi_proc func)
+{
+}
+
+#ifdef DEBUG
+
+/**
+ * Called by each of the no-op GL entrypoints.
+ */
+static int
+Warn(const char *func)
+{
+#if !defined(_WIN32_WCE)
+ if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) {
+ fprintf(stderr, "GL User Error: gl%s called without a rendering context\n",
+ func);
+ }
+#endif
+ return 0;
+}
+
+
+/**
+ * This is called if the user somehow calls an unassigned GL dispatch function.
+ */
+static GLint
+NoOpUnused(void)
+{
+ return Warn(" function");
+}
+
+/*
+ * Defines for the glapitemp.h functions.
+ */
+#define KEYWORD1 static
+#define KEYWORD1_ALT static
+#define KEYWORD2 GLAPIENTRY
+#define NAME(func) NoOp##func
+#define DISPATCH(func, args, msg) Warn(#func);
+#define RETURN_DISPATCH(func, args, msg) Warn(#func); return 0
+
+
+/*
+ * Defines for the table of no-op entry points.
+ */
+#define TABLE_ENTRY(name) (_glapi_proc) NoOp##name
+
+#else
+
+static int
+NoOpGeneric(void)
+{
+#if !defined(_WIN32_WCE)
+ if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) {
+ fprintf(stderr, "GL User Error: calling GL function without a rendering context\n");
+ }
+#endif
+ return 0;
+}
+
+#define TABLE_ENTRY(name) (_glapi_proc) NoOpGeneric
+
+#endif
+
+#define DISPATCH_TABLE_NAME __glapi_noop_table
+#define UNUSED_TABLE_NAME __unused_noop_functions
+
+#include "glapitemp.h"
+
+/***** END NO-OP DISPATCH *****/
+
+
+
+/**
+ * \name Current dispatch and current context control variables
+ *
+ * Depending on whether or not multithreading is support, and the type of
+ * support available, several variables are used to store the current context
+ * pointer and the current dispatch table pointer. In the non-threaded case,
+ * the variables \c _glapi_Dispatch and \c _glapi_Context are used for this
+ * purpose.
+ *
+ * In the "normal" threaded case, the variables \c _glapi_Dispatch and
+ * \c _glapi_Context will be \c NULL if an application is detected as being
+ * multithreaded. Single-threaded applications will use \c _glapi_Dispatch
+ * and \c _glapi_Context just like the case without any threading support.
+ * When \c _glapi_Dispatch and \c _glapi_Context are \c NULL, the thread state
+ * data \c _gl_DispatchTSD and \c ContextTSD are used. Drivers and the
+ * static dispatch functions access these variables via \c _glapi_get_dispatch
+ * and \c _glapi_get_context.
+ *
+ * There is a race condition in setting \c _glapi_Dispatch to \c NULL. It is
+ * possible for the original thread to be setting it at the same instant a new
+ * thread, perhaps running on a different processor, is clearing it. Because
+ * of that, \c ThreadSafe, which can only ever be changed to \c GL_TRUE, is
+ * used to determine whether or not the application is multithreaded.
+ *
+ * In the TLS case, the variables \c _glapi_Dispatch and \c _glapi_Context are
+ * hardcoded to \c NULL. Instead the TLS variables \c _glapi_tls_Dispatch and
+ * \c _glapi_tls_Context are used. Having \c _glapi_Dispatch and
+ * \c _glapi_Context be hardcoded to \c NULL maintains binary compatability
+ * between TLS enabled loaders and non-TLS DRI drivers.
+ */
+/*@{*/
+#if defined(GLX_USE_TLS)
+
+PUBLIC TLS struct _glapi_table * _glapi_tls_Dispatch
+ __attribute__((tls_model("initial-exec")))
+ = (struct _glapi_table *) __glapi_noop_table;
+
+PUBLIC TLS void * _glapi_tls_Context
+ __attribute__((tls_model("initial-exec")));
+
+PUBLIC const struct _glapi_table *_glapi_Dispatch = NULL;
+
+PUBLIC const void *_glapi_Context = NULL;
+
+#else
+
+#if defined(THREADS)
+
+_glthread_TSD _gl_DispatchTSD; /**< Per-thread dispatch pointer */
+
+static _glthread_TSD ContextTSD; /**< Per-thread context pointer */
+
+#endif /* defined(THREADS) */
+
+PUBLIC struct _glapi_table *_glapi_Dispatch = (struct _glapi_table *) __glapi_noop_table;
+
+PUBLIC void *_glapi_Context = NULL;
+
+#endif /* defined(GLX_USE_TLS) */
+/*@}*/
+
+
+
+#if defined(THREADS) && !defined(GLX_USE_TLS)
+
+void
+_glapi_init_multithread(void)
+{
+ _glthread_InitTSD(&_gl_DispatchTSD);
+ _glthread_InitTSD(&ContextTSD);
+}
+
+void
+_glapi_destroy_multithread(void)
+{
+#ifdef WIN32_THREADS
+ _glthread_DestroyTSD(&_gl_DispatchTSD);
+ _glthread_DestroyTSD(&ContextTSD);
+#endif
+}
+
+/**
+ * Mutex for multithread check.
+ */
+#ifdef WIN32_THREADS
+/* _glthread_DECLARE_STATIC_MUTEX is broken on windows. There will be race! */
+#define CHECK_MULTITHREAD_LOCK()
+#define CHECK_MULTITHREAD_UNLOCK()
+#else
+_glthread_DECLARE_STATIC_MUTEX(ThreadCheckMutex);
+#define CHECK_MULTITHREAD_LOCK() _glthread_LOCK_MUTEX(ThreadCheckMutex)
+#define CHECK_MULTITHREAD_UNLOCK() _glthread_UNLOCK_MUTEX(ThreadCheckMutex)
+#endif
+/**
+ * xserver's gl is not multithreaded, we promise.
+ */
+PUBLIC void
+_glapi_check_multithread(void)
+{
+}
+#else
+
+void
+_glapi_init_multithread(void) { }
+
+void
+_glapi_destroy_multithread(void) { }
+
+PUBLIC void
+_glapi_check_multithread(void) { }
+
+#endif
+
+
+
+/**
+ * Set the current context pointer for this thread.
+ * The context pointer is an opaque type which should be cast to
+ * void from the real context pointer type.
+ */
+void
+_glapi_set_context(void *context)
+{
+#if defined(GLX_USE_TLS)
+ _glapi_tls_Context = context;
+#elif defined(THREADS)
+ _glthread_SetTSD(&ContextTSD, context);
+ _glapi_Context = context;
+#else
+ _glapi_Context = context;
+#endif
+}
+
+
+
+/**
+ * Get the current context pointer for this thread.
+ * The context pointer is an opaque type which should be cast from
+ * void to the real context pointer type.
+ */
+void *
+_glapi_get_context(void)
+{
+#if defined(GLX_USE_TLS)
+ return _glapi_tls_Context;
+#else
+ return _glapi_Context;
+#endif
+}
+
+
+
+/**
+ * Set the global or per-thread dispatch table pointer.
+ * If the dispatch parameter is NULL we'll plug in the no-op dispatch
+ * table (__glapi_noop_table).
+ */
+void
+_glapi_set_dispatch(struct _glapi_table *dispatch)
+{
+ init_glapi_relocs_once();
+
+ if (dispatch == NULL) {
+ /* use the no-op functions */
+ dispatch = (struct _glapi_table *) __glapi_noop_table;
+ }
+
+#if defined(GLX_USE_TLS)
+ _glapi_tls_Dispatch = dispatch;
+#else
+ _glapi_Dispatch = dispatch;
+#endif
+}
+
+
+
+/**
+ * Return pointer to current dispatch table for calling thread.
+ */
+struct _glapi_table *
+_glapi_get_dispatch(void)
+{
+#if defined(GLX_USE_TLS)
+ return _glapi_tls_Dispatch;
+#else
+ return _glapi_Dispatch;
+#endif
+}
+
+
+
+/***
+ *** The rest of this file is pretty much concerned with GetProcAddress
+ *** functionality.
+ ***/
+
+#if defined(USE_X86_ASM)
+# if defined(GLX_USE_TLS)
+# define DISPATCH_FUNCTION_SIZE 16
+# elif defined(THREADS)
+# define DISPATCH_FUNCTION_SIZE 32
+# else
+# define DISPATCH_FUNCTION_SIZE 16
+# endif
+#endif
+
+#if defined(USE_X64_64_ASM)
+# if defined(GLX_USE_TLS)
+# define DISPATCH_FUNCTION_SIZE 16
+# endif
+#endif
+
+#if !defined(DISPATCH_FUNCTION_SIZE) && !defined(XFree86Server) && !defined(XGLServer)
+# define NEED_FUNCTION_POINTER
+#endif
+
+/* The code in this file is auto-generated with Python */
+#include "glprocs.h"
+
+
+/**
+ * Search the table of static entrypoint functions for the named function
+ * and return the corresponding glprocs_table_t entry.
+ */
+static const glprocs_table_t *
+get_static_proc( const char * n )
+{
+ GLuint i;
+ for (i = 0; static_functions[i].Name_offset >= 0; i++) {
+ const char *testName = gl_string_table + static_functions[i].Name_offset;
+#ifdef MANGLE
+ /* skip the prefix on the name */
+ if (strcmp(testName, n + 1) == 0)
+#else
+ if (strcmp(testName, n) == 0)
+#endif
+ {
+ return &static_functions[i];
+ }
+ }
+ return NULL;
+}
+
+
+/**
+ * Return dispatch table offset of the named static (built-in) function.
+ * Return -1 if function not found.
+ */
+static GLint
+get_static_proc_offset(const char *funcName)
+{
+ const glprocs_table_t * const f = get_static_proc( funcName );
+ if (f == NULL) {
+ return -1;
+ }
+
+ return f->Offset;
+}
+
+
+/**********************************************************************
+ * Extension function management.
+ */
+
+/**
+ * Number of extension functions which we can dynamically add at runtime.
+ *
+ * Number of extension functions is also subject to the size of backing exec
+ * mem we allocate. For the common case of dispatch stubs with size 16 bytes,
+ * the two limits will be hit simultaneously. For larger dispatch function
+ * sizes, MAX_EXTENSION_FUNCS is effectively reduced.
+ */
+#define MAX_EXTENSION_FUNCS 256
+
+
+/**
+ * Track information about a function added to the GL API.
+ */
+struct _glapi_function {
+ /**
+ * Name of the function.
+ */
+ const char * name;
+
+
+ /**
+ * Text string that describes the types of the parameters passed to the
+ * named function. Parameter types are converted to characters using the
+ * following rules:
+ * - 'i' for \c GLint, \c GLuint, and \c GLenum
+ * - 'p' for any pointer type
+ * - 'f' for \c GLfloat and \c GLclampf
+ * - 'd' for \c GLdouble and \c GLclampd
+ */
+ const char * parameter_signature;
+
+
+ /**
+ * Offset in the dispatch table where the pointer to the real function is
+ * located. If the driver has not requested that the named function be
+ * added to the dispatch table, this will have the value ~0.
+ */
+ unsigned dispatch_offset;
+
+
+ /**
+ * Pointer to the dispatch stub for the named function.
+ *
+ * \todo
+ * The semantic of this field should be changed slightly. Currently, it
+ * is always expected to be non-\c NULL. However, it would be better to
+ * only allocate the entry-point stub when the application requests the
+ * function via \c glXGetProcAddress. This would save memory for all the
+ * functions that the driver exports but that the application never wants
+ * to call.
+ */
+ _glapi_proc dispatch_stub;
+};
+
+
+static struct _glapi_function ExtEntryTable[MAX_EXTENSION_FUNCS];
+static GLuint NumExtEntryPoints = 0;
+
+
+static struct _glapi_function *
+get_extension_proc(const char *funcName)
+{
+ GLuint i;
+ for (i = 0; i < NumExtEntryPoints; i++) {
+ if (strcmp(ExtEntryTable[i].name, funcName) == 0) {
+ return & ExtEntryTable[i];
+ }
+ }
+ return NULL;
+}
+
+
+static GLint
+get_extension_proc_offset(const char *funcName)
+{
+ const struct _glapi_function * const f = get_extension_proc( funcName );
+ if (f == NULL) {
+ return -1;
+ }
+
+ return f->dispatch_offset;
+}
+
+
+static _glapi_proc
+get_extension_proc_address(const char *funcName)
+{
+ const struct _glapi_function * const f = get_extension_proc( funcName );
+ if (f == NULL) {
+ return NULL;
+ }
+
+ return f->dispatch_stub;
+}
+
+
+static const char *
+get_extension_proc_name(GLuint offset)
+{
+ GLuint i;
+ for (i = 0; i < NumExtEntryPoints; i++) {
+ if (ExtEntryTable[i].dispatch_offset == offset) {
+ return ExtEntryTable[i].name;
+ }
+ }
+ return NULL;
+}
+
+
+/**
+ * strdup() is actually not a standard ANSI C or POSIX routine.
+ * Irix will not define it if ANSI mode is in effect.
+ */
+static char *
+str_dup(const char *str)
+{
+ char *copy;
+ copy = (char*) malloc(strlen(str) + 1);
+ if (!copy)
+ return NULL;
+ strcpy(copy, str);
+ return copy;
+}
+
+
+/**
+ * Generate new entrypoint
+ *
+ * Use a temporary dispatch offset of ~0 (i.e. -1). Later, when the driver
+ * calls \c _glapi_add_dispatch we'll put in the proper offset. If that
+ * never happens, and the user calls this function, he'll segfault. That's
+ * what you get when you try calling a GL function that doesn't really exist.
+ *
+ * \param funcName Name of the function to create an entry-point for.
+ *
+ * \sa _glapi_add_entrypoint
+ */
+
+static struct _glapi_function *
+add_function_name( const char * funcName )
+{
+ struct _glapi_function * entry = NULL;
+ _glapi_proc entrypoint = NULL;
+ char * name_dup = NULL;
+
+ if (NumExtEntryPoints >= MAX_EXTENSION_FUNCS)
+ return NULL;
+
+ if (funcName == NULL)
+ return NULL;
+
+ name_dup = str_dup(funcName);
+ if (name_dup == NULL)
+ return NULL;
+
+ entrypoint = generate_entrypoint(~0);
+
+ if (entrypoint == NULL) {
+ free(name_dup);
+ return NULL;
+ }
+
+ entry = & ExtEntryTable[NumExtEntryPoints];
+ NumExtEntryPoints++;
+
+ entry->name = name_dup;
+ entry->parameter_signature = NULL;
+ entry->dispatch_offset = ~0;
+ entry->dispatch_stub = entrypoint;
+
+ return entry;
+}
+
+
+static struct _glapi_function *
+set_entry_info( struct _glapi_function * entry, const char * signature, unsigned offset )
+{
+ char * sig_dup = NULL;
+
+ if (signature == NULL)
+ return NULL;
+
+ sig_dup = str_dup(signature);
+ if (sig_dup == NULL)
+ return NULL;
+
+ fill_in_entrypoint_offset(entry->dispatch_stub, offset);
+
+ entry->parameter_signature = sig_dup;
+ entry->dispatch_offset = offset;
+
+ return entry;
+}
+
+#if defined(USE_X86_ASM)
+
+/**
+ * Perform platform-specific GL API entry-point fixups.
+ */
+static void
+init_glapi_relocs( void )
+{
+#if defined(GLX_USE_TLS) && !defined(GLX_X86_READONLY_TEXT)
+ extern unsigned long _x86_get_dispatch(void);
+ char run_time_patch[] = {
+ 0x65, 0xa1, 0, 0, 0, 0 /* movl %gs:0,%eax */
+ };
+ GLuint *offset = (GLuint *) &run_time_patch[2]; /* 32-bits for x86/32 */
+ const GLubyte * const get_disp = (const GLubyte *) run_time_patch;
+ GLubyte * curr_func = (GLubyte *) gl_dispatch_functions_start;
+
+ *offset = _x86_get_dispatch();
+ while ( curr_func != (GLubyte *) gl_dispatch_functions_end ) {
+ (void) memcpy( curr_func, get_disp, sizeof(run_time_patch));
+ curr_func += DISPATCH_FUNCTION_SIZE;
+ }
+#endif
+}
+
+
+/**
+ * Generate a dispatch function (entrypoint) which jumps through
+ * the given slot number (offset) in the current dispatch table.
+ * We need assembly language in order to accomplish this.
+ */
+_glapi_proc
+generate_entrypoint(unsigned int functionOffset)
+{
+ /* 32 is chosen as something of a magic offset. For x86, the dispatch
+ * at offset 32 is the first one where the offset in the
+ * "jmp OFFSET*4(%eax)" can't be encoded in a single byte.
+ */
+ const GLubyte * const template_func = gl_dispatch_functions_start
+ + (DISPATCH_FUNCTION_SIZE * 32);
+ GLubyte * const code = (GLubyte *) u_execmem_alloc(DISPATCH_FUNCTION_SIZE);
+
+
+ if ( code != NULL ) {
+ (void) memcpy(code, template_func, DISPATCH_FUNCTION_SIZE);
+ fill_in_entrypoint_offset( (_glapi_proc) code, functionOffset );
+ }
+
+ return (_glapi_proc) code;
+}
+
+
+/**
+ * This function inserts a new dispatch offset into the assembly language
+ * stub that was generated with the preceeding function.
+ */
+void
+fill_in_entrypoint_offset(_glapi_proc entrypoint, unsigned int offset)
+{
+ GLubyte * const code = (GLubyte *) entrypoint;
+
+#if defined(GLX_USE_TLS)
+ *((unsigned int *)(code + 8)) = 4 * offset;
+#elif defined(THREADS)
+ *((unsigned int *)(code + 11)) = 4 * offset;
+ *((unsigned int *)(code + 22)) = 4 * offset;
+#else
+ *((unsigned int *)(code + 7)) = 4 * offset;
+#endif
+}
+
+
+#elif defined(USE_SPARC_ASM)
+
+extern void __glapi_sparc_icache_flush(unsigned int *);
+
+static void
+init_glapi_relocs( void )
+{
+#if defined(PTHREADS) || defined(GLX_USE_TLS)
+ static const unsigned int template[] = {
+#ifdef GLX_USE_TLS
+ 0x05000000, /* sethi %hi(_glapi_tls_Dispatch), %g2 */
+ 0x8730e00a, /* srl %g3, 10, %g3 */
+ 0x8410a000, /* or %g2, %lo(_glapi_tls_Dispatch), %g2 */
+#ifdef __arch64__
+ 0xc259c002, /* ldx [%g7 + %g2], %g1 */
+ 0xc2584003, /* ldx [%g1 + %g3], %g1 */
+#else
+ 0xc201c002, /* ld [%g7 + %g2], %g1 */
+ 0xc2004003, /* ld [%g1 + %g3], %g1 */
+#endif
+ 0x81c04000, /* jmp %g1 */
+ 0x01000000, /* nop */
+#else
+#ifdef __arch64__
+ 0x03000000, /* 64-bit 0x00 --> sethi %hh(_glapi_Dispatch), %g1 */
+ 0x05000000, /* 64-bit 0x04 --> sethi %lm(_glapi_Dispatch), %g2 */
+ 0x82106000, /* 64-bit 0x08 --> or %g1, %hm(_glapi_Dispatch), %g1 */
+ 0x8730e00a, /* 64-bit 0x0c --> srl %g3, 10, %g3 */
+ 0x83287020, /* 64-bit 0x10 --> sllx %g1, 32, %g1 */
+ 0x82004002, /* 64-bit 0x14 --> add %g1, %g2, %g1 */
+ 0xc2586000, /* 64-bit 0x18 --> ldx [%g1 + %lo(_glapi_Dispatch)], %g1 */
+#else
+ 0x03000000, /* 32-bit 0x00 --> sethi %hi(_glapi_Dispatch), %g1 */
+ 0x8730e00a, /* 32-bit 0x04 --> srl %g3, 10, %g3 */
+ 0xc2006000, /* 32-bit 0x08 --> ld [%g1 + %lo(_glapi_Dispatch)], %g1 */
+#endif
+ 0x80a06000, /* --> cmp %g1, 0 */
+ 0x02800005, /* --> be +4*5 */
+ 0x01000000, /* --> nop */
+#ifdef __arch64__
+ 0xc2584003, /* 64-bit --> ldx [%g1 + %g3], %g1 */
+#else
+ 0xc2004003, /* 32-bit --> ld [%g1 + %g3], %g1 */
+#endif
+ 0x81c04000, /* --> jmp %g1 */
+ 0x01000000, /* --> nop */
+#ifdef __arch64__
+ 0x9de3bf80, /* 64-bit --> save %sp, -128, %sp */
+#else
+ 0x9de3bfc0, /* 32-bit --> save %sp, -64, %sp */
+#endif
+ 0xa0100003, /* --> mov %g3, %l0 */
+ 0x40000000, /* --> call _glapi_get_dispatch */
+ 0x01000000, /* --> nop */
+ 0x82100008, /* --> mov %o0, %g1 */
+ 0x86100010, /* --> mov %l0, %g3 */
+ 0x10bffff7, /* --> ba -4*9 */
+ 0x81e80000, /* --> restore */
+#endif
+ };
+#ifdef GLX_USE_TLS
+ extern unsigned int __glapi_sparc_tls_stub;
+ extern unsigned long __glapi_sparc_get_dispatch(void);
+ unsigned int *code = &__glapi_sparc_tls_stub;
+ unsigned long dispatch = __glapi_sparc_get_dispatch();
+#else
+ extern unsigned int __glapi_sparc_pthread_stub;
+ unsigned int *code = &__glapi_sparc_pthread_stub;
+ unsigned long dispatch = (unsigned long) &_glapi_Dispatch;
+ unsigned long call_dest = (unsigned long ) &_glapi_get_dispatch;
+ int idx;
+#endif
+
+#ifdef GLX_USE_TLS
+ code[0] = template[0] | (dispatch >> 10);
+ code[1] = template[1];
+ __glapi_sparc_icache_flush(&code[0]);
+ code[2] = template[2] | (dispatch & 0x3ff);
+ code[3] = template[3];
+ __glapi_sparc_icache_flush(&code[2]);
+ code[4] = template[4];
+ code[5] = template[5];
+ __glapi_sparc_icache_flush(&code[4]);
+ code[6] = template[6];
+ __glapi_sparc_icache_flush(&code[6]);
+#else
+#if defined(__arch64__)
+ code[0] = template[0] | (dispatch >> (32 + 10));
+ code[1] = template[1] | ((dispatch & 0xffffffff) >> 10);
+ __glapi_sparc_icache_flush(&code[0]);
+ code[2] = template[2] | ((dispatch >> 32) & 0x3ff);
+ code[3] = template[3];
+ __glapi_sparc_icache_flush(&code[2]);
+ code[4] = template[4];
+ code[5] = template[5];
+ __glapi_sparc_icache_flush(&code[4]);
+ code[6] = template[6] | (dispatch & 0x3ff);
+ idx = 7;
+#else
+ code[0] = template[0] | (dispatch >> 10);
+ code[1] = template[1];
+ __glapi_sparc_icache_flush(&code[0]);
+ code[2] = template[2] | (dispatch & 0x3ff);
+ idx = 3;
+#endif
+ code[idx + 0] = template[idx + 0];
+ __glapi_sparc_icache_flush(&code[idx - 1]);
+ code[idx + 1] = template[idx + 1];
+ code[idx + 2] = template[idx + 2];
+ __glapi_sparc_icache_flush(&code[idx + 1]);
+ code[idx + 3] = template[idx + 3];
+ code[idx + 4] = template[idx + 4];
+ __glapi_sparc_icache_flush(&code[idx + 3]);
+ code[idx + 5] = template[idx + 5];
+ code[idx + 6] = template[idx + 6];
+ __glapi_sparc_icache_flush(&code[idx + 5]);
+ code[idx + 7] = template[idx + 7];
+ code[idx + 8] = template[idx + 8] |
+ (((call_dest - ((unsigned long) &code[idx + 8]))
+ >> 2) & 0x3fffffff);
+ __glapi_sparc_icache_flush(&code[idx + 7]);
+ code[idx + 9] = template[idx + 9];
+ code[idx + 10] = template[idx + 10];
+ __glapi_sparc_icache_flush(&code[idx + 9]);
+ code[idx + 11] = template[idx + 11];
+ code[idx + 12] = template[idx + 12];
+ __glapi_sparc_icache_flush(&code[idx + 11]);
+ code[idx + 13] = template[idx + 13];
+ __glapi_sparc_icache_flush(&code[idx + 13]);
+#endif
+#endif
+}
+
+
+_glapi_proc
+generate_entrypoint(GLuint functionOffset)
+{
+#if defined(PTHREADS) || defined(GLX_USE_TLS)
+ static const unsigned int template[] = {
+ 0x07000000, /* sethi %hi(0), %g3 */
+ 0x8210000f, /* mov %o7, %g1 */
+ 0x40000000, /* call */
+ 0x9e100001, /* mov %g1, %o7 */
+ };
+#ifdef GLX_USE_TLS
+ extern unsigned int __glapi_sparc_tls_stub;
+ unsigned long call_dest = (unsigned long ) &__glapi_sparc_tls_stub;
+#else
+ extern unsigned int __glapi_sparc_pthread_stub;
+ unsigned long call_dest = (unsigned long ) &__glapi_sparc_pthread_stub;
+#endif
+ unsigned int *code = (unsigned int *) u_execmem_alloc(sizeof(template));
+ if (code) {
+ code[0] = template[0] | (functionOffset & 0x3fffff);
+ code[1] = template[1];
+ __glapi_sparc_icache_flush(&code[0]);
+ code[2] = template[2] |
+ (((call_dest - ((unsigned long) &code[2]))
+ >> 2) & 0x3fffffff);
+ code[3] = template[3];
+ __glapi_sparc_icache_flush(&code[2]);
+ }
+ return (_glapi_proc) code;
+#endif
+}
+
+
+void
+fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset)
+{
+ unsigned int *code = (unsigned int *) entrypoint;
+
+ code[0] &= ~0x3fffff;
+ code[0] |= (offset * sizeof(void *)) & 0x3fffff;
+ __glapi_sparc_icache_flush(&code[0]);
+}
+
+
+#else /* USE_*_ASM */
+
+static void
+init_glapi_relocs( void )
+{
+}
+
+
+_glapi_proc
+generate_entrypoint(GLuint functionOffset)
+{
+ (void) functionOffset;
+ return NULL;
+}
+
+
+void
+fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset)
+{
+ /* an unimplemented architecture */
+ (void) entrypoint;
+ (void) offset;
+}
+
+#endif /* USE_*_ASM */
+
+
+void
+init_glapi_relocs_once( void )
+{
+#if defined(PTHREADS) || defined(GLX_USE_TLS)
+ static pthread_once_t once_control = PTHREAD_ONCE_INIT;
+ pthread_once( & once_control, init_glapi_relocs );
+#endif
+}
+
+/**
+ * Fill-in the dispatch stub for the named function.
+ *
+ * This function is intended to be called by a hardware driver. When called,
+ * a dispatch stub may be created created for the function. A pointer to this
+ * dispatch function will be returned by glXGetProcAddress.
+ *
+ * \param function_names Array of pointers to function names that should
+ * share a common dispatch offset.
+ * \param parameter_signature String representing the types of the parameters
+ * passed to the named function. Parameter types
+ * are converted to characters using the following
+ * rules:
+ * - 'i' for \c GLint, \c GLuint, and \c GLenum
+ * - 'p' for any pointer type
+ * - 'f' for \c GLfloat and \c GLclampf
+ * - 'd' for \c GLdouble and \c GLclampd
+ *
+ * \returns
+ * The offset in the dispatch table of the named function. A pointer to the
+ * driver's implementation of the named function should be stored at
+ * \c dispatch_table[\c offset]. Return -1 if error/problem.
+ *
+ * \sa glXGetProcAddress
+ *
+ * \warning
+ * This function can only handle up to 8 names at a time. As far as I know,
+ * the maximum number of names ever associated with an existing GL function is
+ * 4 (\c glPointParameterfSGIS, \c glPointParameterfEXT,
+ * \c glPointParameterfARB, and \c glPointParameterf), so this should not be
+ * too painful of a limitation.
+ *
+ * \todo
+ * Determine whether or not \c parameter_signature should be allowed to be
+ * \c NULL. It doesn't seem like much of a hardship for drivers to have to
+ * pass in an empty string.
+ *
+ * \todo
+ * Determine if code should be added to reject function names that start with
+ * 'glX'.
+ *
+ * \bug
+ * Add code to compare \c parameter_signature with the parameter signature of
+ * a static function. In order to do that, we need to find a way to \b get
+ * the parameter signature of a static function.
+ */
+
+PUBLIC
+int
+_glapi_add_dispatch( const char * const * function_names,
+ const char * parameter_signature )
+{
+ static int next_dynamic_offset = FIRST_DYNAMIC_OFFSET;
+ const char * const real_sig = (parameter_signature != NULL)
+ ? parameter_signature : "";
+ struct _glapi_function * entry[8];
+ GLboolean is_static[8];
+ unsigned i;
+ int offset = ~0;
+
+ init_glapi_relocs_once();
+
+ (void) memset( is_static, 0, sizeof( is_static ) );
+ (void) memset( entry, 0, sizeof( entry ) );
+
+ /* Find the _single_ dispatch offset for all function names that already
+ * exist (and have a dispatch offset).
+ */
+
+ for ( i = 0 ; function_names[i] != NULL ; i++ ) {
+ const char * funcName = function_names[i];
+ int static_offset;
+ int extension_offset;
+
+ if (funcName[0] != 'g' || funcName[1] != 'l')
+ return -1;
+
+ /* search built-in functions */
+ static_offset = get_static_proc_offset(funcName);
+
+ if (static_offset >= 0) {
+
+ is_static[i] = GL_TRUE;
+
+ /* FIXME: Make sure the parameter signatures match! How do we get
+ * FIXME: the parameter signature for static functions?
+ */
+
+ if ( (offset != ~0) && (static_offset != offset) ) {
+ return -1;
+ }
+
+ offset = static_offset;
+
+ continue;
+ }
+
+ /* search added extension functions */
+ entry[i] = get_extension_proc(funcName);
+
+ if (entry[i] != NULL) {
+ extension_offset = entry[i]->dispatch_offset;
+
+ /* The offset may be ~0 if the function name was added by
+ * glXGetProcAddress but never filled in by the driver.
+ */
+
+ if (extension_offset == ~0) {
+ continue;
+ }
+
+ if (strcmp(real_sig, entry[i]->parameter_signature) != 0) {
+ return -1;
+ }
+
+ if ( (offset != ~0) && (extension_offset != offset) ) {
+ return -1;
+ }
+
+ offset = extension_offset;
+ }
+ }
+
+ /* If all function names are either new (or with no dispatch offset),
+ * allocate a new dispatch offset.
+ */
+
+ if (offset == ~0) {
+ offset = next_dynamic_offset;
+ next_dynamic_offset++;
+ }
+
+ /* Fill in the dispatch offset for the new function names (and those with
+ * no dispatch offset).
+ */
+
+ for ( i = 0 ; function_names[i] != NULL ; i++ ) {
+ if (is_static[i]) {
+ continue;
+ }
+
+ /* generate entrypoints for new function names */
+ if (entry[i] == NULL) {
+ entry[i] = add_function_name( function_names[i] );
+ if (entry[i] == NULL) {
+ /* FIXME: Possible memory leak here. */
+ return -1;
+ }
+ }
+
+ if (entry[i]->dispatch_offset == ~0) {
+ set_entry_info( entry[i], real_sig, offset );
+ }
+ }
+
+ return offset;
+}
+
+/**
+ * Return size of dispatch table struct as number of functions (or
+ * slots).
+ */
+GLuint
+_glapi_get_dispatch_table_size(void)
+{
+ /*
+ * The dispatch table size (number of entries) is the size of the
+ * _glapi_table struct plus the number of dynamic entries we can add.
+ * The extra slots can be filled in by DRI drivers that register new
+ * extension functions.
+ */
+ return FIRST_DYNAMIC_OFFSET + MAX_EXTENSION_FUNCS;
+}
+
diff --git a/xorg-server/glx/glapi.h b/xorg-server/glx/glapi.h
index a99317ad0..b64ad5d0c 100644
--- a/xorg-server/glx/glapi.h
+++ b/xorg-server/glx/glapi.h
@@ -77,10 +77,10 @@ struct _glapi_table;
#if defined (GLX_USE_TLS)
-_GLAPI_EXPORT extern __thread struct _glapi_table * _glapi_tls_Dispatch
+_GLAPI_EXPORT extern TLS struct _glapi_table * _glapi_tls_Dispatch
__attribute__((tls_model("initial-exec")));
-_GLAPI_EXPORT extern __thread void * _glapi_tls_Context
+_GLAPI_EXPORT extern TLS void * _glapi_tls_Context
__attribute__((tls_model("initial-exec")));
_GLAPI_EXPORT extern const struct _glapi_table *_glapi_Dispatch;
diff --git a/xorg-server/glx/glthread.h b/xorg-server/glx/glthread.h
index 28793fcc7..a1b0bf99a 100644
--- a/xorg-server/glx/glthread.h
+++ b/xorg-server/glx/glthread.h
@@ -1,252 +1,252 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5.2
- *
- * Copyright (C) 1999-2006 Brian Paul 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
- * BRIAN PAUL 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.
- */
-
-
-/*
- * Thread support for gl dispatch.
- *
- * Initial version by John Stone (j.stone@acm.org) (johns@cs.umr.edu)
- * and Christoph Poliwoda (poliwoda@volumegraphics.com)
- * Revised by Keith Whitwell
- * Adapted for new gl dispatcher by Brian Paul
- *
- *
- *
- * DOCUMENTATION
- *
- * This thread module exports the following types:
- * _glthread_TSD Thread-specific data area
- * _glthread_Thread Thread datatype
- * _glthread_Mutex Mutual exclusion lock
- *
- * Macros:
- * _glthread_DECLARE_STATIC_MUTEX(name) Declare a non-local mutex
- * _glthread_INIT_MUTEX(name) Initialize a mutex
- * _glthread_LOCK_MUTEX(name) Lock a mutex
- * _glthread_UNLOCK_MUTEX(name) Unlock a mutex
- *
- * Functions:
- * _glthread_GetID(v) Get integer thread ID
- * _glthread_InitTSD() Initialize thread-specific data
- * _glthread_GetTSD() Get thread-specific data
- * _glthread_SetTSD() Set thread-specific data
- *
- */
-
-/*
- * If this file is accidentally included by a non-threaded build,
- * it should not cause the build to fail, or otherwise cause problems.
- * In general, it should only be included when needed however.
- */
-
-#ifndef GLTHREAD_H
-#define GLTHREAD_H
-
-
-#if defined(USE_MGL_NAMESPACE)
-#define _glapi_Dispatch _mglapi_Dispatch
-#endif
-
-#if (defined(PTHREADS) || defined(WIN32_THREADS)) \
- && !defined(THREADS)
-# define THREADS
-#endif
-
-#ifdef VMS
-#include <GL/vms_x_fix.h>
-#endif
-
-/*
- * POSIX threads. This should be your choice in the Unix world
- * whenever possible. When building with POSIX threads, be sure
- * to enable any compiler flags which will cause the MT-safe
- * libc (if one exists) to be used when linking, as well as any
- * header macros for MT-safe errno, etc. For Solaris, this is the -mt
- * compiler flag. On Solaris with gcc, use -D_REENTRANT to enable
- * proper compiling for MT-safe libc etc.
- */
-#if defined(PTHREADS)
-#include <pthread.h> /* POSIX threads headers */
-
-typedef struct {
- pthread_key_t key;
- int initMagic;
-} _glthread_TSD;
-
-typedef pthread_t _glthread_Thread;
-
-typedef pthread_mutex_t _glthread_Mutex;
-
-#define _glthread_DECLARE_STATIC_MUTEX(name) \
- static _glthread_Mutex name = PTHREAD_MUTEX_INITIALIZER
-
-#define _glthread_INIT_MUTEX(name) \
- pthread_mutex_init(&(name), NULL)
-
-#define _glthread_DESTROY_MUTEX(name) \
- pthread_mutex_destroy(&(name))
-
-#define _glthread_LOCK_MUTEX(name) \
- (void) pthread_mutex_lock(&(name))
-
-#define _glthread_UNLOCK_MUTEX(name) \
- (void) pthread_mutex_unlock(&(name))
-
-#endif /* PTHREADS */
-
-
-
-
-/*
- * Solaris threads. Use only up to Solaris 2.4.
- * Solaris 2.5 and higher provide POSIX threads.
- * Be sure to compile with -mt on the Solaris compilers, or
- * use -D_REENTRANT if using gcc.
- */
-
-
-
-
-/*
- * Windows threads. Should work with Windows NT and 95.
- * IMPORTANT: Link with multithreaded runtime library when THREADS are
- * used!
- */
-#ifdef WIN32_THREADS
-#include <windows.h>
-
-typedef struct {
- DWORD key;
- int initMagic;
-} _glthread_TSD;
-
-typedef HANDLE _glthread_Thread;
-
-typedef CRITICAL_SECTION _glthread_Mutex;
-
-#define _glthread_DECLARE_STATIC_MUTEX(name) /*static*/ _glthread_Mutex name = {0,0,0,0,0,0}
-#define _glthread_INIT_MUTEX(name) InitializeCriticalSection(&name)
-#define _glthread_DESTROY_MUTEX(name) DeleteCriticalSection(&name)
-#define _glthread_LOCK_MUTEX(name) EnterCriticalSection(&name)
-#define _glthread_UNLOCK_MUTEX(name) LeaveCriticalSection(&name)
-
-#endif /* WIN32_THREADS */
-
-/*
- * BeOS threads. R5.x required.
- */
-#ifdef BEOS_THREADS
-
-#include <kernel/OS.h>
-#include <support/TLS.h>
-
-typedef struct {
- int32 key;
- int initMagic;
-} _glthread_TSD;
-
-typedef thread_id _glthread_Thread;
-
-/* Use Benaphore, aka speeder semaphore */
-typedef struct {
- int32 lock;
- sem_id sem;
-} benaphore;
-typedef benaphore _glthread_Mutex;
-
-#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = { 0, 0 }
-#define _glthread_INIT_MUTEX(name) name.sem = create_sem(0, #name"_benaphore"), name.lock = 0
-#define _glthread_DESTROY_MUTEX(name) delete_sem(name.sem), name.lock = 0
-#define _glthread_LOCK_MUTEX(name) if (name.sem == 0) _glthread_INIT_MUTEX(name); \
- if (atomic_add(&(name.lock), 1) >= 1) acquire_sem(name.sem)
-#define _glthread_UNLOCK_MUTEX(name) if (atomic_add(&(name.lock), -1) > 1) release_sem(name.sem)
-
-#endif /* BEOS_THREADS */
-
-
-
-#ifndef THREADS
-
-/*
- * THREADS not defined
- */
-
-typedef int _glthread_TSD;
-
-typedef int _glthread_Thread;
-
-typedef int _glthread_Mutex;
-
-#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0
-
-#define _glthread_INIT_MUTEX(name) (void) name
-
-#define _glthread_DESTROY_MUTEX(name) (void) name
-
-#define _glthread_LOCK_MUTEX(name) (void) name
-
-#define _glthread_UNLOCK_MUTEX(name) (void) name
-
-#endif /* THREADS */
-
-
-
-/*
- * Platform independent thread specific data API.
- */
-
-extern unsigned long
-_glthread_GetID(void);
-
-
-extern void
-_glthread_InitTSD(_glthread_TSD *);
-
-
-extern void *
-_glthread_GetTSD(_glthread_TSD *);
-
-
-extern void
-_glthread_SetTSD(_glthread_TSD *, void *);
-
-#if defined(GLX_USE_TLS)
-
-extern __thread struct _glapi_table * _glapi_tls_Dispatch
- __attribute__((tls_model("initial-exec")));
-
-#define GET_DISPATCH() _glapi_tls_Dispatch
-
-#elif !defined(GL_CALL)
-# if defined(THREADS)
-# define GET_DISPATCH() \
- ((__builtin_expect( _glapi_Dispatch != NULL, 1 )) \
- ? _glapi_Dispatch : _glapi_get_dispatch())
-# else
-# define GET_DISPATCH() _glapi_Dispatch
-# endif /* defined(THREADS) */
-#endif /* ndef GL_CALL */
-
-
-#endif /* THREADS_H */
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5.2
+ *
+ * Copyright (C) 1999-2006 Brian Paul 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
+ * BRIAN PAUL 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.
+ */
+
+
+/*
+ * Thread support for gl dispatch.
+ *
+ * Initial version by John Stone (j.stone@acm.org) (johns@cs.umr.edu)
+ * and Christoph Poliwoda (poliwoda@volumegraphics.com)
+ * Revised by Keith Whitwell
+ * Adapted for new gl dispatcher by Brian Paul
+ *
+ *
+ *
+ * DOCUMENTATION
+ *
+ * This thread module exports the following types:
+ * _glthread_TSD Thread-specific data area
+ * _glthread_Thread Thread datatype
+ * _glthread_Mutex Mutual exclusion lock
+ *
+ * Macros:
+ * _glthread_DECLARE_STATIC_MUTEX(name) Declare a non-local mutex
+ * _glthread_INIT_MUTEX(name) Initialize a mutex
+ * _glthread_LOCK_MUTEX(name) Lock a mutex
+ * _glthread_UNLOCK_MUTEX(name) Unlock a mutex
+ *
+ * Functions:
+ * _glthread_GetID(v) Get integer thread ID
+ * _glthread_InitTSD() Initialize thread-specific data
+ * _glthread_GetTSD() Get thread-specific data
+ * _glthread_SetTSD() Set thread-specific data
+ *
+ */
+
+/*
+ * If this file is accidentally included by a non-threaded build,
+ * it should not cause the build to fail, or otherwise cause problems.
+ * In general, it should only be included when needed however.
+ */
+
+#ifndef GLTHREAD_H
+#define GLTHREAD_H
+
+
+#if defined(USE_MGL_NAMESPACE)
+#define _glapi_Dispatch _mglapi_Dispatch
+#endif
+
+#if (defined(PTHREADS) || defined(WIN32_THREADS)) \
+ && !defined(THREADS)
+# define THREADS
+#endif
+
+#ifdef VMS
+#include <GL/vms_x_fix.h>
+#endif
+
+/*
+ * POSIX threads. This should be your choice in the Unix world
+ * whenever possible. When building with POSIX threads, be sure
+ * to enable any compiler flags which will cause the MT-safe
+ * libc (if one exists) to be used when linking, as well as any
+ * header macros for MT-safe errno, etc. For Solaris, this is the -mt
+ * compiler flag. On Solaris with gcc, use -D_REENTRANT to enable
+ * proper compiling for MT-safe libc etc.
+ */
+#if defined(PTHREADS)
+#include <pthread.h> /* POSIX threads headers */
+
+typedef struct {
+ pthread_key_t key;
+ int initMagic;
+} _glthread_TSD;
+
+typedef pthread_t _glthread_Thread;
+
+typedef pthread_mutex_t _glthread_Mutex;
+
+#define _glthread_DECLARE_STATIC_MUTEX(name) \
+ static _glthread_Mutex name = PTHREAD_MUTEX_INITIALIZER
+
+#define _glthread_INIT_MUTEX(name) \
+ pthread_mutex_init(&(name), NULL)
+
+#define _glthread_DESTROY_MUTEX(name) \
+ pthread_mutex_destroy(&(name))
+
+#define _glthread_LOCK_MUTEX(name) \
+ (void) pthread_mutex_lock(&(name))
+
+#define _glthread_UNLOCK_MUTEX(name) \
+ (void) pthread_mutex_unlock(&(name))
+
+#endif /* PTHREADS */
+
+
+
+
+/*
+ * Solaris threads. Use only up to Solaris 2.4.
+ * Solaris 2.5 and higher provide POSIX threads.
+ * Be sure to compile with -mt on the Solaris compilers, or
+ * use -D_REENTRANT if using gcc.
+ */
+
+
+
+
+/*
+ * Windows threads. Should work with Windows NT and 95.
+ * IMPORTANT: Link with multithreaded runtime library when THREADS are
+ * used!
+ */
+#ifdef WIN32_THREADS
+#include <windows.h>
+
+typedef struct {
+ DWORD key;
+ int initMagic;
+} _glthread_TSD;
+
+typedef HANDLE _glthread_Thread;
+
+typedef CRITICAL_SECTION _glthread_Mutex;
+
+#define _glthread_DECLARE_STATIC_MUTEX(name) /*static*/ _glthread_Mutex name = {0,0,0,0,0,0}
+#define _glthread_INIT_MUTEX(name) InitializeCriticalSection(&name)
+#define _glthread_DESTROY_MUTEX(name) DeleteCriticalSection(&name)
+#define _glthread_LOCK_MUTEX(name) EnterCriticalSection(&name)
+#define _glthread_UNLOCK_MUTEX(name) LeaveCriticalSection(&name)
+
+#endif /* WIN32_THREADS */
+
+/*
+ * BeOS threads. R5.x required.
+ */
+#ifdef BEOS_THREADS
+
+#include <kernel/OS.h>
+#include <support/TLS.h>
+
+typedef struct {
+ int32 key;
+ int initMagic;
+} _glthread_TSD;
+
+typedef thread_id _glthread_Thread;
+
+/* Use Benaphore, aka speeder semaphore */
+typedef struct {
+ int32 lock;
+ sem_id sem;
+} benaphore;
+typedef benaphore _glthread_Mutex;
+
+#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = { 0, 0 }
+#define _glthread_INIT_MUTEX(name) name.sem = create_sem(0, #name"_benaphore"), name.lock = 0
+#define _glthread_DESTROY_MUTEX(name) delete_sem(name.sem), name.lock = 0
+#define _glthread_LOCK_MUTEX(name) if (name.sem == 0) _glthread_INIT_MUTEX(name); \
+ if (atomic_add(&(name.lock), 1) >= 1) acquire_sem(name.sem)
+#define _glthread_UNLOCK_MUTEX(name) if (atomic_add(&(name.lock), -1) > 1) release_sem(name.sem)
+
+#endif /* BEOS_THREADS */
+
+
+
+#ifndef THREADS
+
+/*
+ * THREADS not defined
+ */
+
+typedef int _glthread_TSD;
+
+typedef int _glthread_Thread;
+
+typedef int _glthread_Mutex;
+
+#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0
+
+#define _glthread_INIT_MUTEX(name) (void) name
+
+#define _glthread_DESTROY_MUTEX(name) (void) name
+
+#define _glthread_LOCK_MUTEX(name) (void) name
+
+#define _glthread_UNLOCK_MUTEX(name) (void) name
+
+#endif /* THREADS */
+
+
+
+/*
+ * Platform independent thread specific data API.
+ */
+
+extern unsigned long
+_glthread_GetID(void);
+
+
+extern void
+_glthread_InitTSD(_glthread_TSD *);
+
+
+extern void *
+_glthread_GetTSD(_glthread_TSD *);
+
+
+extern void
+_glthread_SetTSD(_glthread_TSD *, void *);
+
+#if defined(GLX_USE_TLS)
+
+extern TLS struct _glapi_table * _glapi_tls_Dispatch
+ __attribute__((tls_model("initial-exec")));
+
+#define GET_DISPATCH() _glapi_tls_Dispatch
+
+#elif !defined(GL_CALL)
+# if defined(THREADS)
+# define GET_DISPATCH() \
+ ((__builtin_expect( _glapi_Dispatch != NULL, 1 )) \
+ ? _glapi_Dispatch : _glapi_get_dispatch())
+# else
+# define GET_DISPATCH() _glapi_Dispatch
+# endif /* defined(THREADS) */
+#endif /* ndef GL_CALL */
+
+
+#endif /* THREADS_H */
diff --git a/xorg-server/hw/kdrive/src/kdrive.c b/xorg-server/hw/kdrive/src/kdrive.c
index aab64a510..7d424dbcc 100644
--- a/xorg-server/hw/kdrive/src/kdrive.c
+++ b/xorg-server/hw/kdrive/src/kdrive.c
@@ -92,95 +92,6 @@ static Bool kdCaughtSignal = FALSE;
KdOsFuncs *kdOsFuncs;
void
-KdSetRootClip (ScreenPtr pScreen, BOOL enable)
-{
- WindowPtr pWin = pScreen->root;
- WindowPtr pChild;
- Bool WasViewable;
- Bool anyMarked = FALSE;
- WindowPtr pLayerWin;
- BoxRec box;
-
- if (!pWin)
- return;
- WasViewable = (Bool)(pWin->viewable);
- if (WasViewable)
- {
- for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib)
- {
- (void) (*pScreen->MarkOverlappedWindows)(pChild,
- pChild,
- &pLayerWin);
- }
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- if (pWin->valdata)
- {
- if (HasBorder (pWin))
- {
- RegionPtr borderVisible;
-
- borderVisible = RegionCreate(NullBox, 1);
- RegionSubtract(borderVisible,
- &pWin->borderClip, &pWin->winSize);
- pWin->valdata->before.borderVisible = borderVisible;
- }
- pWin->valdata->before.resized = TRUE;
- }
- }
-
- if (enable)
- {
- box.x1 = 0;
- box.y1 = 0;
- box.x2 = pScreen->width;
- box.y2 = pScreen->height;
- pWin->drawable.width = pScreen->width;
- pWin->drawable.height = pScreen->height;
- RegionInit(&pWin->winSize, &box, 1);
- RegionInit(&pWin->borderSize, &box, 1);
- RegionReset(&pWin->borderClip, &box);
- RegionBreak(&pWin->clipList);
- }
- else
- {
- RegionEmpty(&pWin->borderClip);
- RegionBreak(&pWin->clipList);
- }
-
- ResizeChildrenWinSize (pWin, 0, 0, 0, 0);
-
- if (WasViewable)
- {
- if (pWin->firstChild)
- {
- anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
- pWin->firstChild,
- (WindowPtr *)NULL);
- }
- else
- {
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- }
-
-
- if (anyMarked)
- (*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
- }
-
- if (WasViewable)
- {
- if (anyMarked)
- (*pScreen->HandleExposures)(pWin);
- if (anyMarked && pScreen->PostValidateTree)
- (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
- }
- if (pWin->realized)
- WindowsRestructured ();
-}
-
-void
KdDisableScreen (ScreenPtr pScreen)
{
KdScreenPriv(pScreen);
@@ -188,7 +99,7 @@ KdDisableScreen (ScreenPtr pScreen)
if (!pScreenPriv->enabled)
return;
if (!pScreenPriv->closed)
- KdSetRootClip (pScreen, FALSE);
+ SetRootClip (pScreen, FALSE);
KdDisableColormap (pScreen);
if (!pScreenPriv->screen->dumb && pScreenPriv->card->cfuncs->disableAccel)
(*pScreenPriv->card->cfuncs->disableAccel) (pScreen);
@@ -271,7 +182,7 @@ KdEnableScreen (ScreenPtr pScreen)
if (!pScreenPriv->screen->dumb && pScreenPriv->card->cfuncs->enableAccel)
(*pScreenPriv->card->cfuncs->enableAccel) (pScreen);
KdEnableColormap (pScreen);
- KdSetRootClip (pScreen, TRUE);
+ SetRootClip (pScreen, TRUE);
if (pScreenPriv->card->cfuncs->dpms)
(*pScreenPriv->card->cfuncs->dpms) (pScreen, pScreenPriv->dpmsState);
return TRUE;
diff --git a/xorg-server/hw/kdrive/src/kdrive.h b/xorg-server/hw/kdrive/src/kdrive.h
index 9cf44f01e..e5928aa2b 100644
--- a/xorg-server/hw/kdrive/src/kdrive.h
+++ b/xorg-server/hw/kdrive/src/kdrive.h
@@ -387,9 +387,6 @@ KdStoreColors (ColormapPtr pCmap, int ndef, xColorItem *pdefs);
extern miPointerScreenFuncRec kdPointerScreenFuncs;
void
-KdSetRootClip (ScreenPtr pScreen, BOOL enable);
-
-void
KdDisableScreen (ScreenPtr pScreen);
void
diff --git a/xorg-server/hw/kdrive/src/kinput.c b/xorg-server/hw/kdrive/src/kinput.c
index ee8fba65a..2ae0a201e 100644
--- a/xorg-server/hw/kdrive/src/kinput.c
+++ b/xorg-server/hw/kdrive/src/kinput.c
@@ -497,7 +497,6 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff)
free(axes_labels);
if (pi->inputClass == KD_TOUCHSCREEN) {
- InitAbsoluteClassDeviceStruct(pDevice);
xiclass = AtomFromName(XI_TOUCHSCREEN);
}
else {
@@ -2229,8 +2228,6 @@ ChangeDeviceControl(register ClientPtr client, DeviceIntPtr pDev,
case DEVICE_ABS_CALIB:
case DEVICE_ABS_AREA:
- return Success;
-
case DEVICE_CORE:
return BadMatch;
case DEVICE_ENABLE:
diff --git a/xorg-server/hw/xfree86/common/xf86Helper.c b/xorg-server/hw/xfree86/common/xf86Helper.c
index 147464410..f94b24184 100644
--- a/xorg-server/hw/xfree86/common/xf86Helper.c
+++ b/xorg-server/hw/xfree86/common/xf86Helper.c
@@ -983,106 +983,6 @@ xf86SetBlackWhitePixels(ScreenPtr pScreen)
}
/*
- * xf86SetRootClip --
- * Enable or disable rendering to the screen by
- * setting the root clip list and revalidating
- * all of the windows
- */
-
-static void
-xf86SetRootClip (ScreenPtr pScreen, Bool enable)
-{
- WindowPtr pWin = pScreen->root;
- WindowPtr pChild;
- Bool WasViewable = (Bool)(pWin->viewable);
- Bool anyMarked = FALSE;
- WindowPtr pLayerWin;
- BoxRec box;
-
- if (WasViewable)
- {
- for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib)
- {
- (void) (*pScreen->MarkOverlappedWindows)(pChild,
- pChild,
- &pLayerWin);
- }
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- if (pWin->valdata)
- {
- if (HasBorder (pWin))
- {
- RegionPtr borderVisible;
-
- borderVisible = RegionCreate(NullBox, 1);
- RegionSubtract(borderVisible,
- &pWin->borderClip, &pWin->winSize);
- pWin->valdata->before.borderVisible = borderVisible;
- }
- pWin->valdata->before.resized = TRUE;
- }
- }
-
- /*
- * Use REGION_BREAK to avoid optimizations in ValidateTree
- * that assume the root borderClip can't change well, normally
- * it doesn't...)
- */
- if (enable)
- {
- box.x1 = 0;
- box.y1 = 0;
- box.x2 = pScreen->width;
- box.y2 = pScreen->height;
- RegionInit(&pWin->winSize, &box, 1);
- RegionInit(&pWin->borderSize, &box, 1);
- if (WasViewable)
- RegionReset(&pWin->borderClip, &box);
- pWin->drawable.width = pScreen->width;
- pWin->drawable.height = pScreen->height;
- RegionBreak(&pWin->clipList);
- }
- else
- {
- RegionEmpty(&pWin->borderClip);
- RegionBreak(&pWin->clipList);
- }
-
- ResizeChildrenWinSize (pWin, 0, 0, 0, 0);
-
- if (WasViewable)
- {
- if (pWin->firstChild)
- {
- anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
- pWin->firstChild,
- (WindowPtr *)NULL);
- }
- else
- {
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- }
-
-
- if (anyMarked)
- (*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
- }
-
- if (WasViewable)
- {
- if (anyMarked)
- (*pScreen->HandleExposures)(pWin);
- if (anyMarked && pScreen->PostValidateTree)
- (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
- }
- if (pWin->realized)
- WindowsRestructured ();
- FlushAllOutput ();
-}
-
-/*
* Function to enable/disable access to the frame buffer
*
* This is used when VT switching and when entering/leaving DGA direct mode.
@@ -1115,7 +1015,7 @@ xf86EnableDisableFBAccess(int scrnIndex, Bool enable)
* Restore all of the clip lists on the screen
*/
if (!xf86Resetting)
- xf86SetRootClip (pScreen, TRUE);
+ SetRootClip (pScreen, TRUE);
}
else
@@ -1123,7 +1023,7 @@ xf86EnableDisableFBAccess(int scrnIndex, Bool enable)
/*
* Empty all of the clip lists on the screen
*/
- xf86SetRootClip (pScreen, FALSE);
+ SetRootClip (pScreen, FALSE);
}
}
diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c
index 4166a1c38..d3af0c0c2 100644
--- a/xorg-server/hw/xfree86/common/xf86Xinput.c
+++ b/xorg-server/hw/xfree86/common/xf86Xinput.c
@@ -405,10 +405,10 @@ ChangeDeviceControl (ClientPtr client, DeviceIntPtr dev, xDeviceCtl *control)
if (!pInfo->control_proc) {
switch (control->control) {
case DEVICE_CORE:
- return BadMatch;
- case DEVICE_RESOLUTION:
case DEVICE_ABS_CALIB:
case DEVICE_ABS_AREA:
+ return BadMatch;
+ case DEVICE_RESOLUTION:
case DEVICE_ENABLE:
return Success;
default:
@@ -775,6 +775,8 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable)
goto unwind;
}
+ xf86Msg(X_INFO, "Using input driver '%s' for '%s'\n", drv->driverName, pInfo->name);
+
if (!drv->PreInit) {
xf86Msg(X_ERROR,
"Input driver `%s' has no PreInit function (ignoring)\n",
diff --git a/xorg-server/hw/xfree86/dri/dri.c b/xorg-server/hw/xfree86/dri/dri.c
index 38241f904..17bf51c0e 100644
--- a/xorg-server/hw/xfree86/dri/dri.c
+++ b/xorg-server/hw/xfree86/dri/dri.c
@@ -1497,10 +1497,6 @@ DRIGetDrawableInfo(ScreenPtr pScreen,
*stamp = pDRIPriv->pSAREA->drawableTable[*index].stamp;
*X = (int)(pWin->drawable.x);
*Y = (int)(pWin->drawable.y);
-#if 0
- *W = (int)(pWin->winSize.extents.x2 - pWin->winSize.extents.x1);
- *H = (int)(pWin->winSize.extents.y2 - pWin->winSize.extents.y1);
-#endif
*W = (int)(pWin->drawable.width);
*H = (int)(pWin->drawable.height);
*numClipRects = RegionNumRects(&pWin->clipList);
diff --git a/xorg-server/hw/xquartz/applewm.c b/xorg-server/hw/xquartz/applewm.c
index d81032aa9..3b8ca3094 100644
--- a/xorg-server/hw/xquartz/applewm.c
+++ b/xorg-server/hw/xquartz/applewm.c
@@ -437,7 +437,7 @@ ProcAppleWMSetWindowLevel(register ClientPtr client)
DixReadAccess))
return BadValue;
- if (stuff->level < 0 || stuff->level >= AppleWMNumWindowLevels) {
+ if (stuff->level >= AppleWMNumWindowLevels) {
return BadValue;
}
diff --git a/xorg-server/hw/xquartz/darwin.c b/xorg-server/hw/xquartz/darwin.c
index 56021ed0a..5e43d2e04 100644
--- a/xorg-server/hw/xquartz/darwin.c
+++ b/xorg-server/hw/xquartz/darwin.c
@@ -314,7 +314,6 @@ static int DarwinMouseProc(DeviceIntPtr pPointer, int what) {
(PtrCtrlProcPtr)NoopDDA,
GetMotionHistorySize(), NAXES,
axes_labels);
- InitAbsoluteClassDeviceStruct(pPointer);
// InitValuatorAxisStruct(pPointer, 0, 0, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1, Absolute);
// InitValuatorAxisStruct(pPointer, 1, 0, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1, Absolute);
break;
@@ -362,7 +361,6 @@ static int DarwinTabletProc(DeviceIntPtr pPointer, int what) {
GetMotionHistorySize(), NAXES,
axes_labels);
InitProximityClassDeviceStruct(pPointer);
- InitAbsoluteClassDeviceStruct(pPointer);
InitValuatorAxisStruct(pPointer, 0, axes_labels[0], 0, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1, Absolute);
InitValuatorAxisStruct(pPointer, 1, axes_labels[1], 0, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1, Absolute);
@@ -769,113 +767,3 @@ void AbortDDX( void )
OsAbort();
}
-#include "mivalidate.h" // for union _Validate used by windowstr.h
-#include "windowstr.h" // for struct _Window
-#include "scrnintstr.h" // for struct _Screen
-
-// This is copied from Xserver/hw/xfree86/common/xf86Helper.c.
-// Quartz mode uses this when switching in and out of Quartz.
-// Quartz or IOKit can use this when waking from sleep.
-// Copyright (c) 1997-1998 by The XFree86 Project, Inc.
-
-/*
- * xf86SetRootClip --
- * Enable or disable rendering to the screen by
- * setting the root clip list and revalidating
- * all of the windows
- */
-
-void
-xf86SetRootClip (ScreenPtr pScreen, int enable)
-{
- WindowPtr pWin = pScreen->root;
- WindowPtr pChild;
- Bool WasViewable = (Bool)(pWin->viewable);
- Bool anyMarked = TRUE;
- RegionPtr pOldClip = NULL;
- WindowPtr pLayerWin;
- BoxRec box;
-
- if (WasViewable)
- {
- for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib)
- {
- (void) (*pScreen->MarkOverlappedWindows)(pChild,
- pChild,
- &pLayerWin);
- }
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- if (pWin->valdata)
- {
- if (HasBorder (pWin))
- {
- RegionPtr borderVisible;
-
- borderVisible = RegionCreate(NullBox, 1);
- RegionSubtract(borderVisible,
- &pWin->borderClip, &pWin->winSize);
- pWin->valdata->before.borderVisible = borderVisible;
- }
- pWin->valdata->before.resized = TRUE;
- }
- }
-
- /*
- * Use REGION_BREAK to avoid optimizations in ValidateTree
- * that assume the root borderClip can't change well, normally
- * it doesn't...)
- */
- if (enable)
- {
- box.x1 = 0;
- box.y1 = 0;
- box.x2 = pScreen->width;
- box.y2 = pScreen->height;
- RegionReset(&pWin->borderClip, &box);
- RegionBreak(&pWin->clipList);
- }
- else
- {
- RegionEmpty(&pWin->borderClip);
- RegionBreak(&pWin->clipList);
- }
-
- ResizeChildrenWinSize (pWin, 0, 0, 0, 0);
-
- if (WasViewable)
- {
- if (pWin->backStorage)
- {
- pOldClip = RegionCreate(NullBox, 1);
- RegionCopy(pOldClip, &pWin->clipList);
- }
-
- if (pWin->firstChild)
- {
- anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
- pWin->firstChild,
- (WindowPtr *)NULL);
- }
- else
- {
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- }
-
-
- if (anyMarked)
- (*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
- }
-
- if (WasViewable)
- {
- if (anyMarked)
- (*pScreen->HandleExposures)(pWin);
- if (anyMarked && pScreen->PostValidateTree)
- (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
- }
- if (pWin->realized)
- WindowsRestructured ();
- FlushAllOutput ();
-}
diff --git a/xorg-server/hw/xquartz/darwin.h b/xorg-server/hw/xquartz/darwin.h
index 7cd4336cd..3a45f76e2 100644
--- a/xorg-server/hw/xquartz/darwin.h
+++ b/xorg-server/hw/xquartz/darwin.h
@@ -42,7 +42,6 @@
void DarwinPrintBanner(void);
int DarwinParseModifierList(const char *constmodifiers, int separatelr);
void DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo);
-void xf86SetRootClip (ScreenPtr pScreen, int enable);
#define SCREEN_PRIV(pScreen) ((DarwinFramebufferPtr) \
dixLookupPrivate(&pScreen->devPrivates, darwinScreenKey))
diff --git a/xorg-server/hw/xquartz/darwinXinput.c b/xorg-server/hw/xquartz/darwinXinput.c
index 527c5bcff..0989412d2 100644
--- a/xorg-server/hw/xquartz/darwinXinput.c
+++ b/xorg-server/hw/xquartz/darwinXinput.c
@@ -117,17 +117,7 @@ ChangeDeviceControl(ClientPtr client, DeviceIntPtr dev,
{
DEBUG_LOG("ChangeDeviceControl(%p, %p, %p)\n", client, dev, control);
- switch (control->control) {
- case DEVICE_RESOLUTION:
- return BadMatch;
- case DEVICE_ABS_CALIB:
- case DEVICE_ABS_AREA:
- return BadMatch;
- case DEVICE_CORE:
- return BadMatch;
- default:
- return BadMatch;
- }
+ return BadMatch;
}
diff --git a/xorg-server/hw/xquartz/quartz.c b/xorg-server/hw/xquartz/quartz.c
index 9e9f6be14..158656b6a 100644
--- a/xorg-server/hw/xquartz/quartz.c
+++ b/xorg-server/hw/xquartz/quartz.c
@@ -442,7 +442,7 @@ void QuartzSetRootClip(
for (i = 0; i < screenInfo.numScreens; i++) {
if (screenInfo.screens[i]) {
- xf86SetRootClip(screenInfo.screens[i], enable);
+ SetRootClip(screenInfo.screens[i], enable);
}
}
}
diff --git a/xorg-server/hw/xquartz/threadSafety.h b/xorg-server/hw/xquartz/threadSafety.h
index 7b009103a..48602567b 100644
--- a/xorg-server/hw/xquartz/threadSafety.h
+++ b/xorg-server/hw/xquartz/threadSafety.h
@@ -1,56 +1,56 @@
-/*
- * Copyright (C) 2008 Apple, Inc.
- *
- * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#ifndef _XQ_THREAD_SAFETY_H_
-#define _XQ_THREAD_SAFETY_H_
-
-#define DEBUG_THREADS 1
-
-#include <pthread.h>
-
-extern pthread_t APPKIT_THREAD_ID;
-extern pthread_t SERVER_THREAD_ID;
-
-/* Dump the call stack */
-void spewCallStack(void);
-
-/* Print message to ErrorF if we're in the wrong thread */
-void _threadSafetyAssert(pthread_t tid, const char *file, const char *fun, int line);
-
-/* Get a string that identifies our thread nicely */
-const char *threadSafetyID(pthread_t tid);
-
-#define threadSafetyAssert(tid) _threadSafetyAssert(tid, __FILE__, __FUNCTION__, __LINE__)
-
-#ifdef DEBUG_THREADS
-#define TA_APPKIT() threadSafetyAssert(APPKIT_THREAD_ID)
-#define TA_SERVER() threadSafetyAssert(SERVER_THREAD_ID)
-#else
-#define TA_SERVER()
-#define TA_APPKIT()
-#endif
-
-#endif _XQ_THREAD_SAFETY_H_
+/*
+ * Copyright (C) 2008 Apple, Inc.
+ *
+ * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in this Software without prior written authorization.
+ */
+
+#ifndef _XQ_THREAD_SAFETY_H_
+#define _XQ_THREAD_SAFETY_H_
+
+#define DEBUG_THREADS 1
+
+#include <pthread.h>
+
+extern pthread_t APPKIT_THREAD_ID;
+extern pthread_t SERVER_THREAD_ID;
+
+/* Dump the call stack */
+void spewCallStack(void);
+
+/* Print message to ErrorF if we're in the wrong thread */
+void _threadSafetyAssert(pthread_t tid, const char *file, const char *fun, int line);
+
+/* Get a string that identifies our thread nicely */
+const char *threadSafetyID(pthread_t tid);
+
+#define threadSafetyAssert(tid) _threadSafetyAssert(tid, __FILE__, __FUNCTION__, __LINE__)
+
+#ifdef DEBUG_THREADS
+#define TA_APPKIT() threadSafetyAssert(APPKIT_THREAD_ID)
+#define TA_SERVER() threadSafetyAssert(SERVER_THREAD_ID)
+#else
+#define TA_SERVER()
+#define TA_APPKIT()
+#endif
+
+#endif /* _XQ_THREAD_SAFETY_H_ */
diff --git a/xorg-server/hw/xquartz/xpr/xprScreen.c b/xorg-server/hw/xquartz/xpr/xprScreen.c
index 338440a39..c8b1e45bd 100644
--- a/xorg-server/hw/xquartz/xpr/xprScreen.c
+++ b/xorg-server/hw/xquartz/xpr/xprScreen.c
@@ -326,7 +326,9 @@ xprAddScreen(int index, ScreenPtr pScreen)
#endif
}
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
have_depth:
+#endif
switch(depth) {
case 8: // pseudo-working
dfb->visuals = PseudoColorMask;
diff --git a/xorg-server/hw/xwin/winrandr.c b/xorg-server/hw/xwin/winrandr.c
index 680817e9d..7b7ec0c60 100644
--- a/xorg-server/hw/xwin/winrandr.c
+++ b/xorg-server/hw/xwin/winrandr.c
@@ -1,321 +1,221 @@
-/*
- *Copyright (C) 2001-2004 Harold L Hunt II All Rights Reserved.
- *Copyright (C) 2009-2010 Jon TURNEY
- *
- *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 the author(s)
- *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 author(s)
- *
- * Authors: Harold L Hunt II
- * Jon TURNEY
- */
-
-#ifdef HAVE_XWIN_CONFIG_H
-#include <xwin-config.h>
-#endif
-#include "win.h"
-#include "mivalidate.h" // for union _Validate used by windowstr.h
-
-#ifndef RANDR_12_INTERFACE
-#error X server must have RandR 1.2 interface
-#endif
-
-
-/*
- * Answer queries about the RandR features supported.
- */
-
-static Bool
-winRandRGetInfo (ScreenPtr pScreen, Rotation *pRotations)
-{
- winDebug ("winRandRGetInfo ()\n");
-
- /* Don't support rotations */
- *pRotations = RR_Rotate_0;
-
- /*
- The screen doesn't have to be limited to the actual
- monitor size (we can have scrollbars :-), so what is
- the upper limit?
- */
- RRScreenSetSizeRange(pScreen, 0, 0, 4096, 4096);
-
- return TRUE;
-}
-
-
-/*
- Copied from the xfree86 DDX
-
- Why can't this be in DIX?
- Does union _Validate vary depending on DDX??
- */
-void
-xf86SetRootClip (ScreenPtr pScreen, Bool enable)
-{
- WindowPtr pWin = pScreen->root;
- WindowPtr pChild;
- Bool WasViewable = (Bool)(pWin->viewable);
- Bool anyMarked = FALSE;
- WindowPtr pLayerWin;
- BoxRec box;
-
- if (WasViewable)
- {
- for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib)
- {
- (void) (*pScreen->MarkOverlappedWindows)(pChild,
- pChild,
- &pLayerWin);
- }
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- if (pWin->valdata)
- {
- if (HasBorder (pWin))
- {
- RegionPtr borderVisible;
-
- borderVisible = RegionCreate(NullBox, 1);
- RegionSubtract(borderVisible,
- &pWin->borderClip, &pWin->winSize);
- pWin->valdata->before.borderVisible = borderVisible;
- }
- pWin->valdata->before.resized = TRUE;
- }
- }
-
- /*
- * Use REGION_BREAK to avoid optimizations in ValidateTree
- * that assume the root borderClip can't change well, normally
- * it doesn't...)
- */
- if (enable)
- {
- box.x1 = 0;
- box.y1 = 0;
- box.x2 = pScreen->width;
- box.y2 = pScreen->height;
- RegionInit(&pWin->winSize, &box, 1);
- RegionInit(&pWin->borderSize, &box, 1);
- if (WasViewable)
- RegionReset(&pWin->borderClip, &box);
- pWin->drawable.width = pScreen->width;
- pWin->drawable.height = pScreen->height;
- RegionBreak(&pWin->clipList);
- }
- else
- {
- RegionEmpty(&pWin->borderClip);
- RegionBreak(&pWin->clipList);
- }
-
- ResizeChildrenWinSize (pWin, 0, 0, 0, 0);
-
- if (WasViewable)
- {
- if (pWin->firstChild)
- {
- anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
- pWin->firstChild,
- (WindowPtr *)NULL);
- }
- else
- {
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- }
-
-
- if (anyMarked)
- (*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
- }
-
- if (WasViewable)
- {
- if (anyMarked)
- (*pScreen->HandleExposures)(pWin);
- if (anyMarked && pScreen->PostValidateTree)
- (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
- }
- if (pWin->realized)
- WindowsRestructured ();
- FlushAllOutput ();
-}
-
-/*
-
-*/
-void
-winDoRandRScreenSetSize (ScreenPtr pScreen,
- CARD16 width,
- CARD16 height,
- CARD32 mmWidth,
- CARD32 mmHeight)
-{
- winScreenPriv(pScreen);
- winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
- WindowPtr pRoot = pScreen->root;
-
- // Prevent screen updates while we change things around
- xf86SetRootClip(pScreen, FALSE);
-
- /* Update the screen size as requested */
- pScreenInfo->dwWidth = width;
- pScreenInfo->dwHeight = height;
-
- /* Reallocate the framebuffer used by the drawing engine */
- (*pScreenPriv->pwinFreeFB)(pScreen);
- if (!(*pScreenPriv->pwinAllocateFB)(pScreen))
- {
- ErrorF ("winDoRandRScreenSetSize - Could not reallocate framebuffer\n");
- }
-
- pScreen->width = width;
- pScreen->height = height;
- pScreen->mmWidth = mmWidth;
- pScreen->mmHeight = mmHeight;
-
- /* Update the screen pixmap to point to the new framebuffer */
- winUpdateFBPointer(pScreen, pScreenInfo->pfb);
-
- // pScreen->devPrivate == pScreen->GetScreenPixmap(screen) ?
- // resize the root window
- //pScreen->ResizeWindow(pRoot, 0, 0, width, height, NULL);
- // does this emit a ConfigureNotify??
-
- // Restore the ability to update screen, now with new dimensions
- xf86SetRootClip(pScreen, TRUE);
-
- // and arrange for it to be repainted
- miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
-
- /* Indicate that a screen size change took place */
- RRScreenSizeNotify(pScreen);
-}
-
-/*
- * Respond to resize request
- */
-static
-Bool
-winRandRScreenSetSize (ScreenPtr pScreen,
- CARD16 width,
- CARD16 height,
- CARD32 mmWidth,
- CARD32 mmHeight)
-{
- winScreenPriv(pScreen);
- winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
-
- winDebug ("winRandRScreenSetSize ()\n");
-
- /*
- It doesn't currently make sense to allow resize in fullscreen mode
- (we'd actually have to list the supported resolutions)
- */
- if (pScreenInfo->fFullScreen)
- {
- ErrorF ("winRandRScreenSetSize - resize not supported in fullscreen mode\n");
- return FALSE;
- }
-
- /*
- Client resize requests aren't allowed in rootless modes, even if
- the X screen is monitor or virtual desktop size, we'd need to
- resize the native display size
- */
- if (FALSE
-#ifdef XWIN_MULTIWINDOWEXTWM
- || pScreenInfo->fMWExtWM
-#endif
- || pScreenInfo->fRootless
-#ifdef XWIN_MULTIWINDOW
- || pScreenInfo->fMultiWindow
-#endif
- )
- {
- ErrorF ("winRandRScreenSetSize - resize not supported in rootless modes\n");
- return FALSE;
- }
-
- winDoRandRScreenSetSize(pScreen, width, height, mmWidth, mmHeight);
-
- /* Cause the native window for the screen to resize itself */
- {
- DWORD dwStyle, dwExStyle;
- RECT rcClient;
-
- rcClient.left = 0;
- rcClient.top = 0;
- rcClient.right = width;
- rcClient.bottom = height;
-
- ErrorF ("winRandRScreenSetSize new client area w: %d h: %d\n", width, height);
-
- /* Get the Windows window style and extended style */
- dwExStyle = GetWindowLongPtr(pScreenPriv->hwndScreen, GWL_EXSTYLE);
- dwStyle = GetWindowLongPtr(pScreenPriv->hwndScreen, GWL_STYLE);
-
- /*
- * Calculate the window size needed for the given client area
- * adjusting for any decorations it will have
- */
- AdjustWindowRectEx(&rcClient, dwStyle, FALSE, dwExStyle);
-
- ErrorF ("winRandRScreenSetSize new window area w: %ld h: %ld\n", rcClient.right-rcClient.left, rcClient.bottom-rcClient.top);
-
- SetWindowPos(pScreenPriv->hwndScreen, NULL,
- 0, 0, rcClient.right-rcClient.left, rcClient.bottom-rcClient.top,
- SWP_NOZORDER | SWP_NOMOVE);
- }
-
- return TRUE;
-}
-
-/*
- * Initialize the RandR layer.
- */
-
-Bool
-winRandRInit (ScreenPtr pScreen)
-{
- rrScrPrivPtr pRRScrPriv;
- winDebug ("winRandRInit ()\n");
-
- if (!RRScreenInit (pScreen))
- {
- ErrorF ("winRandRInit () - RRScreenInit () failed\n");
- return FALSE;
- }
-
- /* Set some RandR function pointers */
- pRRScrPriv = rrGetScrPriv (pScreen);
- pRRScrPriv->rrGetInfo = winRandRGetInfo;
- pRRScrPriv->rrSetConfig = NULL;
- pRRScrPriv->rrScreenSetSize = winRandRScreenSetSize;
- pRRScrPriv->rrCrtcSet = NULL;
- pRRScrPriv->rrCrtcSetGamma = NULL;
-
- return TRUE;
-}
+/*
+ *Copyright (C) 2001-2004 Harold L Hunt II All Rights Reserved.
+ *Copyright (C) 2009-2010 Jon TURNEY
+ *
+ *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 the author(s)
+ *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 author(s)
+ *
+ * Authors: Harold L Hunt II
+ * Jon TURNEY
+ */
+
+#ifdef HAVE_XWIN_CONFIG_H
+#include <xwin-config.h>
+#endif
+#include "win.h"
+#include "mivalidate.h" // for union _Validate used by windowstr.h
+
+#ifndef RANDR_12_INTERFACE
+#error X server must have RandR 1.2 interface
+#endif
+
+
+/*
+ * Answer queries about the RandR features supported.
+ */
+
+static Bool
+winRandRGetInfo (ScreenPtr pScreen, Rotation *pRotations)
+{
+ winDebug ("winRandRGetInfo ()\n");
+
+ /* Don't support rotations */
+ *pRotations = RR_Rotate_0;
+
+ /*
+ The screen doesn't have to be limited to the actual
+ monitor size (we can have scrollbars :-), so what is
+ the upper limit?
+ */
+ RRScreenSetSizeRange(pScreen, 0, 0, 4096, 4096);
+
+ return TRUE;
+}
+
+/*
+
+*/
+void
+winDoRandRScreenSetSize (ScreenPtr pScreen,
+ CARD16 width,
+ CARD16 height,
+ CARD32 mmWidth,
+ CARD32 mmHeight)
+{
+ winScreenPriv(pScreen);
+ winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
+ WindowPtr pRoot = pScreen->root;
+
+ // Prevent screen updates while we change things around
+ SetRootClip(pScreen, FALSE);
+
+ /* Update the screen size as requested */
+ pScreenInfo->dwWidth = width;
+ pScreenInfo->dwHeight = height;
+
+ /* Reallocate the framebuffer used by the drawing engine */
+ (*pScreenPriv->pwinFreeFB)(pScreen);
+ if (!(*pScreenPriv->pwinAllocateFB)(pScreen))
+ {
+ ErrorF ("winDoRandRScreenSetSize - Could not reallocate framebuffer\n");
+ }
+
+ pScreen->width = width;
+ pScreen->height = height;
+ pScreen->mmWidth = mmWidth;
+ pScreen->mmHeight = mmHeight;
+
+ /* Update the screen pixmap to point to the new framebuffer */
+ winUpdateFBPointer(pScreen, pScreenInfo->pfb);
+
+ // pScreen->devPrivate == pScreen->GetScreenPixmap(screen) ?
+ // resize the root window
+ //pScreen->ResizeWindow(pRoot, 0, 0, width, height, NULL);
+ // does this emit a ConfigureNotify??
+
+ // Restore the ability to update screen, now with new dimensions
+ SetRootClip(pScreen, TRUE);
+
+ // and arrange for it to be repainted
+ miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
+
+ /* Indicate that a screen size change took place */
+ RRScreenSizeNotify(pScreen);
+}
+
+/*
+ * Respond to resize request
+ */
+static
+Bool
+winRandRScreenSetSize (ScreenPtr pScreen,
+ CARD16 width,
+ CARD16 height,
+ CARD32 mmWidth,
+ CARD32 mmHeight)
+{
+ winScreenPriv(pScreen);
+ winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
+
+ winDebug ("winRandRScreenSetSize ()\n");
+
+ /*
+ It doesn't currently make sense to allow resize in fullscreen mode
+ (we'd actually have to list the supported resolutions)
+ */
+ if (pScreenInfo->fFullScreen)
+ {
+ ErrorF ("winRandRScreenSetSize - resize not supported in fullscreen mode\n");
+ return FALSE;
+ }
+
+ /*
+ Client resize requests aren't allowed in rootless modes, even if
+ the X screen is monitor or virtual desktop size, we'd need to
+ resize the native display size
+ */
+ if (FALSE
+#ifdef XWIN_MULTIWINDOWEXTWM
+ || pScreenInfo->fMWExtWM
+#endif
+ || pScreenInfo->fRootless
+#ifdef XWIN_MULTIWINDOW
+ || pScreenInfo->fMultiWindow
+#endif
+ )
+ {
+ ErrorF ("winRandRScreenSetSize - resize not supported in rootless modes\n");
+ return FALSE;
+ }
+
+ winDoRandRScreenSetSize(pScreen, width, height, mmWidth, mmHeight);
+
+ /* Cause the native window for the screen to resize itself */
+ {
+ DWORD dwStyle, dwExStyle;
+ RECT rcClient;
+
+ rcClient.left = 0;
+ rcClient.top = 0;
+ rcClient.right = width;
+ rcClient.bottom = height;
+
+ ErrorF ("winRandRScreenSetSize new client area w: %d h: %d\n", width, height);
+
+ /* Get the Windows window style and extended style */
+ dwExStyle = GetWindowLongPtr(pScreenPriv->hwndScreen, GWL_EXSTYLE);
+ dwStyle = GetWindowLongPtr(pScreenPriv->hwndScreen, GWL_STYLE);
+
+ /*
+ * Calculate the window size needed for the given client area
+ * adjusting for any decorations it will have
+ */
+ AdjustWindowRectEx(&rcClient, dwStyle, FALSE, dwExStyle);
+
+ ErrorF ("winRandRScreenSetSize new window area w: %ld h: %ld\n", rcClient.right-rcClient.left, rcClient.bottom-rcClient.top);
+
+ SetWindowPos(pScreenPriv->hwndScreen, NULL,
+ 0, 0, rcClient.right-rcClient.left, rcClient.bottom-rcClient.top,
+ SWP_NOZORDER | SWP_NOMOVE);
+ }
+
+ return TRUE;
+}
+
+/*
+ * Initialize the RandR layer.
+ */
+
+Bool
+winRandRInit (ScreenPtr pScreen)
+{
+ rrScrPrivPtr pRRScrPriv;
+ winDebug ("winRandRInit ()\n");
+
+ if (!RRScreenInit (pScreen))
+ {
+ ErrorF ("winRandRInit () - RRScreenInit () failed\n");
+ return FALSE;
+ }
+
+ /* Set some RandR function pointers */
+ pRRScrPriv = rrGetScrPriv (pScreen);
+ pRRScrPriv->rrGetInfo = winRandRGetInfo;
+ pRRScrPriv->rrSetConfig = NULL;
+ pRRScrPriv->rrScreenSetSize = winRandRScreenSetSize;
+ pRRScrPriv->rrCrtcSet = NULL;
+ pRRScrPriv->rrCrtcSetGamma = NULL;
+
+ return TRUE;
+}
diff --git a/xorg-server/hw/xwin/winwndproc.c b/xorg-server/hw/xwin/winwndproc.c
index 649de4368..e1cb77508 100644
--- a/xorg-server/hw/xwin/winwndproc.c
+++ b/xorg-server/hw/xwin/winwndproc.c
@@ -48,8 +48,6 @@
#endif
#include <xkbsrv.h>
-void xf86SetRootClip (ScreenPtr pScreen, Bool enable);
-
/*
* Global variables
*/
@@ -325,7 +323,7 @@ winWindowProc (HWND hwnd, UINT message,
/* Update the screen pixmap to point to the new framebuffer */
winUpdateFBPointer(s_pScreen, s_pScreenPriv->pScreenInfo->pfb);
// Restore the ability to update screen, now with new dimensions
- xf86SetRootClip(s_pScreen, TRUE);
+ SetRootClip(s_pScreen, TRUE);
// and arrange for it to be repainted
miPaintWindow(s_pScreen->root, &s_pScreen->root->borderClip, PW_BACKGROUND);
diff --git a/xorg-server/include/dix-config.h.in b/xorg-server/include/dix-config.h.in
index 174e64a99..2c0f00b3e 100644
--- a/xorg-server/include/dix-config.h.in
+++ b/xorg-server/include/dix-config.h.in
@@ -444,6 +444,9 @@
/* Define to 1 if you have the `ffs' function. */
#undef HAVE_FFS
+/* If the compiler supports a TLS storage class define it to that here */
+#undef TLS
+
/* Correctly set _XSERVER64 for OSX fat binaries */
#ifdef __APPLE__
#include "dix-config-apple-verbatim.h"
diff --git a/xorg-server/include/input.h b/xorg-server/include/input.h
index ec915b37e..7d818e0b8 100644
--- a/xorg-server/include/input.h
+++ b/xorg-server/include/input.h
@@ -311,7 +311,10 @@ extern _X_EXPORT Bool InitPointerAccelerationScheme(
DeviceIntPtr /*dev*/,
int /*scheme*/);
-extern _X_EXPORT Bool InitAbsoluteClassDeviceStruct(
+/**
+ * This is not implemented and just returns FALSE.
+ */
+extern _X_EXPORT _X_DEPRECATED Bool InitAbsoluteClassDeviceStruct(
DeviceIntPtr /*device*/);
extern _X_EXPORT Bool InitFocusClassDeviceStruct(
diff --git a/xorg-server/include/inputstr.h b/xorg-server/include/inputstr.h
index 02c30d33e..4016524d2 100644
--- a/xorg-server/include/inputstr.h
+++ b/xorg-server/include/inputstr.h
@@ -317,27 +317,6 @@ typedef struct _ProximityClassRec {
char in_proximity;
} ProximityClassRec, *ProximityClassPtr;
-typedef struct _AbsoluteClassRec {
- int sourceid;
- /* Calibration. */
- int min_x;
- int max_x;
- int min_y;
- int max_y;
- int flip_x;
- int flip_y;
- int rotation;
- int button_threshold;
-
- /* Area. */
- int offset_x;
- int offset_y;
- int width;
- int height;
- int screen;
- XID following;
-} AbsoluteClassRec, *AbsoluteClassPtr;
-
typedef struct _KbdFeedbackClassRec *KbdFeedbackPtr;
typedef struct _PtrFeedbackClassRec *PtrFeedbackPtr;
typedef struct _IntegerFeedbackClassRec *IntegerFeedbackPtr;
@@ -392,7 +371,7 @@ typedef struct _ClassesRec {
ButtonClassPtr button;
FocusClassPtr focus;
ProximityClassPtr proximity;
- AbsoluteClassPtr absolute;
+ void* _pad0; /* keep ABI during AbsoluteClass removal */
KbdFeedbackPtr kbdfeed;
PtrFeedbackPtr ptrfeed;
IntegerFeedbackPtr intfeed;
@@ -517,7 +496,7 @@ typedef struct _DeviceIntRec {
ButtonClassPtr button;
FocusClassPtr focus;
ProximityClassPtr proximity;
- AbsoluteClassPtr absolute;
+ void* _pad0; /* keep ABI, was pointer to abs class */
KbdFeedbackPtr kbdfeed;
PtrFeedbackPtr ptrfeed;
IntegerFeedbackPtr intfeed;
diff --git a/xorg-server/include/window.h b/xorg-server/include/window.h
index 6fb2f8c18..e9d84eef0 100644
--- a/xorg-server/include/window.h
+++ b/xorg-server/include/window.h
@@ -1,269 +1,270 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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
-OPEN GROUP 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 Open Group 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 Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef WINDOW_H
-#define WINDOW_H
-
-#include "misc.h"
-#include "region.h"
-#include "screenint.h"
-#include <X11/Xproto.h>
-
-#define TOTALLY_OBSCURED 0
-#define UNOBSCURED 1
-#define OBSCURED 2
-
-#define VisibilityNotViewable 3
-
-/* return values for tree-walking callback procedures */
-#define WT_STOPWALKING 0
-#define WT_WALKCHILDREN 1
-#define WT_DONTWALKCHILDREN 2
-#define WT_NOMATCH 3
-#define NullWindow ((WindowPtr) 0)
-
-/* Forward declaration, we can't include input.h here */
-struct _DeviceIntRec;
-struct _Cursor;
-
-typedef struct _BackingStore *BackingStorePtr;
-typedef struct _Window *WindowPtr;
-
-typedef int (*VisitWindowProcPtr)(
- WindowPtr /*pWin*/,
- pointer /*data*/);
-
-extern _X_EXPORT int TraverseTree(
- WindowPtr /*pWin*/,
- VisitWindowProcPtr /*func*/,
- pointer /*data*/);
-
-extern _X_EXPORT int WalkTree(
- ScreenPtr /*pScreen*/,
- VisitWindowProcPtr /*func*/,
- pointer /*data*/);
-
-extern _X_EXPORT Bool CreateRootWindow(
- ScreenPtr /*pScreen*/);
-
-extern _X_EXPORT void InitRootWindow(
- WindowPtr /*pWin*/);
-
-typedef WindowPtr (* RealChildHeadProc) (WindowPtr pWin);
-
-extern _X_EXPORT void RegisterRealChildHeadProc (RealChildHeadProc proc);
-
-extern _X_EXPORT WindowPtr RealChildHead(
- WindowPtr /*pWin*/);
-
-extern _X_EXPORT WindowPtr CreateWindow(
- Window /*wid*/,
- WindowPtr /*pParent*/,
- int /*x*/,
- int /*y*/,
- unsigned int /*w*/,
- unsigned int /*h*/,
- unsigned int /*bw*/,
- unsigned int /*class*/,
- Mask /*vmask*/,
- XID* /*vlist*/,
- int /*depth*/,
- ClientPtr /*client*/,
- VisualID /*visual*/,
- int* /*error*/);
-
-extern _X_EXPORT int DeleteWindow(
- pointer /*pWin*/,
- XID /*wid*/);
-
-extern _X_EXPORT int DestroySubwindows(
- WindowPtr /*pWin*/,
- ClientPtr /*client*/);
-
-/* Quartz support on Mac OS X uses the HIToolbox
- framework whose ChangeWindowAttributes function conflicts here. */
-#ifdef __APPLE__
-#define ChangeWindowAttributes Darwin_X_ChangeWindowAttributes
-#endif
-extern _X_EXPORT int ChangeWindowAttributes(
- WindowPtr /*pWin*/,
- Mask /*vmask*/,
- XID* /*vlist*/,
- ClientPtr /*client*/);
-
-extern _X_EXPORT int ChangeWindowDeviceCursor(
- WindowPtr /*pWin*/,
- struct _DeviceIntRec* /*pDev*/,
- struct _Cursor* /*pCursor*/);
-
-extern _X_EXPORT struct _Cursor* WindowGetDeviceCursor(
- WindowPtr /*pWin*/,
- struct _DeviceIntRec* /*pDev*/);
-
-/* Quartz support on Mac OS X uses the HIToolbox
- framework whose GetWindowAttributes function conflicts here. */
-#ifdef __APPLE__
-#define GetWindowAttributes(w,c,x) Darwin_X_GetWindowAttributes(w,c,x)
-extern void Darwin_X_GetWindowAttributes(
-#else
-extern _X_EXPORT void GetWindowAttributes(
-#endif
- WindowPtr /*pWin*/,
- ClientPtr /*client*/,
- xGetWindowAttributesReply* /* wa */);
-
-extern _X_EXPORT void GravityTranslate(
- int /*x*/,
- int /*y*/,
- int /*oldx*/,
- int /*oldy*/,
- int /*dw*/,
- int /*dh*/,
- unsigned /*gravity*/,
- int* /*destx*/,
- int* /*desty*/);
-
-extern _X_EXPORT int ConfigureWindow(
- WindowPtr /*pWin*/,
- Mask /*mask*/,
- XID* /*vlist*/,
- ClientPtr /*client*/);
-
-extern _X_EXPORT int CirculateWindow(
- WindowPtr /*pParent*/,
- int /*direction*/,
- ClientPtr /*client*/);
-
-extern _X_EXPORT int ReparentWindow(
- WindowPtr /*pWin*/,
- WindowPtr /*pParent*/,
- int /*x*/,
- int /*y*/,
- ClientPtr /*client*/);
-
-extern _X_EXPORT int MapWindow(
- WindowPtr /*pWin*/,
- ClientPtr /*client*/);
-
-extern _X_EXPORT void MapSubwindows(
- WindowPtr /*pParent*/,
- ClientPtr /*client*/);
-
-extern _X_EXPORT int UnmapWindow(
- WindowPtr /*pWin*/,
- Bool /*fromConfigure*/);
-
-extern _X_EXPORT void UnmapSubwindows(
- WindowPtr /*pWin*/);
-
-extern _X_EXPORT void HandleSaveSet(
- ClientPtr /*client*/);
-
-extern _X_EXPORT Bool PointInWindowIsVisible(
- WindowPtr /*pWin*/,
- int /*x*/,
- int /*y*/);
-
-extern _X_EXPORT RegionPtr NotClippedByChildren(
- WindowPtr /*pWin*/);
-
-extern _X_EXPORT void SendVisibilityNotify(
- WindowPtr /*pWin*/);
-
-extern _X_EXPORT int dixSaveScreens(
- ClientPtr client,
- int on,
- int mode);
-
-extern _X_EXPORT int SaveScreens(
- int on,
- int mode);
-
-extern _X_EXPORT WindowPtr FindWindowWithOptional(
- WindowPtr /*w*/);
-
-extern _X_EXPORT void CheckWindowOptionalNeed(
- WindowPtr /*w*/);
-
-extern _X_EXPORT Bool MakeWindowOptional(
- WindowPtr /*pWin*/);
-
-extern _X_EXPORT WindowPtr MoveWindowInStack(
- WindowPtr /*pWin*/,
- WindowPtr /*pNextSib*/);
-
-extern _X_EXPORT void SetWinSize(
- WindowPtr /*pWin*/);
-
-extern _X_EXPORT void SetBorderSize(
- WindowPtr /*pWin*/);
-
-extern _X_EXPORT void ResizeChildrenWinSize(
- WindowPtr /*pWin*/,
- int /*dx*/,
- int /*dy*/,
- int /*dw*/,
- int /*dh*/);
-
-extern _X_EXPORT void ShapeExtensionInit(void);
-
-extern _X_EXPORT void SendShapeNotify(
- WindowPtr /* pWin */,
- int /* which */ );
-
-extern _X_EXPORT RegionPtr CreateBoundingShape(
- WindowPtr /* pWin */ );
-
-extern _X_EXPORT RegionPtr CreateClipShape(
- WindowPtr /* pWin */ );
-
-extern _X_EXPORT void DisableMapUnmapEvents(
- WindowPtr /* pWin */ );
-extern _X_EXPORT void EnableMapUnmapEvents(
- WindowPtr /* pWin */ );
-
-#endif /* WINDOW_H */
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+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
+OPEN GROUP 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 Open Group 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 Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include "misc.h"
+#include "region.h"
+#include "screenint.h"
+#include <X11/Xproto.h>
+
+#define TOTALLY_OBSCURED 0
+#define UNOBSCURED 1
+#define OBSCURED 2
+
+#define VisibilityNotViewable 3
+
+/* return values for tree-walking callback procedures */
+#define WT_STOPWALKING 0
+#define WT_WALKCHILDREN 1
+#define WT_DONTWALKCHILDREN 2
+#define WT_NOMATCH 3
+#define NullWindow ((WindowPtr) 0)
+
+/* Forward declaration, we can't include input.h here */
+struct _DeviceIntRec;
+struct _Cursor;
+
+typedef struct _BackingStore *BackingStorePtr;
+typedef struct _Window *WindowPtr;
+
+typedef int (*VisitWindowProcPtr)(
+ WindowPtr /*pWin*/,
+ pointer /*data*/);
+
+extern _X_EXPORT int TraverseTree(
+ WindowPtr /*pWin*/,
+ VisitWindowProcPtr /*func*/,
+ pointer /*data*/);
+
+extern _X_EXPORT int WalkTree(
+ ScreenPtr /*pScreen*/,
+ VisitWindowProcPtr /*func*/,
+ pointer /*data*/);
+
+extern _X_EXPORT Bool CreateRootWindow(
+ ScreenPtr /*pScreen*/);
+
+extern _X_EXPORT void InitRootWindow(
+ WindowPtr /*pWin*/);
+
+typedef WindowPtr (* RealChildHeadProc) (WindowPtr pWin);
+
+extern _X_EXPORT void RegisterRealChildHeadProc (RealChildHeadProc proc);
+
+extern _X_EXPORT WindowPtr RealChildHead(
+ WindowPtr /*pWin*/);
+
+extern _X_EXPORT WindowPtr CreateWindow(
+ Window /*wid*/,
+ WindowPtr /*pParent*/,
+ int /*x*/,
+ int /*y*/,
+ unsigned int /*w*/,
+ unsigned int /*h*/,
+ unsigned int /*bw*/,
+ unsigned int /*class*/,
+ Mask /*vmask*/,
+ XID* /*vlist*/,
+ int /*depth*/,
+ ClientPtr /*client*/,
+ VisualID /*visual*/,
+ int* /*error*/);
+
+extern _X_EXPORT int DeleteWindow(
+ pointer /*pWin*/,
+ XID /*wid*/);
+
+extern _X_EXPORT int DestroySubwindows(
+ WindowPtr /*pWin*/,
+ ClientPtr /*client*/);
+
+/* Quartz support on Mac OS X uses the HIToolbox
+ framework whose ChangeWindowAttributes function conflicts here. */
+#ifdef __APPLE__
+#define ChangeWindowAttributes Darwin_X_ChangeWindowAttributes
+#endif
+extern _X_EXPORT int ChangeWindowAttributes(
+ WindowPtr /*pWin*/,
+ Mask /*vmask*/,
+ XID* /*vlist*/,
+ ClientPtr /*client*/);
+
+extern _X_EXPORT int ChangeWindowDeviceCursor(
+ WindowPtr /*pWin*/,
+ struct _DeviceIntRec* /*pDev*/,
+ struct _Cursor* /*pCursor*/);
+
+extern _X_EXPORT struct _Cursor* WindowGetDeviceCursor(
+ WindowPtr /*pWin*/,
+ struct _DeviceIntRec* /*pDev*/);
+
+/* Quartz support on Mac OS X uses the HIToolbox
+ framework whose GetWindowAttributes function conflicts here. */
+#ifdef __APPLE__
+#define GetWindowAttributes(w,c,x) Darwin_X_GetWindowAttributes(w,c,x)
+extern void Darwin_X_GetWindowAttributes(
+#else
+extern _X_EXPORT void GetWindowAttributes(
+#endif
+ WindowPtr /*pWin*/,
+ ClientPtr /*client*/,
+ xGetWindowAttributesReply* /* wa */);
+
+extern _X_EXPORT void GravityTranslate(
+ int /*x*/,
+ int /*y*/,
+ int /*oldx*/,
+ int /*oldy*/,
+ int /*dw*/,
+ int /*dh*/,
+ unsigned /*gravity*/,
+ int* /*destx*/,
+ int* /*desty*/);
+
+extern _X_EXPORT int ConfigureWindow(
+ WindowPtr /*pWin*/,
+ Mask /*mask*/,
+ XID* /*vlist*/,
+ ClientPtr /*client*/);
+
+extern _X_EXPORT int CirculateWindow(
+ WindowPtr /*pParent*/,
+ int /*direction*/,
+ ClientPtr /*client*/);
+
+extern _X_EXPORT int ReparentWindow(
+ WindowPtr /*pWin*/,
+ WindowPtr /*pParent*/,
+ int /*x*/,
+ int /*y*/,
+ ClientPtr /*client*/);
+
+extern _X_EXPORT int MapWindow(
+ WindowPtr /*pWin*/,
+ ClientPtr /*client*/);
+
+extern _X_EXPORT void MapSubwindows(
+ WindowPtr /*pParent*/,
+ ClientPtr /*client*/);
+
+extern _X_EXPORT int UnmapWindow(
+ WindowPtr /*pWin*/,
+ Bool /*fromConfigure*/);
+
+extern _X_EXPORT void UnmapSubwindows(
+ WindowPtr /*pWin*/);
+
+extern _X_EXPORT void HandleSaveSet(
+ ClientPtr /*client*/);
+
+extern _X_EXPORT Bool PointInWindowIsVisible(
+ WindowPtr /*pWin*/,
+ int /*x*/,
+ int /*y*/);
+
+extern _X_EXPORT RegionPtr NotClippedByChildren(
+ WindowPtr /*pWin*/);
+
+extern _X_EXPORT void SendVisibilityNotify(
+ WindowPtr /*pWin*/);
+
+extern _X_EXPORT int dixSaveScreens(
+ ClientPtr client,
+ int on,
+ int mode);
+
+extern _X_EXPORT int SaveScreens(
+ int on,
+ int mode);
+
+extern _X_EXPORT WindowPtr FindWindowWithOptional(
+ WindowPtr /*w*/);
+
+extern _X_EXPORT void CheckWindowOptionalNeed(
+ WindowPtr /*w*/);
+
+extern _X_EXPORT Bool MakeWindowOptional(
+ WindowPtr /*pWin*/);
+
+extern _X_EXPORT WindowPtr MoveWindowInStack(
+ WindowPtr /*pWin*/,
+ WindowPtr /*pNextSib*/);
+
+extern _X_EXPORT void SetWinSize(
+ WindowPtr /*pWin*/);
+
+extern _X_EXPORT void SetBorderSize(
+ WindowPtr /*pWin*/);
+
+extern _X_EXPORT void ResizeChildrenWinSize(
+ WindowPtr /*pWin*/,
+ int /*dx*/,
+ int /*dy*/,
+ int /*dw*/,
+ int /*dh*/);
+
+extern _X_EXPORT void ShapeExtensionInit(void);
+
+extern _X_EXPORT void SendShapeNotify(
+ WindowPtr /* pWin */,
+ int /* which */ );
+
+extern _X_EXPORT RegionPtr CreateBoundingShape(
+ WindowPtr /* pWin */ );
+
+extern _X_EXPORT RegionPtr CreateClipShape(
+ WindowPtr /* pWin */ );
+
+extern _X_EXPORT void DisableMapUnmapEvents(
+ WindowPtr /* pWin */ );
+extern _X_EXPORT void EnableMapUnmapEvents(
+ WindowPtr /* pWin */ );
+
+extern _X_EXPORT void SetRootClip(ScreenPtr pScreen, Bool enable);
+#endif /* WINDOW_H */
diff --git a/xorg-server/os/client.c b/xorg-server/os/client.c
index 1311855d5..c7c59d69f 100644
--- a/xorg-server/os/client.c
+++ b/xorg-server/os/client.c
@@ -1,310 +1,309 @@
-/*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). All
- * rights reserved.
- * Copyright (c) 1993, 2010, Oracle and/or its affiliates. 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 THE
- * AUTHORS OR COPYRIGHT HOLDERS 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.
- */
-
-/**
- * @file
- *
- * This file contains functionality for identifying clients by various
- * means. The primary purpose of identification is to simply aid in
- * finding out which clients are using X server and how they are using
- * it. For example, it's often necessary to monitor what requests
- * clients are executing (to spot bad behaviour) and how they are
- * allocating resources in X server (to spot excessive resource
- * usage).
- *
- * This framework automatically allocates information, that can be
- * used for client identification, when a client connects to the
- * server. The information is freed when the client disconnects. The
- * allocated information is just a collection of various IDs, such as
- * PID and process name for local clients, that are likely to be
- * useful in analyzing X server usage.
- *
- * Users of the framework can query ID information about clients at
- * any time. To avoid repeated polling of IDs the users can also
- * subscribe for notifications about the availability of ID
- * information. IDs have been allocated before ClientStateCallback is
- * called with ClientStateInitial state. Similarly the IDs will be
- * released after ClientStateCallback is called with ClientStateGone
- * state.
- *
- * Author: Rami Ylimäki <rami.ylimaki@vincit.fi>
- */
-
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include "client.h"
-#include "os.h"
-#include "dixstruct.h"
-
-/**
- * Try to determine a PID for a client from its connection
- * information. This should be called only once when new client has
- * connected, use GetClientPid to determine the PID at other times.
- *
- * @param[in] client Connection linked to some process.
- *
- * @return PID of the client. Error (-1) if PID can't be determined
- * for the client.
- *
- * @see GetClientPid
- */
-pid_t DetermineClientPid(struct _Client *client)
-{
- LocalClientCredRec *lcc = NULL;
- pid_t pid = -1;
-
- if (client == NullClient)
- return pid;
-
- if (client == serverClient)
- return getpid();
-
- if (GetLocalClientCreds(client, &lcc) != -1)
- {
- if (lcc->fieldsSet & LCC_PID_SET)
- pid = lcc->pid;
- FreeLocalClientCreds(lcc);
- }
-
- return pid;
-}
-
-/**
- * Try to determine a command line string for a client based on its
- * PID. Note that mapping PID to a command hasn't been implemented for
- * some operating systems. This should be called only once when a new
- * client has connected, use GetClientCmdName/Args to determine the
- * string at other times.
- *
- * @param[in] pid Process ID of a client.
-
- * @param[out] cmdname Client process name without arguments. You must
- * release this by calling free. On error NULL is
- * returned. Pass NULL if you aren't interested in
- * this value.
- * @param[out] cmdargs Arguments to client process. Useful for
- * identifying a client that is executed from a
- * launcher program. You must release this by
- * calling free. On error NULL is returned. Pass
- * NULL if you aren't interested in this value.
- *
- * @see GetClientCmdName/Args
- */
-void DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs)
-{
- char path[PATH_MAX + 1];
- int totsize = 0;
- int cmdsize = 0;
- int argsize = 0;
- int fd = 0;
-
- if (cmdname)
- *cmdname = NULL;
- if (cmdargs)
- *cmdargs = NULL;
-
- if (pid == -1)
- return;
-
- /* Check if /proc/pid/cmdline exists. It's not supported on all
- * operating systems. */
- if (snprintf(path, sizeof(path), "/proc/%d/cmdline", pid) < 0)
- return;
- fd = open(path, O_RDONLY);
- if (fd < 0)
- return;
-
- /* Read the contents of /proc/pid/cmdline. It should contain the
- * process name and arguments. */
- totsize = read(fd, path, sizeof(path));
- if (totsize <= 0)
- return;
- if (close(fd) < 0)
- return;
- path[totsize - 1] = '\0';
-
- /* Contruct the process name without arguments. */
- cmdsize = strlen(path) + 1;
- if (cmdname)
- {
- char *name = malloc(cmdsize);
- if (name)
- {
- strncpy(name, path, cmdsize);
- name[cmdsize - 1] = '\0';
- *cmdname = name;
- }
- }
-
- /* Construct the arguments for client process. */
- argsize = totsize - cmdsize;
- if (cmdargs && (argsize > 0))
- {
- char *args = malloc(argsize);
- if (args)
- {
- int i = 0;
- for (i = 0; i < (argsize - 1); ++i)
- {
- const char c = path[cmdsize + i];
- args[i] = (c == '\0') ? ' ' : c;
- }
- args[argsize - 1] = '\0';
- *cmdargs = args;
- }
- }
-}
-
-/**
- * Called when a new client connects. Allocates client ID information.
- *
- * @param[in] client Recently connected client.
- */
-void ReserveClientIds(struct _Client *client)
-{
-#ifdef CLIENTIDS
- if (client == NullClient)
- return;
-
- assert(!client->clientIds);
- client->clientIds = calloc(1, sizeof(ClientIdRec));
- if (!client->clientIds)
- return;
-
- client->clientIds->pid = DetermineClientPid(client);
- if (client->clientIds->pid != -1)
- DetermineClientCmd(client->clientIds->pid, &client->clientIds->cmdname, &client->clientIds->cmdargs);
-
- DebugF("client(%lx): Reserved pid(%d).\n",
- client->clientAsMask, client->clientIds->pid);
- DebugF("client(%lx): Reserved cmdname(%s) and cmdargs(%s).\n",
- client->clientAsMask,
- client->clientIds->cmdname ? client->clientIds->cmdname : "NULL",
- client->clientIds->cmdargs ? client->clientIds->cmdargs : "NULL");
-#endif /* CLIENTIDS */
-}
-
-/**
- * Called when an existing client disconnects. Frees client ID
- * information.
- *
- * @param[in] client Recently disconnected client.
- */
-void ReleaseClientIds(struct _Client *client)
-{
-#ifdef CLIENTIDS
- if (client == NullClient)
- return;
-
- if (!client->clientIds)
- return;
-
- DebugF("client(%lx): Released pid(%d).\n",
- client->clientAsMask, client->clientIds->pid);
- DebugF("client(%lx): Released cmdline(%s) and cmdargs(%s).\n",
- client->clientAsMask,
- client->clientIds->cmdname ? client->clientIds->cmdname : "NULL",
- client->clientIds->cmdargs ? client->clientIds->cmdargs : "NULL");
-
- free((void *) client->clientIds->cmdname); /* const char * */
- free((void *) client->clientIds->cmdargs); /* const char * */
- free(client->clientIds);
- client->clientIds = NULL;
-#endif /* CLIENTIDS */
-}
-
-/**
- * Get cached PID of a client.
- *
- * param[in] client Client whose PID has been already cached.
- *
- * @return Cached client PID. Error (-1) if called:
- * - before ClientStateInitial client state notification
- * - after ClientStateGone client state notification
- * - for remote clients
- *
- * @see DetermineClientPid
- */
-pid_t GetClientPid(struct _Client *client)
-{
- if (client == NullClient)
- return -1;
-
- if (!client->clientIds)
- return -1;
-
- return client->clientIds->pid;
-}
-
-/**
- * Get cached command name string of a client.
- *
- * param[in] client Client whose command line string has been already
- * cached.
- *
- * @return Cached client command name. Error (NULL) if called:
- * - before ClientStateInitial client state notification
- * - after ClientStateGone client state notification
- * - for remote clients
- * - on OS that doesn't support mapping of PID to command line
- *
- * @see DetermineClientCmd
- */
-const char *GetClientCmdName(struct _Client *client)
-{
- if (client == NullClient)
- return NULL;
-
- if (!client->clientIds)
- return NULL;
-
- return client->clientIds->cmdname;
-}
-
-/**
- * Get cached command arguments string of a client.
- *
- * param[in] client Client whose command line string has been already
- * cached.
- *
- * @return Cached client command arguments. Error (NULL) if called:
- * - before ClientStateInitial client state notification
- * - after ClientStateGone client state notification
- * - for remote clients
- * - on OS that doesn't support mapping of PID to command line
- *
- * @see DetermineClientCmd
- */
-const char *GetClientCmdArgs(struct _Client *client)
-{
- if (client == NullClient)
- return NULL;
-
- if (!client->clientIds)
- return NULL;
-
- return client->clientIds->cmdargs;
-}
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). All
+ * rights reserved.
+ * Copyright (c) 1993, 2010, Oracle and/or its affiliates. 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 THE
+ * AUTHORS OR COPYRIGHT HOLDERS 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.
+ */
+
+/**
+ * @file
+ *
+ * This file contains functionality for identifying clients by various
+ * means. The primary purpose of identification is to simply aid in
+ * finding out which clients are using X server and how they are using
+ * it. For example, it's often necessary to monitor what requests
+ * clients are executing (to spot bad behaviour) and how they are
+ * allocating resources in X server (to spot excessive resource
+ * usage).
+ *
+ * This framework automatically allocates information, that can be
+ * used for client identification, when a client connects to the
+ * server. The information is freed when the client disconnects. The
+ * allocated information is just a collection of various IDs, such as
+ * PID and process name for local clients, that are likely to be
+ * useful in analyzing X server usage.
+ *
+ * Users of the framework can query ID information about clients at
+ * any time. To avoid repeated polling of IDs the users can also
+ * subscribe for notifications about the availability of ID
+ * information. IDs have been allocated before ClientStateCallback is
+ * called with ClientStateInitial state. Similarly the IDs will be
+ * released after ClientStateCallback is called with ClientStateGone
+ * state.
+ *
+ * Author: Rami Ylimäki <rami.ylimaki@vincit.fi>
+ */
+
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "client.h"
+#include "os.h"
+#include "dixstruct.h"
+
+/**
+ * Try to determine a PID for a client from its connection
+ * information. This should be called only once when new client has
+ * connected, use GetClientPid to determine the PID at other times.
+ *
+ * @param[in] client Connection linked to some process.
+ *
+ * @return PID of the client. Error (-1) if PID can't be determined
+ * for the client.
+ *
+ * @see GetClientPid
+ */
+pid_t DetermineClientPid(struct _Client *client)
+{
+ LocalClientCredRec *lcc = NULL;
+ pid_t pid = -1;
+
+ if (client == NullClient)
+ return pid;
+
+ if (client == serverClient)
+ return getpid();
+
+ if (GetLocalClientCreds(client, &lcc) != -1)
+ {
+ if (lcc->fieldsSet & LCC_PID_SET)
+ pid = lcc->pid;
+ FreeLocalClientCreds(lcc);
+ }
+
+ return pid;
+}
+
+/**
+ * Try to determine a command line string for a client based on its
+ * PID. Note that mapping PID to a command hasn't been implemented for
+ * some operating systems. This should be called only once when a new
+ * client has connected, use GetClientCmdName/Args to determine the
+ * string at other times.
+ *
+ * @param[in] pid Process ID of a client.
+
+ * @param[out] cmdname Client process name without arguments. You must
+ * release this by calling free. On error NULL is
+ * returned. Pass NULL if you aren't interested in
+ * this value.
+ * @param[out] cmdargs Arguments to client process. Useful for
+ * identifying a client that is executed from a
+ * launcher program. You must release this by
+ * calling free. On error NULL is returned. Pass
+ * NULL if you aren't interested in this value.
+ *
+ * @see GetClientCmdName/Args
+ */
+void DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs)
+{
+ char path[PATH_MAX + 1];
+ int totsize = 0;
+ int cmdsize = 0;
+ int argsize = 0;
+ int fd = 0;
+
+ if (cmdname)
+ *cmdname = NULL;
+ if (cmdargs)
+ *cmdargs = NULL;
+
+ if (pid == -1)
+ return;
+
+ /* Check if /proc/pid/cmdline exists. It's not supported on all
+ * operating systems. */
+ if (snprintf(path, sizeof(path), "/proc/%d/cmdline", pid) < 0)
+ return;
+ fd = open(path, O_RDONLY);
+ if (fd < 0)
+ return;
+
+ /* Read the contents of /proc/pid/cmdline. It should contain the
+ * process name and arguments. */
+ totsize = read(fd, path, sizeof(path));
+ close(fd);
+ if (totsize <= 0)
+ return;
+ path[totsize - 1] = '\0';
+
+ /* Contruct the process name without arguments. */
+ cmdsize = strlen(path) + 1;
+ if (cmdname)
+ {
+ char *name = malloc(cmdsize);
+ if (name)
+ {
+ strncpy(name, path, cmdsize);
+ name[cmdsize - 1] = '\0';
+ *cmdname = name;
+ }
+ }
+
+ /* Construct the arguments for client process. */
+ argsize = totsize - cmdsize;
+ if (cmdargs && (argsize > 0))
+ {
+ char *args = malloc(argsize);
+ if (args)
+ {
+ int i = 0;
+ for (i = 0; i < (argsize - 1); ++i)
+ {
+ const char c = path[cmdsize + i];
+ args[i] = (c == '\0') ? ' ' : c;
+ }
+ args[argsize - 1] = '\0';
+ *cmdargs = args;
+ }
+ }
+}
+
+/**
+ * Called when a new client connects. Allocates client ID information.
+ *
+ * @param[in] client Recently connected client.
+ */
+void ReserveClientIds(struct _Client *client)
+{
+#ifdef CLIENTIDS
+ if (client == NullClient)
+ return;
+
+ assert(!client->clientIds);
+ client->clientIds = calloc(1, sizeof(ClientIdRec));
+ if (!client->clientIds)
+ return;
+
+ client->clientIds->pid = DetermineClientPid(client);
+ if (client->clientIds->pid != -1)
+ DetermineClientCmd(client->clientIds->pid, &client->clientIds->cmdname, &client->clientIds->cmdargs);
+
+ DebugF("client(%lx): Reserved pid(%d).\n",
+ client->clientAsMask, client->clientIds->pid);
+ DebugF("client(%lx): Reserved cmdname(%s) and cmdargs(%s).\n",
+ client->clientAsMask,
+ client->clientIds->cmdname ? client->clientIds->cmdname : "NULL",
+ client->clientIds->cmdargs ? client->clientIds->cmdargs : "NULL");
+#endif /* CLIENTIDS */
+}
+
+/**
+ * Called when an existing client disconnects. Frees client ID
+ * information.
+ *
+ * @param[in] client Recently disconnected client.
+ */
+void ReleaseClientIds(struct _Client *client)
+{
+#ifdef CLIENTIDS
+ if (client == NullClient)
+ return;
+
+ if (!client->clientIds)
+ return;
+
+ DebugF("client(%lx): Released pid(%d).\n",
+ client->clientAsMask, client->clientIds->pid);
+ DebugF("client(%lx): Released cmdline(%s) and cmdargs(%s).\n",
+ client->clientAsMask,
+ client->clientIds->cmdname ? client->clientIds->cmdname : "NULL",
+ client->clientIds->cmdargs ? client->clientIds->cmdargs : "NULL");
+
+ free((void *) client->clientIds->cmdname); /* const char * */
+ free((void *) client->clientIds->cmdargs); /* const char * */
+ free(client->clientIds);
+ client->clientIds = NULL;
+#endif /* CLIENTIDS */
+}
+
+/**
+ * Get cached PID of a client.
+ *
+ * param[in] client Client whose PID has been already cached.
+ *
+ * @return Cached client PID. Error (-1) if called:
+ * - before ClientStateInitial client state notification
+ * - after ClientStateGone client state notification
+ * - for remote clients
+ *
+ * @see DetermineClientPid
+ */
+pid_t GetClientPid(struct _Client *client)
+{
+ if (client == NullClient)
+ return -1;
+
+ if (!client->clientIds)
+ return -1;
+
+ return client->clientIds->pid;
+}
+
+/**
+ * Get cached command name string of a client.
+ *
+ * param[in] client Client whose command line string has been already
+ * cached.
+ *
+ * @return Cached client command name. Error (NULL) if called:
+ * - before ClientStateInitial client state notification
+ * - after ClientStateGone client state notification
+ * - for remote clients
+ * - on OS that doesn't support mapping of PID to command line
+ *
+ * @see DetermineClientCmd
+ */
+const char *GetClientCmdName(struct _Client *client)
+{
+ if (client == NullClient)
+ return NULL;
+
+ if (!client->clientIds)
+ return NULL;
+
+ return client->clientIds->cmdname;
+}
+
+/**
+ * Get cached command arguments string of a client.
+ *
+ * param[in] client Client whose command line string has been already
+ * cached.
+ *
+ * @return Cached client command arguments. Error (NULL) if called:
+ * - before ClientStateInitial client state notification
+ * - after ClientStateGone client state notification
+ * - for remote clients
+ * - on OS that doesn't support mapping of PID to command line
+ *
+ * @see DetermineClientCmd
+ */
+const char *GetClientCmdArgs(struct _Client *client)
+{
+ if (client == NullClient)
+ return NULL;
+
+ if (!client->clientIds)
+ return NULL;
+
+ return client->clientIds->cmdargs;
+}
diff --git a/xorg-server/test/Makefile.am b/xorg-server/test/Makefile.am
index ea886a961..bf091d41d 100644
--- a/xorg-server/test/Makefile.am
+++ b/xorg-server/test/Makefile.am
@@ -2,10 +2,10 @@ if ENABLE_UNIT_TESTS
if HAVE_GLIB
if HAVE_LD_WRAP
SUBDIRS= . xi2
-check_PROGRAMS = xkb input xtest list
+noinst_PROGRAMS = xkb input xtest list
check_LTLIBRARIES = libxservertest.la
-TESTS=$(check_PROGRAMS)
+TESTS=$(noinst_PROGRAMS)
AM_CFLAGS = $(DIX_CFLAGS) $(GLIB_CFLAGS) @XORG_CFLAGS@
INCLUDES = @XORG_INCS@
diff --git a/xorg-server/test/xi2/Makefile.am b/xorg-server/test/xi2/Makefile.am
index b7948b151..c2d0b6e7c 100644
--- a/xorg-server/test/xi2/Makefile.am
+++ b/xorg-server/test/xi2/Makefile.am
@@ -1,7 +1,7 @@
if ENABLE_UNIT_TESTS
if HAVE_GLIB
if HAVE_LD_WRAP
-check_PROGRAMS = \
+noinst_PROGRAMS = \
protocol-xiqueryversion \
protocol-xiquerydevice \
protocol-xiselectevents \
@@ -12,7 +12,7 @@ check_PROGRAMS = \
protocol-xiwarppointer \
protocol-eventconvert
-TESTS=$(check_PROGRAMS)
+TESTS=$(noinst_PROGRAMS)
AM_CFLAGS = $(DIX_CFLAGS) $(GLIB_CFLAGS) @XORG_CFLAGS@
INCLUDES = @XORG_INCS@
diff --git a/xorg-server/xkeyboard-config/NEWS b/xorg-server/xkeyboard-config/NEWS
index c6411f6f0..a8e3e940e 100644
--- a/xorg-server/xkeyboard-config/NEWS
+++ b/xorg-server/xkeyboard-config/NEWS
@@ -1,45 +1,48 @@
-2.1 Bugfixes (13). Updated/new translations. Some new layouts and models.
-2.0 Bugfixes (17). Updated/new translations. Some new layouts and models.
-1.9 Bugfixes (27). Updated/new translations. Some new layouts and models.
- The evdev model is gone, use pc105 instead.
- Some fixes for the build process
-1.8 Bugfixes (10). Updated/new translations. Some new layouts and models.
-1.7 Bugfixes (30). Updated/new translations. Some new layouts and models.
-1.6 Bugfixes (36). Updated/new translations. Some new layouts and models.
- Added terminate:* group
- Dropped locale-specific models
- Improved compat rules
-1.5 Bugfixes (45). Updated/new translations. Some new layouts and models. Serious cleanup in symbols/inet.
-1.4 Bugfixes (31). Updated/new translations. Some new layouts and models. Added evdev ruleset.
-1.3 Bugfixes (35). Updated/new translations. Some new layouts and models. A lot of country and language-related information put into base.xml. Dropped unsupported rulesets sgi and sun.
-1.2 Bugfixes (36). Updated/new translations, renewed relations with TP. Some new layouts and models. A lot of changes from OLPC project. Changed base.xml merging schema (.gmo files are installed and used explicitly)
-1.1 First time-based release. Bugfixes (27). Updated/new translations, renewed relations with TP. Renamed (for clarity) types. Some new layouts and models.
-1.0 Maintenance release. Bugfixes (72). Updated/new translations. Updated/new layouts and models.
-0.9 Maintenance release. Bugfixes (76). Updated/new translations. Updated/new layouts.
-0.8 Maintenance release. Bugfixes. Updated/new translations. Updated/new layouts.
- Massive patch from Sun Microsystems incorporated.
-0.7 New layouts and keyboard models (mostly media keyboards)
- Massive reorganization of the symbols/inet file (huge credits to Frederic Boiteux)
- Improved RAlt handling (for grp:alts_toggle and lvl3:ralt_switch)
- A lot of bugs fixed (from fd.o bugzilla)
- Added more translations.
-0.5 More bugs from freedesktop.org bugzilla fixed.
- The group names now are matching the descriptions - and the validating
- scripts are implemented.
- Some layouts, variants, models are added/fixed.
- Some translations are updated (though the overall translation activity
- is disappointinly low).
-0.4 A lot of fixes and polishing (introduced own CVS keyword).
- Highlights:
- More universal EURO-related options added.
- Improved reorganized indicator handling.
- More logical level3 handling
-0.3 HEAVILY restructured layout names
- Compatibility rules are introduced
- intltool problem resolved (sorry, with warnings)
-0.2 Now automatically create symlink for xkbcomp (XFree/XOrg servers need it).
- Added HOWTO.transition.
- Added Maori layout.
- Fixed bug 515.
-0.1 First public release.
- XKB configuration only. Restructured layouts tree. Only additive layouts are included. No compatibility rules.
+2.1.99 Prerelease for 2.2. Major changes in descriptions: for GNOME3 release
+ Some new layouts and models. Translations are not updated.
+ Checking runtime dependencies at build time
+2.1 Bugfixes (13). Updated/new translations. Some new layouts and models.
+2.0 Bugfixes (17). Updated/new translations. Some new layouts and models.
+1.9 Bugfixes (27). Updated/new translations. Some new layouts and models.
+ The evdev model is gone, use pc105 instead.
+ Some fixes for the build process
+1.8 Bugfixes (10). Updated/new translations. Some new layouts and models.
+1.7 Bugfixes (30). Updated/new translations. Some new layouts and models.
+1.6 Bugfixes (36). Updated/new translations. Some new layouts and models.
+ Added terminate:* group
+ Dropped locale-specific models
+ Improved compat rules
+1.5 Bugfixes (45). Updated/new translations. Some new layouts and models. Serious cleanup in symbols/inet.
+1.4 Bugfixes (31). Updated/new translations. Some new layouts and models. Added evdev ruleset.
+1.3 Bugfixes (35). Updated/new translations. Some new layouts and models. A lot of country and language-related information put into base.xml. Dropped unsupported rulesets sgi and sun.
+1.2 Bugfixes (36). Updated/new translations, renewed relations with TP. Some new layouts and models. A lot of changes from OLPC project. Changed base.xml merging schema (.gmo files are installed and used explicitly)
+1.1 First time-based release. Bugfixes (27). Updated/new translations, renewed relations with TP. Renamed (for clarity) types. Some new layouts and models.
+1.0 Maintenance release. Bugfixes (72). Updated/new translations. Updated/new layouts and models.
+0.9 Maintenance release. Bugfixes (76). Updated/new translations. Updated/new layouts.
+0.8 Maintenance release. Bugfixes. Updated/new translations. Updated/new layouts.
+ Massive patch from Sun Microsystems incorporated.
+0.7 New layouts and keyboard models (mostly media keyboards)
+ Massive reorganization of the symbols/inet file (huge credits to Frederic Boiteux)
+ Improved RAlt handling (for grp:alts_toggle and lvl3:ralt_switch)
+ A lot of bugs fixed (from fd.o bugzilla)
+ Added more translations.
+0.5 More bugs from freedesktop.org bugzilla fixed.
+ The group names now are matching the descriptions - and the validating
+ scripts are implemented.
+ Some layouts, variants, models are added/fixed.
+ Some translations are updated (though the overall translation activity
+ is disappointinly low).
+0.4 A lot of fixes and polishing (introduced own CVS keyword).
+ Highlights:
+ More universal EURO-related options added.
+ Improved reorganized indicator handling.
+ More logical level3 handling
+0.3 HEAVILY restructured layout names
+ Compatibility rules are introduced
+ intltool problem resolved (sorry, with warnings)
+0.2 Now automatically create symlink for xkbcomp (XFree/XOrg servers need it).
+ Added HOWTO.transition.
+ Added Maori layout.
+ Fixed bug 515.
+0.1 First public release.
+ XKB configuration only. Restructured layouts tree. Only additive layouts are included. No compatibility rules.
diff --git a/xorg-server/xkeyboard-config/configure.in b/xorg-server/xkeyboard-config/configure.in
index 8d1a44b00..6f43494a2 100644
--- a/xorg-server/xkeyboard-config/configure.in
+++ b/xorg-server/xkeyboard-config/configure.in
@@ -1,4 +1,4 @@
-AC_INIT(xkeyboard-config, 2.1)
+AC_INIT(xkeyboard-config, 2.1.99)
AC_CONFIG_SRCDIR(rules/base.xml.in)
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
diff --git a/xorg-server/xkeyboard-config/rules/base.xml.in b/xorg-server/xkeyboard-config/rules/base.xml.in
index e4c79fe77..be13e8860 100644
--- a/xorg-server/xkeyboard-config/rules/base.xml.in
+++ b/xorg-server/xkeyboard-config/rules/base.xml.in
@@ -1243,8 +1243,8 @@
<layout>
<configItem>
<name>us</name>
- <_shortDescription>USA</_shortDescription>
- <_description>USA</_description>
+ <_shortDescription>en</_shortDescription>
+ <_description>English (US)</_description>
<languageList>
<iso639Id>eng</iso639Id>
</languageList>
@@ -1253,7 +1253,8 @@
<variant>
<configItem>
<name>chr</name>
- <_description>USA - Cherokee</_description>
+ <_shortDescription>chr</_shortDescription>
+ <_description>Cherokee</_description>
<languageList>
<iso639Id>chr</iso639Id>
</languageList>
@@ -1262,73 +1263,74 @@
<variant>
<configItem>
<name>euro</name>
- <_description>USA - With EuroSign on 5</_description>
+ <_description>English (US, with euro on 5)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>intl</name>
- <_description>USA - International (with dead keys)</_description>
+ <_description>English (US, international with dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>alt-intl</name>
- <_description>USA - Alternative international</_description>
+ <_description>English (US, alternative international)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>colemak</name>
- <_description>USA - Colemak</_description>
+ <_description>English (Colemak)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak</name>
- <_description>USA - Dvorak</_description>
+ <_description>English (Dvorak)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak-intl</name>
- <_description>USA - Dvorak international (with dead keys)</_description>
+ <_description>English (Dvorak international with dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak-alt-intl</name>
- <_description>USA - Dvorak alternative international (no dead keys)</_description>
+ <_description>English (Dvorak alternative international no dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak-l</name>
- <_description>USA - Left handed Dvorak</_description>
+ <_description>English (left handed Dvorak)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak-r</name>
- <_description>USA - Right handed Dvorak</_description>
+ <_description>English (right handed Dvorak)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak-classic</name>
- <_description>USA - Classic Dvorak</_description>
+ <_description>English (classic Dvorak)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvp</name>
- <_description>USA - Programmer Dvorak</_description>
+ <_description>English (programmer Dvorak)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>rus</name>
- <_description>USA - Russian phonetic</_description>
+ <_shortDescription>ru</_shortDescription>
+ <_description>Russian (US, phonetic)</_description>
<languageList>
<iso639Id>rus</iso639Id>
</languageList>
@@ -1337,13 +1339,13 @@
<variant>
<configItem>
<name>mac</name>
- <_description>USA - Macintosh</_description>
+ <_description>English (Macintosh)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>altgr-intl</name>
- <_description>USA - International (AltGr dead keys)</_description>
+ <_description>English (international AltGr dead keys)</_description>
<languageList><iso639Id>eng</iso639Id>
<iso639Id>fra</iso639Id>
<iso639Id>ger</iso639Id></languageList>
@@ -1352,13 +1354,13 @@
<variant>
<configItem>
<name>olpc2</name>
- <_description>USA - Layout toggle on multiply/divide key</_description>
+ <_description>English (layout toggle on multiply/divide key)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>hbs</name>
- <_description>USA - Serbo-Croatian</_description>
+ <_description>Serbo-Croatian (US)</_description>
<languageList><iso639Id>eng</iso639Id>
<iso639Id>bos</iso639Id>
<iso639Id>hbs</iso639Id>
@@ -1371,8 +1373,8 @@
<layout>
<configItem>
<name>ad</name>
- <_shortDescription>And</_shortDescription>
- <_description>Andorra</_description>
+ <_shortDescription>ca</_shortDescription>
+ <_description>Catalan</_description>
<languageList>
<iso639Id>cat</iso639Id>
</languageList>
@@ -1383,13 +1385,14 @@
<configItem>
<name>af</name>
<_shortDescription>Afg</_shortDescription>
- <_description>Afghanistan</_description>
+ <_description>Afghani</_description>
</configItem>
<variantList>
<variant>
<configItem>
<name>ps</name>
- <_description>Afghanistan - Pashto</_description>
+ <_shortDescription>ps</_shortDescription>
+ <_description>Pashto</_description>
<languageList>
<iso639Id>pus</iso639Id>
</languageList>
@@ -1398,7 +1401,8 @@
<variant>
<configItem>
<name>uz</name>
- <_description>Afghanistan - Southern Uzbek</_description>
+ <_shortDescription>uz</_shortDescription>
+ <_description>Uzbek (Afghanistan)</_description>
<languageList>
<iso639Id>uzb</iso639Id>
</languageList>
@@ -1407,7 +1411,8 @@
<variant>
<configItem>
<name>olpc-ps</name>
- <_description>Afghanistan - OLPC Pashto</_description>
+ <_shortDescription>ps</_shortDescription>
+ <_description>Pashto (Afghanistan, OLPC)</_description>
<languageList>
<iso639Id>pus</iso639Id>
</languageList>
@@ -1416,13 +1421,15 @@
<variant>
<configItem>
<name>fa-olpc</name>
- <_description>Afghanistan - OLPC Dari</_description>
+ <_shortDescription>fa</_shortDescription>
+ <_description>Persian (Afghanistan, Dari OLPC)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>uz-olpc</name>
- <_description>Afghanistan - OLPC Southern Uzbek</_description>
+ <_shortDescription>uz</_shortDescription>
+ <_description>Uzbek (Afghanistan, OLPC)</_description>
<languageList>
<iso639Id>uzb</iso639Id>
</languageList>
@@ -1433,7 +1440,7 @@
<layout>
<configItem>
<name>ara</name>
- <_shortDescription>Ara</_shortDescription>
+ <_shortDescription>ar</_shortDescription>
<_description>Arabic</_description>
<countryList>
<iso3166Id>AE</iso3166Id>
@@ -1464,37 +1471,37 @@
<variant>
<configItem>
<name>azerty</name>
- <_description>Arabic - azerty</_description>
+ <_description>Arabic (azerty)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>azerty_digits</name>
- <_description>Arabic - azerty/digits</_description>
+ <_description>Arabic (azerty/digits)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>digits</name>
- <_description>Arabic - digits</_description>
+ <_description>Arabic (digits)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>qwerty</name>
- <_description>Arabic - qwerty</_description>
+ <_description>Arabic (qwerty)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>qwerty_digits</name>
- <_description>Arabic - qwerty/digits</_description>
+ <_description>Arabic (qwerty/digits)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>buckwalter</name>
- <_description>Arabic - Buckwalter</_description>
+ <_description>Arabic (Buckwalter)</_description>
</configItem>
</variant>
</variantList>
@@ -1502,8 +1509,8 @@
<layout>
<configItem>
<name>al</name>
- <_shortDescription>Alb</_shortDescription>
- <_description>Albania</_description>
+ <_shortDescription>sq</_shortDescription>
+ <_description>Albanian</_description>
<languageList>
<iso639Id>alb</iso639Id>
</languageList>
@@ -1513,8 +1520,8 @@
<layout>
<configItem>
<name>am</name>
- <_shortDescription>Arm</_shortDescription>
- <_description>Armenia</_description>
+ <_shortDescription>hy</_shortDescription>
+ <_description>Armenian</_description>
<languageList>
<iso639Id>hye</iso639Id>
</languageList>
@@ -1523,31 +1530,31 @@
<variant>
<configItem>
<name>phonetic</name>
- <_description>Armenia - Phonetic</_description>
+ <_description>Armenian (phonetic)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>phonetic-alt</name>
- <_description>Armenia - Alternative Phonetic</_description>
+ <_description>Armenian (alternative phonetic)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>eastern</name>
- <_description>Armenia - Eastern</_description>
+ <_description>Armenian (eastern)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>western</name>
- <_description>Armenia - Western</_description>
+ <_description>Armenian (western)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>eastern-alt</name>
- <_description>Armenia - Alternative Eastern</_description>
+ <_description>Armenian (alternative eastern)</_description>
</configItem>
</variant>
</variantList>
@@ -1555,8 +1562,8 @@
<layout>
<configItem>
<name>at</name>
- <_shortDescription>Aut</_shortDescription>
- <_description>Austria</_description>
+ <_shortDescription>de</_shortDescription>
+ <_description>German (Austria)</_description>
<languageList>
<iso639Id>ger</iso639Id>
</languageList>
@@ -1565,19 +1572,19 @@
<variant>
<configItem>
<name>nodeadkeys</name>
- <_description>Austria - Eliminate dead keys</_description>
+ <_description>German (Austria, eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>sundeadkeys</name>
- <_description>Austria - Sun dead keys</_description>
+ <_description>German (Austria, Sun dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>mac</name>
- <_description>Austria - Macintosh</_description>
+ <_description>German (Austria, Mac)</_description>
</configItem>
</variant>
</variantList>
@@ -1585,8 +1592,8 @@
<layout>
<configItem>
<name>az</name>
- <_shortDescription>Aze</_shortDescription>
- <_description>Azerbaijan</_description>
+ <_shortDescription>az</_shortDescription>
+ <_description>Azerbaijani</_description>
<languageList>
<iso639Id>aze</iso639Id>
</languageList>
@@ -1595,7 +1602,7 @@
<variant>
<configItem>
<name>cyrillic</name>
- <_description>Azerbaijan - Cyrillic</_description>
+ <_description>Azerbaijan (Cyrillic)</_description>
</configItem>
</variant>
</variantList>
@@ -1603,8 +1610,8 @@
<layout>
<configItem>
<name>by</name>
- <_shortDescription>Blr</_shortDescription>
- <_description>Belarus</_description>
+ <_shortDescription>be</_shortDescription>
+ <_description>Belarusian</_description>
<languageList>
<iso639Id>bel</iso639Id>
</languageList>
@@ -1613,13 +1620,13 @@
<variant>
<configItem>
<name>legacy</name>
- <_description>Belarus - Legacy</_description>
+ <_description>Belarusian (legacy)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>latin</name>
- <_description>Belarus - Latin</_description>
+ <_description>Belarusian (Latin)</_description>
</configItem>
</variant>
</variantList>
@@ -1627,8 +1634,8 @@
<layout>
<configItem>
<name>be</name>
- <_shortDescription>Bel</_shortDescription>
- <_description>Belgium</_description>
+ <_shortDescription>be</_shortDescription>
+ <_description>Belgian</_description>
<languageList><iso639Id>ger</iso639Id>
<iso639Id>nld</iso639Id>
<iso639Id>fra</iso639Id></languageList>
@@ -1637,43 +1644,43 @@
<variant>
<configItem>
<name>oss</name>
- <_description>Belgium - Alternative</_description>
+ <_description>Belgian (alternative)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>oss_latin9</name>
- <_description>Belgium - Alternative, latin-9 only</_description>
+ <_description>Belgian (alternative, latin-9 only)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>oss_sundeadkeys</name>
- <_description>Belgium - Alternative, Sun dead keys</_description>
+ <_description>Belgian (alternative, Sun dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>iso-alternate</name>
- <_description>Belgium - ISO Alternate</_description>
+ <_description>Belgian (ISO alternate)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>nodeadkeys</name>
- <_description>Belgium - Eliminate dead keys</_description>
+ <_description>Belgian (eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>sundeadkeys</name>
- <_description>Belgium - Sun dead keys</_description>
+ <_description>Belgian (Sun dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>wang</name>
- <_description>Belgium - Wang model 724 azerty</_description>
+ <_description>Belgian (Wang model 724 azerty)</_description>
</configItem>
</variant>
</variantList>
@@ -1681,8 +1688,8 @@
<layout>
<configItem>
<name>bd</name>
- <_shortDescription>Bgd</_shortDescription>
- <_description>Bangladesh</_description>
+ <_shortDescription>bn</_shortDescription>
+ <_description>Bengali</_description>
<languageList>
<iso639Id>ben</iso639Id>
</languageList>
@@ -1691,7 +1698,7 @@
<variant>
<configItem>
<name>probhat</name>
- <_description>Bangladesh - Probhat</_description>
+ <_description>Bengali (Probhat)</_description>
</configItem>
</variant>
</variantList>
@@ -1699,14 +1706,15 @@
<layout>
<configItem>
<name>in</name>
- <_shortDescription>Ind</_shortDescription>
- <_description>India</_description>
+ <_shortDescription>in</_shortDescription>
+ <_description>Indian</_description>
</configItem>
<variantList>
<variant>
<configItem>
<name>ben</name>
- <_description>India - Bengali</_description>
+ <_shortDescription>bn</_shortDescription>
+ <_description>Bengali</_description>
<languageList>
<iso639Id>ben</iso639Id>
</languageList>
@@ -1715,7 +1723,8 @@
<variant>
<configItem>
<name>ben_probhat</name>
- <_description>India - Bengali Probhat</_description>
+ <_shortDescription>bn</_shortDescription>
+ <_description>Bengali (Probhat)</_description>
<languageList>
<iso639Id>ben</iso639Id>
</languageList>
@@ -1724,7 +1733,8 @@
<variant>
<configItem>
<name>guj</name>
- <_description>India - Gujarati</_description>
+ <_shortDescription>gu</_shortDescription>
+ <_description>Gujarati</_description>
<languageList>
<iso639Id>guj</iso639Id>
</languageList>
@@ -1733,7 +1743,8 @@
<variant>
<configItem>
<name>guru</name>
- <_description>India - Gurmukhi</_description>
+ <_shortDescription>pa</_shortDescription>
+ <_description>Punjabi (Gurmukhi)</_description>
<languageList>
<iso639Id>pan</iso639Id>
</languageList>
@@ -1742,7 +1753,8 @@
<variant>
<configItem>
<name>jhelum</name>
- <_description>India - Gurmukhi Jhelum</_description>
+ <_shortDescription>pa</_shortDescription>
+ <_description>Punjabi (Gurmukhi Jhelum)</_description>
<languageList>
<iso639Id>pan</iso639Id>
</languageList>
@@ -1751,7 +1763,8 @@
<variant>
<configItem>
<name>kan</name>
- <_description>India - Kannada</_description>
+ <_shortDescription>kn</_shortDescription>
+ <_description>Kannada</_description>
<languageList>
<iso639Id>kan</iso639Id>
</languageList>
@@ -1760,7 +1773,8 @@
<variant>
<configItem>
<name>mal</name>
- <_description>India - Malayalam</_description>
+ <_shortDescription>ml</_shortDescription>
+ <_description>Malayalam</_description>
<languageList>
<iso639Id>mal</iso639Id>
</languageList>
@@ -1769,7 +1783,8 @@
<variant>
<configItem>
<name>mal_lalitha</name>
- <_description>India - Malayalam Lalitha</_description>
+ <_shortDescription>ml</_shortDescription>
+ <_description>Malayalam (Lalitha)</_description>
<languageList>
<iso639Id>mal</iso639Id>
</languageList>
@@ -1777,15 +1792,17 @@
</variant>
<variant>
<configItem>
- <name>mal_enhanced</name>
- <_description>India - Malayalam enhanced Inscript with Rupee Sign</_description>
- <languageList><iso639Id>mal</iso639Id></languageList>
+ <name>mal_enhanced</name>
+ <_shortDescription>ml</_shortDescription>
+ <_description>Malayalam (enhanced Inscript with Rupee Sign)</_description>
+ <languageList><iso639Id>mal</iso639Id></languageList>
</configItem>
</variant>
<variant>
<configItem>
<name>ori</name>
- <_description>India - Oriya</_description>
+ <_shortDescription>or</_shortDescription>
+ <_description> Oriya</_description>
<languageList>
<iso639Id>ori</iso639Id>
</languageList>
@@ -1794,7 +1811,8 @@
<variant>
<configItem>
<name>tam_unicode</name>
- <_description>India - Tamil Unicode</_description>
+ <_shortDescription>ta</_shortDescription>
+ <_description>Tamil (Unicode)</_description>
<languageList>
<iso639Id>tam</iso639Id>
</languageList>
@@ -1803,7 +1821,8 @@
<variant>
<configItem>
<name>tam_keyboard_with_numerals</name>
- <_description>India - Tamil Keyboard with Numerals</_description>
+ <_shortDescription>ta</_shortDescription>
+ <_description>Tamil (keyboard with numerals)</_description>
<languageList>
<iso639Id>tam</iso639Id>
</languageList>
@@ -1812,7 +1831,8 @@
<variant>
<configItem>
<name>tam_TAB</name>
- <_description>India - Tamil TAB Typewriter</_description>
+ <_shortDescription>ta</_shortDescription>
+ <_description>Tamil (TAB typewriter)</_description>
<languageList>
<iso639Id>tam</iso639Id>
</languageList>
@@ -1821,7 +1841,8 @@
<variant>
<configItem>
<name>tam_TSCII</name>
- <_description>India - Tamil TSCII Typewriter</_description>
+ <_shortDescription>ta</_shortDescription>
+ <_description>Tamil (TSCII typewriter)</_description>
<languageList>
<iso639Id>tam</iso639Id>
</languageList>
@@ -1830,7 +1851,8 @@
<variant>
<configItem>
<name>tam</name>
- <_description>India - Tamil</_description>
+ <_shortDescription>ta</_shortDescription>
+ <_description>Tamil</_description>
<languageList>
<iso639Id>tam</iso639Id>
</languageList>
@@ -1839,7 +1861,8 @@
<variant>
<configItem>
<name>tel</name>
- <_description>India - Telugu</_description>
+ <_shortDescription>te</_shortDescription>
+ <_description>Telugu</_description>
<languageList>
<iso639Id>tel</iso639Id>
</languageList>
@@ -1848,7 +1871,8 @@
<variant>
<configItem>
<name>urd-phonetic</name>
- <_description>India - Urdu, Phonetic</_description>
+ <_shortDescription>ur</_shortDescription>
+ <_description>Urdu (phonetic)</_description>
<languageList>
<iso639Id>urd</iso639Id>
</languageList>
@@ -1857,7 +1881,8 @@
<variant>
<configItem>
<name>urd-phonetic3</name>
- <_description>India - Urdu, Alternative phonetic</_description>
+ <_shortDescription>ur</_shortDescription>
+ <_description>Urdu (alternative phonetic)</_description>
<languageList>
<iso639Id>urd</iso639Id>
</languageList>
@@ -1866,7 +1891,8 @@
<variant>
<configItem>
<name>urd-winkeys</name>
- <_description>India - Urdu, Winkeys</_description>
+ <_shortDescription>ur</_shortDescription>
+ <_description>Urdu (WinKeys)</_description>
<languageList>
<iso639Id>urd</iso639Id>
</languageList>
@@ -1875,7 +1901,8 @@
<variant>
<configItem>
<name>bolnagri</name>
- <_description>India - Hindi Bolnagri</_description>
+ <_shortDescription>hi</_shortDescription>
+ <_description>Hindi (Bolnagri)</_description>
<languageList>
<iso639Id>hin</iso639Id>
</languageList>
@@ -1884,7 +1911,8 @@
<variant>
<configItem>
<name>hin-wx</name>
- <_description>India - Hindi Wx</_description>
+ <_shortDescription>hi</_shortDescription>
+ <_description>Hindi (Wx)</_description>
<languageList>
<iso639Id>hin</iso639Id>
</languageList>
@@ -1893,7 +1921,8 @@
<variant>
<configItem>
<name>eng</name>
- <_description>India - English with RupeeSign</_description>
+ <_shortDescription>en</_shortDescription>
+ <_description>English (India, with RupeeSign)</_description>
<languageList>
<iso639Id>eng</iso639Id>
</languageList>
@@ -1904,8 +1933,8 @@
<layout>
<configItem>
<name>ba</name>
- <_shortDescription>Bih</_shortDescription>
- <_description>Bosnia and Herzegovina</_description>
+ <_shortDescription>bs</_shortDescription>
+ <_description>Bosnian</_description>
<languageList>
<iso639Id>bos</iso639Id>
</languageList>
@@ -1914,25 +1943,25 @@
<variant>
<configItem>
<name>alternatequotes</name>
- <_description>Bosnia and Herzegovina - Use guillemets for quotes</_description>
+ <_description>Bosnian (use guillemets for quotes)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>unicode</name>
- <_description>Bosnia and Herzegovina - Use Bosnian digraphs</_description>
+ <_description>Bosnian (use Bosnian digraphs)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>unicodeus</name>
- <_description>Bosnia and Herzegovina - US keyboard with Bosnian digraphs</_description>
+ <_description>Bosnian (US keyboard with Bosnian digraphs)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>us</name>
- <_description>Bosnia and Herzegovina - US keyboard with Bosnian letters</_description>
+ <_description>Bosnian (US keyboard with Bosnian letters)</_description>
</configItem>
</variant>
</variantList>
@@ -1940,8 +1969,8 @@
<layout>
<configItem>
<name>br</name>
- <_shortDescription>Bra</_shortDescription>
- <_description>Brazil</_description>
+ <_shortDescription>pt</_shortDescription>
+ <_description>Portuguese (Brazil)</_description>
<languageList>
<iso639Id>por</iso639Id>
</languageList>
@@ -1950,31 +1979,31 @@
<variant>
<configItem>
<name>nodeadkeys</name>
- <_description>Brazil - Eliminate dead keys</_description>
+ <_description>Portuguese (Brazil, eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak</name>
- <_description>Brazil - Dvorak</_description>
+ <_description>Portuguese (Brazil, Dvorak)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>nativo</name>
- <_description>Brazil - Nativo</_description>
+ <_description>Portuguese (Brazil, nativo)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>nativo-us</name>
- <_description>Brazil - Nativo for USA keyboards</_description>
+ <_description>Portuguese (Brazil, nativo for USA keyboards)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>nativo-epo</name>
- <_description>Brazil - Nativo for Esperanto</_description>
+ <_description>Portuguese (Brazil, nativo for Esperanto)</_description>
<languageList>
<iso639Id>epo</iso639Id>
</languageList>
@@ -1985,8 +2014,8 @@
<layout>
<configItem>
<name>bg</name>
- <_shortDescription>Bgr</_shortDescription>
- <_description>Bulgaria</_description>
+ <_shortDescription>bg</_shortDescription>
+ <_description>Bulgarian</_description>
<languageList>
<iso639Id>bul</iso639Id>
</languageList>
@@ -1995,13 +2024,13 @@
<variant>
<configItem>
<name>phonetic</name>
- <_description>Bulgaria - Traditional phonetic</_description>
+ <_description>Bulgarian (traditional phonetic)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>bas_phonetic</name>
- <_description>Bulgaria - New phonetic</_description>
+ <_description>Bulgarian (new phonetic)</_description>
</configItem>
</variant>
</variantList>
@@ -2009,13 +2038,15 @@
<layout>
<configItem>
<name>ma</name>
- <_description>Morocco</_description>
+ <_shortDescription>ar</_shortDescription>
+ <_description>Arabic (Morocco)</_description>
</configItem>
<variantList>
<variant>
<configItem>
<name>french</name>
- <_description>Morocco - French</_description>
+ <_shortDescription>fr</_shortDescription>
+ <_description>French (Morocco)</_description>
<languageList>
<iso639Id>fra</iso639Id>
</languageList>
@@ -2024,7 +2055,8 @@
<variant>
<configItem>
<name>tifinagh</name>
- <_description>Morocco - Tifinagh</_description>
+ <_shortDescription>ber</_shortDescription>
+ <_description>Berber (Morocco, Tifinagh)</_description>
<languageList>
<iso639Id>ber</iso639Id>
</languageList>
@@ -2033,7 +2065,8 @@
<variant>
<configItem>
<name>tifinagh-alt</name>
- <_description>Morocco - Tifinagh alternative</_description>
+ <_shortDescription>ber</_shortDescription>
+ <_description>Berber (Morocco, Tifinagh alternative)</_description>
<languageList>
<iso639Id>ber</iso639Id>
</languageList>
@@ -2042,7 +2075,8 @@
<variant>
<configItem>
<name>tifinagh-alt-phonetic</name>
- <_description>Morocco - Tifinagh alternative phonetic</_description>
+ <_shortDescription>ber</_shortDescription>
+ <_description>Berber (Morocco, Tifinagh alternative phonetic)</_description>
<languageList>
<iso639Id>ber</iso639Id>
</languageList>
@@ -2051,7 +2085,8 @@
<variant>
<configItem>
<name>tifinagh-extended</name>
- <_description>Morocco - Tifinagh extended</_description>
+ <_shortDescription>ber</_shortDescription>
+ <_description>Berber (Morocco, Tifinagh extended)</_description>
<languageList>
<iso639Id>ber</iso639Id>
</languageList>
@@ -2060,7 +2095,8 @@
<variant>
<configItem>
<name>tifinagh-phonetic</name>
- <_description>Morocco - Tifinagh phonetic</_description>
+ <_shortDescription>ber</_shortDescription>
+ <_description>Berber (Morocco, Tifinagh phonetic)</_description>
<languageList>
<iso639Id>ber</iso639Id>
</languageList>
@@ -2069,7 +2105,8 @@
<variant>
<configItem>
<name>tifinagh-extended-phonetic</name>
- <_description>Morocco - Tifinagh extended phonetic</_description>
+ <_shortDescription>ber</_shortDescription>
+ <_description>Berber (Morocco, Tifinagh extended phonetic)</_description>
<languageList>
<iso639Id>ber</iso639Id>
</languageList>
@@ -2080,8 +2117,8 @@
<layout>
<configItem>
<name>mm</name>
- <_shortDescription>Mmr</_shortDescription>
- <_description>Myanmar</_description>
+ <_shortDescription>my</_shortDescription>
+ <_description>Burmese</_description>
<languageList>
<iso639Id>mya</iso639Id>
</languageList>
@@ -2091,8 +2128,8 @@
<layout>
<configItem>
<name>ca</name>
- <_shortDescription>Can</_shortDescription>
- <_description>Canada</_description>
+ <_shortDescription>en</_shortDescription>
+ <_description>English (Canada)</_description>
<languageList>
<iso639Id>fra</iso639Id>
</languageList>
@@ -2101,37 +2138,40 @@
<variant>
<configItem>
<name>fr-dvorak</name>
- <_description>Canada - French Dvorak</_description>
+ <_shortDescription>fr</_shortDescription>
+ <_description>French (Canada, Dvorak)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>fr-legacy</name>
- <_description>Canada - French (legacy)</_description>
+ <_shortDescription>fr</_shortDescription>
+ <_description>French (Canada, legacy)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>multix</name>
- <_description>Canada - Multilingual</_description>
+ <_description>Canadian Multilingual</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>multi</name>
- <_description>Canada - Multilingual, first part</_description>
+ <_description>Canadian Multilingual (first part)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>multi-2gr</name>
- <_description>Canada - Multilingual, second part</_description>
+ <_description>Canadian Multilingual (second part)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>ike</name>
- <_description>Canada - Inuktitut</_description>
+ <_shortDescription>ike</_shortDescription>
+ <_description>Inuktitut</_description>
<languageList>
<iso639Id>iku</iso639Id>
</languageList>
@@ -2140,19 +2180,22 @@
<variant>
<configItem>
<name>shs</name>
- <_description>Canada - Secwepemctsin</_description>
+ <_shortDescription>shs</_shortDescription>
+ <_description>Secwepemctsin</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>kut</name>
- <_description>Canada - Ktunaxa</_description>
+ <_shortDescription>kut</_shortDescription>
+ <_description>Kutenai</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>eng</name>
- <_description>Canada - English</_description>
+ <_shortDescription>en</_shortDescription>
+ <_description>English (Canada)</_description>
<languageList>
<iso639Id>eng</iso639Id>
</languageList>
@@ -2163,8 +2206,8 @@
<layout>
<configItem>
<name>cd</name>
- <_shortDescription>COD</_shortDescription>
- <_description>Congo, Democratic Republic of the</_description>
+ <_shortDescription>fr</_shortDescription>
+ <_description>French (Democratic Republic of the Congo)</_description>
<languageList>
<iso639Id>fra</iso639Id>
</languageList>
@@ -2174,8 +2217,8 @@
<layout>
<configItem>
<name>cn</name>
- <_shortDescription>Chn</_shortDescription>
- <_description>China</_description>
+ <_shortDescription>zh</_shortDescription>
+ <_description>Chinese</_description>
<languageList>
<iso639Id>chi</iso639Id>
</languageList>
@@ -2184,7 +2227,7 @@
<variant>
<configItem>
<name>tib</name>
- <_description>China - Tibetan</_description>
+ <_description>Chinese (Tibetan)</_description>
<languageList>
<iso639Id>tib</iso639Id>
</languageList>
@@ -2193,7 +2236,7 @@
<variant>
<configItem>
<name>tib_asciinum</name>
- <_description>China - Tibetan (with ASCII numerals)</_description>
+ <_description>Chinese (Tibetan with ASCII numerals)</_description>
<languageList>
<iso639Id>tib</iso639Id>
</languageList>
@@ -2202,7 +2245,7 @@
<variant>
<configItem>
<name>uig</name>
- <_description>China - Uyghur</_description>
+ <_description>Chinese (Uyghur)</_description>
<languageList>
<iso639Id>uig</iso639Id>
</languageList>
@@ -2213,8 +2256,8 @@
<layout>
<configItem>
<name>hr</name>
- <_shortDescription>Hrv</_shortDescription>
- <_description>Croatia</_description>
+ <_shortDescription>hr</_shortDescription>
+ <_description>Croatian</_description>
<languageList>
<iso639Id>scr</iso639Id>
</languageList>
@@ -2223,25 +2266,25 @@
<variant>
<configItem>
<name>alternatequotes</name>
- <_description>Croatia - Use guillemets for quotes</_description>
+ <_description>Croatian (Use guillemets for quotes)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>unicode</name>
- <_description>Croatia - Use Croatian digraphs</_description>
+ <_description>Croatian (Use Croatian digraphs)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>unicodeus</name>
- <_description>Croatia - US keyboard with Croatian digraphs</_description>
+ <_description>Croatian (US keyboard with Croatian digraphs)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>us</name>
- <_description>Croatia - US keyboard with Croatian letters</_description>
+ <_description>Croatian (US keyboard with Croatian letters)</_description>
</configItem>
</variant>
</variantList>
@@ -2249,8 +2292,8 @@
<layout>
<configItem>
<name>cz</name>
- <_shortDescription>Cze</_shortDescription>
- <_description>Czechia</_description>
+ <_shortDescription>cs</_shortDescription>
+ <_description>Czech</_description>
<languageList>
<iso639Id>cze</iso639Id>
</languageList>
@@ -2259,31 +2302,31 @@
<variant>
<configItem>
<name>bksl</name>
- <_description>Czechia - With &lt;\|&gt; key</_description>
+ <_description>Czech (With &lt;\|&gt; key)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>qwerty</name>
- <_description>Czechia - qwerty</_description>
+ <_description>Czech (qwerty)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>qwerty_bksl</name>
- <_description>Czechia - qwerty, extended Backslash</_description>
+ <_description>Czech (qwerty, extended Backslash)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>ucw</name>
- <_description>Czechia - UCW layout (accented letters only)</_description>
+ <_description>Czech (UCW layout accented letters only)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak-ucw</name>
- <_description>Czechia - US Dvorak with CZ UCW support</_description>
+ <_description>Czech (US Dvorak with CZ UCW support)</_description>
</configItem>
</variant>
</variantList>
@@ -2291,8 +2334,8 @@
<layout>
<configItem>
<name>dk</name>
- <_shortDescription>Dnk</_shortDescription>
- <_description>Denmark</_description>
+ <_shortDescription>da</_shortDescription>
+ <_description>Danish</_description>
<languageList>
<iso639Id>dan</iso639Id>
</languageList>
@@ -2301,25 +2344,25 @@
<variant>
<configItem>
<name>nodeadkeys</name>
- <_description>Denmark - Eliminate dead keys</_description>
+ <_description>Danish (eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>mac</name>
- <_description>Denmark - Macintosh</_description>
+ <_description>Danish (Mac)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>mac_nodeadkeys</name>
- <_description>Denmark - Macintosh, eliminate dead keys</_description>
+ <_description>Danish (Mac, eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak</name>
- <_description>Denmark - Dvorak</_description>
+ <_description>Danish (Dvorak)</_description>
</configItem>
</variant>
</variantList>
@@ -2327,8 +2370,8 @@
<layout>
<configItem>
<name>nl</name>
- <_shortDescription>Nld</_shortDescription>
- <_description>Netherlands</_description>
+ <_shortDescription>nl</_shortDescription>
+ <_description>Dutch</_description>
<languageList>
<iso639Id>nld</iso639Id>
</languageList>
@@ -2337,19 +2380,19 @@
<variant>
<configItem>
<name>sundeadkeys</name>
- <_description>Netherlands - Sun dead keys</_description>
+ <_description>Dutch (Sun dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>mac</name>
- <_description>Netherlands - Macintosh</_description>
+ <_description>Dutch (Mac)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>std</name>
- <_description>Netherlands - Standard</_description>
+ <_description>Dutch (standard)</_description>
</configItem>
</variant>
</variantList>
@@ -2357,8 +2400,8 @@
<layout>
<configItem>
<name>bt</name>
- <_shortDescription>Btn</_shortDescription>
- <_description>Bhutan</_description>
+ <_shortDescription>dz</_shortDescription>
+ <_description>Dzongkha</_description>
<languageList>
<iso639Id>dzo</iso639Id>
</languageList>
@@ -2367,8 +2410,8 @@
<layout>
<configItem>
<name>ee</name>
- <_shortDescription>Est</_shortDescription>
- <_description>Estonia</_description>
+ <_shortDescription>et</_shortDescription>
+ <_description>Estonian</_description>
<languageList>
<iso639Id>est</iso639Id>
</languageList>
@@ -2377,19 +2420,19 @@
<variant>
<configItem>
<name>nodeadkeys</name>
- <_description>Estonia - Eliminate dead keys</_description>
+ <_description>Estonian (eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak</name>
- <_description>Estonia - Dvorak</_description>
+ <_description>Estonian (Dvorak)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>us</name>
- <_description>Estonia - US keyboard with Estonian letters</_description>
+ <_description>Estonian (US keyboard with Estonian letters)</_description>
</configItem>
</variant>
</variantList>
@@ -2397,8 +2440,8 @@
<layout>
<configItem>
<name>ir</name>
- <_shortDescription>Irn</_shortDescription>
- <_description>Iran</_description>
+ <_shortDescription>fa</_shortDescription>
+ <_description>Persian</_description>
<languageList>
<iso639Id>per</iso639Id>
</languageList>
@@ -2407,13 +2450,14 @@
<variant>
<configItem>
<name>pes_keypad</name>
- <_description>Iran - Persian, with Persian Keypad</_description>
+ <_description>Persian (with Persian Keypad)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>ku</name>
- <_description>Iran - Kurdish, Latin Q</_description>
+ <_shortDescription>ku</_shortDescription>
+ <_description>Kurdish (Iran, Latin Q)</_description>
<languageList>
<iso639Id>kur</iso639Id>
</languageList>
@@ -2422,7 +2466,8 @@
<variant>
<configItem>
<name>ku_f</name>
- <_description>Iran - Kurdish, (F)</_description>
+ <_shortDescription>ku</_shortDescription>
+ <_description>Kurdish (Iran, F)</_description>
<languageList>
<iso639Id>kur</iso639Id>
</languageList>
@@ -2431,7 +2476,8 @@
<variant>
<configItem>
<name>ku_alt</name>
- <_description>Iran - Kurdish, Latin Alt-Q</_description>
+ <_shortDescription>ku</_shortDescription>
+ <_description>Kurdish (Iran, latin alt-Q)</_description>
<languageList>
<iso639Id>kur</iso639Id>
</languageList>
@@ -2440,7 +2486,8 @@
<variant>
<configItem>
<name>ku_ara</name>
- <_description>Iran - Kurdish, Arabic-Latin</_description>
+ <_shortDescription>ku</_shortDescription>
+ <_description>Kurdish (Iran, Arabic-Latin)</_description>
<languageList>
<iso639Id>kur</iso639Id>
</languageList>
@@ -2451,8 +2498,8 @@
<layout>
<configItem>
<name>iq</name>
- <_shortDescription>Irq</_shortDescription>
- <_description>Iraq</_description>
+ <_shortDescription>irq</_shortDescription>
+ <_description>Iraqi</_description>
<languageList><iso639Id>ara</iso639Id>
<iso639Id>kur</iso639Id></languageList>
</configItem>
@@ -2460,7 +2507,8 @@
<variant>
<configItem>
<name>ku</name>
- <_description>Iraq - Kurdish, Latin Q</_description>
+ <_shortDescription>ku</_shortDescription>
+ <_description>Kurdish (Iraq, Latin Q)</_description>
<languageList>
<iso639Id>kur</iso639Id>
</languageList>
@@ -2469,7 +2517,8 @@
<variant>
<configItem>
<name>ku_f</name>
- <_description>Iraq - Kurdish, (F)</_description>
+ <_shortDescription>ku</_shortDescription>
+ <_description>Kurdish (Iraq, F)</_description>
<languageList>
<iso639Id>kur</iso639Id>
</languageList>
@@ -2478,7 +2527,8 @@
<variant>
<configItem>
<name>ku_alt</name>
- <_description>Iraq - Kurdish, Latin Alt-Q</_description>
+ <_shortDescription>ku</_shortDescription>
+ <_description>Kurdish (Iraq, Latin Alt-Q)</_description>
<languageList>
<iso639Id>kur</iso639Id>
</languageList>
@@ -2487,7 +2537,8 @@
<variant>
<configItem>
<name>ku_ara</name>
- <_description>Iraq - Kurdish, Arabic-Latin</_description>
+ <_shortDescription>ku</_shortDescription>
+ <_description>Kurdish (Iraq, Arabic-Latin)</_description>
<languageList>
<iso639Id>kur</iso639Id>
</languageList>
@@ -2498,8 +2549,8 @@
<layout>
<configItem>
<name>fo</name>
- <_shortDescription>Fro</_shortDescription>
- <_description>Faroe Islands</_description>
+ <_shortDescription>fo</_shortDescription>
+ <_description>Faroese</_description>
<languageList>
<iso639Id>fao</iso639Id>
</languageList>
@@ -2508,7 +2559,7 @@
<variant>
<configItem>
<name>nodeadkeys</name>
- <_description>Faroe Islands - Eliminate dead keys</_description>
+ <_description>Faroese (eliminate dead keys)</_description>
</configItem>
</variant>
</variantList>
@@ -2516,8 +2567,8 @@
<layout>
<configItem>
<name>fi</name>
- <_shortDescription>Fin</_shortDescription>
- <_description>Finland</_description>
+ <_shortDescription>fi</_shortDescription>
+ <_description>Finnish</_description>
<languageList>
<iso639Id>fin</iso639Id>
</languageList>
@@ -2526,19 +2577,19 @@
<variant>
<configItem>
<name>classic</name>
- <_description>Finland - Classic</_description>
+ <_description>Finnish (classic)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>nodeadkeys</name>
- <_description>Finland - Classic, eliminate dead keys</_description>
+ <_description>Finnish (classic, eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>smi</name>
- <_description>Finland - Northern Saami</_description>
+ <_description>Finnish (northern Saami)</_description>
<languageList><iso639Id>smi</iso639Id>
<iso639Id>sme</iso639Id></languageList>
</configItem>
@@ -2546,7 +2597,7 @@
<variant>
<configItem>
<name>mac</name>
- <_description>Finland - Macintosh</_description>
+ <_description>Finnish (Mac)</_description>
</configItem>
</variant>
</variantList>
@@ -2554,8 +2605,8 @@
<layout>
<configItem>
<name>fr</name>
- <_shortDescription>Fra</_shortDescription>
- <_description>France</_description>
+ <_shortDescription>fr</_shortDescription>
+ <_description>French</_description>
<languageList>
<iso639Id>fra</iso639Id>
</languageList>
@@ -2564,91 +2615,91 @@
<variant>
<configItem>
<name>nodeadkeys</name>
- <_description>France - Eliminate dead keys</_description>
+ <_description>French (eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>sundeadkeys</name>
- <_description>France - Sun dead keys</_description>
+ <_description>French (Sun dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>oss</name>
- <_description>France - Alternative</_description>
+ <_description>French (alternative)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>oss_latin9</name>
- <_description>France - Alternative, latin-9 only</_description>
+ <_description>French (alternative, latin-9 only)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>oss_nodeadkeys</name>
- <_description>France - Alternative, eliminate dead keys</_description>
+ <_description>French (alternative, eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>oss_sundeadkeys</name>
- <_description>France - Alternative, Sun dead keys</_description>
+ <_description>French (alternative, Sun dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>latin9</name>
- <_description>France - (Legacy) Alternative</_description>
+ <_description>French (legacy alternative)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>latin9_nodeadkeys</name>
- <_description>France - (Legacy) Alternative, eliminate dead keys</_description>
+ <_description>French (legacy, alternative, eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>latin9_sundeadkeys</name>
- <_description>France - (Legacy) Alternative, Sun dead keys</_description>
+ <_description>French (legacy, alternative, Sun dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>bepo</name>
- <_description>France - Bepo, ergonomic, Dvorak way</_description>
+ <_description>French (Bepo, ergonomic, Dvorak way)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>bepo_latin9</name>
- <_description>France - Bepo, ergonomic, Dvorak way, latin-9 only</_description>
+ <_description>French (Bepo, ergonomic, Dvorak way, latin-9 only)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak</name>
- <_description>France - Dvorak</_description>
+ <_description>French (Dvorak)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>mac</name>
- <_description>France - Macintosh</_description>
+ <_description>French (Mac)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>bre</name>
- <_description>France - Breton</_description>
+ <_description>French (Breton)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>oci</name>
- <_description>France - Occitan</_description>
+ <_description>French (Occitan)</_description>
<languageList>
<iso639Id>oci</iso639Id>
</languageList>
@@ -2657,7 +2708,7 @@
<variant>
<configItem>
<name>geo</name>
- <_description>France - Georgian AZERTY Tskapo</_description>
+ <_description>French (Georgian AZERTY Tskapo)</_description>
<languageList>
<iso639Id>geo</iso639Id>
</languageList>
@@ -2668,8 +2719,8 @@
<layout>
<configItem>
<name>gh</name>
- <_shortDescription>Gha</_shortDescription>
- <_description>Ghana</_description>
+ <_shortDescription>en</_shortDescription>
+ <_description>English (Ghana)</_description>
<languageList>
<iso639Id>eng</iso639Id>
</languageList>
@@ -2678,13 +2729,14 @@
<variant>
<configItem>
<name>generic</name>
- <_description>Ghana - Multilingual</_description>
+ <_description>English (Ghana, multilingual)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>akan</name>
- <_description>Ghana - Akan</_description>
+ <_shortDescription>ak</_shortDescription>
+ <_description>Akan</_description>
<languageList>
<iso639Id>aka</iso639Id>
</languageList>
@@ -2693,7 +2745,8 @@
<variant>
<configItem>
<name>ewe</name>
- <_description>Ghana - Ewe</_description>
+ <_shortDescription>ee</_shortDescription>
+ <_description>Ewe</_description>
<languageList>
<iso639Id>ewe</iso639Id>
</languageList>
@@ -2702,7 +2755,8 @@
<variant>
<configItem>
<name>fula</name>
- <_description>Ghana - Fula</_description>
+ <_shortDescription>ff</_shortDescription>
+ <_description>Fula</_description>
<languageList>
<iso639Id>ful</iso639Id>
</languageList>
@@ -2711,7 +2765,8 @@
<variant>
<configItem>
<name>ga</name>
- <_description>Ghana - Ga</_description>
+ <_shortDescription>gaa</_shortDescription>
+ <_description>Ga</_description>
<languageList>
<iso639Id>gaa</iso639Id>
</languageList>
@@ -2720,7 +2775,8 @@
<variant>
<configItem>
<name>hausa</name>
- <_description>Ghana - Hausa</_description>
+ <_shortDescription>ha</_shortDescription>
+ <_description>Hausa</_description>
<languageList>
<iso639Id>hau</iso639Id>
</languageList>
@@ -2729,7 +2785,8 @@
<variant>
<configItem>
<name>avn</name>
- <_description>Ghana - Avatime</_description>
+ <_shortDescription>avn</_shortDescription>
+ <_description>Avatime</_description>
<languageList>
<iso639Id>avn</iso639Id>
</languageList>
@@ -2738,7 +2795,7 @@
<variant>
<configItem>
<name>gillbt</name>
- <_description>Ghana - GILLBT</_description>
+ <_description>English (Ghana, GILLBT)</_description>
</configItem>
</variant>
</variantList>
@@ -2746,8 +2803,8 @@
<layout>
<configItem>
<name>gn</name>
- <_shortDescription>Gin</_shortDescription>
- <_description>Guinea</_description>
+ <_shortDescription>fr</_shortDescription>
+ <_description>French (Guinea)</_description>
<languageList>
<iso639Id>fra</iso639Id>
</languageList>
@@ -2757,8 +2814,8 @@
<layout>
<configItem>
<name>ge</name>
- <_shortDescription>Geo</_shortDescription>
- <_description>Georgia</_description>
+ <_shortDescription>ka</_shortDescription>
+ <_description>Georgian</_description>
<languageList>
<iso639Id>geo</iso639Id>
</languageList>
@@ -2767,19 +2824,20 @@
<variant>
<configItem>
<name>ergonomic</name>
- <_description>Georgia - Ergonomic</_description>
+ <_description>Georgian (ergonomic)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>mess</name>
- <_description>Georgia - MESS</_description>
+ <_description>Georgian (MESS)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>ru</name>
- <_description>Georgia - Russian</_description>
+ <_shortDescription>ru</_shortDescription>
+ <_description>Russian (Georgia)</_description>
<languageList>
<iso639Id>rus</iso639Id>
</languageList>
@@ -2788,7 +2846,7 @@
<variant>
<configItem>
<name>os</name>
- <_description>Georgia - Ossetian</_description>
+ <_description>Georgian (Ossetian)</_description>
<languageList>
<iso639Id>oss</iso639Id>
</languageList>
@@ -2799,8 +2857,8 @@
<layout>
<configItem>
<name>de</name>
- <_shortDescription>Deu</_shortDescription>
- <_description>Germany</_description>
+ <_shortDescription>de</_shortDescription>
+ <_description>German</_description>
<languageList>
<iso639Id>ger</iso639Id>
</languageList>
@@ -2809,67 +2867,67 @@
<variant>
<configItem>
<name>deadacute</name>
- <_description>Germany - Dead acute</_description>
+ <_description>German (dead acute)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>deadgraveacute</name>
- <_description>Germany - Dead grave acute</_description>
+ <_description>German (dead grave acute)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>nodeadkeys</name>
- <_description>Germany - Eliminate dead keys</_description>
+ <_description>German (eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>ro</name>
- <_description>Germany - Romanian keyboard with German letters</_description>
+ <_description>German (Romanian keyboard with German letters)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>ro_nodeadkeys</name>
- <_description>Germany - Romanian keyboard with German letters, eliminate dead keys</_description>
+ <_description>German (Romanian keyboard with German letters, eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak</name>
- <_description>Germany - Dvorak</_description>
+ <_description>German (Dvorak)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>sundeadkeys</name>
- <_description>Germany - Sun dead keys</_description>
+ <_description>German (Sun dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>neo</name>
- <_description>Germany - Neo 2</_description>
+ <_description>German (Neo 2)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>mac</name>
- <_description>Germany - Macintosh</_description>
+ <_description>German (Mac)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>mac_nodeadkeys</name>
- <_description>Germany - Macintosh, eliminate dead keys</_description>
+ <_description>German (Mac, eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dsb</name>
- <_description>Germany - Lower Sorbian</_description>
+ <_description>German (lower Sorbian)</_description>
<languageList>
<iso639Id>dsb</iso639Id>
</languageList>
@@ -2878,7 +2936,7 @@
<variant>
<configItem>
<name>dsb_qwertz</name>
- <_description>Germany - Lower Sorbian (qwertz)</_description>
+ <_description>German (lower Sorbian qwertz)</_description>
<languageList>
<iso639Id>dsb</iso639Id>
</languageList>
@@ -2887,13 +2945,13 @@
<variant>
<configItem>
<name>qwerty</name>
- <_description>Germany - qwerty</_description>
+ <_description>German (qwerty)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>ru</name>
- <_description>Germany - Russian phonetic</_description>
+ <_description>Russian (Germany, phonetic)</_description>
<languageList>
<iso639Id>rus</iso639Id>
</languageList>
@@ -2904,8 +2962,8 @@
<layout>
<configItem>
<name>gr</name>
- <_shortDescription>Grc</_shortDescription>
- <_description>Greece</_description>
+ <_shortDescription>gr</_shortDescription>
+ <_description>Greek</_description>
<languageList>
<iso639Id>gre</iso639Id>
</languageList>
@@ -2914,25 +2972,25 @@
<variant>
<configItem>
<name>simple</name>
- <_description>Greece - Simple</_description>
+ <_description>Greek (simple)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>extended</name>
- <_description>Greece - Extended</_description>
+ <_description>Greek (extended)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>nodeadkeys</name>
- <_description>Greece - Eliminate dead keys</_description>
+ <_description>Greek (eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>polytonic</name>
- <_description>Greece - Polytonic</_description>
+ <_description>Greek (polytonic)</_description>
</configItem>
</variant>
</variantList>
@@ -2940,8 +2998,8 @@
<layout>
<configItem>
<name>hu</name>
- <_shortDescription>Hun</_shortDescription>
- <_description>Hungary</_description>
+ <_shortDescription>hu</_shortDescription>
+ <_description>Hungarian</_description>
<languageList>
<iso639Id>hun</iso639Id>
</languageList>
@@ -2950,115 +3008,115 @@
<variant>
<configItem>
<name>standard</name>
- <_description>Hungary - Standard</_description>
+ <_description>Hungarian (standard)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>nodeadkeys</name>
- <_description>Hungary - Eliminate dead keys</_description>
+ <_description>Hungarian (eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>qwerty</name>
- <_description>Hungary - qwerty</_description>
+ <_description>Hungarian (qwerty)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>101_qwertz_comma_dead</name>
- <_description>Hungary - 101/qwertz/comma/Dead keys</_description>
+ <_description>Hungarian (101/qwertz/comma/dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>101_qwertz_comma_nodead</name>
- <_description>Hungary - 101/qwertz/comma/Eliminate dead keys</_description>
+ <_description>Hungarian (101/qwertz/comma/eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>101_qwertz_dot_dead</name>
- <_description>Hungary - 101/qwertz/dot/Dead keys</_description>
+ <_description>Hungarian (101/qwertz/dot/dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>101_qwertz_dot_nodead</name>
- <_description>Hungary - 101/qwertz/dot/Eliminate dead keys</_description>
+ <_description>Hungarian (101/qwertz/dot/eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>101_qwerty_comma_dead</name>
- <_description>Hungary - 101/qwerty/comma/Dead keys</_description>
+ <_description>Hungarian (101/qwerty/comma/dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>101_qwerty_comma_nodead</name>
- <_description>Hungary - 101/qwerty/comma/Eliminate dead keys</_description>
+ <_description>Hungarian (101/qwerty/comma/eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>101_qwerty_dot_dead</name>
- <_description>Hungary - 101/qwerty/dot/Dead keys</_description>
+ <_description>Hungarian (101/qwerty/dot/dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>101_qwerty_dot_nodead</name>
- <_description>Hungary - 101/qwerty/dot/Eliminate dead keys</_description>
+ <_description>Hungarian (101/qwerty/dot/eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>102_qwertz_comma_dead</name>
- <_description>Hungary - 102/qwertz/comma/Dead keys</_description>
+ <_description>Hungarian (102/qwertz/comma/dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>102_qwertz_comma_nodead</name>
- <_description>Hungary - 102/qwertz/comma/Eliminate dead keys</_description>
+ <_description>Hungarian (102/qwertz/comma/eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>102_qwertz_dot_dead</name>
- <_description>Hungary - 102/qwertz/dot/Dead keys</_description>
+ <_description>Hungarian (102/qwertz/dot/dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>102_qwertz_dot_nodead</name>
- <_description>Hungary - 102/qwertz/dot/Eliminate dead keys</_description>
+ <_description>Hungarian (102/qwertz/dot/eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>102_qwerty_comma_dead</name>
- <_description>Hungary - 102/qwerty/comma/Dead keys</_description>
+ <_description>Hungarian (102/qwerty/comma/dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>102_qwerty_comma_nodead</name>
- <_description>Hungary - 102/qwerty/comma/Eliminate dead keys</_description>
+ <_description>Hungarian (102/qwerty/comma/eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>102_qwerty_dot_dead</name>
- <_description>Hungary - 102/qwerty/dot/Dead keys</_description>
+ <_description>Hungarian (102/qwerty/dot/dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>102_qwerty_dot_nodead</name>
- <_description>Hungary - 102/qwerty/dot/Eliminate dead keys</_description>
+ <_description>Hungarian (102/qwerty/dot/eliminate dead keys)</_description>
</configItem>
</variant>
</variantList>
@@ -3066,8 +3124,8 @@
<layout>
<configItem>
<name>is</name>
- <_shortDescription>Isl</_shortDescription>
- <_description>Iceland</_description>
+ <_shortDescription>is</_shortDescription>
+ <_description>Icelandic</_description>
<languageList>
<iso639Id>ice</iso639Id>
</languageList>
@@ -3076,25 +3134,25 @@
<variant>
<configItem>
<name>Sundeadkeys</name>
- <_description>Iceland - Sun dead keys</_description>
+ <_description>Icelandic (Sun dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>nodeadkeys</name>
- <_description>Iceland - Eliminate dead keys</_description>
+ <_description>Icelandic (eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>mac</name>
- <_description>Iceland - Macintosh</_description>
+ <_description>Icelandic (Mac)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak</name>
- <_description>Iceland - Dvorak</_description>
+ <_description>Icelandic (Dvorak)</_description>
</configItem>
</variant>
</variantList>
@@ -3102,8 +3160,8 @@
<layout>
<configItem>
<name>il</name>
- <_shortDescription>Isr</_shortDescription>
- <_description>Israel</_description>
+ <_shortDescription>he</_shortDescription>
+ <_description>Hebrew</_description>
<languageList>
<iso639Id>heb</iso639Id>
</languageList>
@@ -3112,19 +3170,19 @@
<variant>
<configItem>
<name>lyx</name>
- <_description>Israel - lyx</_description>
+ <_description>Hebrew (lyx)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>phonetic</name>
- <_description>Israel - Phonetic</_description>
+ <_description>Hebrew (Phonetic)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>biblical</name>
- <_description>Israel - Biblical Hebrew (Tiro)</_description>
+ <_description>Hebrew (Tiro)</_description>
</configItem>
</variant>
</variantList>
@@ -3132,8 +3190,8 @@
<layout>
<configItem>
<name>it</name>
- <_shortDescription>Ita</_shortDescription>
- <_description>Italy</_description>
+ <_shortDescription>it</_shortDescription>
+ <_description>Italian</_description>
<languageList>
<iso639Id>ita</iso639Id>
</languageList>
@@ -3142,25 +3200,25 @@
<variant>
<configItem>
<name>nodeadkeys</name>
- <_description>Italy - Eliminate dead keys</_description>
+ <_description>Italian (eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>mac</name>
- <_description>Italy - Macintosh</_description>
+ <_description>Italian (Mac)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>us</name>
- <_description>Italy - US keyboard with Italian letters</_description>
+ <_description>Italian (US keyboard with Italian letters)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>geo</name>
- <_description>Italy - Georgian</_description>
+ <_description>Italian (Georgian)</_description>
<languageList>
<iso639Id>geo</iso639Id>
</languageList>
@@ -3171,8 +3229,8 @@
<layout>
<configItem>
<name>jp</name>
- <_shortDescription>Jpn</_shortDescription>
- <_description>Japan</_description>
+ <_shortDescription>ja</_shortDescription>
+ <_description>Japanese</_description>
<languageList>
<iso639Id>jpn</iso639Id>
</languageList>
@@ -3181,25 +3239,25 @@
<variant>
<configItem>
<name>kana</name>
- <_description>Japan - Kana</_description>
+ <_description>Japanese (Kana)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>kana86</name>
- <_description>Japan - Kana 86</_description>
+ <_description>Japanese (Kana 86)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>OADG109A</name>
- <_description>Japan - OADG 109A</_description>
+ <_description>Japanese (OADG 109A)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>mac</name>
- <_description>Japan - Macintosh</_description>
+ <_description>Japanese (Mac)</_description>
</configItem>
</variant>
</variantList>
@@ -3207,8 +3265,8 @@
<layout>
<configItem>
<name>kg</name>
- <_shortDescription>Kgz</_shortDescription>
- <_description>Kyrgyzstan</_description>
+ <_shortDescription>ki</_shortDescription>
+ <_description>Kyrgyz</_description>
<languageList>
<iso639Id>kir</iso639Id>
</languageList>
@@ -3217,7 +3275,7 @@
<variant>
<configItem>
<name>phonetic</name>
- <_description>Kyrgyzstan - Phonetic</_description>
+ <_description>Kyrgyz (phonetic)</_description>
</configItem>
</variant>
</variantList>
@@ -3225,8 +3283,8 @@
<layout>
<configItem>
<name>kh</name>
- <_shortDescription>Khm</_shortDescription>
- <_description>Cambodia</_description>
+ <_shortDescription>km</_shortDescription>
+ <_description>Khmer (Cambodian)</_description>
<languageList>
<iso639Id>khm</iso639Id>
</languageList>
@@ -3236,8 +3294,8 @@
<layout>
<configItem>
<name>kz</name>
- <_shortDescription>Kaz</_shortDescription>
- <_description>Kazakhstan</_description>
+ <_shortDescription>kk</_shortDescription>
+ <_description>Kazakh</_description>
<languageList>
<iso639Id>kaz</iso639Id>
</languageList>
@@ -3246,7 +3304,8 @@
<variant>
<configItem>
<name>ruskaz</name>
- <_description>Kazakhstan - Russian with Kazakh</_description>
+ <_shortDescription>ru</_shortDescription>
+ <_description>Russian (Kazakhstan, with Kazakh)</_description>
<languageList><iso639Id>kaz</iso639Id>
<iso639Id>rus</iso639Id></languageList>
</configItem>
@@ -3254,7 +3313,7 @@
<variant>
<configItem>
<name>kazrus</name>
- <_description>Kazakhstan - Kazakh with Russian</_description>
+ <_description>Kazakh (with Russian)</_description>
<languageList><iso639Id>kaz</iso639Id>
<iso639Id>rus</iso639Id></languageList>
</configItem>
@@ -3264,8 +3323,8 @@
<layout>
<configItem>
<name>la</name>
- <_shortDescription>Lao</_shortDescription>
- <_description>Laos</_description>
+ <_shortDescription>lo</_shortDescription>
+ <_description>Lao</_description>
<languageList>
<iso639Id>lao</iso639Id>
</languageList>
@@ -3274,7 +3333,7 @@
<variant>
<configItem>
<name>stea</name>
- <_description>Laos - STEA (proposed standard layout)</_description>
+ <_description>Lao (STEA proposed standard layout)</_description>
<languageList><iso639Id>lao</iso639Id>
</languageList>
</configItem>
@@ -3284,8 +3343,8 @@
<layout>
<configItem>
<name>latam</name>
- <_shortDescription>Esp</_shortDescription>
- <_description>Latin American</_description>
+ <_shortDescription>es</_shortDescription>
+ <_description>Spanish (Latin American)</_description>
<countryList>
<iso3166Id>AR</iso3166Id>
<iso3166Id>BO</iso3166Id>
@@ -3317,19 +3376,19 @@
<variant>
<configItem>
<name>nodeadkeys</name>
- <_description>Latin American - Eliminate dead keys</_description>
+ <_description>Spanish (Latin American, eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>deadtilde</name>
- <_description>Latin American - Include dead tilde</_description>
+ <_description>Spanish (Latin American, include dead tilde)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>sundeadkeys</name>
- <_description>Latin American - Sun dead keys</_description>
+ <_description>Spanish (Latin American, sun dead keys)</_description>
</configItem>
</variant>
</variantList>
@@ -3337,8 +3396,8 @@
<layout>
<configItem>
<name>lt</name>
- <_shortDescription>Ltu</_shortDescription>
- <_description>Lithuania</_description>
+ <_shortDescription>lt</_shortDescription>
+ <_description>Lithuanian</_description>
<languageList>
<iso639Id>lit</iso639Id>
</languageList>
@@ -3347,31 +3406,31 @@
<variant>
<configItem>
<name>std</name>
- <_description>Lithuania - Standard</_description>
+ <_description>Lithuanian (standard)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>us</name>
- <_description>Lithuania - US keyboard with Lithuanian letters</_description>
+ <_description>Lithuanian (US keyboard with Lithuanian letters)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>ibm</name>
- <_description>Lithuania - IBM (LST 1205-92)</_description>
+ <_description>Lithuanian (IBM LST 1205-92)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>lekp</name>
- <_description>Lithuania - LEKP</_description>
+ <_description>Lithuanian (LEKP)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>lekpa</name>
- <_description>Lithuania - LEKPa</_description>
+ <_description>Lithuanian (LEKPa)</_description>
</configItem>
</variant>
</variantList>
@@ -3379,8 +3438,8 @@
<layout>
<configItem>
<name>lv</name>
- <_shortDescription>Lva</_shortDescription>
- <_description>Latvia</_description>
+ <_shortDescription>lv</_shortDescription>
+ <_description>Latvian</_description>
<languageList>
<iso639Id>lav</iso639Id>
</languageList>
@@ -3389,19 +3448,19 @@
<variant>
<configItem>
<name>apostrophe</name>
- <_description>Latvia - Apostrophe (') variant</_description>
+ <_description>Latvian (Apostrophe ' variant)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>tilde</name>
- <_description>Latvia - Tilde (~) variant</_description>
+ <_description>Latvian (Tilde ~ variant)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>fkey</name>
- <_description>Latvia - F-letter (F) variant</_description>
+ <_description>Latvian (F variant)</_description>
</configItem>
</variant>
</variantList>
@@ -3409,8 +3468,8 @@
<layout>
<configItem>
<name>mao</name>
- <_shortDescription>Mao</_shortDescription>
- <_description>Maori</_description>
+ <_shortDescription>mi</_shortDescription>
+ <_description>Māori</_description>
<languageList>
<iso639Id>mao</iso639Id>
</languageList>
@@ -3420,8 +3479,8 @@
<layout>
<configItem>
<name>me</name>
- <_shortDescription>MNE</_shortDescription>
- <_description>Montenegro</_description>
+ <_shortDescription>srp</_shortDescription>
+ <_description>Montenegrin</_description>
<languageList>
<iso639Id>srp</iso639Id>
</languageList>
@@ -3430,43 +3489,43 @@
<variant>
<configItem>
<name>cyrillic</name>
- <_description>Montenegro - Cyrillic</_description>
+ <_description>Montenegrin (Cyrillic)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>cyrillicyz</name>
- <_description>Montenegro - Cyrillic, Z and ZHE swapped</_description>
+ <_description>Montenegrin (Cyrillic, Z and ZHE swapped)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>latinunicode</name>
- <_description>Montenegro - Latin unicode</_description>
+ <_description>Montenegrin (Latin unicode)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>latinyz</name>
- <_description>Montenegro - Latin qwerty</_description>
+ <_description>Montenegrin (Latin qwerty)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>latinunicodeyz</name>
- <_description>Montenegro - Latin unicode qwerty</_description>
+ <_description>Montenegrin (Latin unicode qwerty)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>cyrillicalternatequotes</name>
- <_description>Montenegro - Cyrillic with guillemets</_description>
+ <_description>Montenegrin (Cyrillic with guillemets)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>latinalternatequotes</name>
- <_description>Montenegro - Latin with guillemets</_description>
+ <_description>Montenegrin (Latin with guillemets)</_description>
</configItem>
</variant>
</variantList>
@@ -3474,8 +3533,8 @@
<layout>
<configItem>
<name>mk</name>
- <_shortDescription>Mkd</_shortDescription>
- <_description>Macedonia</_description>
+ <_shortDescription>mk</_shortDescription>
+ <_description>Macedonian</_description>
<languageList>
<iso639Id>mkd</iso639Id>
</languageList>
@@ -3484,7 +3543,7 @@
<variant>
<configItem>
<name>nodeadkeys</name>
- <_description>Macedonia - Eliminate dead keys</_description>
+ <_description>Macedonian (eliminate dead keys)</_description>
</configItem>
</variant>
</variantList>
@@ -3492,8 +3551,8 @@
<layout>
<configItem>
<name>mt</name>
- <_shortDescription>Mlt</_shortDescription>
- <_description>Malta</_description>
+ <_shortDescription>mt</_shortDescription>
+ <_description>Maltese</_description>
<languageList>
<iso639Id>mlt</iso639Id>
</languageList>
@@ -3502,7 +3561,7 @@
<variant>
<configItem>
<name>us</name>
- <_description>Malta - Maltese keyboard with US layout</_description>
+ <_description>Maltese (with US layout)</_description>
</configItem>
</variant>
</variantList>
@@ -3510,8 +3569,8 @@
<layout>
<configItem>
<name>mn</name>
- <_shortDescription>Mng</_shortDescription>
- <_description>Mongolia</_description>
+ <_shortDescription>mn</_shortDescription>
+ <_description>Mongolian</_description>
<languageList>
<iso639Id>mng</iso639Id>
</languageList>
@@ -3521,8 +3580,8 @@
<layout>
<configItem>
<name>no</name>
- <_shortDescription>Nor</_shortDescription>
- <_description>Norway</_description>
+ <_shortDescription>no</_shortDescription>
+ <_description>Norwegian</_description>
<languageList>
<iso639Id>nor</iso639Id>
</languageList>
@@ -3531,19 +3590,19 @@
<variant>
<configItem>
<name>nodeadkeys</name>
- <_description>Norway - Eliminate dead keys</_description>
+ <_description>Norwegian (eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak</name>
- <_description>Norway - Dvorak</_description>
+ <_description>Norwegian (Dvorak)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>smi</name>
- <_description>Norway - Northern Saami</_description>
+ <_description>Norwegian (Northern Saami</_description>
<languageList>
<iso639Id>sme</iso639Id>
</languageList>
@@ -3552,7 +3611,7 @@
<variant>
<configItem>
<name>smi_nodeadkeys</name>
- <_description>Norway - Northern Saami, eliminate dead keys</_description>
+ <_description>Norwegian (northern Saami, eliminate dead keys)</_description>
<languageList>
<iso639Id>sme</iso639Id>
</languageList>
@@ -3561,13 +3620,13 @@
<variant>
<configItem>
<name>mac</name>
- <_description>Norway - Macintosh</_description>
+ <_description>Norwegian (Mac)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>mac_nodeadkeys</name>
- <_description>Norway - Macintosh, eliminate dead keys</_description>
+ <_description>Norwegian (Mac, eliminate dead keys)</_description>
</configItem>
</variant>
</variantList>
@@ -3575,8 +3634,8 @@
<layout>
<configItem>
<name>pl</name>
- <_shortDescription>Pol</_shortDescription>
- <_description>Poland</_description>
+ <_shortDescription>pl</_shortDescription>
+ <_description>Polish</_description>
<languageList>
<iso639Id>pol</iso639Id>
</languageList>
@@ -3585,31 +3644,31 @@
<variant>
<configItem>
<name>qwertz</name>
- <_description>Poland - qwertz</_description>
+ <_description>Polish (qwertz)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak</name>
- <_description>Poland - Dvorak</_description>
+ <_description>Polish (Dvorak)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak_quotes</name>
- <_description>Poland - Dvorak, Polish quotes on quotemark key</_description>
+ <_description>Polish (Dvorak, polish quotes on quotemark key)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak_altquotes</name>
- <_description>Poland - Dvorak, Polish quotes on key 1</_description>
+ <_description>Polish (Dvorak, polish quotes on key 1)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>csb</name>
- <_description>Poland - Kashubian</_description>
+ <_description>Polish (Kashubian)</_description>
<languageList>
<iso639Id>csb</iso639Id>
</languageList>
@@ -3618,7 +3677,8 @@
<variant>
<configItem>
<name>ru_phonetic_dvorak</name>
- <_description>Poland - Russian phonetic Dvorak</_description>
+ <_shortDescription>ru</_shortDescription>
+ <_description>Russian (Poland, phonetic Dvorak)</_description>
<languageList>
<iso639Id>rus</iso639Id>
</languageList>
@@ -3627,7 +3687,7 @@
<variant>
<configItem>
<name>dvp</name>
- <_description>Poland - Programmer Dvorak</_description>
+ <_description>Polish (programmer Dvorak)</_description>
</configItem>
</variant>
</variantList>
@@ -3635,8 +3695,8 @@
<layout>
<configItem>
<name>pt</name>
- <_shortDescription>Prt</_shortDescription>
- <_description>Portugal</_description>
+ <_shortDescription>pt</_shortDescription>
+ <_description>Portuguese</_description>
<languageList>
<iso639Id>por</iso639Id>
</languageList>
@@ -3645,49 +3705,49 @@
<variant>
<configItem>
<name>nodeadkeys</name>
- <_description>Portugal - Eliminate dead keys</_description>
+ <_description>Portuguese (eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>sundeadkeys</name>
- <_description>Portugal - Sun dead keys</_description>
+ <_description>Portuguese (Sun dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>mac</name>
- <_description>Portugal - Macintosh</_description>
+ <_description>Portuguese (Mac)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>mac_nodeadkeys</name>
- <_description>Portugal - Macintosh, eliminate dead keys</_description>
+ <_description>Portuguese (Mac, eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>mac_sundeadkeys</name>
- <_description>Portugal - Macintosh, Sun dead keys</_description>
+ <_description>Portuguese (Mac, Sun dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>nativo</name>
- <_description>Portugal - Nativo</_description>
+ <_description>Portuguese (Nativo)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>nativo-us</name>
- <_description>Portugal - Nativo for USA keyboards</_description>
+ <_description>Portuguese (Nativo for USA keyboards)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>nativo-epo</name>
- <_description>Portugal - Nativo for Esperanto</_description>
+ <_description>Portuguese (Nativo for Esperanto)</_description>
<languageList>
<iso639Id>epo</iso639Id>
</languageList>
@@ -3698,8 +3758,8 @@
<layout>
<configItem>
<name>ro</name>
- <_shortDescription>Rou</_shortDescription>
- <_description>Romania</_description>
+ <_shortDescription>ro</_shortDescription>
+ <_description>Romanian</_description>
<languageList>
<iso639Id>rum</iso639Id>
</languageList>
@@ -3708,31 +3768,31 @@
<variant>
<configItem>
<name>cedilla</name>
- <_description>Romania - Cedilla</_description>
+ <_description>Romanian (cedilla)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>std</name>
- <_description>Romania - Standard</_description>
+ <_description>Romanian (standard)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>std_cedilla</name>
- <_description>Romania - Standard (Cedilla)</_description>
+ <_description>Romanian (standard cedilla)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>winkeys</name>
- <_description>Romania - Winkeys</_description>
+ <_description>Romanian (WinKeys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>crh_f</name>
- <_description>Romania - Crimean Tatar (Turkish F)</_description>
+ <_description>Romanian (Crimean Tatar Turkish F)</_description>
<languageList>
<iso639Id>crh</iso639Id>
</languageList>
@@ -3741,7 +3801,7 @@
<variant>
<configItem>
<name>crh_alt</name>
- <_description>Romania - Crimean Tatar (Turkish Alt-Q)</_description>
+ <_description>Romanian (Crimean Tatar Turkish Alt-Q)</_description>
<languageList>
<iso639Id>crh</iso639Id>
</languageList>
@@ -3750,7 +3810,7 @@
<variant>
<configItem>
<name>crh_dobruca1</name>
- <_description>Romania - Crimean Tatar (Dobruca-1 Q)</_description>
+ <_description>Romanian (Crimean Tatar Dobruca-1 Q)</_description>
<languageList>
<iso639Id>crh</iso639Id>
</languageList>
@@ -3759,7 +3819,7 @@
<variant>
<configItem>
<name>crh_dobruca2</name>
- <_description>Romania - Crimean Tatar (Dobruca-2 Q)</_description>
+ <_description>Romanian (Crimean Tatar Dobruca-2 Q)</_description>
<languageList>
<iso639Id>crh</iso639Id>
</languageList>
@@ -3770,8 +3830,8 @@
<layout>
<configItem>
<name>ru</name>
- <_shortDescription>Rus</_shortDescription>
- <_description>Russia</_description>
+ <_shortDescription>ru</_shortDescription>
+ <_description>Russian</_description>
<languageList>
<iso639Id>rus</iso639Id>
</languageList>
@@ -3780,37 +3840,37 @@
<variant>
<configItem>
<name>phonetic</name>
- <_description>Russia - Phonetic</_description>
+ <_description>Russian (phonetic)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>phonetic_winkeys</name>
- <_description>Russia - Phonetic Winkeys</_description>
+ <_description>Russian (phonetic WinKeys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>typewriter</name>
- <_description>Russia - Typewriter</_description>
+ <_description>Russian (typewriter)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>legacy</name>
- <_description>Russia - Legacy</_description>
+ <_description>Russian (legacy)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>typewriter-legacy</name>
- <_description>Russia - Typewriter, legacy</_description>
+ <_description>Russian (typewriter, legacy)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>tt</name>
- <_description>Russia - Tatar</_description>
+ <_description>Russian (Tatar)</_description>
<languageList>
<iso639Id>tat</iso639Id>
</languageList>
@@ -3819,7 +3879,7 @@
<variant>
<configItem>
<name>os_legacy</name>
- <_description>Russia - Ossetian, legacy</_description>
+ <_description>Russian (Ossetian, legacy)</_description>
<languageList>
<iso639Id>oss</iso639Id>
</languageList>
@@ -3828,7 +3888,7 @@
<variant>
<configItem>
<name>os_winkeys</name>
- <_description>Russia - Ossetian, Winkeys</_description>
+ <_description>Russian (Ossetian, WinKeys)</_description>
<languageList>
<iso639Id>oss</iso639Id>
</languageList>
@@ -3837,7 +3897,7 @@
<variant>
<configItem>
<name>cv</name>
- <_description>Russia - Chuvash</_description>
+ <_description>Russian (Chuvash)</_description>
<languageList>
<iso639Id>chv</iso639Id>
</languageList>
@@ -3846,7 +3906,7 @@
<variant>
<configItem>
<name>cv_latin</name>
- <_description>Russia - Chuvash Latin</_description>
+ <_description>Russian (Chuvash Latin)</_description>
<languageList>
<iso639Id>chv</iso639Id>
</languageList>
@@ -3855,7 +3915,7 @@
<variant>
<configItem>
<name>udm</name>
- <_description>Russia - Udmurt</_description>
+ <_description>Russian (Udmurt)</_description>
<languageList>
<iso639Id>udm</iso639Id>
</languageList>
@@ -3864,7 +3924,7 @@
<variant>
<configItem>
<name>kom</name>
- <_description>Russia - Komi</_description>
+ <_description>Russian (Komi)</_description>
<languageList>
<iso639Id>kom</iso639Id>
</languageList>
@@ -3873,7 +3933,7 @@
<variant>
<configItem>
<name>sah</name>
- <_description>Russia - Yakut</_description>
+ <_description>Russian (Yakut)</_description>
<languageList>
<iso639Id>sah</iso639Id>
</languageList>
@@ -3882,7 +3942,7 @@
<variant>
<configItem>
<name>xal</name>
- <_description>Russia - Kalmyk</_description>
+ <_description>Russian (Kalmyk)</_description>
<languageList>
<iso639Id>xal</iso639Id>
</languageList>
@@ -3891,13 +3951,13 @@
<variant>
<configItem>
<name>dos</name>
- <_description>Russia - DOS</_description>
+ <_description>Russian (DOS)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>srp</name>
- <_description>Russia - Serbian</_description>
+ <_description>Russian (Serbian)</_description>
<languageList><iso639Id>rus</iso639Id>
<iso639Id>srp</iso639Id></languageList>
</configItem>
@@ -3905,7 +3965,7 @@
<variant>
<configItem>
<name>bak</name>
- <_description>Russia - Bashkirian</_description>
+ <_description>Russian (Bashkirian)</_description>
<languageList>
<iso639Id>bak</iso639Id>
</languageList>
@@ -3914,7 +3974,7 @@
<variant>
<configItem>
<name>chm</name>
- <_description>Russia - Mari</_description>
+ <_description>Russian (Mari)</_description>
<languageList>
<iso639Id>chm</iso639Id>
</languageList>
@@ -3925,8 +3985,8 @@
<layout>
<configItem>
<name>rs</name>
- <_shortDescription>Srb</_shortDescription>
- <_description>Serbia</_description>
+ <_shortDescription>sr</_shortDescription>
+ <_description>Serbian</_description>
<languageList>
<iso639Id>srp</iso639Id>
</languageList>
@@ -3935,49 +3995,49 @@
<variant>
<configItem>
<name>yz</name>
- <_description>Serbia - Z and ZHE swapped</_description>
+ <_description>Serbian (Z and ZHE swapped)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>latin</name>
- <_description>Serbia - Latin</_description>
+ <_description>Serbian (Latin)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>latinunicode</name>
- <_description>Serbia - Latin Unicode</_description>
+ <_description>Serbian (Latin Unicode)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>latinyz</name>
- <_description>Serbia - Latin qwerty</_description>
+ <_description>Serbian (Latin qwerty)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>latinunicodeyz</name>
- <_description>Serbia - Latin Unicode qwerty</_description>
+ <_description>Serbian (Latin Unicode qwerty)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>alternatequotes</name>
- <_description>Serbia - With guillemets</_description>
+ <_description>Serbian (with guillemets)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>latinalternatequotes</name>
- <_description>Serbia - Latin with guillemets</_description>
+ <_description>Serbian (Latin with guillemets)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>rue</name>
- <_description>Serbia - Pannonian Rusyn Homophonic</_description>
+ <_description>Serbian (Pannonian Rusyn Homophonic)</_description>
<languageList>
<iso639Id>rue</iso639Id>
</languageList>
@@ -3988,8 +4048,8 @@
<layout>
<configItem>
<name>si</name>
- <_shortDescription>Svn</_shortDescription>
- <_description>Slovenia</_description>
+ <_shortDescription>sl</_shortDescription>
+ <_description>Slovene</_description>
<languageList>
<iso639Id>slv</iso639Id>
</languageList>
@@ -3998,13 +4058,13 @@
<variant>
<configItem>
<name>alternatequotes</name>
- <_description>Slovenia - Use guillemets for quotes</_description>
+ <_description>Slovene (use guillemets for quotes)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>us</name>
- <_description>Slovenia - US keyboard with Slovenian letters</_description>
+ <_description>Slovene (US keyboard with Slovenian letters)</_description>
</configItem>
</variant>
</variantList>
@@ -4012,8 +4072,8 @@
<layout>
<configItem>
<name>sk</name>
- <_shortDescription>Svk</_shortDescription>
- <_description>Slovakia</_description>
+ <_shortDescription>sk</_shortDescription>
+ <_description>Slovak</_description>
<languageList>
<iso639Id>slo</iso639Id>
</languageList>
@@ -4022,19 +4082,19 @@
<variant>
<configItem>
<name>bksl</name>
- <_description>Slovakia - Extended Backslash</_description>
+ <_description>Slovak (extended Backslash)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>qwerty</name>
- <_description>Slovakia - qwerty</_description>
+ <_description>Slovak (qwerty)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>qwerty_bksl</name>
- <_description>Slovakia - qwerty, extended Backslash</_description>
+ <_description>Slovak (qwerty, extended Backslash)</_description>
</configItem>
</variant>
</variantList>
@@ -4042,8 +4102,8 @@
<layout>
<configItem>
<name>es</name>
- <_shortDescription>Esp</_shortDescription>
- <_description>Spain</_description>
+ <_shortDescription>es</_shortDescription>
+ <_description>Spanish</_description>
<languageList>
<iso639Id>spa</iso639Id>
</languageList>
@@ -4052,31 +4112,31 @@
<variant>
<configItem>
<name>nodeadkeys</name>
- <_description>Spain - Eliminate dead keys</_description>
+ <_description>Spanish (eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>deadtilde</name>
- <_description>Spain - Include dead tilde</_description>
+ <_description>Spanish (include dead tilde)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>sundeadkeys</name>
- <_description>Spain - Sun dead keys</_description>
+ <_description>Spanish (Sun dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak</name>
- <_description>Spain - Dvorak</_description>
+ <_description>Spanish (Dvorak)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>ast</name>
- <_description>Spain - Asturian variant with bottom-dot H and bottom-dot L</_description>
+ <_description>Spanish (Asturian variant with bottom-dot H and bottom-dot L)</_description>
<languageList>
<iso639Id>ast</iso639Id>
</languageList>
@@ -4085,7 +4145,7 @@
<variant>
<configItem>
<name>cat</name>
- <_description>Spain - Catalan variant with middle-dot L</_description>
+ <_description>Spanish (Catalan variant with middle-dot L)</_description>
<languageList>
<iso639Id>cat</iso639Id>
</languageList>
@@ -4094,7 +4154,7 @@
<variant>
<configItem>
<name>mac</name>
- <_description>Spain - Macintosh</_description>
+ <_description>Spanish (Mac)</_description>
</configItem>
</variant>
</variantList>
@@ -4102,8 +4162,8 @@
<layout>
<configItem>
<name>se</name>
- <_shortDescription>Swe</_shortDescription>
- <_description>Sweden</_description>
+ <_shortDescription>sv</_shortDescription>
+ <_description>Swedish</_description>
<languageList>
<iso639Id>swe</iso639Id>
</languageList>
@@ -4112,19 +4172,20 @@
<variant>
<configItem>
<name>nodeadkeys</name>
- <_description>Sweden - Eliminate dead keys</_description>
+ <_description>Swedish (eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak</name>
- <_description>Sweden - Dvorak</_description>
+ <_description>Swedish (Dvorak)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>rus</name>
- <_description>Sweden - Russian phonetic</_description>
+ <_shortDescription>ru</_shortDescription>
+ <_description>Russian (Sweden, phonetic)</_description>
<languageList>
<iso639Id>rus</iso639Id>
</languageList>
@@ -4133,7 +4194,8 @@
<variant>
<configItem>
<name>rus_nodeadkeys</name>
- <_description>Sweden - Russian phonetic, eliminate dead keys</_description>
+ <_shortDescription>ru</_shortDescription>
+ <_description>Russian (Sweden, phonetic, eliminate dead keys)</_description>
<languageList>
<iso639Id>rus</iso639Id>
</languageList>
@@ -4142,7 +4204,7 @@
<variant>
<configItem>
<name>smi</name>
- <_description>Sweden - Northern Saami</_description>
+ <_description>Swedish (northern Saami)</_description>
<languageList>
<iso639Id>sme</iso639Id>
</languageList>
@@ -4151,13 +4213,13 @@
<variant>
<configItem>
<name>mac</name>
- <_description>Sweden - Macintosh</_description>
+ <_description>Swedish (Mac)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>svdvorak</name>
- <_description>Sweden - Svdvorak</_description>
+ <_description>Swedish (Svdvorak)</_description>
</configItem>
</variant>
</variantList>
@@ -4165,8 +4227,8 @@
<layout>
<configItem>
<name>ch</name>
- <_shortDescription>Che</_shortDescription>
- <_description>Switzerland</_description>
+ <_shortDescription>che</_shortDescription>
+ <_description>Swiss</_description>
<languageList><iso639Id>ger</iso639Id>
<iso639Id>gsw</iso639Id></languageList>
</configItem>
@@ -4174,25 +4236,28 @@
<variant>
<configItem>
<name>legacy</name>
- <_description>Switzerland - Legacy</_description>
+ <_description>Swiss (legacy)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>de_nodeadkeys</name>
- <_description>Switzerland - German, eliminate dead keys</_description>
+ <_shortDescription>de</_shortDescription>
+ <_description>German (Switzerland, eliminate dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>de_sundeadkeys</name>
- <_description>Switzerland - German, Sun dead keys</_description>
+ <_shortDescription>de</_shortDescription>
+ <_description>German (Switzerland, Sun dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>fr</name>
- <_description>Switzerland - French</_description>
+ <_shortDescription>fr</_shortDescription>
+ <_description>French (Switzerland)</_description>
<languageList>
<iso639Id>fra</iso639Id>
</languageList>
@@ -4201,7 +4266,8 @@
<variant>
<configItem>
<name>fr_nodeadkeys</name>
- <_description>Switzerland - French, eliminate dead keys</_description>
+ <_shortDescription>fr</_shortDescription>
+ <_description>French (Switzerland, eliminate dead keys)</_description>
<languageList>
<iso639Id>fra</iso639Id>
</languageList>
@@ -4210,7 +4276,8 @@
<variant>
<configItem>
<name>fr_sundeadkeys</name>
- <_description>Switzerland - French, Sun dead keys</_description>
+ <_shortDescription>fr</_shortDescription>
+ <_description>French (Switzerland, Sun dead keys)</_description>
<languageList>
<iso639Id>fra</iso639Id>
</languageList>
@@ -4219,7 +4286,8 @@
<variant>
<configItem>
<name>fr_mac</name>
- <_description>Switzerland - French (Macintosh)</_description>
+ <_shortDescription>fr</_shortDescription>
+ <_description>French (Switzerland, Mac)</_description>
<languageList>
<iso639Id>fra</iso639Id>
</languageList>
@@ -4228,7 +4296,8 @@
<variant>
<configItem>
<name>de_mac</name>
- <_description>Switzerland - German (Macintosh)</_description>
+ <_shortDescription>de</_shortDescription>
+ <_description>German (Switzerland, Mac)</_description>
</configItem>
</variant>
</variantList>
@@ -4236,8 +4305,8 @@
<layout>
<configItem>
<name>sy</name>
- <_shortDescription>Syr</_shortDescription>
- <_description>Syria</_description>
+ <_shortDescription>ar</_shortDescription>
+ <_description>Arabic (Syria)</_description>
<languageList>
<iso639Id>syr</iso639Id>
</languageList>
@@ -4246,19 +4315,22 @@
<variant>
<configItem>
<name>syc</name>
- <_description>Syria - Syriac</_description>
+ <_shortDescription>syc</_shortDescription>
+ <_description>Syriac</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>syc_phonetic</name>
- <_description>Syria - Syriac phonetic</_description>
+ <_shortDescription>syc</_shortDescription>
+ <_description>Syriac (phonetic)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>ku</name>
- <_description>Syria - Kurdish, Latin Q</_description>
+ <_shortDescription>ku</_shortDescription>
+ <_description>Kurdish (Syria, Latin Q)</_description>
<languageList>
<iso639Id>kur</iso639Id>
</languageList>
@@ -4267,7 +4339,8 @@
<variant>
<configItem>
<name>ku_f</name>
- <_description>Syria - Kurdish, (F)</_description>
+ <_shortDescription>ku</_shortDescription>
+ <_description>Kurdish (Syria, F)</_description>
<languageList>
<iso639Id>kur</iso639Id>
</languageList>
@@ -4276,7 +4349,8 @@
<variant>
<configItem>
<name>ku_alt</name>
- <_description>Syria - Kurdish, Latin Alt-Q</_description>
+ <_shortDescription>ku</_shortDescription>
+ <_description>Kurdish (Syria, Latin Alt-Q)</_description>
<languageList>
<iso639Id>kur</iso639Id>
</languageList>
@@ -4287,8 +4361,8 @@
<layout>
<configItem>
<name>tj</name>
- <_shortDescription>Tjk</_shortDescription>
- <_description>Tajikistan</_description>
+ <_shortDescription>tg</_shortDescription>
+ <_description>Tajik</_description>
<languageList>
<iso639Id>tgk</iso639Id>
</languageList>
@@ -4297,7 +4371,7 @@
<variant>
<configItem>
<name>legacy</name>
- <_description>Tajikistan - Legacy</_description>
+ <_description>Tajik (legacy)</_description>
</configItem>
</variant>
</variantList>
@@ -4305,8 +4379,8 @@
<layout>
<configItem>
<name>lk</name>
- <_shortDescription>Lka</_shortDescription>
- <_description>Sri Lanka</_description>
+ <_shortDescription>si</_shortDescription>
+ <_description>Sinhala</_description>
<languageList>
<iso639Id>sin</iso639Id>
</languageList>
@@ -4315,7 +4389,8 @@
<variant>
<configItem>
<name>tam_unicode</name>
- <_description>Sri Lanka - Tamil Unicode</_description>
+ <_shortDescription>ta</_shortDescription>
+ <_description>Tamil (Sri Lanka, Unicode)</_description>
<languageList>
<iso639Id>tam</iso639Id>
</languageList>
@@ -4324,7 +4399,7 @@
<variant>
<configItem>
<name>tam_TAB</name>
- <_description>Sri Lanka - Tamil TAB Typewriter</_description>
+ <_description>Tamil (Sri Lanka, TAB Typewriter)</_description>
<languageList>
<iso639Id>tam</iso639Id>
</languageList>
@@ -4335,8 +4410,8 @@
<layout>
<configItem>
<name>th</name>
- <_shortDescription>Tha</_shortDescription>
- <_description>Thailand</_description>
+ <_shortDescription>th</_shortDescription>
+ <_description>Thai</_description>
<languageList>
<iso639Id>tha</iso639Id>
</languageList>
@@ -4345,13 +4420,13 @@
<variant>
<configItem>
<name>tis</name>
- <_description>Thailand - TIS-820.2538</_description>
+ <_description>Thai (TIS-820.2538)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>pat</name>
- <_description>Thailand - Pattachote</_description>
+ <_description>Thai (Pattachote)</_description>
</configItem>
</variant>
</variantList>
@@ -4359,8 +4434,8 @@
<layout>
<configItem>
<name>tr</name>
- <_shortDescription>Tur</_shortDescription>
- <_description>Turkey</_description>
+ <_shortDescription>tr</_shortDescription>
+ <_description>Turkish</_description>
<languageList>
<iso639Id>tur</iso639Id>
</languageList>
@@ -4369,25 +4444,26 @@
<variant>
<configItem>
<name>f</name>
- <_description>Turkey - (F)</_description>
+ <_description>Turkish (F)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>alt</name>
- <_description>Turkey - Alt-Q</_description>
+ <_description>Turkish (Alt-Q)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>sundeadkeys</name>
- <_description>Turkey - Sun dead keys</_description>
+ <_description>Turkish (Sun dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>ku</name>
- <_description>Turkey - Kurdish, Latin Q</_description>
+ <_shortDescription>ku</_shortDescription>
+ <_description>Kurdish (Turkey, Latin Q)</_description>
<languageList>
<iso639Id>kur</iso639Id>
</languageList>
@@ -4396,7 +4472,8 @@
<variant>
<configItem>
<name>ku_f</name>
- <_description>Turkey - Kurdish, (F)</_description>
+ <_shortDescription>ku</_shortDescription>
+ <_description>Kurdish (Turkey, F)</_description>
<languageList>
<iso639Id>kur</iso639Id>
</languageList>
@@ -4405,7 +4482,8 @@
<variant>
<configItem>
<name>ku_alt</name>
- <_description>Turkey - Kurdish, Latin Alt-Q</_description>
+ <_shortDescription>ku</_shortDescription>
+ <_description>Kurdish (Turkey, Latin Alt-Q)</_description>
<languageList>
<iso639Id>kur</iso639Id>
</languageList>
@@ -4414,13 +4492,13 @@
<variant>
<configItem>
<name>intl</name>
- <_description>Turkey - International (with dead keys)</_description>
+ <_description>Turkish (international with dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>crh</name>
- <_description>Turkey - Crimean Tatar (Turkish Q)</_description>
+ <_description>Turkish (Crimean Tatar Turkish Q)</_description>
<languageList>
<iso639Id>crh</iso639Id>
</languageList>
@@ -4429,7 +4507,7 @@
<variant>
<configItem>
<name>crh_f</name>
- <_description>Turkey - Crimean Tatar (Turkish F)</_description>
+ <_description>Turkish (Crimean Tatar Turkish F)</_description>
<languageList>
<iso639Id>crh</iso639Id>
</languageList>
@@ -4438,7 +4516,7 @@
<variant>
<configItem>
<name>crh_alt</name>
- <_description>Turkey - Crimean Tatar (Turkish Alt-Q)</_description>
+ <_description>Turkish (Crimean Tatar Turkish Alt-Q)</_description>
<languageList>
<iso639Id>crh</iso639Id>
</languageList>
@@ -4449,8 +4527,8 @@
<layout>
<configItem>
<name>tw</name>
- <_shortDescription>Twn</_shortDescription>
- <_description>Taiwan</_description>
+ <_shortDescription>twn</_shortDescription>
+ <_description>Taiwanese</_description>
<languageList>
<iso639Id>trv</iso639Id>
</languageList>
@@ -4459,7 +4537,7 @@
<variant>
<configItem>
<name>indigenous</name>
- <_description>Taiwan - Indigenous</_description>
+ <_description>Taiwanese (indigenous)</_description>
<languageList>
<iso639Id>ami</iso639Id>
<iso639Id>tay</iso639Id>
@@ -4478,9 +4556,10 @@
<variant>
<configItem>
<name>saisiyat</name>
- <_description>Taiwan - Saisiyat</_description>
+ <_shortDescription>xsy</_shortDescription>
+ <_description>Saisiyat (Taiwan)</_description>
<languageList>
- <iso639Id>xsf</iso639Id>
+ <iso639Id>xsy</iso639Id>
</languageList>
</configItem>
</variant>
@@ -4489,8 +4568,8 @@
<layout>
<configItem>
<name>ua</name>
- <_shortDescription>Ukr</_shortDescription>
- <_description>Ukraine</_description>
+ <_shortDescription>uk</_shortDescription>
+ <_description>Ukrainian</_description>
<languageList>
<iso639Id>ukr</iso639Id>
</languageList>
@@ -4499,49 +4578,49 @@
<variant>
<configItem>
<name>phonetic</name>
- <_description>Ukraine - Phonetic</_description>
+ <_description>Ukrainian (phonetic)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>typewriter</name>
- <_description>Ukraine - Typewriter</_description>
+ <_description>Ukrainian (typewriter)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>winkeys</name>
- <_description>Ukraine - Winkeys</_description>
+ <_description>Ukrainian (WinKeys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>legacy</name>
- <_description>Ukraine - Legacy</_description>
+ <_description>Ukrainian (legacy)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>rstu</name>
- <_description>Ukraine - Standard RSTU</_description>
+ <_description>Ukrainian (standard RSTU)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>rstu_ru</name>
- <_description>Ukraine - Standard RSTU on Russian layout</_description>
+ <_description>Ukrainian (standard RSTU on Russian layout)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>homophonic</name>
- <_description>Ukraine - Homophonic</_description>
+ <_description>Ukrainian (homophonic)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>crh</name>
- <_description>Ukraine - Crimean Tatar (Turkish Q)</_description>
+ <_description>Ukrainian (Crimean Tatar Turkish Q)</_description>
<languageList>
<iso639Id>crh</iso639Id>
</languageList>
@@ -4550,7 +4629,7 @@
<variant>
<configItem>
<name>crh_f</name>
- <_description>Ukraine - Crimean Tatar (Turkish F)</_description>
+ <_description>Ukrainian (Crimean Tatar Turkish F)</_description>
<languageList>
<iso639Id>crh</iso639Id>
</languageList>
@@ -4559,7 +4638,7 @@
<variant>
<configItem>
<name>crh_alt</name>
- <_description>Ukraine - Crimean Tatar (Turkish Alt-Q)</_description>
+ <_description>Ukrainian (Crimean Tatar Turkish Alt-Q)</_description>
<languageList>
<iso639Id>crh</iso639Id>
</languageList>
@@ -4571,7 +4650,7 @@
<configItem>
<name>gb</name>
<_shortDescription>GBr</_shortDescription>
- <_description>United Kingdom</_description>
+ <_description>English (UK)</_description>
<languageList>
<iso639Id>eng</iso639Id>
</languageList>
@@ -4580,43 +4659,43 @@
<variant>
<configItem>
<name>extd</name>
- <_description>United Kingdom - Extended - Winkeys</_description>
+ <_description>English (UK, extended, WinKeys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>intl</name>
- <_description>United Kingdom - International (with dead keys)</_description>
+ <_description>English (UK, international with dead keys)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorak</name>
- <_description>United Kingdom - Dvorak</_description>
+ <_description>English (UK, Dvorak)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>dvorakukp</name>
- <_description>United Kingdom - Dvorak (UK Punctuation)</_description>
+ <_description>English (UK, Dvorak UK punctuation)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>mac</name>
- <_description>United Kingdom - Macintosh</_description>
+ <_description>English (UK, Mac)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>mac_intl</name>
- <_description>United Kingdom - Macintosh (International)</_description>
+ <_description>English (UK, Mac international)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>colemak</name>
- <_description>United Kingdom - Colemak</_description>
+ <_description>English (UK, Colemak)</_description>
</configItem>
</variant>
</variantList>
@@ -4624,8 +4703,8 @@
<layout>
<configItem>
<name>uz</name>
- <_shortDescription>Uzb</_shortDescription>
- <_description>Uzbekistan</_description>
+ <_shortDescription>uz</_shortDescription>
+ <_description>Uzbek</_description>
<languageList>
<iso639Id>uzb</iso639Id>
</languageList>
@@ -4634,13 +4713,13 @@
<variant>
<configItem>
<name>latin</name>
- <_description>Uzbekistan - Latin</_description>
+ <_description>Uzbek (Latin)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>crh</name>
- <_description>Uzbekistan - Crimean Tatar (Turkish Q)</_description>
+ <_description>Uzbek (Crimean Tatar Turkish Q)</_description>
<languageList>
<iso639Id>crh</iso639Id>
</languageList>
@@ -4649,7 +4728,7 @@
<variant>
<configItem>
<name>crh_f</name>
- <_description>Uzbekistan - Crimean Tatar (Turkish F)</_description>
+ <_description>Uzbek (Crimean Tatar Turkish F)</_description>
<languageList>
<iso639Id>crh</iso639Id>
</languageList>
@@ -4658,7 +4737,7 @@
<variant>
<configItem>
<name>crh_alt</name>
- <_description>Uzbekistan - Crimean Tatar (Turkish Alt-Q)</_description>
+ <_description>Uzbek (Crimean Tatar Turkish Alt-Q)</_description>
<languageList>
<iso639Id>crh</iso639Id>
</languageList>
@@ -4669,8 +4748,8 @@
<layout>
<configItem>
<name>vn</name>
- <_shortDescription>Vnm</_shortDescription>
- <_description>Vietnam</_description>
+ <_shortDescription>vi</_shortDescription>
+ <_description>Vietnamese</_description>
<languageList>
<iso639Id>vie</iso639Id>
</languageList>
@@ -4680,8 +4759,8 @@
<layout>
<configItem>
<name>kr</name>
- <_shortDescription>Kor</_shortDescription>
- <_description>Korea, Republic of</_description>
+ <_shortDescription>ko</_shortDescription>
+ <_description>Korean</_description>
<languageList>
<iso639Id>kor</iso639Id>
</languageList>
@@ -4690,7 +4769,7 @@
<variant>
<configItem>
<name>kr104</name>
- <_description>Korea, Republic of - 101/104 key Compatible</_description>
+ <_description>Korean (101/104 key compatible)</_description>
</configItem>
</variant>
</variantList>
@@ -4698,8 +4777,8 @@
<layout>
<configItem>
<name>nec_vndr/jp</name>
- <_shortDescription>Jpn</_shortDescription>
- <_description>Japan (PC-98xx Series)</_description>
+ <_shortDescription>ja</_shortDescription>
+ <_description>Japanese (PC-98xx Series)</_description>
<countryList>
<iso3166Id>JP</iso3166Id>
</countryList>
@@ -4712,8 +4791,8 @@
<layout>
<configItem>
<name>ie</name>
- <_shortDescription>Irl</_shortDescription>
- <_description>Ireland</_description>
+ <_shortDescription>ie</_shortDescription>
+ <_description>Irish</_description>
<languageList>
<iso639Id>eng</iso639Id>
</languageList>
@@ -4722,7 +4801,7 @@
<variant>
<configItem>
<name>CloGaelach</name>
- <_description>Ireland - CloGaelach</_description>
+ <_description>Irish (CloGaelach)</_description>
<languageList>
<iso639Id>gla</iso639Id>
</languageList>
@@ -4731,19 +4810,19 @@
<variant>
<configItem>
<name>UnicodeExpert</name>
- <_description>Ireland - UnicodeExpert</_description>
+ <_description>Irish (UnicodeExpert)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>ogam</name>
- <_description>Ireland - Ogham</_description>
+ <_description>Irish (Ogham)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>ogam_is434</name>
- <_description>Ireland - Ogham IS434</_description>
+ <_description>Irish (Ogham IS434)</_description>
</configItem>
</variant>
</variantList>
@@ -4751,8 +4830,8 @@
<layout>
<configItem>
<name>pk</name>
- <_shortDescription>Pak</_shortDescription>
- <_description>Pakistan</_description>
+ <_shortDescription>ur</_shortDescription>
+ <_description>Urdu (Pakistan)</_description>
<languageList>
<iso639Id>urd</iso639Id>
</languageList>
@@ -4761,7 +4840,7 @@
<variant>
<configItem>
<name>urd-crulp</name>
- <_description>Pakistan - CRULP</_description>
+ <_description>Urdu (Pakistan, CRULP)</_description>
<languageList>
<iso639Id>urd</iso639Id>
</languageList>
@@ -4770,7 +4849,7 @@
<variant>
<configItem>
<name>urd-nla</name>
- <_description>Pakistan - NLA</_description>
+ <_description>Urdu (Pakistan, NLA)</_description>
<languageList>
<iso639Id>urd</iso639Id>
</languageList>
@@ -4779,7 +4858,8 @@
<variant>
<configItem>
<name>ara</name>
- <_description>Pakistan - Arabic</_description>
+ <_shortDescription>ar</_shortDescription>
+ <_description>Arabic (Pakistan)</_description>
<languageList>
<iso639Id>ara</iso639Id>
</languageList>
@@ -4788,7 +4868,8 @@
<variant>
<configItem>
<name>snd</name>
- <_description>Pakistan - Sindhi</_description>
+ <_shortDescription>sd</_shortDescription>
+ <_description>Sindhi</_description>
<languageList>
<iso639Id>sd</iso639Id>
</languageList>
@@ -4799,8 +4880,8 @@
<layout>
<configItem>
<name>mv</name>
- <_shortDescription>Mdv</_shortDescription>
- <_description>Maldives</_description>
+ <_shortDescription>dv</_shortDescription>
+ <_description>Dhivehi</_description>
<languageList>
<iso639Id>div</iso639Id>
</languageList>
@@ -4810,8 +4891,8 @@
<layout>
<configItem>
<name>za</name>
- <_shortDescription>Zaf</_shortDescription>
- <_description>South Africa</_description>
+ <_shortDescription>en</_shortDescription>
+ <_description>English (South Africa)</_description>
<languageList>
<iso639Id>eng</iso639Id>
</languageList>
@@ -4820,7 +4901,7 @@
<layout>
<configItem>
<name>epo</name>
- <_shortDescription>Epo</_shortDescription>
+ <_shortDescription>eo</_shortDescription>
<_description>Esperanto</_description>
<languageList>
<iso639Id>epo</iso639Id>
@@ -4830,7 +4911,7 @@
<variant>
<configItem>
<name>legacy</name>
- <_description>Esperanto - displaced semicolon and quote (obsolete)</_description>
+ <_description>Esperanto (displaced semicolon and quote, obsolete)</_description>
</configItem>
</variant>
</variantList>
@@ -4838,8 +4919,8 @@
<layout>
<configItem>
<name>np</name>
- <_shortDescription>Npl</_shortDescription>
- <_description>Nepal</_description>
+ <_shortDescription>ne</_shortDescription>
+ <_description>Nepali</_description>
<languageList>
<iso639Id>nep</iso639Id>
</languageList>
@@ -4848,8 +4929,8 @@
<layout>
<configItem>
<name>ng</name>
- <_shortDescription>Nga</_shortDescription>
- <_description>Nigeria</_description>
+ <_shortDescription>en</_shortDescription>
+ <_description>English (Nigeria)</_description>
<languageList>
<iso639Id>eng</iso639Id>
</languageList>
@@ -4858,7 +4939,8 @@
<variant>
<configItem>
<name>igbo</name>
- <_description>Nigeria - Igbo</_description>
+ <_shortDescription>ig</_shortDescription>
+ <_description>Igbo</_description>
<languageList>
<iso639Id>ibo</iso639Id>
</languageList>
@@ -4867,7 +4949,8 @@
<variant>
<configItem>
<name>yoruba</name>
- <_description>Nigeria - Yoruba</_description>
+ <_shortDescription>yo</_shortDescription>
+ <_description>Yoruba</_description>
<languageList>
<iso639Id>yor</iso639Id>
</languageList>
@@ -4876,7 +4959,8 @@
<variant>
<configItem>
<name>hausa</name>
- <_description>Nigeria - Hausa</_description>
+ <_shortDescription>ha</_shortDescription>
+ <_description>Hausa</_description>
<languageList>
<iso639Id>hau</iso639Id>
</languageList>
@@ -4887,8 +4971,8 @@
<layout>
<configItem>
<name>et</name>
- <_shortDescription>Eth</_shortDescription>
- <_description>Ethiopia</_description>
+ <_shortDescription>am</_shortDescription>
+ <_description>Amharic</_description>
<languageList>
<iso639Id>amh</iso639Id>
</languageList>
@@ -4898,8 +4982,8 @@
<layout>
<configItem>
<name>sn</name>
- <_shortDescription>Sen</_shortDescription>
- <_description>Senegal</_description>
+ <_shortDescription>wo</_shortDescription>
+ <_description>Wolof</_description>
<languageList>
<iso639Id>wol</iso639Id>
</languageList>
@@ -4909,20 +4993,20 @@
<layout>
<configItem>
<name>brai</name>
- <_shortDescription>Brl</_shortDescription>
+ <_shortDescription>brl</_shortDescription>
<_description>Braille</_description>
</configItem>
<variantList>
<variant>
<configItem>
<name>left_hand</name>
- <_description>Braille - Left hand</_description>
+ <_description>Braille (left hand)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>right_hand</name>
- <_description>Braille - Right hand</_description>
+ <_description>Braille (right hand)</_description>
</configItem>
</variant>
</variantList>
@@ -4930,8 +5014,8 @@
<layout>
<configItem>
<name>tm</name>
- <_shortDescription>Tkm</_shortDescription>
- <_description>Turkmenistan</_description>
+ <_shortDescription>tk</_shortDescription>
+ <_description>Turkmen</_description>
<languageList>
<iso639Id>tuk</iso639Id>
</languageList>
@@ -4940,7 +5024,7 @@
<variant>
<configItem>
<name>alt</name>
- <_description>Turkmenistan - Alt-Q</_description>
+ <_description>Turkmen (Alt-Q)</_description>
</configItem>
</variant>
</variantList>
@@ -4948,8 +5032,8 @@
<layout>
<configItem>
<name>ml</name>
- <_shortDescription>Mli</_shortDescription>
- <_description>Mali</_description>
+ <_shortDescription>bm</_shortDescription>
+ <_description>Bambara</_description>
<languageList>
<iso639Id>bam</iso639Id>
</languageList>
@@ -4958,19 +5042,22 @@
<variant>
<configItem>
<name>fr-oss</name>
- <_description>Mali - Français (France Alternative)</_description>
+ <_shortDescription>fr</_shortDescription>
+ <_description>French (Mali, alternative)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>us-mac</name>
- <_description>Mali - English (USA Macintosh)</_description>
+ <_shortDescription>en</_shortDescription>
+ <_description>English (Mali, USA Mac)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>us-intl</name>
- <_description>Mali - English (USA International)</_description>
+ <_shortDescription>en</_shortDescription>
+ <_description>English (Mali, USA international)</_description>
</configItem>
</variant>
</variantList>
@@ -4978,8 +5065,8 @@
<layout>
<configItem>
<name>tz</name>
- <_shortDescription>Tza</_shortDescription>
- <_description>Tanzania</_description>
+ <_shortDescription>sw</_shortDescription>
+ <_description>Swahili (Tanzania)</_description>
<languageList>
<iso639Id>swa</iso639Id>
</languageList>
@@ -4988,8 +5075,8 @@
<layout>
<configItem>
<name>ke</name>
- <_shortDescription>Ken</_shortDescription>
- <_description>Kenya</_description>
+ <_shortDescription>sw</_shortDescription>
+ <_description>Swahili (Kenya)</_description>
<languageList>
<iso639Id>swa</iso639Id>
</languageList>
@@ -4998,7 +5085,8 @@
<variant>
<configItem>
<name>kik</name>
- <_description>Kenya - Kikuyu</_description>
+ <_shortDescription>ki</_shortDescription>
+ <_description>Kikuyu</_description>
<languageList>
<iso639Id>kik</iso639Id>
</languageList>
@@ -5009,8 +5097,8 @@
<layout>
<configItem>
<name>bw</name>
- <_shortDescription>Bwa</_shortDescription>
- <_description>Botswana</_description>
+ <_shortDescription>tn</_shortDescription>
+ <_description>Tswana</_description>
<languageList>
<iso639Id>tsn</iso639Id>
</languageList>
@@ -5019,8 +5107,8 @@
<layout>
<configItem>
<name>ph</name>
- <_shortDescription>Phi</_shortDescription>
- <_description>Philippines</_description>
+ <_shortDescription>ph</_shortDescription>
+ <_description>Filipino</_description>
<languageList><iso639Id>eng</iso639Id>
<iso639Id>bik</iso639Id>
<iso639Id>ceb</iso639Id>
@@ -5037,7 +5125,7 @@
<variant>
<configItem>
<name>qwerty-bay</name>
- <_description>Philippines - QWERTY (Baybayin)</_description>
+ <_description>Filipino (QWERTY Baybayin)</_description>
<languageList><iso639Id>bik</iso639Id>
<iso639Id>ceb</iso639Id>
<iso639Id>fil</iso639Id>
@@ -5053,13 +5141,13 @@
<variant>
<configItem>
<name>capewell-dvorak</name>
- <_description>Philippines - Capewell-Dvorak (Latin)</_description>
+ <_description>Filipino (Capewell-Dvorak Latin)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>capewell-dvorak-bay</name>
- <_description>Philippines - Capewell-Dvorak (Baybayin)</_description>
+ <_description>Filipino (Capewell-Dvorak Baybayin)</_description>
<languageList><iso639Id>bik</iso639Id>
<iso639Id>ceb</iso639Id>
<iso639Id>fil</iso639Id>
@@ -5075,13 +5163,13 @@
<variant>
<configItem>
<name>capewell-qwerf2k6</name>
- <_description>Philippines - Capewell-QWERF 2006 (Latin)</_description>
+ <_description>Filipino (Capewell-QWERF 2006 Latin)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>capewell-qwerf2k6-bay</name>
- <_description>Philippines - Capewell-QWERF 2006 (Baybayin)</_description>
+ <_description>Filipino (Capewell-QWERF 2006 Baybayin)</_description>
<languageList><iso639Id>bik</iso639Id>
<iso639Id>ceb</iso639Id>
<iso639Id>fil</iso639Id>
@@ -5097,13 +5185,13 @@
<variant>
<configItem>
<name>colemak</name>
- <_description>Philippines - Colemak (Latin)</_description>
+ <_description>Filipino (Colemak Latin)</_description>
</configItem>
</variant>
<variant>
<configItem>
<name>colemak-bay</name>
- <_description>Philippines - Colemak (Baybayin)</_description>
+ <_description>Filipino (Colemak Baybayin)</_description>
<languageList><iso639Id>bik</iso639Id>
<iso639Id>ceb</iso639Id>
<iso639Id>fil</iso639Id>
@@ -5119,7 +5207,7 @@
<variant>
<configItem>
<name>dvorak</name>
- <_description>Philippines - Dvorak (Latin)</_description>
+ <_description>Filipino (Dvorak Latin)</_description>
</configItem>
</variant>
<variant>
diff --git a/xorg-server/xkeyboard-config/symbols/mm b/xorg-server/xkeyboard-config/symbols/mm
index 43218ead5..de854855e 100644
--- a/xorg-server/xkeyboard-config/symbols/mm
+++ b/xorg-server/xkeyboard-config/symbols/mm
@@ -1,63 +1,58 @@
-// based on a keyboard map from an 'xkb/symbols/mm' file
-
partial default alphanumeric_keys
xkb_symbols "basic" {
- name[Group1]= "Myanmar";
-
-// Mainly numbers.
- key <AE01> { [ 0x1001041, exclam ] };
- key <AE02> { [ 0x1001042 ] };
- key <AE03> { [ 0x1001043 ] };
- key <AE04> { [ 0x1001044 ] };
- key <AE05> { [ 0x1001045 ] };
- key <AE06> { [ 0x1001046 ] };
- key <AE07> { [ 0x1001047 ] };
- key <AE08> { [ 0x1001048 ] };
- key <AE09> { [ 0x1001049, parenleft ] };
- key <AE10> { [ 0x1001040, parenright ] };
- key <AE11> { [ minus, 0x1001038 ] };
- key <AE12> { [ 0x1001052, 0x1001056 ] };
+ name[Group1]= "Myanmar";
-// Mainly long vowels
- key <AD01> { [ 0x100102A, 0x100102A ] };
- key <AD02> { [ 0x1001032, 0x1001032 ] };
- key <AD03> { [ 0x100102C, 0x1001021 ] };
- key <AD04> { [ 0x100102E, 0x1001024 ] };
- key <AD05> { [ 0x1001030, 0x1001026 ] };
+ // Alphanumeric section
+ key <TLDE> { [ U1050, U100E, grave, asciitilde ] };
+ key <AE01> { [ U1041, U100D, 1, exclam ] };
+ key <AE02> { [ U1042, U1052, 2, at ] };
+ key <AE03> { [ U1043, U100B, 3, numbersign ] };
+ key <AE04> { [ U1044, U1053, 4, dollar ] };
+ key <AE05> { [ U1045, U1054, 5, percent ] };
+ key <AE06> { [ U1046, U1055, 6, asciicircum ] };
+ key <AE07> { [ U1047, U101B, 7, ampersand ] };
+ key <AE08> { [ U1048, asterisk, 8, asterisk ] };
+ key <AE09> { [ U1049, parenleft, 9, parenleft ] };
+ key <AE10> { [ U1040, parenright, 0, parenright ] };
+ key <AE11> { [ minus, underscore, minus, underscore ] };
+ key <AE12> { [ equal, plus, equal, plus ] };
-// Mainly voiced consonants
- key <AD06> { [ 0x1001017, 0x1001018 ] };
- key <AD07> { [ 0x100101F, 0x1001004 ] };
- key <AD08> { [ 0x1001002, 0x1001003 ] };
- key <AD09> { [ 0x1001012, 0x1001013 ] };
- key <AD10> { [ 0x1001007, 0x1001008 ] };
- key <AD11> { [ 0x100100d, 0x100100e ] };
- key <AD12> { [ 0x100100a, 0x1001009 ] };
+ key <AD01> { [ U1006, U1008, q, Q ] };
+ key <AD02> { [ U1010, U101D, w, W ] };
+ key <AD03> { [ U1014, U1023, e, E ] };
+ key <AD04> { [ U1019, U104E, r, R ] };
+ key <AD05> { [ U1021, U1024, t, T ] };
+ key <AD06> { [ U1015, U104C, y, Y ] };
+ key <AD07> { [ U1000, U1025, u, U ] };
+ key <AD08> { [ U1004, U104D, i, I ] };
+ key <AD09> { [ U101E, U103F, o, O ] };
+ key <AD10> { [ U1005, U100F, p, P ] };
+ key <AD11> { [ U101F, U1027, bracketleft, braceleft ] };
+ key <AD12> { [ U1029, U102A, bracketright, braceright ] };
-// Mainly short vowels
- key <AC01> { [ 0x1001029, 0x1001029 ] };
- key <AC02> { [ 0x1001027, 0x1001027 ] };
- key <AC03> { [ 0x1001039, 0x1001021 ] };
- key <AC04> { [ 0x100102D, 0x1001023 ] };
- key <AC05> { [ 0x100102F, 0x1001025 ] };
+ key <AC01> { [ U1031, U1017, a, A ] };
+ key <AC02> { [ U103B, U103E, s, S ] };
+ key <AC03> { [ U102D, U102E, d, D ] };
+ key <AC04> { [ U103A, U1039, f, F ] };
+ key <AC05> { [ U102B, U103D, g, G ] };
+ key <AC06> { [ U1037, U1036, h, H ] };
+ key <AC07> { [ U103C, U1032, j, J ] };
+ key <AC08> { [ U102F, U1012, k, K ] };
+ key <AC09> { [ U1030, U1013, l, L ] };
+ key <AC10> { [ U1038, U1002, semicolon, colon ] };
+ key <AC11> { [ apostrophe, quotedbl ] };
-// Mainly unvoiced consonants
- key <AC06> { [ 0x1001015, 0x1001016 ] };
- key <AC07> { [ 0x100101B, 0x100101B ] };
- key <AC08> { [ 0x1001000, 0x1001001 ] };
- key <AC09> { [ 0x1001010, 0x1001011 ] };
- key <AC10> { [ 0x1001005, 0x1001006 ] };
- key <AC11> { [ 0x100100b, 0x100100c ] };
- key <BKSL> { [ 0x100104E, 0x100104F ] };
+ key <AB01> { [ U1016, U1007, z, Z ] };
+ key <AB02> { [ U1011, U100C, x, X ] };
+ key <AB03> { [ U1001, U1003, c, C ] };
+ key <AB04> { [ U101C, U1020, v, V ] };
+ key <AB05> { [ U1018, U101A, b, B ] };
+ key <AB06> { [ U100A, U1009, n, N ] };
+ key <AB07> { [ U102C, U1026, m, M ] };
+ key <AB08> { [ comma, U104A, comma, less ] };
+ key <AB09> { [ period, U104B, period, greater ] };
+ key <AB10> { [ slash, question ] };
- key <AB01> { [ 0x100104C, 0x100104D ] };
- key <AB02> { [ 0x1001037, 0x1001036 ] };
- key <AB03> { [ 0x1001019, 0x100100f ] };
- key <AB04> { [ 0x1001014, 0x1001014 ] };
- key <AB05> { [ 0x1001017, 0x1001017 ] };
- key <AB06> { [ 0x100101C, 0x100101C ] };
- key <AB07> { [ 0x100101E, 0x1001050 ] };
- key <AB08> { [ comma, 0x1001051 ] };
- key <AB09> { [ period, 0x100104A ] };
- key <AB10> { [ slash, 0x100101A ] };
+ key <BKSL> { [ U104F, U1051, backslash, bar ] };
+ // End alphanumeric section
};