diff options
Diffstat (limited to 'hw/kdrive')
-rw-r--r-- | hw/kdrive/ephyr/ephyr.c | 20 | ||||
-rw-r--r-- | hw/kdrive/ephyr/ephyr_draw.c | 8 | ||||
-rw-r--r-- | hw/kdrive/ephyr/ephyrdriext.c | 20 | ||||
-rw-r--r-- | hw/kdrive/ephyr/ephyrglxext.c | 10 | ||||
-rw-r--r-- | hw/kdrive/ephyr/ephyrhostvideo.c | 4 | ||||
-rw-r--r-- | hw/kdrive/ephyr/ephyrvideo.c | 20 | ||||
-rw-r--r-- | hw/kdrive/fake/fake.c | 10 | ||||
-rw-r--r-- | hw/kdrive/fbdev/fbdev.c | 14 | ||||
-rw-r--r-- | hw/kdrive/linux/evdev.c | 20 | ||||
-rw-r--r-- | hw/kdrive/linux/keyboard.c | 4 | ||||
-rw-r--r-- | hw/kdrive/linux/mouse.c | 4 | ||||
-rw-r--r-- | hw/kdrive/linux/tslib.c | 4 | ||||
-rw-r--r-- | hw/kdrive/src/kdrive.c | 8 | ||||
-rw-r--r-- | hw/kdrive/src/kinfo.c | 36 | ||||
-rw-r--r-- | hw/kdrive/src/kinput.c | 24 | ||||
-rw-r--r-- | hw/kdrive/src/kshadow.c | 6 | ||||
-rw-r--r-- | hw/kdrive/src/kxv.c | 76 |
17 files changed, 144 insertions, 144 deletions
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index b21559bba..b96851605 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -73,13 +73,13 @@ ephyrCardInit (KdCardInfo *card) { EphyrPriv *priv; - priv = (EphyrPriv *) xalloc (sizeof (EphyrPriv)); + priv = (EphyrPriv *) malloc(sizeof (EphyrPriv)); if (!priv) return FALSE; if (!ephyrInitialize (card, priv)) { - xfree (priv); + free(priv); return FALSE; } card->driver = priv; @@ -185,7 +185,7 @@ ephyrScreenInit (KdScreenInfo *screen) { EphyrScrPriv *scrpriv; - scrpriv = xcalloc (1, sizeof (EphyrScrPriv)); + scrpriv = calloc(1, sizeof (EphyrScrPriv)); if (!scrpriv) return FALSE; @@ -195,7 +195,7 @@ ephyrScreenInit (KdScreenInfo *screen) if (!ephyrScreenInitialize (screen, scrpriv)) { screen->driver = 0; - xfree (scrpriv); + free(scrpriv); return FALSE; } @@ -737,7 +737,7 @@ ephyrScreenFini (KdScreenInfo *screen) if (scrpriv->shadow) { KdShadowFbFree (screen); } - xfree(screen->driver); + free(screen->driver); screen->driver = NULL; } @@ -1023,7 +1023,7 @@ void ephyrCardFini (KdCardInfo *card) { EphyrPriv *priv = card->driver; - xfree (priv); + free(priv); } void @@ -1075,11 +1075,11 @@ static Status MouseInit (KdPointerInfo *pi) { pi->driverPrivate = (EphyrPointerPrivate *) - xcalloc(sizeof(EphyrPointerPrivate), 1); + calloc(sizeof(EphyrPointerPrivate), 1); ((EphyrPointerPrivate *)pi->driverPrivate)->enabled = FALSE; pi->nAxes = 3; pi->nButtons = 32; - xfree(pi->name); + free(pi->name); pi->name = strdup("Xephyr virtual mouse"); ephyrMouse = pi; return Success; @@ -1121,7 +1121,7 @@ static Status EphyrKeyboardInit (KdKeyboardInfo *ki) { ki->driverPrivate = (EphyrKbdPrivate *) - xcalloc(sizeof(EphyrKbdPrivate), 1); + calloc(sizeof(EphyrKbdPrivate), 1); hostx_load_keymap(); if (!ephyrKeySyms.map) { ErrorF("Couldn't load keymap from host\n"); @@ -1129,7 +1129,7 @@ EphyrKeyboardInit (KdKeyboardInfo *ki) } ki->minScanCode = ephyrKeySyms.minKeyCode; ki->maxScanCode = ephyrKeySyms.maxKeyCode; - xfree(ki->name); + free(ki->name); ki->name = strdup("Xephyr virtual keyboard"); ephyrKbd = ki; return Success; diff --git a/hw/kdrive/ephyr/ephyr_draw.c b/hw/kdrive/ephyr/ephyr_draw.c index f9fac8007..f25a9b43b 100644 --- a/hw/kdrive/ephyr/ephyr_draw.c +++ b/hw/kdrive/ephyr/ephyr_draw.c @@ -432,13 +432,13 @@ ephyrDrawInit(ScreenPtr pScreen) EphyrFakexaPriv *fakexa; Bool success; - fakexa = xcalloc(1, sizeof(*fakexa)); + fakexa = calloc(1, sizeof(*fakexa)); if (fakexa == NULL) return FALSE; fakexa->exa = exaDriverAlloc(); if (fakexa->exa == NULL) { - xfree(fakexa); + free(fakexa); return FALSE; } @@ -487,8 +487,8 @@ ephyrDrawInit(ScreenPtr pScreen) scrpriv->fakexa = fakexa; } else { ErrorF("Failed to initialize EXA\n"); - xfree(fakexa->exa); - xfree(fakexa); + free(fakexa->exa); + free(fakexa); } return success; diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c index 5f5fd3bff..07733381f 100644 --- a/hw/kdrive/ephyr/ephyrdriext.c +++ b/hw/kdrive/ephyr/ephyrdriext.c @@ -160,7 +160,7 @@ ephyrDRIExtensionInit (ScreenPtr a_screen) EPHYR_LOG_ERROR ("failed to register DRI extension\n") ; goto out ; } - screen_priv = xcalloc (1, sizeof (EphyrDRIScreenPrivRec)) ; + screen_priv = calloc(1, sizeof (EphyrDRIScreenPrivRec)) ; if (!screen_priv) { EPHYR_LOG_ERROR ("failed to allocate screen_priv\n") ; goto out ; @@ -258,7 +258,7 @@ ephyrDRIDestroyWindow (WindowPtr a_win) EphyrDRIWindowPrivPtr win_priv=GET_EPHYR_DRI_WINDOW_PRIV (a_win) ; if (win_priv) { destroyHostPeerWindow (a_win) ; - xfree (win_priv) ; + free(win_priv) ; dixSetPrivate(&a_win->devPrivates, ephyrDRIWindowKey, NULL); EPHYR_LOG ("destroyed the remote peer window\n") ; } @@ -418,7 +418,7 @@ ephyrDRIClipNotify (WindowPtr a_win, EPHYR_LOG_ERROR ("failed to get window pair\n") ; goto out ; } - rects = xcalloc (REGION_NUM_RECTS (&a_win->clipList), + rects = calloc(REGION_NUM_RECTS (&a_win->clipList), sizeof (EphyrRect)) ; for (i=0; i < REGION_NUM_RECTS (&a_win->clipList); i++) { memmove (&rects[i], @@ -440,7 +440,7 @@ ephyrDRIClipNotify (WindowPtr a_win, is_ok = TRUE ; out: - xfree (rects) ; + free(rects) ; rects = NULL ; EPHYR_LOG ("leave. is_ok:%d\n", is_ok) ; @@ -511,7 +511,7 @@ EphyrDuplicateVisual (unsigned int a_screen, /* * be prepare to extend screen->visuals to add new_visual to it */ - new_visuals = xcalloc (screen->numVisuals+1, sizeof (VisualRec)) ; + new_visuals = calloc(screen->numVisuals+1, sizeof (VisualRec)) ; memmove (new_visuals, screen->visuals, screen->numVisuals*sizeof (VisualRec)) ; @@ -535,7 +535,7 @@ EphyrDuplicateVisual (unsigned int a_screen, * extend the list of visual IDs in that entry, * so to add a_new_id in there. */ - vids = xrealloc (cur_depth->vids, + vids = realloc(cur_depth->vids, (cur_depth->numVids+1)*sizeof (VisualID)); if (!vids) { EPHYR_LOG_ERROR ("failed to realloc numids\n") ; @@ -558,14 +558,14 @@ EphyrDuplicateVisual (unsigned int a_screen, /* * Commit our change to screen->visuals */ - xfree (screen->visuals) ; + free(screen->visuals) ; screen->visuals = new_visuals ; screen->numVisuals++ ; new_visuals = NULL ; is_ok = TRUE ; out: - xfree (new_visuals) ; + free(new_visuals) ; new_visuals = NULL ; EPHYR_LOG ("leave\n") ; @@ -1067,7 +1067,7 @@ ProcXF86DRICreateDrawable (ClientPtr client) win_priv = GET_EPHYR_DRI_WINDOW_PRIV (window) ; if (!win_priv) { - win_priv = xcalloc (1, sizeof (EphyrDRIWindowPrivRec)) ; + win_priv = calloc(1, sizeof (EphyrDRIWindowPrivRec)) ; if (!win_priv) { EPHYR_LOG_ERROR ("failed to allocate window private\n") ; return BadAlloc ; @@ -1252,7 +1252,7 @@ ProcXF86DRIGetDrawableInfo (register ClientPtr client) sizeof(drm_clip_rect_t) * rep.numBackClipRects, (char *)backClipRects); } - xfree(clipRects); + free(clipRects); clipRects = NULL ; EPHYR_LOG ("leave\n") ; diff --git a/hw/kdrive/ephyr/ephyrglxext.c b/hw/kdrive/ephyr/ephyrglxext.c index a0278cc2b..dfc43e1d1 100644 --- a/hw/kdrive/ephyr/ephyrglxext.c +++ b/hw/kdrive/ephyr/ephyrglxext.c @@ -243,7 +243,7 @@ ephyrGLXGetVisualConfigsReal (__GLXclientState *a_cl, out: EPHYR_LOG ("leave\n") ; - xfree (props_buf) ; + free(props_buf) ; props_buf = NULL ; return res ; @@ -300,7 +300,7 @@ ephyrGLXGetFBConfigsSGIXReal (__GLXclientState *a_cl, out: EPHYR_LOG ("leave\n") ; - xfree (props_buf) ; + free(props_buf) ; props_buf = NULL ; return res ; @@ -375,7 +375,7 @@ ephyrGLXQueryServerString(__GLXclientState *a_cl, GLbyte *a_pc) reply.sequenceNumber = client->sequence ; reply.length = __GLX_PAD (length) >> 2 ; reply.n = length ; - buf = xcalloc (reply.length << 2, 1); + buf = calloc(reply.length << 2, 1); if (!buf) { EPHYR_LOG_ERROR ("failed to allocate string\n;"); return BadAlloc; @@ -389,10 +389,10 @@ ephyrGLXQueryServerString(__GLXclientState *a_cl, GLbyte *a_pc) out: EPHYR_LOG ("leave\n") ; - xfree (server_string) ; + free(server_string) ; server_string = NULL; - xfree (buf); + free(buf); buf = NULL; return res ; diff --git a/hw/kdrive/ephyr/ephyrhostvideo.c b/hw/kdrive/ephyr/ephyrhostvideo.c index f4a1b9d17..53cd12ec0 100644 --- a/hw/kdrive/ephyr/ephyrhostvideo.c +++ b/hw/kdrive/ephyr/ephyrhostvideo.c @@ -485,10 +485,10 @@ ephyrHostEncodingsDelete (EphyrHostEncoding *a_encodings, if (!a_encodings) return ; for (i=0; i < a_num_encodings; i++) { - xfree (a_encodings[i].name) ; + free(a_encodings[i].name) ; a_encodings[i].name = NULL ; } - xfree (a_encodings) ; + free(a_encodings) ; } void diff --git a/hw/kdrive/ephyr/ephyrvideo.c b/hw/kdrive/ephyr/ephyrvideo.c index 6624ab98a..65127ceb9 100644 --- a/hw/kdrive/ephyr/ephyrvideo.c +++ b/hw/kdrive/ephyr/ephyrvideo.c @@ -332,7 +332,7 @@ ephyrXVPrivNew (void) EPHYR_LOG ("enter\n") ; - xv_priv = xcalloc (1, sizeof (EphyrXVPriv)) ; + xv_priv = calloc(1, sizeof (EphyrXVPriv)) ; if (!xv_priv) { EPHYR_LOG_ERROR ("failed to create EphyrXVPriv\n") ; goto error ; @@ -371,9 +371,9 @@ ephyrXVPrivDelete (EphyrXVPriv *a_this) ephyrHostXVAdaptorArrayDelete (a_this->host_adaptors) ; a_this->host_adaptors = NULL ; } - xfree (a_this->adaptors) ; + free(a_this->adaptors) ; a_this->adaptors = NULL ; - xfree (a_this) ; + free(a_this) ; EPHYR_LOG ("leave\n") ; } @@ -386,7 +386,7 @@ videoEncodingDup (EphyrHostEncoding *a_encodings, EPHYR_RETURN_VAL_IF_FAIL (a_encodings && a_num_encodings, NULL) ; - result = xcalloc (a_num_encodings, sizeof (KdVideoEncodingRec)) ; + result = calloc(a_num_encodings, sizeof (KdVideoEncodingRec)) ; for (i=0 ; i < a_num_encodings; i++) { result[i].id = a_encodings[i].id ; result[i].name = strdup (a_encodings[i].name) ; @@ -407,7 +407,7 @@ portAttributesDup (EphyrHostAttribute *a_encodings, EPHYR_RETURN_VAL_IF_FAIL (a_encodings && a_num_encodings, NULL) ; - result = xcalloc (a_num_encodings, sizeof (KdAttributeRec)) ; + result = calloc(a_num_encodings, sizeof (KdAttributeRec)) ; if (!result) { EPHYR_LOG_ERROR ("failed to allocate attributes\n") ; return NULL ; @@ -455,7 +455,7 @@ ephyrXVPrivQueryHostAdaptors (EphyrXVPriv *a_this) * copy what we can from adaptors into a_this->adaptors */ if (a_this->num_adaptors) { - a_this->adaptors = xcalloc (a_this->num_adaptors, + a_this->adaptors = calloc(a_this->num_adaptors, sizeof (KdVideoAdaptorRec)) ; if (!a_this->adaptors) { EPHYR_LOG_ERROR ("failed to create internal adaptors\n") ; @@ -513,7 +513,7 @@ ephyrXVPrivQueryHostAdaptors (EphyrXVPriv *a_this) ephyrHostXVAdaptorGetNbPorts (cur_host_adaptor) ; */ a_this->adaptors[i].pPortPrivates = - xcalloc (a_this->adaptors[i].nPorts, + calloc(a_this->adaptors[i].nPorts, sizeof (DevUnion) + sizeof (EphyrPortPriv)) ; port_priv_offset = a_this->adaptors[i].nPorts; for (j=0; j < a_this->adaptors[i].nPorts; j++) { @@ -656,7 +656,7 @@ ephyrXVPrivRegisterAdaptors (EphyrXVPriv *a_this, KdXVListGenericAdaptors (screen, ®istered_adaptors); num_adaptors = num_registered_adaptors + a_this->num_adaptors ; - adaptors = xcalloc (num_adaptors, sizeof (KdVideoAdaptorPtr)) ; + adaptors = calloc(num_adaptors, sizeof (KdVideoAdaptorPtr)) ; if (!adaptors) { EPHYR_LOG_ERROR ("failed to allocate adaptors tab\n") ; goto out ; @@ -673,9 +673,9 @@ ephyrXVPrivRegisterAdaptors (EphyrXVPriv *a_this, is_ok = TRUE ; out: - xfree (registered_adaptors) ; + free(registered_adaptors) ; registered_adaptors = NULL ; - xfree (adaptors) ; + free(adaptors) ; adaptors = NULL ; EPHYR_LOG ("leave\n") ; diff --git a/hw/kdrive/fake/fake.c b/hw/kdrive/fake/fake.c index 809e309a6..1cf0f2e21 100644 --- a/hw/kdrive/fake/fake.c +++ b/hw/kdrive/fake/fake.c @@ -40,13 +40,13 @@ fakeCardInit (KdCardInfo *card) { FakePriv *priv; - priv = (FakePriv *) xalloc (sizeof (FakePriv)); + priv = (FakePriv *) malloc(sizeof (FakePriv)); if (!priv) return FALSE; if (!fakeInitialize (card, priv)) { - xfree (priv); + free(priv); return FALSE; } card->driver = priv; @@ -121,14 +121,14 @@ fakeScreenInit (KdScreenInfo *screen) { FakeScrPriv *scrpriv; - scrpriv = xcalloc (1, sizeof (FakeScrPriv)); + scrpriv = calloc(1, sizeof (FakeScrPriv)); if (!scrpriv) return FALSE; screen->driver = scrpriv; if (!fakeScreenInitialize (screen, scrpriv)) { screen->driver = 0; - xfree (scrpriv); + free(scrpriv); return FALSE; } return TRUE; @@ -455,7 +455,7 @@ fakeCardFini (KdCardInfo *card) FakePriv *priv = card->driver; free (priv->base); - xfree (priv); + free(priv); } void diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c index d4604ad29..2c7fa91ad 100644 --- a/hw/kdrive/fbdev/fbdev.c +++ b/hw/kdrive/fbdev/fbdev.c @@ -84,13 +84,13 @@ fbdevCardInit (KdCardInfo *card) { FbdevPriv *priv; - priv = (FbdevPriv *) xalloc (sizeof (FbdevPriv)); + priv = (FbdevPriv *) malloc(sizeof (FbdevPriv)); if (!priv) return FALSE; if (!fbdevInitialize (card, priv)) { - xfree (priv); + free(priv); return FALSE; } card->driver = priv; @@ -296,14 +296,14 @@ fbdevScreenInit (KdScreenInfo *screen) { FbdevScrPriv *scrpriv; - scrpriv = xcalloc (1, sizeof (FbdevScrPriv)); + scrpriv = calloc(1, sizeof (FbdevScrPriv)); if (!scrpriv) return FALSE; screen->driver = scrpriv; if (!fbdevScreenInitialize (screen, scrpriv)) { screen->driver = 0; - xfree (scrpriv); + free(scrpriv); return FALSE; } return TRUE; @@ -594,7 +594,7 @@ fbdevCreateColormap (ColormapPtr pmap) case FB_VISUAL_STATIC_PSEUDOCOLOR: pVisual = pmap->pVisual; nent = pVisual->ColormapEntries; - pdefs = xalloc (nent * sizeof (xColorItem)); + pdefs = malloc(nent * sizeof (xColorItem)); if (!pdefs) return FALSE; for (i = 0; i < nent; i++) @@ -606,7 +606,7 @@ fbdevCreateColormap (ColormapPtr pmap) pmap->red[i].co.local.green = pdefs[i].green; pmap->red[i].co.local.blue = pdefs[i].blue; } - xfree (pdefs); + free(pdefs); return TRUE; default: return fbInitializeColormap (pmap); @@ -749,7 +749,7 @@ fbdevCardFini (KdCardInfo *card) munmap (priv->fb_base, priv->fix.smem_len); close (priv->fd); - xfree (priv); + free(priv); } /* diff --git a/hw/kdrive/linux/evdev.c b/hw/kdrive/linux/evdev.c index 0e4c9f735..3797f0926 100644 --- a/hw/kdrive/linux/evdev.c +++ b/hw/kdrive/linux/evdev.c @@ -252,7 +252,7 @@ EvdevPtrEnable (KdPointerInfo *pi) close (fd); return BadMatch; } - ke = xcalloc (1, sizeof (Kevdev)); + ke = calloc(1, sizeof (Kevdev)); if (!ke) { close (fd); @@ -264,7 +264,7 @@ EvdevPtrEnable (KdPointerInfo *pi) ke->keybits) < 0) { perror ("EVIOCGBIT EV_KEY"); - xfree (ke); + free(ke); close (fd); return BadMatch; } @@ -275,7 +275,7 @@ EvdevPtrEnable (KdPointerInfo *pi) ke->relbits) < 0) { perror ("EVIOCGBIT EV_REL"); - xfree (ke); + free(ke); close (fd); return BadMatch; } @@ -291,7 +291,7 @@ EvdevPtrEnable (KdPointerInfo *pi) ke->absbits) < 0) { perror ("EVIOCGBIT EV_ABS"); - xfree (ke); + free(ke); close (fd); return BadMatch; } @@ -310,13 +310,13 @@ EvdevPtrEnable (KdPointerInfo *pi) } if (i <= ke->max_abs) { - xfree (ke); + free(ke); close (fd); return BadValue; } } if (!KdRegisterFd (fd, EvdevPtrRead, pi)) { - xfree (ke); + free(ke); close (fd); return BadAlloc; } @@ -341,7 +341,7 @@ EvdevPtrDisable (KdPointerInfo *pi) if (ioctl (ke->fd, EVIOCGRAB, 0) < 0) perror ("Ungrabbing evdev mouse device failed"); - xfree (ke); + free(ke); pi->driverPrivate = 0; } @@ -440,14 +440,14 @@ EvdevKbdEnable (KdKeyboardInfo *ki) return BadMatch; } - ke = xcalloc (1, sizeof (Kevdev)); + ke = calloc(1, sizeof (Kevdev)); if (!ke) { close (fd); return BadAlloc; } if (!KdRegisterFd (fd, EvdevKbdRead, ki)) { - xfree (ke); + free(ke); close (fd); return BadAlloc; } @@ -509,7 +509,7 @@ EvdevKbdDisable (KdKeyboardInfo *ki) if (ioctl (ke->fd, EVIOCGRAB, 0) < 0) perror ("Ungrabbing evdev keyboard device failed"); - xfree (ke); + free(ke); ki->driverPrivate = 0; } diff --git a/hw/kdrive/linux/keyboard.c b/hw/kdrive/linux/keyboard.c index 6eed7aed3..e05c5abad 100644 --- a/hw/kdrive/linux/keyboard.c +++ b/hw/kdrive/linux/keyboard.c @@ -737,9 +737,9 @@ LinuxKeyboardInit (KdKeyboardInfo *ki) if (!ki) return !Success; - xfree(ki->path); + free(ki->path); ki->path = strdup("console"); - xfree(ki->name); + free(ki->name); ki->name = strdup("Linux console keyboard"); readKernelMapping (ki); diff --git a/hw/kdrive/linux/mouse.c b/hw/kdrive/linux/mouse.c index 007263e4b..1db534863 100644 --- a/hw/kdrive/linux/mouse.c +++ b/hw/kdrive/linux/mouse.c @@ -958,7 +958,7 @@ MouseInit (KdPointerInfo *pi) close(fd); - km = (Kmouse *) xalloc (sizeof (Kmouse)); + km = (Kmouse *) malloc(sizeof (Kmouse)); if (km) { km->iob.avail = km->iob.used = 0; MouseFirstProtocol(km, pi->protocol ? pi->protocol : "exps/2"); @@ -1016,7 +1016,7 @@ MouseDisable (KdPointerInfo *pi) static void MouseFini (KdPointerInfo *pi) { - xfree (pi->driverPrivate); + free(pi->driverPrivate); pi->driverPrivate = NULL; } diff --git a/hw/kdrive/linux/tslib.c b/hw/kdrive/linux/tslib.c index 322ccc7d5..48a084220 100644 --- a/hw/kdrive/linux/tslib.c +++ b/hw/kdrive/linux/tslib.c @@ -157,7 +157,7 @@ TslibInit (KdPointerInfo *pi) return !Success; pi->driverPrivate = (struct TslibPrivate *) - xcalloc(sizeof(struct TslibPrivate), 1); + calloc(sizeof(struct TslibPrivate), 1); if (!pi->driverPrivate) return !Success; @@ -175,7 +175,7 @@ TslibInit (KdPointerInfo *pi) static void TslibFini (KdPointerInfo *pi) { - xfree(pi->driverPrivate); + free(pi->driverPrivate); pi->driverPrivate = NULL; } diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c index 765bd0ea7..9d1b38376 100644 --- a/hw/kdrive/src/kdrive.c +++ b/hw/kdrive/src/kdrive.c @@ -207,7 +207,7 @@ KdDoSwitchCmd (char *reason) { if (kdSwitchCmd) { - char *command = xalloc (strlen (kdSwitchCmd) + + char *command = malloc(strlen (kdSwitchCmd) + 1 + strlen (reason) + 1); @@ -217,7 +217,7 @@ KdDoSwitchCmd (char *reason) strcat (command, " "); strcat (command, reason); system (command); - xfree (command); + free(command); } } @@ -699,7 +699,7 @@ KdAllocatePrivates (ScreenPtr pScreen) if (kdGeneration != serverGeneration) kdGeneration = serverGeneration; - pScreenPriv = xcalloc(1, sizeof (*pScreenPriv)); + pScreenPriv = calloc(1, sizeof (*pScreenPriv)); if (!pScreenPriv) return FALSE; KdSetScreenPriv (pScreen, pScreenPriv); @@ -788,7 +788,7 @@ KdCloseScreen (int index, ScreenPtr pScreen) pScreenPriv->screen->pScreen = 0; - xfree ((pointer) pScreenPriv); + free((pointer) pScreenPriv); return ret; } diff --git a/hw/kdrive/src/kinfo.c b/hw/kdrive/src/kinfo.c index 0825ee24f..8193215ba 100644 --- a/hw/kdrive/src/kinfo.c +++ b/hw/kdrive/src/kinfo.c @@ -33,7 +33,7 @@ KdCardInfoAdd (KdCardFuncs *funcs, { KdCardInfo *ci, **prev; - ci = xcalloc (1, sizeof (KdCardInfo)); + ci = calloc(1, sizeof (KdCardInfo)); if (!ci) return 0; for (prev = &kdCardInfo; *prev; prev = &(*prev)->next); @@ -66,7 +66,7 @@ KdCardInfoDispose (KdCardInfo *ci) if (*prev == ci) { *prev = ci->next; - xfree (ci); + free(ci); break; } } @@ -77,7 +77,7 @@ KdScreenInfoAdd (KdCardInfo *ci) KdScreenInfo *si, **prev; int n; - si = xcalloc (1, sizeof (KdScreenInfo)); + si = calloc(1, sizeof (KdScreenInfo)); if (!si) return 0; for (prev = &ci->screenList, n = 0; *prev; prev = &(*prev)->next, n++); @@ -98,7 +98,7 @@ KdScreenInfoDispose (KdScreenInfo *si) if (*prev == si) { *prev = si->next; - xfree (si); + free(si); if (!ci->screenList) KdCardInfoDispose (ci); break; @@ -112,7 +112,7 @@ KdNewPointer (void) KdPointerInfo *pi; int i; - pi = (KdPointerInfo *)xcalloc(1, sizeof(KdPointerInfo)); + pi = (KdPointerInfo *)calloc(1, sizeof(KdPointerInfo)); if (!pi) return NULL; @@ -136,28 +136,28 @@ KdFreePointer(KdPointerInfo *pi) { InputOption *option, *prev = NULL; - xfree(pi->name); - xfree(pi->path); + free(pi->name); + free(pi->path); for (option = pi->options; option; option = option->next) { - xfree(prev); - xfree(option->key); - xfree(option->value); + free(prev); + free(option->key); + free(option->value); prev = option; } - xfree(prev); - xfree(pi); + free(prev); + free(pi); } void KdFreeKeyboard(KdKeyboardInfo *ki) { - xfree(ki->name); - xfree(ki->path); - xfree(ki->xkbRules); - xfree(ki->xkbModel); - xfree(ki->xkbLayout); + free(ki->name); + free(ki->path); + free(ki->xkbRules); + free(ki->xkbModel); + free(ki->xkbLayout); ki->next = NULL; - xfree(ki); + free(ki); } diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index a88f2dc61..402475884 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -420,7 +420,7 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff) "(unnamed)"); return !Success; } - xfree(pi->driverPrivate); + free(pi->driverPrivate); pi->driverPrivate = NULL; } @@ -433,12 +433,12 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff) return !Success; } - btn_labels = xcalloc(pi->nButtons, sizeof(Atom)); + btn_labels = calloc(pi->nButtons, sizeof(Atom)); if (!btn_labels) return BadAlloc; - axes_labels = xcalloc(pi->nAxes, sizeof(Atom)); + axes_labels = calloc(pi->nAxes, sizeof(Atom)); if (!axes_labels) { - xfree(btn_labels); + free(btn_labels); return BadAlloc; } @@ -472,8 +472,8 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff) (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), pi->nAxes, axes_labels); - xfree(btn_labels); - xfree(axes_labels); + free(btn_labels); + free(axes_labels); if (pi->inputClass == KD_TOUCHSCREEN) { InitAbsoluteClassDeviceStruct(pDevice); @@ -736,7 +736,7 @@ KdKeyboardProc(DeviceIntPtr pDevice, int onoff) "(unnamed)"); return !Success; } - xfree(ki->driverPrivate); + free(ki->driverPrivate); ki->driverPrivate = NULL; } @@ -887,7 +887,7 @@ KdRemoveKeyboardDriver (KdKeyboardDriver *driver) KdKeyboardInfo * KdNewKeyboard (void) { - KdKeyboardInfo *ki = xcalloc(sizeof(KdKeyboardInfo), 1); + KdKeyboardInfo *ki = calloc(sizeof(KdKeyboardInfo), 1); if (!ki) return NULL; @@ -915,7 +915,7 @@ KdAddConfigKeyboard (char *keyboard) if (!keyboard) return Success; - new = (struct KdConfigDevice *) xcalloc(sizeof(struct KdConfigDevice), 1); + new = (struct KdConfigDevice *) calloc(sizeof(struct KdConfigDevice), 1); if (!new) return BadAlloc; @@ -983,7 +983,7 @@ KdAddConfigPointer (char *pointer) if (!pointer) return Success; - new = (struct KdConfigDevice *) xcalloc(sizeof(struct KdConfigDevice), 1); + new = (struct KdConfigDevice *) calloc(sizeof(struct KdConfigDevice), 1); if (!new) return BadAlloc; @@ -1053,7 +1053,7 @@ KdGetOptions (InputOption **options, char *string) InputOption *newopt = NULL, **tmpo = NULL; int tam_key = 0; - newopt = xcalloc(1, sizeof (InputOption)); + newopt = calloc(1, sizeof (InputOption)); if (!newopt) return FALSE; @@ -1064,7 +1064,7 @@ KdGetOptions (InputOption **options, char *string) if (strchr(string, '=')) { tam_key = (strchr(string, '=') - string); - newopt->key = (char *)xalloc(tam_key); + newopt->key = (char *)malloc(tam_key); strncpy(newopt->key, string, tam_key); newopt->key[tam_key] = '\0'; newopt->value = xstrdup(strchr(string, '=') + 1); diff --git a/hw/kdrive/src/kshadow.c b/hw/kdrive/src/kshadow.c index cf3391dba..6f5a2f346 100644 --- a/hw/kdrive/src/kshadow.c +++ b/hw/kdrive/src/kshadow.c @@ -36,11 +36,11 @@ KdShadowFbAlloc (KdScreenInfo *screen, Bool rotate) /* use fb computation for width */ paddedWidth = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof (FbBits); - buf = xalloc (paddedWidth * height); + buf = malloc(paddedWidth * height); if (!buf) return FALSE; if (screen->fb.shadow) - xfree (screen->fb.frameBuffer); + free(screen->fb.frameBuffer); screen->fb.shadow = TRUE; screen->fb.frameBuffer = buf; screen->fb.byteStride = paddedWidth; @@ -53,7 +53,7 @@ KdShadowFbFree (KdScreenInfo *screen) { if (screen->fb.shadow) { - xfree (screen->fb.frameBuffer); + free(screen->fb.frameBuffer); screen->fb.frameBuffer = 0; screen->fb.shadow = FALSE; } diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c index 27ecc5d6c..56f101f65 100644 --- a/hw/kdrive/src/kxv.c +++ b/hw/kdrive/src/kxv.c @@ -134,7 +134,7 @@ KdXVRegisterGenericAdaptorDriver( /* fprintf(stderr,"KdXVRegisterGenericAdaptorDriver\n"); */ - newdrivers = xrealloc(GenDrivers, sizeof(KdXVInitGenericAdaptorPtr) * + newdrivers = realloc(GenDrivers, sizeof(KdXVInitGenericAdaptorPtr) * (1 + NumGenDrivers)); if (!newdrivers) return 0; @@ -159,7 +159,7 @@ KdXVListGenericAdaptors( n = GenDrivers[i](screen,&DrivAdap); if (0 == n) continue; - new = xrealloc(*adaptors, sizeof(KdVideoAdaptorPtr) * (num+n)); + new = realloc(*adaptors, sizeof(KdVideoAdaptorPtr) * (num+n)); if (NULL == new) continue; *adaptors = new; @@ -172,13 +172,13 @@ KdXVListGenericAdaptors( KdVideoAdaptorPtr KdXVAllocateVideoAdaptorRec(KdScreenInfo * screen) { - return xcalloc(1, sizeof(KdVideoAdaptorRec)); + return calloc(1, sizeof(KdVideoAdaptorRec)); } void KdXVFreeVideoAdaptorRec(KdVideoAdaptorPtr ptr) { - xfree(ptr); + free(ptr); } @@ -218,7 +218,7 @@ KdXVScreenInit( a CloseScreen hook so that we don't have to wrap it. I'm not sure that I appreciate that. */ - ScreenPriv = xalloc(sizeof(KdXVScreenRec)); + ScreenPriv = malloc(sizeof(KdXVScreenRec)); pxvs->devPriv.ptr = (pointer)ScreenPriv; if(!ScreenPriv) return FALSE; @@ -247,18 +247,18 @@ KdXVFreeAdaptor(XvAdaptorPtr pAdaptor) { int i; - xfree(pAdaptor->name); + free(pAdaptor->name); if(pAdaptor->pEncodings) { XvEncodingPtr pEncode = pAdaptor->pEncodings; for(i = 0; i < pAdaptor->nEncodings; i++, pEncode++) { - xfree(pEncode->name); + free(pEncode->name); } - xfree(pAdaptor->pEncodings); + free(pAdaptor->pEncodings); } - xfree(pAdaptor->pFormats); + free(pAdaptor->pFormats); if(pAdaptor->pPorts) { XvPortPtr pPort = pAdaptor->pPorts; @@ -271,25 +271,25 @@ KdXVFreeAdaptor(XvAdaptorPtr pAdaptor) REGION_DESTROY(pAdaptor->pScreen, pPriv->clientClip); if(pPriv->pCompositeClip && pPriv->FreeCompositeClip) REGION_DESTROY(pAdaptor->pScreen, pPriv->pCompositeClip); - xfree(pPriv); + free(pPriv); } } - xfree(pAdaptor->pPorts); + free(pAdaptor->pPorts); } if(pAdaptor->nAttributes) { XvAttributePtr pAttribute = pAdaptor->pAttributes; for(i = 0; i < pAdaptor->nAttributes; i++, pAttribute++) { - xfree(pAttribute->name); + free(pAttribute->name); } - xfree(pAdaptor->pAttributes); + free(pAdaptor->pAttributes); } - xfree(pAdaptor->pImages); + free(pAdaptor->pImages); - xfree(pAdaptor->devPriv.ptr); + free(pAdaptor->devPriv.ptr); } static Bool @@ -325,7 +325,7 @@ KdXVInitAdaptors( pxvs->nAdaptors = 0; pxvs->pAdaptors = NULL; - if(!(pAdaptor = xcalloc(number, sizeof(XvAdaptorRec)))) + if(!(pAdaptor = calloc(number, sizeof(XvAdaptorRec)))) return FALSE; for(pa = pAdaptor, na = 0, numAdaptor = 0; na < number; na++, adaptorPtr++) { @@ -375,18 +375,18 @@ KdXVInitAdaptors( pa->ddGetPortAttribute = KdXVGetPortAttribute; pa->ddQueryBestSize = KdXVQueryBestSize; pa->ddQueryImageAttributes = KdXVQueryImageAttributes; - if((pa->name = xalloc(strlen(adaptorPtr->name) + 1))) + if((pa->name = malloc(strlen(adaptorPtr->name) + 1))) strcpy(pa->name, adaptorPtr->name); if(adaptorPtr->nEncodings && - (pEncode = xcalloc(adaptorPtr->nEncodings, sizeof(XvEncodingRec)))) { + (pEncode = calloc(adaptorPtr->nEncodings, sizeof(XvEncodingRec)))) { for(pe = pEncode, encodingPtr = adaptorPtr->pEncodings, i = 0; i < adaptorPtr->nEncodings; pe++, i++, encodingPtr++) { pe->id = encodingPtr->id; pe->pScreen = pScreen; - if((pe->name = xalloc(strlen(encodingPtr->name) + 1))) + if((pe->name = malloc(strlen(encodingPtr->name) + 1))) strcpy(pe->name, encodingPtr->name); pe->width = encodingPtr->width; pe->height = encodingPtr->height; @@ -398,7 +398,7 @@ KdXVInitAdaptors( } if(adaptorPtr->nImages && - (pImage = xcalloc(adaptorPtr->nImages, sizeof(XvImageRec)))) { + (pImage = calloc(adaptorPtr->nImages, sizeof(XvImageRec)))) { for(i = 0, pi = pImage, imagePtr = adaptorPtr->pImages; i < adaptorPtr->nImages; i++, pi++, imagePtr++) @@ -431,7 +431,7 @@ KdXVInitAdaptors( } if(adaptorPtr->nAttributes && - (pAttribute = xcalloc(adaptorPtr->nAttributes, sizeof(XvAttributeRec)))) + (pAttribute = calloc(adaptorPtr->nAttributes, sizeof(XvAttributeRec)))) { for(pat = pAttribute, attributePtr = adaptorPtr->pAttributes, i = 0; i < adaptorPtr->nAttributes; pat++, i++, attributePtr++) @@ -439,7 +439,7 @@ KdXVInitAdaptors( pat->flags = attributePtr->flags; pat->min_value = attributePtr->min_value; pat->max_value = attributePtr->max_value; - if((pat->name = xalloc(strlen(attributePtr->name) + 1))) + if((pat->name = malloc(strlen(attributePtr->name) + 1))) strcpy(pat->name, attributePtr->name); } pa->nAttributes = adaptorPtr->nAttributes; @@ -449,7 +449,7 @@ KdXVInitAdaptors( totFormat = adaptorPtr->nFormats; - if(!(pFormat = xcalloc(totFormat, sizeof(XvFormatRec)))) { + if(!(pFormat = calloc(totFormat, sizeof(XvFormatRec)))) { KdXVFreeAdaptor(pa); continue; } @@ -466,7 +466,7 @@ KdXVInitAdaptors( if(numFormat >= totFormat) { void *moreSpace; totFormat *= 2; - moreSpace = xrealloc(pFormat, + moreSpace = realloc(pFormat, totFormat * sizeof(XvFormatRec)); if(!moreSpace) break; pFormat = moreSpace; @@ -489,7 +489,7 @@ KdXVInitAdaptors( continue; } - if(!(adaptorPriv = xcalloc(1, sizeof(XvAdaptorRecPrivate)))) { + if(!(adaptorPriv = calloc(1, sizeof(XvAdaptorRecPrivate)))) { KdXVFreeAdaptor(pa); continue; } @@ -509,7 +509,7 @@ KdXVInitAdaptors( pa->devPriv.ptr = (pointer)adaptorPriv; - if(!(pPort = xcalloc(adaptorPtr->nPorts, sizeof(XvPortRec)))) { + if(!(pPort = calloc(adaptorPtr->nPorts, sizeof(XvPortRec)))) { KdXVFreeAdaptor(pa); continue; } @@ -519,11 +519,11 @@ KdXVInitAdaptors( if(!(pp->id = FakeClientID(0))) continue; - if(!(portPriv = xcalloc(1, sizeof(XvPortRecPrivate)))) + if(!(portPriv = calloc(1, sizeof(XvPortRecPrivate)))) continue; if(!AddResource(pp->id, PortResource, pp)) { - xfree(portPriv); + free(portPriv); continue; } @@ -559,7 +559,7 @@ KdXVInitAdaptors( pxvs->nAdaptors = numAdaptor; pxvs->pAdaptors = pAdaptor; } else { - xfree(pAdaptor); + free(pAdaptor); return FALSE; } @@ -925,7 +925,7 @@ KdXVEnlistPortInWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) } if(!winPriv) { - winPriv = xalloc(sizeof(KdXVWindowRec)); + winPriv = malloc(sizeof(KdXVWindowRec)); if(!winPriv) return BadAlloc; winPriv->PortRec = portPriv; winPriv->next = PrivRoot; @@ -948,7 +948,7 @@ KdXVRemovePortFromWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) prevPriv->next = winPriv->next; else dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, winPriv->next); - xfree(winPriv); + free(winPriv); break; } prevPriv = winPriv; @@ -998,7 +998,7 @@ KdXVDestroyWindow(WindowPtr pWin) pPriv->pDraw = NULL; tmp = WinPriv; WinPriv = WinPriv->next; - xfree(tmp); + free(tmp); } dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, NULL); @@ -1063,7 +1063,7 @@ KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2) pPrev->next = WinPriv->next; tmp = WinPriv; WinPriv = WinPriv->next; - xfree(tmp); + free(tmp); continue; } break; @@ -1112,7 +1112,7 @@ KdXVClipNotify(WindowPtr pWin, int dx, int dy) pPrev->next = WinPriv->next; tmp = WinPriv; WinPriv = WinPriv->next; - xfree(tmp); + free(tmp); continue; } } @@ -1153,8 +1153,8 @@ KdXVCloseScreen(int i, ScreenPtr pScreen) KdXVFreeAdaptor(pa); } - xfree(pxvs->pAdaptors); - xfree(ScreenPriv); + free(pxvs->pAdaptors); + free(ScreenPriv); return TRUE; } @@ -1872,7 +1872,7 @@ KXVPaintRegion (DrawablePtr pDraw, RegionPtr pRgn, Pixel fg) BoxPtr pBox = REGION_RECTS (pRgn); int nBox = REGION_NUM_RECTS (pRgn); - rects = xalloc (nBox * sizeof (xRectangle)); + rects = malloc(nBox * sizeof (xRectangle)); if (!rects) goto bail0; r = rects; @@ -1901,7 +1901,7 @@ KXVPaintRegion (DrawablePtr pDraw, RegionPtr pRgn, Pixel fg) FreeScratchGC (pGC); bail1: - xfree (rects); + free(rects); bail0: ; } |