aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xquartz/xpr/x-hook.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-28 09:11:07 +0200
committermarha <marha@users.sourceforge.net>2012-03-28 09:11:07 +0200
commit9b51c6da8bffdd67353b1e1245698a7eac478481 (patch)
treecde44c263cb1756fae5b4a83facb3c0cdfa474e4 /xorg-server/hw/xquartz/xpr/x-hook.c
parentfb2b04331b6ae2cd11f6132cf16f6fcd848fb6b8 (diff)
parentec617f09d07e32d6f57c0da133f53ad3d43a568a (diff)
downloadvcxsrv-9b51c6da8bffdd67353b1e1245698a7eac478481.tar.gz
vcxsrv-9b51c6da8bffdd67353b1e1245698a7eac478481.tar.bz2
vcxsrv-9b51c6da8bffdd67353b1e1245698a7eac478481.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'xorg-server/hw/xquartz/xpr/x-hook.c')
-rw-r--r--xorg-server/hw/xquartz/xpr/x-hook.c77
1 files changed, 39 insertions, 38 deletions
diff --git a/xorg-server/hw/xquartz/xpr/x-hook.c b/xorg-server/hw/xquartz/xpr/x-hook.c
index fd34658e7..b5d8ab90e 100644
--- a/xorg-server/hw/xquartz/xpr/x-hook.c
+++ b/xorg-server/hw/xquartz/xpr/x-hook.c
@@ -1,31 +1,32 @@
/* x-hook.c
-
- Copyright (c) 2003 Apple Computer, Inc. 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 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. */
+ *
+ * Copyright (c) 2002-2012 Apple Inc. 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 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.
+ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
@@ -36,18 +37,18 @@
#include <assert.h>
#include "os.h"
-#define CELL_NEW(f,d) X_PFX (list_prepend) ((x_list *) (f), (d))
-#define CELL_FREE(c) X_PFX (list_free_1) (c)
-#define CELL_FUN(c) ((x_hook_function *) ((c)->next))
-#define CELL_DATA(c) ((c)->data)
+#define CELL_NEW(f, d) X_PFX(list_prepend) ((x_list *)(f), (d))
+#define CELL_FREE(c) X_PFX(list_free_1) (c)
+#define CELL_FUN(c) ((x_hook_function *)((c)->next))
+#define CELL_DATA(c) ((c)->data)
-X_EXTERN x_list *X_PFX(hook_add) (x_list * lst, x_hook_function * fun,
- void *data) {
+X_EXTERN x_list *
+X_PFX(hook_add) (x_list * lst, x_hook_function * fun, void *data) {
return X_PFX(list_prepend) (lst, CELL_NEW(fun, data));
}
-X_EXTERN x_list *X_PFX(hook_remove) (x_list * lst, x_hook_function * fun,
- void *data) {
+X_EXTERN x_list *
+X_PFX(hook_remove) (x_list * lst, x_hook_function * fun, void *data) {
x_list *node, *cell;
x_list *to_delete = NULL;
@@ -68,7 +69,7 @@ X_EXTERN x_list *X_PFX(hook_remove) (x_list * lst, x_hook_function * fun,
}
X_EXTERN void
- X_PFX(hook_run) (x_list * lst, void *arg) {
+X_PFX(hook_run) (x_list * lst, void *arg) {
x_list *node, *cell;
x_hook_function **fun;
void **data;
@@ -92,7 +93,7 @@ X_EXTERN void
}
for (i = 0; i < length; i++) {
- (*fun[i]) (arg, data[i]);
+ (*fun[i])(arg, data[i]);
}
free(fun);
@@ -100,7 +101,7 @@ X_EXTERN void
}
X_EXTERN void
- X_PFX(hook_free) (x_list * lst) {
+X_PFX(hook_free) (x_list * lst) {
x_list *node;
for (node = lst; node != NULL; node = node->next) {