summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SCCDFile.h3
-rw-r--r--loadData.c229
-rw-r--r--xcmsdb.c96
-rw-r--r--xcmsdb.man5
4 files changed, 129 insertions, 204 deletions
diff --git a/SCCDFile.h b/SCCDFile.h
index a8aa87f..d1455a9 100644
--- a/SCCDFile.h
+++ b/SCCDFile.h
@@ -28,6 +28,7 @@
* X Device Color Characterization Convention (XDCCC).
*
*/
+/* $XFree86: xc/programs/xcmsdb/SCCDFile.h,v 1.4 2001/01/17 23:45:19 dawes Exp $ */
#ifndef SCCDFILE_H
#define SCCDFILE_H
@@ -138,5 +139,7 @@ typedef struct _XDCCC_Correction {
struct _XDCCC_Correction* next;
} XDCCC_Correction;
+extern int LoadSCCData(Display *pDpy, int screenNumber, char *filename,
+ int targetFormat);
#endif /* SCCDFILE_H */
diff --git a/loadData.c b/loadData.c
index 5082e83..83f5296 100644
--- a/loadData.c
+++ b/loadData.c
@@ -31,6 +31,7 @@
*
*
*/
+/* $XFree86: xc/programs/xcmsdb/loadData.c,v 3.3 2001/07/25 15:05:18 dawes Exp $ */
/*
* INCLUDES
@@ -52,15 +53,7 @@
* files (external includes or internal includes).
*/
-#ifdef X_NOT_STDC_ENV
-extern char *strtok();
-extern char *strchr();
-#endif
-#ifndef X_NOT_STDC_ENV
#include <stdlib.h>
-#else
-char *calloc();
-#endif
/*
* LOCAL TYPEDEFS
@@ -80,36 +73,36 @@ typedef struct _DefineEntry {
static int linenum = 0;
static DefineEntry KeyTbl[] = {
- SC_BEGIN_KEYWORD, SC_BEGIN,
- SC_END_KEYWORD, SC_END,
- COMMENT_KEYWORD, COMMENT,
- NAME_KEYWORD, NAME,
- MODEL_KEYWORD, MODEL,
- PART_NUMBER_KEYWORD, PART_NUMBER,
- SERIAL_NUMBER_KEYWORD, SERIAL_NUMBER,
- REVISION_KEYWORD, REVISION,
- SCREEN_CLASS_KEYWORD, SCREEN_CLASS,
- COLORIMETRIC_BEGIN_KEYWORD, COLORIMETRIC_BEGIN,
- COLORIMETRIC_END_KEYWORD, COLORIMETRIC_END,
- XYZTORGBMAT_BEGIN_KEYWORD, XYZTORGBMAT_BEGIN,
- XYZTORGBMAT_END_KEYWORD, XYZTORGBMAT_END,
- WHITEPT_XYZ_BEGIN_KEYWORD, WHITEPT_XYZ_BEGIN,
- WHITEPT_XYZ_END_KEYWORD, WHITEPT_XYZ_END,
- RGBTOXYZMAT_BEGIN_KEYWORD, RGBTOXYZMAT_BEGIN,
- RGBTOXYZMAT_END_KEYWORD, RGBTOXYZMAT_END,
- IPROFILE_BEGIN_KEYWORD, IPROFILE_BEGIN,
- IPROFILE_END_KEYWORD, IPROFILE_END,
- ITBL_BEGIN_KEYWORD, ITBL_BEGIN,
- ITBL_END_KEYWORD, ITBL_END,
- "", -1
+ { SC_BEGIN_KEYWORD, SC_BEGIN },
+ { SC_END_KEYWORD, SC_END },
+ { COMMENT_KEYWORD, COMMENT },
+ { NAME_KEYWORD, NAME },
+ { MODEL_KEYWORD, MODEL },
+ { PART_NUMBER_KEYWORD, PART_NUMBER },
+ { SERIAL_NUMBER_KEYWORD, SERIAL_NUMBER },
+ { REVISION_KEYWORD, REVISION },
+ { SCREEN_CLASS_KEYWORD, SCREEN_CLASS },
+ { COLORIMETRIC_BEGIN_KEYWORD, COLORIMETRIC_BEGIN },
+ { COLORIMETRIC_END_KEYWORD, COLORIMETRIC_END },
+ { XYZTORGBMAT_BEGIN_KEYWORD, XYZTORGBMAT_BEGIN },
+ { XYZTORGBMAT_END_KEYWORD, XYZTORGBMAT_END },
+ { WHITEPT_XYZ_BEGIN_KEYWORD, WHITEPT_XYZ_BEGIN },
+ { WHITEPT_XYZ_END_KEYWORD, WHITEPT_XYZ_END },
+ { RGBTOXYZMAT_BEGIN_KEYWORD, RGBTOXYZMAT_BEGIN },
+ { RGBTOXYZMAT_END_KEYWORD, RGBTOXYZMAT_END },
+ { IPROFILE_BEGIN_KEYWORD, IPROFILE_BEGIN },
+ { IPROFILE_END_KEYWORD, IPROFILE_END },
+ { ITBL_BEGIN_KEYWORD, ITBL_BEGIN },
+ { ITBL_END_KEYWORD, ITBL_END },
+ { "", -1 }
};
static DefineEntry ScrnClassTbl[] = {
- VIDEO_RGB_KEYWORD, VIDEO_RGB,
+ { VIDEO_RGB_KEYWORD, VIDEO_RGB },
#ifdef GRAY
- VIDEO_GRAY_KEYWORD, VIDEO_GRAY,
+ { VIDEO_GRAY_KEYWORD, VIDEO_GRAY },
#endif /* GRAY */
- "", -1
+ { "", -1 }
};
#define KEY_VISUALID 1
@@ -122,24 +115,24 @@ static DefineEntry ScrnClassTbl[] = {
#define KEY_BITS_PER_RGB 8
static DefineEntry VisualOptKeyTbl[] = {
- "visualid", KEY_VISUALID,
- "depth", KEY_DEPTH,
- "class", KEY_CLASS,
- "red_mask", KEY_RED_MASK,
- "green_mask", KEY_GREEN_MASK,
- "blue_mask", KEY_BLUE_MASK,
- "colormap_size", KEY_COLORMAP_SIZE,
- "bits_per_rgb", KEY_BITS_PER_RGB,
- "", -1
+ { "visualid", KEY_VISUALID },
+ { "depth", KEY_DEPTH },
+ { "class", KEY_CLASS },
+ { "red_mask", KEY_RED_MASK },
+ { "green_mask", KEY_GREEN_MASK },
+ { "blue_mask", KEY_BLUE_MASK },
+ { "colormap_size", KEY_COLORMAP_SIZE },
+ { "bits_per_rgb", KEY_BITS_PER_RGB },
+ { "", -1 }
};
static DefineEntry VisualClassTbl[] = {
- "StaticGray", StaticGray,
- "GrayScale", GrayScale,
- "StaticColor", StaticColor,
- "PseudoColor", PseudoColor,
- "TrueColor", TrueColor,
- "DirectColor", DirectColor,
- "", -1
+ { "StaticGray", StaticGray },
+ { "GrayScale", GrayScale },
+ { "StaticColor", StaticColor },
+ { "PseudoColor", PseudoColor },
+ { "TrueColor", TrueColor },
+ { "DirectColor", DirectColor },
+ { "", -1 }
};
@@ -156,10 +149,9 @@ static DefineEntry VisualClassTbl[] = {
* SYNOPSIS
*/
static int
-StrToDefine(pde,pstring)
- DefineEntry pde[]; /* IN: table of X string-define pairs */
- /* last entry must contain pair "", 0 */
- char *pstring; /* IN: string to be looked up in that table */
+StrToDefine(DefineEntry pde[], /* IN: table of X string-define pairs */
+ /* last entry must contain pair "", 0 */
+ char *pstring) /* IN: string to be looked up in that table */
/*
* DESCRIPTION
* Converts a string to an integer define.
@@ -193,10 +185,9 @@ StrToDefine(pde,pstring)
* SYNOPSIS
*/
static char *
-DefineToStr(pde,id)
- DefineEntry pde[]; /* IN: table of X string-define pairs */
- /* last entry must contain pair "", 0 */
- int id; /* IN: id to be looked up in that table */
+DefineToStr(DefineEntry pde[], /* IN: table of X string-define pairs */
+ /* last entry must contain pair "", 0 */
+ int id) /* IN: id to be looked up in that table */
/*
* DESCRIPTION
* Converts a string to an integer define.
@@ -230,8 +221,7 @@ DefineToStr(pde,id)
* SYNOPSIS
*/
static int
-SCKeyOf(string)
- char *string;
+SCKeyOf(char *string)
/*
* DESCRIPTION
* Converts a string to an integer define.
@@ -260,8 +250,7 @@ SCKeyOf(string)
* SYNOPSIS
*/
static int
-SCScrnClassOf(string)
- char *string;
+SCScrnClassOf(char *string)
/*
* DESCRIPTION
* Converts a string to an integer define.
@@ -290,8 +279,7 @@ SCScrnClassOf(string)
* SYNOPSIS
*/
static char *
-SCScrnClassStringOf(id)
- int id;
+SCScrnClassStringOf(int id)
/*
* DESCRIPTION
* Converts a id to astring
@@ -307,9 +295,7 @@ SCScrnClassStringOf(id)
/* close the stream and return any memory allocated. */
/*ARGSUSED*/
static void
-closeS(stream, pCorrection)
- FILE *stream;
- XDCCC_Correction* pCorrection;
+closeS(FILE *stream, XDCCC_Correction *pCorrection)
{
XDCCC_Correction* pNext;
if (stream) {
@@ -326,10 +312,7 @@ closeS(stream, pCorrection)
* Get a line of text from the stream.
*/
static char *
-nextline(buf, maxch, stream)
- char *buf;
- int maxch;
- FILE *stream;
+nextline(char *buf, int maxch, FILE *stream)
{
linenum++;
return (fgets(buf, maxch, stream));
@@ -337,10 +320,7 @@ nextline(buf, maxch, stream)
static int
-ProcessColorimetric(stream, pMatrix, VisualFlag)
- FILE *stream;
- XDCCC_Matrix* pMatrix;
- int VisualFlag;
+ProcessColorimetric(FILE *stream, XDCCC_Matrix *pMatrix, int VisualFlag)
{
char buf[BUFSIZ];
char keyword[BUFSIZ];
@@ -354,8 +334,8 @@ ProcessColorimetric(stream, pMatrix, VisualFlag)
/* 1 -- processing data from matrix */
/* 2 -- both matrices processed */
/* Note: the order of the matrices is not important. */
- int count;
- XcmsFloat *pElement;
+ int count = -1;
+ XcmsFloat *pElement = NULL;
while ((nextline(buf, BUFSIZ, stream)) != NULL) {
if ((ntok = sscanf(buf, "%s %s", keyword, token)) > 0) {
@@ -535,9 +515,7 @@ ProcessColorimetric(stream, pMatrix, VisualFlag)
}
static int
-ProcessIProfile(stream, pCorrection)
- FILE *stream;
- XDCCC_Correction* pCorrection;
+ProcessIProfile(FILE *stream, XDCCC_Correction *pCorrection)
{
char buf[BUFSIZ];
char *keyword;
@@ -672,7 +650,6 @@ ProcessIProfile(stream, pCorrection)
/* With tableType 1 only store the intensity. */
pIRec++;
} else {
-#if __STDC__
/* Note ansi C can handle 0x preceeding hex number */
if (sscanf(ptoken, "%hi", &pIRec->value) != 1) {
fprintf(stderr,
@@ -680,17 +657,6 @@ ProcessIProfile(stream, pCorrection)
linenum, ptoken);
return (0);
}
-#else
- if (*ptoken == '0' &&
- ((*(ptoken+1) == 'x') || (*(ptoken+1) == 'X') ))
- ptoken += 2;
- if (sscanf(ptoken, "%hx", &pIRec->value) != 1) {
- fprintf(stderr,
- "Line %d: invalid Intensity Profile value %s\n",
- linenum, ptoken);
- return (0);
- }
-#endif
if ((ptoken = strtok(NULL, DATA_DELIMS)) == NULL) {
fprintf(stderr,
"Line %d: missing Intensity Profile value\n",
@@ -743,9 +709,7 @@ ProcessIProfile(stream, pCorrection)
}
static void
-PutTableType0Card8(pTbl, pCard8)
- IntensityTbl *pTbl;
- unsigned char **pCard8;
+PutTableType0Card8(IntensityTbl *pTbl, unsigned char **pCard8)
{
unsigned int count;
IntensityRec *pIRec;
@@ -763,9 +727,7 @@ PutTableType0Card8(pTbl, pCard8)
}
static void
-PutTableType1Card8(pTbl, pCard8)
- IntensityTbl *pTbl;
- unsigned char **pCard8;
+PutTableType1Card8(IntensityTbl *pTbl, unsigned char **pCard8)
{
unsigned int count;
IntensityRec *pIRec;
@@ -781,9 +743,7 @@ PutTableType1Card8(pTbl, pCard8)
}
static void
-PutTableType0Card16(pTbl, pCard16)
- IntensityTbl *pTbl;
- unsigned short **pCard16;
+PutTableType0Card16(IntensityTbl *pTbl, unsigned short **pCard16)
{
unsigned int count;
IntensityRec *pIRec;
@@ -801,9 +761,7 @@ PutTableType0Card16(pTbl, pCard16)
}
static void
-PutTableType1Card16(pTbl, pCard16)
- IntensityTbl *pTbl;
- unsigned short **pCard16;
+PutTableType1Card16(IntensityTbl *pTbl, unsigned short **pCard16)
{
unsigned int count;
IntensityRec *pIRec;
@@ -819,9 +777,7 @@ PutTableType1Card16(pTbl, pCard16)
}
static void
-PutTableType0Card32(pTbl, pCard32)
- IntensityTbl *pTbl;
- unsigned long **pCard32;
+PutTableType0Card32(IntensityTbl *pTbl, unsigned long **pCard32)
{
unsigned int count;
IntensityRec *pIRec;
@@ -839,9 +795,7 @@ PutTableType0Card32(pTbl, pCard32)
}
static void
-PutTableType1Card32(pTbl, pCard32)
- IntensityTbl *pTbl;
- unsigned long **pCard32;
+PutTableType1Card32(IntensityTbl *pTbl, unsigned long **pCard32)
{
unsigned int count;
IntensityRec *pIRec;
@@ -858,10 +812,7 @@ PutTableType1Card32(pTbl, pCard32)
static void
-LoadMatrix(pDpy, root, pMatrix)
- Display *pDpy;
- Window root;
- XDCCC_Matrix *pMatrix;
+LoadMatrix(Display *pDpy, Window root, XDCCC_Matrix *pMatrix)
{
int count;
unsigned long *pCard32;
@@ -888,11 +839,8 @@ LoadMatrix(pDpy, root, pMatrix)
static int
-LoadCorrections(pDpy, root, pCorrection, targetFormat)
- Display *pDpy;
- Window root;
- XDCCC_Correction *pCorrection;
- int targetFormat;
+LoadCorrections(Display *pDpy, Window root, XDCCC_Correction *pCorrection,
+ int targetFormat)
{
unsigned char *pCard8;
unsigned char *pCard8Array = (unsigned char *)NULL;
@@ -912,7 +860,7 @@ LoadCorrections(pDpy, root, pCorrection, targetFormat)
for (i = 0; pCorrection; i++, pCorrection = pCorrection->next) {
if ((pCorrection->tableType != 0) && (pCorrection->tableType != 1)) {
if (pCorrection->visual_info.visualid) {
- fprintf(stderr,"RGB Correction for visualid %d: Invalid intensity table type %d.\n",
+ fprintf(stderr,"RGB Correction for visualid %ld: Invalid intensity table type %d.\n",
pCorrection->visual_info.visualid,
pCorrection->tableType);
} else {
@@ -924,7 +872,7 @@ LoadCorrections(pDpy, root, pCorrection, targetFormat)
if (pCorrection->nTables != 1 && pCorrection->nTables != 3) {
if (pCorrection->visual_info.visualid) {
- fprintf(stderr,"RGB Correction for visualid %d: %d invalid number of tables.\n",
+ fprintf(stderr,"RGB Correction for visualid %ld: %d invalid number of tables.\n",
pCorrection->visual_info.visualid,
pCorrection->nTables);
} else {
@@ -937,7 +885,7 @@ LoadCorrections(pDpy, root, pCorrection, targetFormat)
if (pCorrection->nTables == 1) {
if (pCorrection->pRedTbl->nEntries < 2) {
if (pCorrection->visual_info.visualid) {
- fprintf(stderr,"RGB Correction for visualid %d: Illegal number of entries in table\n",
+ fprintf(stderr,"RGB Correction for visualid %ld: Illegal number of entries in table\n",
pCorrection->visual_info.visualid);
} else {
fprintf(stderr,"Global RGB Correction: Illegal number of entries in table\n");
@@ -1015,7 +963,7 @@ LoadCorrections(pDpy, root, pCorrection, targetFormat)
break;
default:
if (pCorrection->visual_info.visualid) {
- fprintf(stderr,"RGB Correction for visualid %d: Invalid property format\n",
+ fprintf(stderr,"RGB Correction for visualid %ld: Invalid property format\n",
pCorrection->visual_info.visualid);
} else {
fprintf(stderr,"Global RGB Correction: Invalid property format\n");
@@ -1027,7 +975,7 @@ LoadCorrections(pDpy, root, pCorrection, targetFormat)
(pCorrection->pGreenTbl->nEntries < 2) ||
(pCorrection->pBlueTbl->nEntries < 2)) {
if (pCorrection->visual_info.visualid) {
- fprintf(stderr,"RGB Correction for visualid %d: Illegal number of entries in table\n",
+ fprintf(stderr,"RGB Correction for visualid %ld: Illegal number of entries in table\n",
pCorrection->visual_info.visualid);
} else {
fprintf(stderr,"Global RGB Correction: Illegal number of entries in table\n");
@@ -1125,7 +1073,7 @@ LoadCorrections(pDpy, root, pCorrection, targetFormat)
break;
default:
if (pCorrection->visual_info.visualid) {
- fprintf(stderr,"RGB Correction for visualid %d: Invalid property format\n",
+ fprintf(stderr,"RGB Correction for visualid %ld: Invalid property format\n",
pCorrection->visual_info.visualid);
} else {
fprintf(stderr,"Global RGB Correction: Invalid property format\n");
@@ -1141,11 +1089,8 @@ LoadCorrections(pDpy, root, pCorrection, targetFormat)
#ifdef GRAY
static int
-LoadDataGray(pDpy, root, tableType, pScreenData, targetFormat)
- Display *pDpy;
- Window root;
- LINEAR_RGB_SCCData *pScreenData;
- int targetFormat;
+LoadDataGray(Display *pDpy, window root, int tableType,
+ LINEAR_RGB_SCCData *pScreenData, int targetFormat)
{
unsigned char *ret_prop;
int count;
@@ -1267,13 +1212,12 @@ LoadDataGray(pDpy, root, tableType, pScreenData, targetFormat)
static void
-PrintVisualOptions(pCorrection)
- XDCCC_Correction *pCorrection;
+PrintVisualOptions(XDCCC_Correction *pCorrection)
{
if (pCorrection->visual_info_mask & VisualIDMask) {
- fprintf(stderr, "\t%s:0x%x\n",
+ fprintf(stderr, "\t%s:0x%lx\n",
DefineToStr(VisualOptKeyTbl, KEY_VISUALID),
- pCorrection->visual_info.visualid);
+ (unsigned long)pCorrection->visual_info.visualid);
}
if (pCorrection->visual_info_mask & VisualDepthMask) {
fprintf(stderr, "\t%s:%d\n",
@@ -1286,17 +1230,17 @@ PrintVisualOptions(pCorrection)
DefineToStr(VisualClassTbl, pCorrection->visual_info.class));
}
if (pCorrection->visual_info_mask & VisualRedMaskMask) {
- fprintf(stderr, "\t%s:0x%x\n",
+ fprintf(stderr, "\t%s:0x%lx\n",
DefineToStr(VisualOptKeyTbl, KEY_RED_MASK),
pCorrection->visual_info.red_mask);
}
if (pCorrection->visual_info_mask & VisualGreenMaskMask) {
- fprintf(stderr, "\t%s:0x%x\n",
+ fprintf(stderr, "\t%s:0x%lx\n",
DefineToStr(VisualOptKeyTbl, KEY_GREEN_MASK),
pCorrection->visual_info.green_mask);
}
if (pCorrection->visual_info_mask & VisualBlueMaskMask) {
- fprintf(stderr, "\t%s:0x%x\n",
+ fprintf(stderr, "\t%s:0x%lx\n",
DefineToStr(VisualOptKeyTbl, KEY_BLUE_MASK),
pCorrection->visual_info.blue_mask);
}
@@ -1314,10 +1258,7 @@ PrintVisualOptions(pCorrection)
static int
-ParseVisualOptions(pDpy, pCorrection, pbuf)
- Display *pDpy;
- XDCCC_Correction *pCorrection;
- char *pbuf;
+ParseVisualOptions(Display *pDpy, XDCCC_Correction *pCorrection, char *pbuf)
{
char *key;
char *value;
@@ -1443,7 +1384,7 @@ ParseVisualOptions(pDpy, pCorrection, pbuf)
if (n_matches > 1) {
fprintf(stderr, "Line %d: Found more than one visual matching ...\n", linenum);
PrintVisualOptions(pCorrection);
- fprintf(stderr, " Using VisualId 0x%x\n", vinfo->visualid);
+ fprintf(stderr, " Using VisualId 0x%lx\n", (unsigned long)vinfo->visualid);
}
memcpy((char*)&pCorrection->visual_info, (char*)vinfo,
sizeof(XVisualInfo));
@@ -1464,11 +1405,7 @@ ParseVisualOptions(pDpy, pCorrection, pbuf)
* SYNOPSIS
*/
int
-LoadSCCData(pDpy, screenNumber, filename, targetFormat)
- Display *pDpy;
- int screenNumber;
- char *filename;
- int targetFormat;
+LoadSCCData(Display *pDpy, int screenNumber, char *filename, int targetFormat)
/*
* DESCRIPTION
diff --git a/xcmsdb.c b/xcmsdb.c
index 441e567..49201fd 100644
--- a/xcmsdb.c
+++ b/xcmsdb.c
@@ -29,12 +29,14 @@
* Characterization Data from the root window of the screen.
*
*/
+/* $XFree86: xc/programs/xcmsdb/xcmsdb.c,v 1.6 2001/04/01 14:00:19 tsi Exp $ */
/*
* INCLUDES
*/
#include <stdio.h>
+#include <stdlib.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xos.h>
@@ -42,12 +44,19 @@
#include "SCCDFile.h"
-static unsigned long _XcmsGetElement();
-static int _XcmsGetProperty();
+static void QuerySCCDataRGB(Display *dpy, Window root);
+static void RemoveSCCData(Display *dpy, Window root, int colorFlag);
+static unsigned long _XcmsGetElement(int format, char **pValue,
+ unsigned long *pCount);
+static int _XcmsGetProperty(Display *pDpy, Window w, Atom property,
+ int *pFormat, unsigned long *pNItems,
+ unsigned long *pNBytes, char **pValue);
+
char *ProgramName;
-void Syntax ()
+static void
+Syntax (void)
{
fprintf (stderr,
"usage: %s [-options ...] [filename]\n\n",
@@ -73,10 +82,8 @@ void Syntax ()
exit (1);
}
-static Bool optionmatch (opt, arg, minlen)
- char *opt;
- char *arg;
- int minlen;
+static Bool
+optionmatch(char *opt, char *arg, int minlen)
{
int arglen;
@@ -95,9 +102,8 @@ static Bool optionmatch (opt, arg, minlen)
return(False);
}
-main (argc, argv)
- int argc;
- char **argv;
+int
+main(int argc, char *argv[])
{
Display *dpy;
int i;
@@ -190,11 +196,8 @@ main (argc, argv)
}
-Atom
-ParseAtom (dpy, name, only_flag)
- Display *dpy;
- char *name;
- int only_flag;
+static Atom
+ParseAtom(Display *dpy, char *name, int only_flag)
{
return(XInternAtom(dpy, name, only_flag));
}
@@ -207,10 +210,7 @@ ParseAtom (dpy, name, only_flag)
* SYNOPSIS
*/
static void
-PrintTableType0(format, pChar, pCount)
- int format;
- char **pChar;
- unsigned long *pCount;
+PrintTableType0(int format, char **pChar, unsigned long *pCount)
/*
* DESCRIPTION
*
@@ -234,7 +234,7 @@ PrintTableType0(format, pChar, pCount)
hValue = _XcmsGetElement (format, pChar, pCount) * 0x101;
fValue = _XcmsGetElement (format, pChar, pCount)
/ (XcmsFloat)255.0;
- printf ("\t\t0x%x\t%8.5lf\n", hValue, fValue);
+ printf ("\t\t0x%x\t%8.5f\n", hValue, fValue);
}
break;
case 16:
@@ -242,7 +242,7 @@ PrintTableType0(format, pChar, pCount)
hValue = _XcmsGetElement (format, pChar, pCount);
fValue = _XcmsGetElement (format, pChar, pCount)
/ (XcmsFloat)65535.0;
- printf ("\t\t0x%x\t%8.5lf\n", hValue, fValue);
+ printf ("\t\t0x%x\t%8.5f\n", hValue, fValue);
}
break;
case 32:
@@ -250,7 +250,7 @@ PrintTableType0(format, pChar, pCount)
hValue = _XcmsGetElement (format, pChar, pCount);
fValue = _XcmsGetElement (format, pChar, pCount)
/ (XcmsFloat)4294967295.0;
- printf ("\t\t0x%x\t%8.5lf\n", hValue, fValue);
+ printf ("\t\t0x%x\t%8.5f\n", hValue, fValue);
}
break;
default:
@@ -266,10 +266,7 @@ PrintTableType0(format, pChar, pCount)
* SYNOPSIS
*/
static void
-PrintTableType1(format, pChar, pCount)
- int format;
- char **pChar;
- unsigned long *pCount;
+PrintTableType1(int format, char **pChar, unsigned long *pCount)
/*
* DESCRIPTION
*
@@ -293,7 +290,7 @@ PrintTableType1(format, pChar, pCount)
hValue = (count * 65535) / max_index;
fValue = _XcmsGetElement (format, pChar, pCount)
/ (XcmsFloat)255.0;
- printf ("\t\t0x%x\t%8.5lf\n", hValue, fValue);
+ printf ("\t\t0x%x\t%8.5f\n", hValue, fValue);
}
break;
case 16:
@@ -301,7 +298,7 @@ PrintTableType1(format, pChar, pCount)
hValue = (count * 65535) / max_index;
fValue = _XcmsGetElement (format, pChar, pCount)
/ (XcmsFloat)65535.0;
- printf ("\t\t0x%x\t%8.5lf\n", hValue, fValue);
+ printf ("\t\t0x%x\t%8.5f\n", hValue, fValue);
}
break;
case 32:
@@ -309,7 +306,7 @@ PrintTableType1(format, pChar, pCount)
hValue = (count * 65535) / max_index;
fValue = _XcmsGetElement (format, pChar, pCount)
/ (XcmsFloat)4294967295.0;
- printf ("\t\t0x%x\t%8.5lf\n", hValue, fValue);
+ printf ("\t\t0x%x\t%8.5f\n", hValue, fValue);
}
break;
default:
@@ -324,10 +321,8 @@ PrintTableType1(format, pChar, pCount)
*
* SYNOPSIS
*/
-int
-QuerySCCDataRGB(dpy, root)
- Display *dpy;
- Window root;
+static void
+QuerySCCDataRGB(Display *dpy, Window root)
/*
* DESCRIPTION
*
@@ -361,7 +356,7 @@ QuerySCCDataRGB(dpy, root)
&nbytes_return, &property_return) == XcmsFailure) {
format = 0;
} else if (nitems != 18) {
- printf ("Property %s had invalid length of %d\n",
+ printf ("Property %s had invalid length of %ld\n",
XDCCC_MATRIX_ATOM_NAME, nitems);
if (property_return) {
XFree (property_return);
@@ -382,7 +377,7 @@ QuerySCCDataRGB(dpy, root)
for (i = 0; i < 3; i++) {
printf ("\t");
for (j = 0; j < 3; j++) {
- printf ("\t%8.5lf",
+ printf ("\t%8.5f",
(long)_XcmsGetElement(format, &pChar, &nitems)
/ (XcmsFloat) XDCCC_NUMBER);
}
@@ -392,7 +387,7 @@ QuerySCCDataRGB(dpy, root)
for (i = 0; i < 3; i++) {
printf ("\t");
for (j = 0; j < 3; j++) {
- printf ("\t%8.5lf",
+ printf ("\t%8.5f",
(long) _XcmsGetElement(format, &pChar, &nitems)
/ (XcmsFloat) XDCCC_NUMBER);
}
@@ -411,7 +406,7 @@ QuerySCCDataRGB(dpy, root)
&nbytes_return, &property_return) == XcmsFailure) {
format = 0;
} else if (nitems <= 0) {
- printf ("Property %s had invalid length of %d\n",
+ printf ("Property %s had invalid length of %ld\n",
XDCCC_CORRECT_ATOM_NAME, nitems);
if (property_return) {
XFree (property_return);
@@ -553,9 +548,7 @@ IntensityTblError:
* SYNOPSIS
*/
int
-QuerySCCDataGray(dpy, root)
- Display *dpy;
- Window root;
+QuerySCCDataGray(Display *dpy, Window root)
/*
* DESCRIPTION
*
@@ -716,11 +709,8 @@ IntensityTblError:
*
* SYNOPSIS
*/
-int
-RemoveSCCData(dpy, root, colorFlag)
- Display *dpy;
- Window root;
- int colorFlag;
+static void
+RemoveSCCData(Display *dpy, Window root, int colorFlag)
/*
* DESCRIPTION
*
@@ -796,10 +786,7 @@ RemoveSCCData(dpy, root, colorFlag)
}
static unsigned long
-_XcmsGetElement (format, pValue, pCount)
- int format;
- char **pValue;
- unsigned long *pCount;
+_XcmsGetElement(int format, char **pValue, unsigned long *pCount)
/*
* DESCRIPTION
* Get the next element from the property and return it.
@@ -842,14 +829,9 @@ _XcmsGetElement (format, pValue, pCount)
* SYNOPSIS
*/
static int
-_XcmsGetProperty (pDpy, w, property, pFormat, pNItems, pNBytes, pValue)
- Display *pDpy;
- Window w;
- Atom property;
- int *pFormat;
- unsigned long *pNItems;
- unsigned long *pNBytes;
- char **pValue;
+_XcmsGetProperty(Display *pDpy, Window w, Atom property, int *pFormat,
+ unsigned long *pNItems, unsigned long *pNBytes,
+ char **pValue)
/*
* DESCRIPTION
*
diff --git a/xcmsdb.man b/xcmsdb.man
index 6c7942d..7cae4db 100644
--- a/xcmsdb.man
+++ b/xcmsdb.man
@@ -23,7 +23,10 @@
.\" be used in advertising or otherwise to promote the sale, use or other
.\" dealing in this Software without prior written authorization from the
.\" The Open Group.
-.TH XCMSDB 1 "Release 6.4" "X Version 11"
+.\"
+.\" $XFree86: xc/programs/xcmsdb/xcmsdb.man,v 1.7 2001/12/14 20:01:18 dawes Exp $
+.\"
+.TH XCMSDB 1 __xorgversion__
.SH NAME
xcmsdb \- Device Color Characterization utility for X Color Management System
.SH SYNOPSIS