aboutsummaryrefslogtreecommitdiff
path: root/libX11/src/xcms
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-08-26 09:04:58 +0200
committermarha <marha@users.sourceforge.net>2013-08-26 09:04:58 +0200
commit5ee5b91b019005aa27273dff01388a68c12be293 (patch)
treed2db8b0d1533d2eea8bfe77f8a6b3d52fa3f633e /libX11/src/xcms
parent854ec4da20ddff9b830be0a7d5b81d8cb4774132 (diff)
downloadvcxsrv-5ee5b91b019005aa27273dff01388a68c12be293.tar.gz
vcxsrv-5ee5b91b019005aa27273dff01388a68c12be293.tar.bz2
vcxsrv-5ee5b91b019005aa27273dff01388a68c12be293.zip
xserver mesa fontconfig libX11 libxcb libxcb/xcb-proto xkeyboard-config git update 26 Aug 2013
xserver commit e01a3f65d3e6d92f92ef2992b338cc9625bde082 libxcb commit c52f2891b43ae77008f63700982f800371458f4d libxcb/xcb-proto commit bd7708ac1037e647b094fa7440ebb6171b9bc75f xkeyboard-config commit 77026e8c59cc64856180452c5f89be86928fea7c libX11 commit e9b14d10d0258bfcc273ff8bc84cd349dccda62c libXdmcp commit 66514a4af7eaa47e8718434356d7efce95e570cf libXext commit 7378d4bdbd33ed49ed6cfa5c4f73d7527982aab4 libfontenc commit 3acba630d8b57084f7e92c15732408711ed5137a libXinerama commit 6e1d1dc328ba8162bba2f4694e7f3c706a1491ff libXau commit 899790011304c4029e15abf410e49ce7cec17e0a xkbcomp commit 0ebdf47fd4bc434ac3d2339544c022a869510738 pixman commit 3518a0dafa63098d41e466f73d105b7e3e4b12de xextproto commit f27fcc99d1cf935cc289933326f7d3baacd5107a randrproto commit ca7cc541c2e43e6c784df19b4583ac35829d2f72 glproto commit 8e3407e02980d088e20041e79bdcdd3737e7827e mkfontscale commit f48de13423c7300f4da9f61993b624426b38ddc0 xwininfo commit ba0d1b0da21d2dbdd81098ed5778f3792b472e13 libXft commit c5e760a239afc62a1c75e0509868e35957c8df52 libXmu commit d5dac08d65c4865f311cb62c161dbb1300eecd11 libxtrans commit f6a161f2a003f4da0a2e414b4faa0ee0de0c01f0 fontconfig commit fba9efecd2ef3aca84e0a4806899c09ba95f4c19 mesa commit 7fa18774bd9d0e97a82ee9b7dfce8fc5a1041c3a
Diffstat (limited to 'libX11/src/xcms')
-rw-r--r--libX11/src/xcms/CCC.c5
-rw-r--r--libX11/src/xcms/CvCols.c6
-rw-r--r--libX11/src/xcms/IdOfPr.c2
-rw-r--r--libX11/src/xcms/LRGB.c36
-rw-r--r--libX11/src/xcms/SetGetCols.c10
-rw-r--r--libX11/src/xcms/StCols.c4
-rw-r--r--libX11/src/xcms/cmsCmap.c11
-rw-r--r--libX11/src/xcms/cmsColNm.c8
-rw-r--r--libX11/src/xcms/cmsInt.c11
9 files changed, 45 insertions, 48 deletions
diff --git a/libX11/src/xcms/CCC.c b/libX11/src/xcms/CCC.c
index 090b1078c..de6d6318a 100644
--- a/libX11/src/xcms/CCC.c
+++ b/libX11/src/xcms/CCC.c
@@ -111,7 +111,7 @@ XcmsCreateCCC(
XcmsPerScrnInfo *pNewScrnInfo;
if (pDefaultCCC == NULL ||
- !(newccc = (XcmsCCC) Xcalloc(1, (unsigned) sizeof(XcmsCCCRec)))) {
+ !(newccc = Xcalloc(1, sizeof(XcmsCCCRec)))) {
return(NULL);
}
@@ -144,8 +144,7 @@ XcmsCreateCCC(
* If one exists replace the pPerScrnInfo.
*/
if ((pIMap = _XcmsGetIntensityMap(dpy, visual)) != NULL) {
- if (!(pNewScrnInfo = (XcmsPerScrnInfo *)
- Xcalloc(1, (unsigned) sizeof(XcmsPerScrnInfo)))) {
+ if (!(pNewScrnInfo = Xcalloc(1, sizeof(XcmsPerScrnInfo)))) {
Xfree(newccc);
return(NULL);
}
diff --git a/libX11/src/xcms/CvCols.c b/libX11/src/xcms/CvCols.c
index ed3582663..87d49311c 100644
--- a/libX11/src/xcms/CvCols.c
+++ b/libX11/src/xcms/CvCols.c
@@ -796,7 +796,7 @@ XcmsConvertColors(
* Make copy of array of color specifications
*/
if (nColors > 1) {
- pColors_tmp = (XcmsColor *) Xmalloc(nColors * sizeof(XcmsColor));
+ pColors_tmp = Xmalloc(nColors * sizeof(XcmsColor));
} else {
pColors_tmp = &Color1;
}
@@ -987,13 +987,13 @@ XcmsConvertColors(
nColors * sizeof(XcmsColor));
}
if (nColors > 1) {
- Xfree((char *)pColors_tmp);
+ Xfree(pColors_tmp);
}
return(retval);
Failure:
if (nColors > 1) {
- Xfree((char *)pColors_tmp);
+ Xfree(pColors_tmp);
}
return(XcmsFailure);
}
diff --git a/libX11/src/xcms/IdOfPr.c b/libX11/src/xcms/IdOfPr.c
index 3a92e0a11..e15f34fec 100644
--- a/libX11/src/xcms/IdOfPr.c
+++ b/libX11/src/xcms/IdOfPr.c
@@ -67,7 +67,7 @@ XcmsFormatOfPrefix(char *prefix)
* While copying prefix to string_lowered, convert to lowercase
*/
if ((len = strlen(prefix)) >= sizeof(string_buf)) {
- string_lowered = (char *) Xmalloc(len+1);
+ string_lowered = Xmalloc(len+1);
} else {
string_lowered = string_buf;
}
diff --git a/libX11/src/xcms/LRGB.c b/libX11/src/xcms/LRGB.c
index 5ecb7d120..461d07d87 100644
--- a/libX11/src/xcms/LRGB.c
+++ b/libX11/src/xcms/LRGB.c
@@ -511,7 +511,7 @@ LINEAR_RGB_InitSCCData(
*pValue++ = (long)_XcmsGetElement(format_return, &pChar,
&nitems) / (XcmsFloat)XDCCC_NUMBER;
}
- Xfree ((char *)property_return);
+ Xfree (property_return);
pPerScrnInfo->screenWhitePt.spec.CIEXYZ.X =
pScreenData->RGBtoXYZmatrix[0][0] +
pScreenData->RGBtoXYZmatrix[0][1] +
@@ -662,7 +662,7 @@ LINEAR_RGB_InitSCCData(
/* Create, initialize, and add map */
if (!(pNewMap = (XcmsIntensityMap *)
Xcalloc (1, sizeof(XcmsIntensityMap)))) {
- Xfree((char *)pScreenData);
+ Xfree(pScreenData);
goto Free_property_return;
}
pNewMap->visualID = visualID;
@@ -782,7 +782,7 @@ LINEAR_RGB_InitSCCData(
#endif /* ALLDEBUG */
}
- Xfree ((char *)property_return);
+ Xfree (property_return);
/* Free the old memory and use the new structure created. */
LINEAR_RGB_FreeSCCData(pPerScrnInfo->screenData);
@@ -796,28 +796,28 @@ LINEAR_RGB_InitSCCData(
return(XcmsSuccess);
FreeBlueTblElements:
- Xfree((char *)pScreenData->pBlueTbl->pBase);
+ Xfree(pScreenData->pBlueTbl->pBase);
FreeBlueTbl:
- Xfree((char *)pScreenData->pBlueTbl);
+ Xfree(pScreenData->pBlueTbl);
FreeGreenTblElements:
- Xfree((char *)pScreenData->pGreenTbl->pBase);
+ Xfree(pScreenData->pGreenTbl->pBase);
FreeGreenTbl:
- Xfree((char *)pScreenData->pGreenTbl);
+ Xfree(pScreenData->pGreenTbl);
FreeRedTblElements:
- Xfree((char *)pScreenData->pRedTbl->pBase);
+ Xfree(pScreenData->pRedTbl->pBase);
FreeRedTbl:
- Xfree((char *)pScreenData->pRedTbl);
+ Xfree(pScreenData->pRedTbl);
Free_property_return:
- Xfree ((char *)property_return);
+ Xfree (property_return);
FreeSCCData:
- Xfree((char *)pScreenDefaultData);
+ Xfree(pScreenDefaultData);
pPerScrnInfo->state = XcmsInitNone;
return(XcmsFailure);
}
@@ -849,30 +849,30 @@ LINEAR_RGB_FreeSCCData(
if (pScreenData->pRedTbl->pBase !=
pScreenData->pGreenTbl->pBase) {
if (pScreenData->pGreenTbl->pBase) {
- Xfree ((char *)pScreenData->pGreenTbl->pBase);
+ Xfree (pScreenData->pGreenTbl->pBase);
}
}
if (pScreenData->pGreenTbl != pScreenData->pRedTbl) {
- Xfree ((char *)pScreenData->pGreenTbl);
+ Xfree (pScreenData->pGreenTbl);
}
}
if (pScreenData->pBlueTbl) {
if (pScreenData->pRedTbl->pBase !=
pScreenData->pBlueTbl->pBase) {
if (pScreenData->pBlueTbl->pBase) {
- Xfree ((char *)pScreenData->pBlueTbl->pBase);
+ Xfree (pScreenData->pBlueTbl->pBase);
}
}
if (pScreenData->pBlueTbl != pScreenData->pRedTbl) {
- Xfree ((char *)pScreenData->pBlueTbl);
+ Xfree (pScreenData->pBlueTbl);
}
}
if (pScreenData->pRedTbl->pBase) {
- Xfree ((char *)pScreenData->pRedTbl->pBase);
+ Xfree (pScreenData->pRedTbl->pBase);
}
- Xfree ((char *)pScreenData->pRedTbl);
+ Xfree (pScreenData->pRedTbl);
}
- Xfree ((char *)pScreenData);
+ Xfree (pScreenData);
}
}
diff --git a/libX11/src/xcms/SetGetCols.c b/libX11/src/xcms/SetGetCols.c
index 9b548dbb2..83fa4c200 100644
--- a/libX11/src/xcms/SetGetCols.c
+++ b/libX11/src/xcms/SetGetCols.c
@@ -237,7 +237,7 @@ _XcmsSetGetColors(
/*
* Allocate space for XColors
*/
- if ((pXColors_in_out = (XColor *)Xcalloc(nColors, sizeof(XColor))) ==
+ if ((pXColors_in_out = Xcalloc(nColors, sizeof(XColor))) ==
NULL) {
return(XcmsFailure);
}
@@ -251,7 +251,7 @@ _XcmsSetGetColors(
*/
if ((retval = XcmsConvertColors(ccc, pColors_in_out, nColors, XcmsRGBFormat,
pCompressed)) == XcmsFailure) {
- Xfree((char *)pXColors_in_out);
+ Xfree(pXColors_in_out);
return(XcmsFailure);
}
@@ -268,12 +268,12 @@ Query:
/* Note: XQueryColors and XStoreColors do not return any Status */
(*xColorProc)(ccc->dpy, cmap, pXColors_in_out, nColors);
} else {
- Xfree((char *)pXColors_in_out);
+ Xfree(pXColors_in_out);
return(XcmsFailure);
}
if (*xColorProc == XStoreColors) {
- Xfree((char *)pXColors_in_out);
+ Xfree(pXColors_in_out);
return(retval);
}
@@ -281,7 +281,7 @@ Query:
* Now, convert the returned XColor (i.e., rgb) to XcmsColor structures
*/
_XColor_to_XcmsRGB(ccc, pXColors_in_out, pColors_in_out, nColors);
- Xfree((char *)pXColors_in_out);
+ Xfree(pXColors_in_out);
/*
* Then, convert XcmsColor structures to the original specification
diff --git a/libX11/src/xcms/StCols.c b/libX11/src/xcms/StCols.c
index 24ccd386f..42a29cd7f 100644
--- a/libX11/src/xcms/StCols.c
+++ b/libX11/src/xcms/StCols.c
@@ -85,7 +85,7 @@ XcmsStoreColors(
* overwrite the contents.
*/
if (nColors > 1) {
- pColors_tmp = (XcmsColor *) Xmalloc(nColors * sizeof(XcmsColor));
+ pColors_tmp = Xmalloc(nColors * sizeof(XcmsColor));
} else {
pColors_tmp = &Color1;
}
@@ -102,7 +102,7 @@ XcmsStoreColors(
* Free copies as needed.
*/
if (nColors > 1) {
- Xfree((char *)pColors_tmp);
+ Xfree(pColors_tmp);
}
/*
diff --git a/libX11/src/xcms/cmsCmap.c b/libX11/src/xcms/cmsCmap.c
index 00816ce03..c5401c05d 100644
--- a/libX11/src/xcms/cmsCmap.c
+++ b/libX11/src/xcms/cmsCmap.c
@@ -191,7 +191,7 @@ CmapRecForColormap(
SyncHandle();
} while (async_state.error_count > 0 && ++j < nVisualsMatched);
- Xfree((char *)visualList);
+ Xfree(visualList);
/*
* if successful
@@ -250,8 +250,7 @@ _XcmsAddCmapRec(
{
XcmsCmapRec *pNew;
- if ((pNew = (XcmsCmapRec *) Xcalloc(1, (unsigned) sizeof(XcmsCmapRec)))
- == NULL) {
+ if ((pNew = Xcalloc(1, sizeof(XcmsCmapRec))) == NULL) {
return((XcmsCmapRec *)NULL);
}
@@ -301,7 +300,7 @@ _XcmsCopyCmapRecAndFree(
pRec_copy =_XcmsAddCmapRec(dpy, copy_cmap, pRec_src->windowID,
pRec_src->visual);
if (pRec_copy != NULL && pRec_src->ccc) {
- pRec_copy->ccc = (XcmsCCC)Xcalloc(1, (unsigned) sizeof(XcmsCCCRec));
+ pRec_copy->ccc = Xcalloc(1, sizeof(XcmsCCCRec));
memcpy((char *)pRec_copy->ccc, (char *)pRec_src->ccc,
sizeof(XcmsCCCRec));
}
@@ -353,7 +352,7 @@ _XcmsDeleteCmapRec(
XcmsFreeCCC(pRec->ccc);
}
*pPrevPtr = pRec->pNext;
- Xfree((char *)pRec);
+ Xfree(pRec);
}
}
@@ -388,7 +387,7 @@ _XcmsFreeClientCmaps(
XcmsFreeCCC(pRecFree->ccc);
}
/* Now free the XcmsCmapRec structure */
- Xfree((char *)pRecFree);
+ Xfree(pRecFree);
}
dpy->cms.clientCmaps = (XPointer)NULL;
}
diff --git a/libX11/src/xcms/cmsColNm.c b/libX11/src/xcms/cmsColNm.c
index 8d0d4a771..ecf19b37e 100644
--- a/libX11/src/xcms/cmsColNm.c
+++ b/libX11/src/xcms/cmsColNm.c
@@ -209,7 +209,7 @@ _XcmsParseColorString(
* While copying color_string to string_lowered, convert to lowercase
*/
if ((len = strlen(color_string)) >= sizeof(string_buf)) {
- string_lowered = (char *) Xmalloc(len+1);
+ string_lowered = Xmalloc(len+1);
} else {
string_lowered = string_buf;
}
@@ -418,7 +418,7 @@ _XcmsLookupColorName(
Retry:
if ((len = strlen(tmpName)) > 63) {
- name_lowered = (char *) Xmalloc(len+1);
+ name_lowered = Xmalloc(len+1);
} else {
name_lowered = name_lowered_64;
}
@@ -760,8 +760,8 @@ LoadColornameDB(void)
}
rewind(stream);
- strings = (char *) Xmalloc(size);
- pairs = (XcmsPair *)Xcalloc(nEntries, sizeof(XcmsPair));
+ strings = Xmalloc(size);
+ pairs = Xcalloc(nEntries, sizeof(XcmsPair));
ReadColornameDB(stream, pairs, strings);
(void) fclose(stream);
diff --git a/libX11/src/xcms/cmsInt.c b/libX11/src/xcms/cmsInt.c
index b7c321472..f4aef04ff 100644
--- a/libX11/src/xcms/cmsInt.c
+++ b/libX11/src/xcms/cmsInt.c
@@ -82,7 +82,7 @@ _XcmsCopyPointerArray(
for (tmp = pap, n = 0; *tmp != NULL; tmp++, n++);
n++; /* add 1 to include the NULL pointer */
- if ((newArray = (XPointer *)Xmalloc(n * sizeof(XPointer)))) {
+ if ((newArray = Xmalloc(n * sizeof(XPointer)))) {
memcpy((char *)newArray, (char *)pap,
(unsigned)(n * sizeof(XPointer)));
}
@@ -141,7 +141,7 @@ _XcmsPushPointerArray(
/* add 2: 1 for the new pointer and another for the NULL pointer */
n += 2;
- if ((newArray = (XPointer *)Xmalloc(n * sizeof(XPointer)))) {
+ if ((newArray = Xmalloc(n * sizeof(XPointer)))) {
memcpy((char *)(newArray+1),(char *)pap,
(unsigned)((n-1) * sizeof(XPointer)));
*newArray = p;
@@ -183,8 +183,7 @@ _XcmsInitDefaultCCCs(
* Create an array of XcmsCCC structures, one for each screen.
* They serve as the screen's default CCC.
*/
- if (!(ccc = (XcmsCCC)
- Xcalloc((unsigned)nScrn, (unsigned) sizeof(XcmsCCCRec)))) {
+ if (!(ccc = Xcalloc((unsigned)nScrn, sizeof(XcmsCCCRec)))) {
return(0);
}
dpy->cms.defaultCCCs = (XPointer)ccc;
@@ -322,8 +321,8 @@ _XcmsInitScrnInfo(
* for the latter (see XcmsCreateCCC). The ones created
* here are referenced by the default CCC.
*/
- if (!(defaultccc->pPerScrnInfo = (XcmsPerScrnInfo *)
- Xcalloc(1, (unsigned) sizeof(XcmsPerScrnInfo)))) {
+ if (!(defaultccc->pPerScrnInfo =
+ Xcalloc(1, sizeof(XcmsPerScrnInfo)))) {
return(0);
}
defaultccc->pPerScrnInfo->state = XcmsInitNone;