aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/cmsColNm.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/lib/X11/cmsColNm.c')
-rw-r--r--nx-X11/lib/X11/cmsColNm.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/nx-X11/lib/X11/cmsColNm.c b/nx-X11/lib/X11/cmsColNm.c
index 5f9724822..e43a829f2 100644
--- a/nx-X11/lib/X11/cmsColNm.c
+++ b/nx-X11/lib/X11/cmsColNm.c
@@ -54,7 +54,7 @@ static Status LoadColornameDB(void);
* #define declarations local to this package.
*/
#ifndef XCMSDB
-#define XCMSDB "/usr/lib/X11/Xcms.txt"
+#define XCMSDB XCMSDIR "/Xcms.txt"
#endif
#ifndef isgraph
@@ -126,13 +126,13 @@ _XcmsColorSpaceOfString(
*/
{
XcmsColorSpace **papColorSpaces;
- int n;
+ size_t n;
char *pchar;
if ((pchar = strchr(color_string, ':')) == NULL) {
return(XcmsFailure);
}
- n = (int)(pchar - color_string);
+ n = (size_t)(pchar - color_string);
if (ccc == NULL) {
return(NULL);
@@ -198,7 +198,7 @@ _XcmsParseColorString(
XcmsColorSpace *pColorSpace;
char string_buf[64];
char *string_lowered;
- int len;
+ size_t len;
int res;
if (ccc == NULL) {
@@ -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;
}
@@ -255,7 +255,7 @@ FirstCmp(const void *p1, const void *p2)
*
*/
{
- return(strcmp(((XcmsPair *)p1)->first, ((XcmsPair *)p2)->first));
+ return(strcmp(((const XcmsPair *)p1)->first, ((const XcmsPair *)p2)->first));
}
@@ -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;
}
@@ -571,7 +571,7 @@ stringSectionSize(
return(XcmsFailure);
}
- while((pBuf = fgets(buf, XCMSDB_MAXLINELEN, stream)) != NULL) {
+ while((fgets(buf, XCMSDB_MAXLINELEN, stream)) != NULL) {
if ((sscanf(buf, "%s", token)) && (strcmp(token, END_TOKEN) == 0)) {
break;
}
@@ -666,7 +666,7 @@ ReadColornameDB(
* Process lines between START_TOKEN to END_TOKEN
*/
- while ((pBuf = fgets(buf, XCMSDB_MAXLINELEN, stream)) != NULL) {
+ while ((fgets(buf, XCMSDB_MAXLINELEN, stream)) != NULL) {
if ((sscanf(buf, "%s", token)) && (strcmp(token, END_TOKEN) == 0)) {
/*
* Found END_TOKEN so break out of for loop
@@ -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);