aboutsummaryrefslogtreecommitdiff
path: root/libXt/src/ResConfig.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-25 10:41:05 +0000
committermarha <marha@users.sourceforge.net>2011-03-25 10:41:05 +0000
commit272e57235cd60a2e65ac8258d96a02eb3939b687 (patch)
tree789d74bd6ec1cc468f1f81aab97d4e4dfdb2d5c5 /libXt/src/ResConfig.c
parentb39f063f74bf0163eaf34db03134f226d18142ec (diff)
downloadvcxsrv-272e57235cd60a2e65ac8258d96a02eb3939b687.tar.gz
vcxsrv-272e57235cd60a2e65ac8258d96a02eb3939b687.tar.bz2
vcxsrv-272e57235cd60a2e65ac8258d96a02eb3939b687.zip
git update until 25 Mar 2011
xserver fontconfig glproto libXau libXft libXmu libfontenc libxcb mesa mkfontscale pixman randrproto xkeyboard-config xtrans xwininfo updated following packages: xproto-7.0.21 xineramaproto-1.2.1 libXt-1.1.1 libxkbfile-1.0.7 libXpm-3.5.9 libXfont-1.4.3 libXaw-1.0.9 bdftopcf-1.0.3 encodings-1.0.4 fixesproto-5.0 font-adobe-100dpi-1.0.3 font-adobe-75dpi-1.0.3 font-adobe-utopia-100dpi-1.0.4 font-adobe-utopia-75dpi-1.0.4 font-adobe-utopia-type1-1.0.4 font-alias-1.0.3 font-arabic-misc-1.0.3 font-bh-100dpi-1.0.3 font-bh-75dpi-1.0.3 font-bh-lucidatypewriter-100dpi-1.0.3 font-bh-lucidatypewriter-75dpi-1.0.3 font-bh-ttf-1.0.3 font-bh-type1-1.0.3 font-bitstream-100dpi-1.0.3 font-bitstream-75dpi-1.0.3 font-bitstream-speedo-1.0.2 font-bitstream-type1-1.0.3 font-cronyx-cyrillic-1.0.3 font-cursor-misc-1.0.3 font-daewoo-misc-1.0.3 font-dec-misc-1.0.3 font-ibm-type1-1.0.3 font-isas-misc-1.0.3 font-jis-misc-1.0.3 font-micro-misc-1.0.3 font-misc-cyrillic-1.0.3 font-misc-ethiopic-1.0.3 font-misc-meltho-1.0.3 font-misc-misc-1.1.2 font-mutt-misc-1.0.3 font-schumacher-misc-1.1.2 font-screen-cyrillic-1.0.4 font-sony-misc-1.0.3 font-sun-misc-1.0.3 font-util-1.2.0 font-winitzki-cyrillic-1.0.3 font-xfree86-type1-1.0.4
Diffstat (limited to 'libXt/src/ResConfig.c')
-rw-r--r--libXt/src/ResConfig.c44
1 files changed, 10 insertions, 34 deletions
diff --git a/libXt/src/ResConfig.c b/libXt/src/ResConfig.c
index fd6d057c9..68da5364c 100644
--- a/libXt/src/ResConfig.c
+++ b/libXt/src/ResConfig.c
@@ -1,4 +1,3 @@
-/* $Xorg: ResConfig.c,v 1.5 2001/02/09 02:03:56 xorgcvs Exp $ */
/*
Copyright 1987, 1988, 1998 The Open Group
@@ -52,7 +51,6 @@ dealings in this Software without prior written authorization from the IBM
Corporation.
******************************************************************/
-/* $XFree86: xc/lib/Xt/ResConfig.c,v 3.7 2001/08/22 22:52:19 dawes Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -176,18 +174,13 @@ _set_resource_values (
* create resource name string
*/
if (resource_name) {
- temp = XtMalloc (sizeof(char) *
- (2 + strlen(cur->core.name)
- + strlen(resource_name)));
- sprintf (temp, ".%s%s", cur->core.name, resource_name);
+ XtAsprintf (&temp, ".%s%s", cur->core.name, resource_name);
XtFree (resource_name);
} else if (!XtIsWidget (cur) || !cur->core.name) {
cur = XtParent(cur);
continue;
} else {
- temp = XtMalloc (sizeof(char) *
- (2 + strlen(cur->core.name)));
- sprintf (temp, ".%s", cur->core.name);
+ XtAsprintf (&temp, ".%s", cur->core.name);
}
resource_name = temp;
@@ -199,31 +192,19 @@ _set_resource_values (
(ApplicationShellWidget) (cur);
if (resource_class) {
- temp = XtMalloc (sizeof(char) *
- (2 + strlen(top->application.class)
- + strlen(resource_class)));
- sprintf (temp, ".%s%s",
+ XtAsprintf (&temp, ".%s%s",
top->application.class, resource_class);
} else {
- temp = XtMalloc (sizeof(char) *
- (2 + strlen(top->application.class)));
- sprintf (temp, ".%s",
+ XtAsprintf (&temp, ".%s",
top->application.class);
}
} else {
if (resource_class) {
- temp = XtMalloc (sizeof(char) *
- (2 + strlen(
- cur->core.widget_class->core_class.class_name)
- + strlen(resource_class)));
- sprintf (temp, ".%s%s",
+ XtAsprintf (&temp, ".%s%s",
cur->core.widget_class->core_class.class_name,
resource_class);
} else {
- temp = XtMalloc (sizeof(char) *
- (2 + strlen(
- cur->core.widget_class->core_class.class_name)));
- sprintf (temp, ".%s",
+ XtAsprintf (&temp, ".%s",
cur->core.widget_class->core_class.class_name);
}
}
@@ -237,9 +218,7 @@ _set_resource_values (
/*
* add the resource name to the end of the resource name string
*/
- temp = XtMalloc (2 + strlen(resource_name) +
- strlen(resources_return[res_index].resource_name));
- sprintf (temp, "%s.%s", resource_name,
+ XtAsprintf (&temp, "%s.%s", resource_name,
resources_return[res_index].resource_name);
if (resource_name != NULL)
XtFree (resource_name);
@@ -248,9 +227,7 @@ _set_resource_values (
/*
* add the resource class to the end of the resource class string
*/
- temp = XtMalloc (2 + strlen(resource_class) +
- strlen(resources_return[res_index].resource_class));
- sprintf (temp, "%s.%s", resource_class,
+ XtAsprintf (&temp, "%s.%s", resource_class,
resources_return[res_index].resource_class);
if (resource_class != NULL)
XtFree (resource_class);
@@ -748,7 +725,7 @@ _search_widget_tree (
/*
* this case covers resources of only one level (eg. *background)
*/
- if (strcmp (remainder, "") == 0) {
+ if (remainder[0] == 0) {
_set_resource_values (w, resource, value, last_part);
if (last_token == '*')
_apply_values_to_children (parent, remainder, resource,
@@ -759,8 +736,7 @@ _search_widget_tree (
*/
} else {
if (remainder[0] != '*' && remainder[0] != '.') {
- copy = XtMalloc (strlen(remainder) + 2);
- sprintf (copy, ".%s", remainder);
+ XtAsprintf (&copy, ".%s", remainder);
XtFree (remainder);
remainder = copy;
}