aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/src/kinfo.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
committermarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
commit0f834b91a4768673833ab4917e87d86c237bb1a6 (patch)
tree363489504ed4b2d360259b8de4c9e392918e5d02 /xorg-server/hw/kdrive/src/kinfo.c
parentfc72edebf875378459368c5383d9023730cbca54 (diff)
downloadvcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.gz
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.bz2
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.zip
libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update
23 Mar 2012
Diffstat (limited to 'xorg-server/hw/kdrive/src/kinfo.c')
-rw-r--r--xorg-server/hw/kdrive/src/kinfo.c71
1 files changed, 34 insertions, 37 deletions
diff --git a/xorg-server/hw/kdrive/src/kinfo.c b/xorg-server/hw/kdrive/src/kinfo.c
index 0055b16db..01ae1e491 100644
--- a/xorg-server/hw/kdrive/src/kinfo.c
+++ b/xorg-server/hw/kdrive/src/kinfo.c
@@ -25,17 +25,16 @@
#endif
#include "kdrive.h"
-KdCardInfo *kdCardInfo;
+KdCardInfo *kdCardInfo;
KdCardInfo *
-KdCardInfoAdd (KdCardFuncs *funcs,
- void *closure)
+KdCardInfoAdd(KdCardFuncs * funcs, void *closure)
{
- KdCardInfo *ci, **prev;
+ KdCardInfo *ci, **prev;
- ci = calloc(1, sizeof (KdCardInfo));
+ ci = calloc(1, sizeof(KdCardInfo));
if (!ci)
- return 0;
+ return 0;
for (prev = &kdCardInfo; *prev; prev = &(*prev)->next);
*prev = ci;
ci->cfuncs = funcs;
@@ -47,39 +46,38 @@ KdCardInfoAdd (KdCardFuncs *funcs,
}
KdCardInfo *
-KdCardInfoLast (void)
+KdCardInfoLast(void)
{
- KdCardInfo *ci;
+ KdCardInfo *ci;
if (!kdCardInfo)
- return 0;
+ return 0;
for (ci = kdCardInfo; ci->next; ci = ci->next);
return ci;
}
void
-KdCardInfoDispose (KdCardInfo *ci)
+KdCardInfoDispose(KdCardInfo * ci)
{
- KdCardInfo **prev;
+ KdCardInfo **prev;
for (prev = &kdCardInfo; *prev; prev = &(*prev)->next)
- if (*prev == ci)
- {
- *prev = ci->next;
- free(ci);
- break;
- }
+ if (*prev == ci) {
+ *prev = ci->next;
+ free(ci);
+ break;
+ }
}
KdScreenInfo *
-KdScreenInfoAdd (KdCardInfo *ci)
+KdScreenInfoAdd(KdCardInfo * ci)
{
- KdScreenInfo *si, **prev;
- int n;
+ KdScreenInfo *si, **prev;
+ int n;
- si = calloc(1, sizeof (KdScreenInfo));
+ si = calloc(1, sizeof(KdScreenInfo));
if (!si)
- return 0;
+ return 0;
for (prev = &ci->screenList, n = 0; *prev; prev = &(*prev)->next, n++);
*prev = si;
si->next = 0;
@@ -89,30 +87,29 @@ KdScreenInfoAdd (KdCardInfo *ci)
}
void
-KdScreenInfoDispose (KdScreenInfo *si)
+KdScreenInfoDispose(KdScreenInfo * si)
{
- KdCardInfo *ci = si->card;
- KdScreenInfo **prev;
+ KdCardInfo *ci = si->card;
+ KdScreenInfo **prev;
for (prev = &ci->screenList; *prev; prev = &(*prev)->next) {
- if (*prev == si)
- {
- *prev = si->next;
- free(si);
- if (!ci->screenList)
- KdCardInfoDispose (ci);
- break;
- }
+ if (*prev == si) {
+ *prev = si->next;
+ free(si);
+ if (!ci->screenList)
+ KdCardInfoDispose(ci);
+ break;
+ }
}
}
KdPointerInfo *
-KdNewPointer (void)
+KdNewPointer(void)
{
KdPointerInfo *pi;
int i;
- pi = (KdPointerInfo *)calloc(1, sizeof(KdPointerInfo));
+ pi = (KdPointerInfo *) calloc(1, sizeof(KdPointerInfo));
if (!pi)
return NULL;
@@ -132,7 +129,7 @@ KdNewPointer (void)
}
void
-KdFreePointer(KdPointerInfo *pi)
+KdFreePointer(KdPointerInfo * pi)
{
free(pi->name);
free(pi->path);
@@ -141,7 +138,7 @@ KdFreePointer(KdPointerInfo *pi)
}
void
-KdFreeKeyboard(KdKeyboardInfo *ki)
+KdFreeKeyboard(KdKeyboardInfo * ki)
{
free(ki->name);
free(ki->path);