diff options
author | marha <marha@users.sourceforge.net> | 2010-12-10 19:06:59 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-12-10 19:06:59 +0000 |
commit | 3a20d23b48c1051e1f22295fd886cc7f643417f6 (patch) | |
tree | 5192dddd9ecf591de2e22504f7268c2935382d90 /xorg-server/xkb/ddxList.c | |
parent | 531a0d974b98074978535f086a73b6b662fa0cea (diff) | |
download | vcxsrv-3a20d23b48c1051e1f22295fd886cc7f643417f6.tar.gz vcxsrv-3a20d23b48c1051e1f22295fd886cc7f643417f6.tar.bz2 vcxsrv-3a20d23b48c1051e1f22295fd886cc7f643417f6.zip |
xserver git update 10/12/2010
Diffstat (limited to 'xorg-server/xkb/ddxList.c')
-rw-r--r-- | xorg-server/xkb/ddxList.c | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/xorg-server/xkb/ddxList.c b/xorg-server/xkb/ddxList.c index 16bca16db..e62078de8 100644 --- a/xorg-server/xkb/ddxList.c +++ b/xorg-server/xkb/ddxList.c @@ -156,34 +156,45 @@ char tmpname[PATH_MAX]; #endif
if (XkbBaseDirectory!=NULL) {
if ((list->pattern[what][0]=='*')&&(list->pattern[what][1]=='\0')) {
- buf = Xprintf("%s/%s.dir",XkbBaseDirectory,componentDirs[what]);
- in= fopen(buf,"r");
+ if (asprintf(&buf, "%s/%s.dir", XkbBaseDirectory,
+ componentDirs[what]) == -1)
+ buf = NULL;
+ else
+ in = fopen(buf,"r");
}
if (!in) {
haveDir= FALSE;
free(buf);
- buf = Xprintf(
- "'%s/xkbcomp' '-R%s/%s' -w %ld -l -vlfhpR '%s'" W32_tmparg,
- XkbBinDirectory,XkbBaseDirectory,componentDirs[what],(long)
- ((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:xkbDebugFlags)),
- file W32_tmpfile
- );
+ if (asprintf
+ (&buf,
+ "'%s/xkbcomp' '-R%s/%s' -w %ld -l -vlfhpR '%s'" W32_tmparg,
+ XkbBinDirectory, XkbBaseDirectory, componentDirs[what],
+ (long) ((xkbDebugFlags < 2) ? 1 :
+ ((xkbDebugFlags > 10) ? 10 : xkbDebugFlags)),
+ file W32_tmpfile
+ ) == -1)
+ buf = NULL;
}
}
else {
if ((list->pattern[what][0]=='*')&&(list->pattern[what][1]=='\0')) {
- buf = Xprintf("%s.dir",componentDirs[what]);
- in= fopen(buf,"r");
+ if (asprintf(&buf, "%s.dir", componentDirs[what]) == -1)
+ buf = NULL;
+ else
+ in = fopen(buf,"r");
}
if (!in) {
haveDir= FALSE;
free(buf);
- buf = Xprintf(
- "xkbcomp -R%s -w %ld -l -vlfhpR '%s'" W32_tmparg,
- componentDirs[what],(long)
- ((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:xkbDebugFlags)),
- file W32_tmpfile
- );
+ if (asprintf
+ (&buf,
+ "xkbcomp -R%s -w %ld -l -vlfhpR '%s'" W32_tmparg,
+ componentDirs[what],
+ (long) ((xkbDebugFlags < 2) ? 1 :
+ ((xkbDebugFlags > 10) ? 10 : xkbDebugFlags)),
+ file W32_tmpfile
+ ) == -1)
+ buf = NULL;
}
}
status= Success;
|