Merge remote branch 'alanc/master'

This commit is contained in:
Keith Packard
2010-12-07 13:39:58 -08:00
66 changed files with 440 additions and 242 deletions

View File

@@ -1,4 +1,4 @@
/* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
/* Copyright (c) 2006, 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"),

View File

@@ -1,4 +1,4 @@
/* Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
/* Copyright (c) 2005-2006, 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"),

View File

@@ -2524,9 +2524,11 @@ AllocDevicePair (ClientPtr client, char* name,
if (!pointer)
return BadAlloc;
pointer->name = calloc(strlen(name) + strlen(" pointer") + 1, sizeof(char));
strcpy(pointer->name, name);
strcat(pointer->name, " pointer");
if (asprintf(&pointer->name, "%s pointer", name) == -1) {
pointer->name = NULL;
RemoveDevice(pointer, FALSE);
return BadAlloc;
}
pointer->public.processInputProc = ProcessOtherEvent;
pointer->public.realInputProc = ProcessOtherEvent;
@@ -2547,9 +2549,12 @@ AllocDevicePair (ClientPtr client, char* name,
return BadAlloc;
}
keyboard->name = calloc(strlen(name) + strlen(" keyboard") + 1, sizeof(char));
strcpy(keyboard->name, name);
strcat(keyboard->name, " keyboard");
if (asprintf(&keyboard->name, "%s keyboard", name) == -1) {
keyboard->name = NULL;
RemoveDevice(keyboard, FALSE);
RemoveDevice(pointer, FALSE);
return BadAlloc;
}
keyboard->public.processInputProc = ProcessOtherEvent;
keyboard->public.realInputProc = ProcessOtherEvent;

View File

@@ -75,7 +75,7 @@ Equipment Corporation.
******************************************************************/
/* XSERVER_DTRACE additions:
* Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2005-2006, 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"),

View File

@@ -1817,7 +1817,9 @@ SetDefaultFontPath(char *path)
start = end;
}
if (!start) {
temp_path = Xprintf("%s%sbuilt-ins", path, *path ? "," : "");
if (asprintf(&temp_path, "%s%sbuilt-ins", path, *path ? "," : "")
== -1)
temp_path = NULL;
} else {
temp_path = strdup(path);
}

View File

@@ -75,7 +75,7 @@ Equipment Corporation.
******************************************************************/
/*
* Copyright © 2003-2005 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2003-2005, 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"),

View File

@@ -73,7 +73,7 @@ Equipment Corporation.
******************************************************************/
/* XSERVER_DTRACE additions:
* Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2005-2006, 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"),