summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-12-31 10:20:07 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-12-31 10:20:07 -0800
commit09bb2c8287e6cafc7acb8e1680ce7b0cc5e36a3d (patch)
tree2dd8f515bf15a55188256255def675954c7586ae
parent1a67ecc569db633a43cf2bbd7c5633b4455b4f4b (diff)
Strip trailing whitespace from source files
git ls-files | xargs gsed -i 's/[ \t]*$//' Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--.gitignore4
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac4
-rw-r--r--loadData.c106
-rw-r--r--xcmsdb.c74
5 files changed, 97 insertions, 97 deletions
diff --git a/.gitignore b/.gitignore
index 177df80..0f54241 100644
--- a/.gitignore
+++ b/.gitignore
@@ -71,9 +71,9 @@ core
*.tar.bz2
*.tar.gz
#
-# Add & Override patterns for xcmsdb
+# Add & Override patterns for xcmsdb
#
# Edit the following section as needed
# For example, !report.pc overrides *.pc. See 'man gitignore'
-#
+#
xcmsdb
diff --git a/Makefile.am b/Makefile.am
index 019a464..ddd531b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
-#
+#
# Copyright 2005 Red Hat, Inc.
-#
+#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
@@ -10,7 +10,7 @@
# specific, written prior permission. Red Hat makes no
# representations about the suitability of this software for any purpose. It
# is provided "as is" without express or implied warranty.
-#
+#
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
diff --git a/configure.ac b/configure.ac
index 85d709f..62dcec8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
dnl Copyright 2005 Red Hat, Inc.
-dnl
+dnl
dnl Permission to use, copy, modify, distribute, and sell this software and its
dnl documentation for any purpose is hereby granted without fee, provided that
dnl the above copyright notice appear in all copies and that both that
@@ -10,7 +10,7 @@ dnl advertising or publicity pertaining to distribution of the software without
dnl specific, written prior permission. Red Hat makes no
dnl representations about the suitability of this software for any purpose. It
dnl is provided "as is" without express or implied warranty.
-dnl
+dnl
dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
diff --git a/loadData.c b/loadData.c
index defcb40..6255378 100644
--- a/loadData.c
+++ b/loadData.c
@@ -27,7 +27,7 @@
* DESCRIPTION
* TekCMS API routine that reads screen data from a file
* and then loads the data on the root window of the screen.
- *
+ *
*
*
*/
@@ -294,8 +294,8 @@ SCScrnClassStringOf(int id)
/* close the stream and return any memory allocated. */
/*ARGSUSED*/
-static void
-closeS(FILE *stream, XDCCC_Correction *pCorrection)
+static void
+closeS(FILE *stream, XDCCC_Correction *pCorrection)
{
XDCCC_Correction* pNext;
if (stream) {
@@ -342,14 +342,14 @@ ProcessColorimetric(FILE *stream, XDCCC_Matrix *pMatrix, int VisualFlag)
switch (SCKeyOf(keyword)) {
case XYZTORGBMAT_BEGIN :
if (VisualFlag != VIDEO_RGB) {
- fprintf(stderr,
+ fprintf(stderr,
"Line %d: Keyword XYZTORGBMAT_BEGIN mismatch for visual %s.\n",
linenum, SCScrnClassStringOf(VisualFlag));
return (0);
}
if (state != 0) {
fprintf(stderr,
- "Line %d: Extraneous keyword %s.\n",
+ "Line %d: Extraneous keyword %s.\n",
linenum, keyword);
return (0);
}
@@ -359,14 +359,14 @@ ProcessColorimetric(FILE *stream, XDCCC_Matrix *pMatrix, int VisualFlag)
break;
case XYZTORGBMAT_END :
if (VisualFlag != VIDEO_RGB) {
- fprintf(stderr,
+ fprintf(stderr,
"Line %d: Keyword XYZTORGBMAT_END mismatch for visual %s.\n",
linenum, SCScrnClassStringOf(VisualFlag));
return (0);
}
if ((state != 1) || (count != 9)) {
fprintf(stderr,
- "Line %d: Incomplete XYZtoRGB matrix -- Premature %s\n",
+ "Line %d: Incomplete XYZtoRGB matrix -- Premature %s\n",
linenum, keyword);
return (0);
}
@@ -385,7 +385,7 @@ ProcessColorimetric(FILE *stream, XDCCC_Matrix *pMatrix, int VisualFlag)
return (0);
}
if (state != 0) {
- fprintf(stderr, "Line %d: Extraneous keyword %s.\n",
+ fprintf(stderr, "Line %d: Extraneous keyword %s.\n",
linenum, keyword);
return (0);
}
@@ -395,14 +395,14 @@ ProcessColorimetric(FILE *stream, XDCCC_Matrix *pMatrix, int VisualFlag)
break;
case RGBTOXYZMAT_END :
if (VisualFlag != VIDEO_RGB) {
- fprintf(stderr,
+ fprintf(stderr,
"Line %d: Keyword RGBTOXYZMAT_END mismatch for visual %s.\n",
linenum, SCScrnClassStringOf(VisualFlag));
return (0);
}
if ((state != 1) || (count != 9)) {
- fprintf(stderr,
- "Line %d: Incomplete RGBtoXYZ matrix -- Premature %s\n",
+ fprintf(stderr,
+ "Line %d: Incomplete RGBtoXYZ matrix -- Premature %s\n",
linenum, keyword);
return (0);
}
@@ -423,7 +423,7 @@ ProcessColorimetric(FILE *stream, XDCCC_Matrix *pMatrix, int VisualFlag)
}
if (state != 0) {
fprintf(stderr,
- "Line %d: Extraneous keyword %s.\n",
+ "Line %d: Extraneous keyword %s.\n",
linenum, keyword);
return (0);
}
@@ -440,7 +440,7 @@ ProcessColorimetric(FILE *stream, XDCCC_Matrix *pMatrix, int VisualFlag)
}
if ((state != 1) || (count != 3)) {
fprintf(stderr,
- "Line %d: Incomplete white point -- Premature %s\n",
+ "Line %d: Incomplete white point -- Premature %s\n",
linenum, keyword);
return (0);
}
@@ -453,7 +453,7 @@ ProcessColorimetric(FILE *stream, XDCCC_Matrix *pMatrix, int VisualFlag)
if (sscanf(ptoken, "%lf", pElement) != 1) {
if (VisualFlag == VIDEO_RGB) {
fprintf(stderr,
- "Line %d: Invalid matrix value %s.",
+ "Line %d: Invalid matrix value %s.",
linenum, ptoken);
} else {
fprintf(stderr,
@@ -466,7 +466,7 @@ ProcessColorimetric(FILE *stream, XDCCC_Matrix *pMatrix, int VisualFlag)
if (VisualFlag == VIDEO_RGB) {
if (++count > 9) {
fprintf(stderr,
- "Line %d: Extra matrix value %s\n",
+ "Line %d: Extra matrix value %s\n",
linenum, ptoken);
return (0);
}
@@ -481,8 +481,8 @@ ProcessColorimetric(FILE *stream, XDCCC_Matrix *pMatrix, int VisualFlag)
}
break;
case COLORIMETRIC_BEGIN :
- fprintf(stderr,
- "Line %d: Extraneous keyword %s.\n",
+ fprintf(stderr,
+ "Line %d: Extraneous keyword %s.\n",
linenum, keyword);
return (0);
case COLORIMETRIC_END :
@@ -533,7 +533,7 @@ ProcessIProfile(FILE *stream, XDCCC_Correction *pCorrection)
switch (SCKeyOf(keyword)) {
case ITBL_BEGIN :
if (state != 0) {
- fprintf(stderr,"Line %d: unexpected keyword %s\n",
+ fprintf(stderr,"Line %d: unexpected keyword %s\n",
linenum, keyword);
return (0);
}
@@ -554,7 +554,7 @@ ProcessIProfile(FILE *stream, XDCCC_Correction *pCorrection)
}
if (strcmp(tableStr, "GREEN") == 0) {
if (pCorrection->nTables != 3) {
- fprintf(stderr,"Line %d: incorrect number of tables\n",
+ fprintf(stderr,"Line %d: incorrect number of tables\n",
linenum);
return (0);
}
@@ -608,7 +608,7 @@ ProcessIProfile(FILE *stream, XDCCC_Correction *pCorrection)
return (0);
}
pCorrection->pRedTbl->nEntries = size;
- pCorrection->pRedTbl->pBase =
+ pCorrection->pRedTbl->pBase =
(IntensityRec *) calloc (size, sizeof(IntensityRec));
if (!pCorrection->pRedTbl->pBase) {
fprintf(stderr,
@@ -638,14 +638,14 @@ ProcessIProfile(FILE *stream, XDCCC_Correction *pCorrection)
}
do {
/********************************************************
- * Note: tableType should only be 0 or 1 at this point.
+ * Note: tableType should only be 0 or 1 at this point.
* 0 indicates value and intensity stored.
- * 1 indicates only intensity stored.
+ * 1 indicates only intensity stored.
********************************************************/
if (pCorrection->tableType) {
if (sscanf(ptoken, "%lf", &pIRec->intensity) != 1) {
fprintf(stderr,
- "Line %d: invalid Intensity Profile value %s\n",
+ "Line %d: invalid Intensity Profile value %s\n",
linenum, ptoken);
return (0);
}
@@ -686,7 +686,7 @@ ProcessIProfile(FILE *stream, XDCCC_Correction *pCorrection)
} while(ptoken != NULL);
break;
case IPROFILE_BEGIN :
- fprintf(stderr,"Line %d: extraneous keyword %s\n",
+ fprintf(stderr,"Line %d: extraneous keyword %s\n",
linenum, keyword);
return (0);
case IPROFILE_END :
@@ -835,13 +835,13 @@ LoadMatrix(Display *pDpy, Window root, XDCCC_Matrix *pMatrix)
*pCard32++ = (unsigned long) (*pValue++ * (XcmsFloat) XDCCC_NUMBER);
}
MatricesAtom = XInternAtom (pDpy, XDCCC_MATRIX_ATOM_NAME, False);
- XChangeProperty (pDpy, root, MatricesAtom, XA_INTEGER, 32,
+ XChangeProperty (pDpy, root, MatricesAtom, XA_INTEGER, 32,
PropModeReplace, (unsigned char *)Card32Array, 18);
}
static int
-LoadCorrections(Display *pDpy, Window root, XDCCC_Correction *pCorrection,
+LoadCorrections(Display *pDpy, Window root, XDCCC_Correction *pCorrection,
int targetFormat)
{
unsigned char *pCard8;
@@ -914,13 +914,13 @@ LoadCorrections(Display *pDpy, Window root, XDCCC_Correction *pCorrection,
} else {
PutTableType1Card8(pCorrection->pRedTbl, &pCard8);
}
- XChangeProperty (pDpy, root, CorrectAtom, XA_INTEGER, 8,
+ XChangeProperty (pDpy, root, CorrectAtom, XA_INTEGER, 8,
i ? PropModeAppend : PropModeReplace,
(unsigned char *)pCard8Array, total);
free(pCard8Array);
break;
case 16:
- total = 5 + (pCorrection->pRedTbl->nEntries *
+ total = 5 + (pCorrection->pRedTbl->nEntries *
(pCorrection->tableType == 0 ? 2 : 1));
if ((pCard16 = pCard16Array = (unsigned short *) calloc (total,
sizeof (unsigned short))) == NULL) {
@@ -936,13 +936,13 @@ LoadCorrections(Display *pDpy, Window root, XDCCC_Correction *pCorrection,
} else {
PutTableType1Card16(pCorrection->pRedTbl, &pCard16);
}
- XChangeProperty (pDpy, root, CorrectAtom, XA_INTEGER, 16,
+ XChangeProperty (pDpy, root, CorrectAtom, XA_INTEGER, 16,
i ? PropModeAppend : PropModeReplace,
(unsigned char *)pCard16Array, total);
free(pCard16Array);
break;
case 32:
- total = 4 + (pCorrection->pRedTbl->nEntries *
+ total = 4 + (pCorrection->pRedTbl->nEntries *
(pCorrection->tableType == 0 ? 2 : 1));
if ((pCard32 = pCard32Array =
(unsigned long *) calloc (total,
@@ -958,7 +958,7 @@ LoadCorrections(Display *pDpy, Window root, XDCCC_Correction *pCorrection,
} else {
PutTableType1Card32(pCorrection->pRedTbl, &pCard32);
}
- XChangeProperty (pDpy, root, CorrectAtom, XA_INTEGER, 32,
+ XChangeProperty (pDpy, root, CorrectAtom, XA_INTEGER, 32,
i ? PropModeAppend : PropModeReplace,
(unsigned char *)pCard32Array, total);
free(pCard32Array);
@@ -1011,7 +1011,7 @@ LoadCorrections(Display *pDpy, Window root, XDCCC_Correction *pCorrection,
PutTableType1Card8(pCorrection->pGreenTbl, &pCard8);
PutTableType1Card8(pCorrection->pBlueTbl, &pCard8);
}
- XChangeProperty (pDpy, root, CorrectAtom, XA_INTEGER, 8,
+ XChangeProperty (pDpy, root, CorrectAtom, XA_INTEGER, 8,
i ? PropModeAppend : PropModeReplace,
(unsigned char *)pCard8Array, total);
free(pCard8Array);
@@ -1040,7 +1040,7 @@ LoadCorrections(Display *pDpy, Window root, XDCCC_Correction *pCorrection,
PutTableType1Card16(pCorrection->pGreenTbl, &pCard16);
PutTableType1Card16(pCorrection->pBlueTbl, &pCard16);
}
- XChangeProperty (pDpy, root, CorrectAtom, XA_INTEGER, 16,
+ XChangeProperty (pDpy, root, CorrectAtom, XA_INTEGER, 16,
i ? PropModeAppend : PropModeReplace,
(unsigned char *)pCard16Array, total);
free(pCard16Array);
@@ -1068,7 +1068,7 @@ LoadCorrections(Display *pDpy, Window root, XDCCC_Correction *pCorrection,
PutTableType1Card32(pCorrection->pGreenTbl, &pCard32);
PutTableType1Card32(pCorrection->pBlueTbl, &pCard32);
}
- XChangeProperty (pDpy, root, CorrectAtom, XA_INTEGER, 32,
+ XChangeProperty (pDpy, root, CorrectAtom, XA_INTEGER, 32,
i ? PropModeAppend : PropModeReplace,
(unsigned char *)pCard32Array, total);
free(pCard32Array);
@@ -1091,7 +1091,7 @@ LoadCorrections(Display *pDpy, Window root, XDCCC_Correction *pCorrection,
#ifdef GRAY
static int
-LoadDataGray(Display *pDpy, window root, int tableType,
+LoadDataGray(Display *pDpy, window root, int tableType,
LINEAR_RGB_SCCData *pScreenData, int targetFormat)
{
unsigned char *ret_prop;
@@ -1117,15 +1117,15 @@ LoadDataGray(Display *pDpy, window root, int tableType,
*pCard32++ = (unsigned long) (*pValue++ * (XcmsFloat) XDCCC_NUMBER);
}
MatricesAtom = XInternAtom (pDpy,XDCCC_SCREENWHITEPT_ATOM_NAME,False);
- XChangeProperty (pDpy, root, MatricesAtom, XA_INTEGER, 32,
+ XChangeProperty (pDpy, root, MatricesAtom, XA_INTEGER, 32,
PropModeReplace, (unsigned char *)Card32Array, 3);
/* Now store the XDCCC_GRAY_CORRECTION */
CorrectAtom = XInternAtom (pDpy, XDCCC_GRAY_CORRECT_ATOM_NAME, False);
if (tableType == CORR_TYPE_NONE) {
- XGetWindowProperty (pDpy, root, CorrectAtom,
- 0, 5, False, XA_INTEGER,
+ XGetWindowProperty (pDpy, root, CorrectAtom,
+ 0, 5, False, XA_INTEGER,
&ret_atom, &ret_format, &ret_len, &ret_after,
&ret_prop);
if (ret_format != 0) {
@@ -1158,7 +1158,7 @@ LoadDataGray(Display *pDpy, window root, int tableType,
} else { /* tableType == 1 */
PutTableType1Card8(pScreenData->pRedTbl, &pCard8);
}
- XChangeProperty (pDpy, root, CorrectAtom, XA_INTEGER, 8,
+ XChangeProperty (pDpy, root, CorrectAtom, XA_INTEGER, 8,
PropModeReplace, (unsigned char *)pCard8Array,
total);
free (pCard8Array);
@@ -1179,7 +1179,7 @@ LoadDataGray(Display *pDpy, window root, int tableType,
} else { /* tableType == 1 */
PutTableType1Card16(pScreenData->pRedTbl, &pCard16);
}
- XChangeProperty (pDpy, root, CorrectAtom, XA_INTEGER, 16,
+ XChangeProperty (pDpy, root, CorrectAtom, XA_INTEGER, 16,
PropModeReplace, (unsigned char *)pCard16Array,
total);
free (pCard16Array);
@@ -1199,7 +1199,7 @@ LoadDataGray(Display *pDpy, window root, int tableType,
} else { /* tableType == 1 */
PutTableType1Card32(pScreenData->pRedTbl, &pCard32);
}
- XChangeProperty (pDpy, root, CorrectAtom, XA_INTEGER, 32,
+ XChangeProperty (pDpy, root, CorrectAtom, XA_INTEGER, 32,
PropModeReplace, (unsigned char *)pCard32Array,
total);
free (pCard32Array);
@@ -1295,7 +1295,7 @@ ParseVisualOptions(Display *pDpy, XDCCC_Correction *pCorrection, char *pbuf)
"Line %d: invalid depth specified, %s\n",
linenum, value);
return (0);
- }
+ }
pCorrection->visual_info_mask |= VisualDepthMask;
break;
case KEY_CLASS:
@@ -1357,7 +1357,7 @@ ParseVisualOptions(Display *pDpy, XDCCC_Correction *pCorrection, char *pbuf)
"Line %d: invalid colormap_size specified -- %s\n",
linenum, value);
return (0);
- }
+ }
pCorrection->visual_info_mask |= VisualColormapSizeMask;
break;
case KEY_BITS_PER_RGB:
@@ -1366,7 +1366,7 @@ ParseVisualOptions(Display *pDpy, XDCCC_Correction *pCorrection, char *pbuf)
"Line %d: invalid bits_per_rgb specified -- %s\n",
linenum, value);
return (0);
- }
+ }
pCorrection->visual_info_mask |= VisualBitsPerRGBMask;
break;
default:
@@ -1396,7 +1396,7 @@ ParseVisualOptions(Display *pDpy, XDCCC_Correction *pCorrection, char *pbuf)
memcpy((char*)&pCorrection->visual_info, (char*)vinfo,
sizeof(XVisualInfo));
return (1);
-}
+}
/************************************************************************
@@ -1425,7 +1425,7 @@ LoadSCCData(Display *pDpy, int screenNumber, const char *filename,
* Returns 0 if failed; otherwise 1.
*
*/
-{
+{
FILE *stream;
char *pStr;
char buf[BUFSIZ];
@@ -1461,7 +1461,7 @@ LoadSCCData(Display *pDpy, int screenNumber, const char *filename,
}
/*
- * Advance to starting keyword
+ * Advance to starting keyword
* Anything before this keyword is just treated as comments.
*/
@@ -1514,7 +1514,7 @@ LoadSCCData(Display *pDpy, int screenNumber, const char *filename,
screenNumber = atoi(token2);
if (screenNumber < 0) {
- fprintf(stderr,"Invalid Screen Number %d\n",
+ fprintf(stderr,"Invalid Screen Number %d\n",
screenNumber);
}
else {
@@ -1533,7 +1533,7 @@ LoadSCCData(Display *pDpy, int screenNumber, const char *filename,
closeS (stream, CorrectionHead);
return (0);
}
- if (!ProcessColorimetric(stream,
+ if (!ProcessColorimetric(stream,
&matrix, VisualFlag)) {
closeS (stream, CorrectionHead);
return (0);
@@ -1571,7 +1571,7 @@ LoadSCCData(Display *pDpy, int screenNumber, const char *filename,
linenum, buf);
closeS (stream, CorrectionHead);
return (0);
- }
+ }
if ((VisualFlag == VIDEO_RGB) && (token2 == (char *)NULL)) {
fprintf(stderr,
@@ -1599,7 +1599,7 @@ LoadSCCData(Display *pDpy, int screenNumber, const char *filename,
if (token3 != (char*)NULL) {
if (!ParseVisualOptions(pDpy, pCurrent, token3)) {
goto ByPassThisIProfile;
- }
+ }
}
switch (pCurrent->nTables) {
@@ -1686,7 +1686,7 @@ IProfileProcessed:
case SC_END :
if (!(state & 0x02)) {
fprintf(stderr,
- "File %s is missing Colorimetric data.\n",
+ "File %s is missing Colorimetric data.\n",
filename);
closeS (stream, CorrectionHead);
return (0);
@@ -1718,7 +1718,7 @@ IProfileProcessed:
return (1);
default :
- fprintf(stderr,"Line %d: extraneous keyword %s\n",
+ fprintf(stderr,"Line %d: extraneous keyword %s\n",
linenum, keyword);
closeS (stream, CorrectionHead);
return (0);
diff --git a/xcmsdb.c b/xcmsdb.c
index b1ec2ce..ab5cb66 100644
--- a/xcmsdb.c
+++ b/xcmsdb.c
@@ -25,7 +25,7 @@
* xcmsdb.c
*
* DESCRIPTION
- * Program to load, query or remove the Screen Color
+ * Program to load, query or remove the Screen Color
* Characterization Data from the root window of the screen.
*
*/
@@ -50,10 +50,10 @@
static void QuerySCCDataRGB(Display *dpy, Window root);
static void RemoveSCCData(Display *dpy, Window root, int colorFlag);
-static unsigned long _XcmsGetElement(int format, char **pValue,
+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,
+static int _XcmsGetProperty(Display *pDpy, Window w, Atom property,
+ int *pFormat, unsigned long *pNItems,
unsigned long *pNBytes, char **pValue);
@@ -62,7 +62,7 @@ static char *ProgramName;
static void
Syntax (int exitcode)
{
- fprintf (stderr,
+ fprintf (stderr,
"usage: %s [-options ...] [filename]\n\n%s",
ProgramName,
"where options include:\n"
@@ -86,7 +86,7 @@ MissingArg (const char *option)
Syntax (1);
}
-static Bool
+static Bool
optionmatch(const char *opt, const char *arg, int minlen)
{
int arglen;
@@ -102,7 +102,7 @@ optionmatch(const char *opt, const char *arg, int minlen)
if (strncmp (opt, arg, arglen) == 0) {
return(True);
}
-
+
return(False);
}
@@ -172,7 +172,7 @@ main(int argc, char *argv[])
}
}
- /* Open display */
+ /* Open display */
if (!(dpy = XOpenDisplay (displayname))) {
fprintf (stderr, "%s: Can't open display '%s'\n",
ProgramName, XDisplayName(displayname));
@@ -373,7 +373,7 @@ QuerySCCDataRGB(Display *dpy, Window root)
}
return;
}
- }
+ }
if (MatricesAtom == None || !format) {
printf ("Could not find property %s\n", XDCCC_MATRIX_ATOM_NAME);
} else if (format != 32) {
@@ -387,7 +387,7 @@ QuerySCCDataRGB(Display *dpy, Window root)
for (i = 0; i < 3; i++) {
printf ("\t");
for (j = 0; j < 3; j++) {
- printf ("\t%8.5f",
+ printf ("\t%8.5f",
(long)_XcmsGetElement(format, &pChar, &nitems)
/ (XcmsFloat) XDCCC_NUMBER);
}
@@ -397,7 +397,7 @@ QuerySCCDataRGB(Display *dpy, Window root)
for (i = 0; i < 3; i++) {
printf ("\t");
for (j = 0; j < 3; j++) {
- printf ("\t%8.5f",
+ printf ("\t%8.5f",
(long) _XcmsGetElement(format, &pChar, &nitems)
/ (XcmsFloat) XDCCC_NUMBER);
}
@@ -491,7 +491,7 @@ QuerySCCDataRGB(Display *dpy, Window root)
visualID = _XcmsGetElement(format, &pChar, &nitems);
/* add the depth, class, and bits info in output */
vinfo_template.visualid = visualID;
- vinfo_ret = XGetVisualInfo(dpy, VisualIDMask, &vinfo_template,
+ vinfo_ret = XGetVisualInfo(dpy, VisualIDMask, &vinfo_template,
&nvis);
while (count--) {
visualID = visualID << format;
@@ -499,7 +499,7 @@ QuerySCCDataRGB(Display *dpy, Window root)
}
if (vinfo_ret != NULL) {
- printf
+ printf
("\n\tVisualID: 0x%lx class: %s depth: %d bits_per_rgb: %d\n",
visualID, visual_strings[vinfo_ret->class],
vinfo_ret->depth, vinfo_ret->bits_per_rgb);
@@ -538,9 +538,9 @@ QuerySCCDataRGB(Display *dpy, Window root)
default:
goto IntensityTblError;
}
- }
+ }
XFree (property_return);
- }
+ }
return;
IntensityTblError:
@@ -586,7 +586,7 @@ QuerySCCDataGray(Display *dpy, Window root)
}
return;
}
- }
+ }
if (MatricesAtom == None || !format) {
printf ("Could not find property %s\n", XDCCC_SCREENWHITEPT_ATOM_NAME);
} else {
@@ -595,8 +595,8 @@ QuerySCCDataGray(Display *dpy, Window root)
printf ("\tWhite Point XYZ :\n");
printf ("\t");
for (j = 0; j < 3; j++) {
- printf ("\t%8.5lf",
- (long) _XcmsGetElement(format, &pChar, &nitems) /
+ printf ("\t%8.5lf",
+ (long) _XcmsGetElement(format, &pChar, &nitems) /
(XcmsFloat) XDCCC_NUMBER);
}
printf ("\n");
@@ -702,9 +702,9 @@ QuerySCCDataGray(Display *dpy, Window root)
default:
goto IntensityTblError;
}
- }
+ }
XFree (property_return);
- }
+ }
return;
IntensityTblError:
XFree (property_return);
@@ -737,9 +737,9 @@ RemoveSCCData(Display *dpy, Window root, int colorFlag)
MatricesAtom = ParseAtom (dpy, XDCCC_MATRIX_ATOM_NAME, True);
if (MatricesAtom != None) {
XGetWindowProperty (dpy, root, MatricesAtom, 0, 8192, False,
- XA_INTEGER, &ret_atom, &ret_format, &ret_len,
+ XA_INTEGER, &ret_atom, &ret_format, &ret_len,
&ret_after, &ret_prop);
- }
+ }
if (MatricesAtom == None || !ret_format) {
printf ("Could not find property %s\n", XDCCC_MATRIX_ATOM_NAME);
} else {
@@ -750,8 +750,8 @@ RemoveSCCData(Display *dpy, Window root, int colorFlag)
CorrectAtom = XInternAtom (dpy, XDCCC_CORRECT_ATOM_NAME, True);
if (CorrectAtom != None) {
- XGetWindowProperty (dpy, root, CorrectAtom, 0, 8192, False,
- XA_INTEGER, &ret_atom, &ret_format, &ret_len,
+ XGetWindowProperty (dpy, root, CorrectAtom, 0, 8192, False,
+ XA_INTEGER, &ret_atom, &ret_format, &ret_len,
&ret_after, &ret_prop);
}
if (CorrectAtom == None || !ret_format) {
@@ -767,9 +767,9 @@ RemoveSCCData(Display *dpy, Window root, int colorFlag)
MatricesAtom = ParseAtom (dpy, XDCCC_SCREENWHITEPT_ATOM_NAME, True);
if (MatricesAtom != None) {
XGetWindowProperty (dpy, root, MatricesAtom, 0, 8192, False,
- XA_INTEGER, &ret_atom, &ret_format, &ret_len,
+ XA_INTEGER, &ret_atom, &ret_format, &ret_len,
&ret_after, &ret_prop);
- }
+ }
if (MatricesAtom == None || !ret_format) {
printf ("Could not find property %s\n", XDCCC_SCREENWHITEPT_ATOM_NAME);
} else {
@@ -780,8 +780,8 @@ RemoveSCCData(Display *dpy, Window root, int colorFlag)
CorrectAtom = XInternAtom (dpy, XDCCC_GRAY_CORRECT_ATOM_NAME, True);
if (CorrectAtom != None) {
- XGetWindowProperty (dpy, root, CorrectAtom, 0, 8192, False,
- XA_INTEGER, &ret_atom, &ret_format, &ret_len,
+ XGetWindowProperty (dpy, root, CorrectAtom, 0, 8192, False,
+ XA_INTEGER, &ret_atom, &ret_format, &ret_len,
&ret_after, &ret_prop);
}
if (CorrectAtom == None || !ret_format) {
@@ -796,7 +796,7 @@ RemoveSCCData(Display *dpy, Window root, int colorFlag)
}
static unsigned long
-_XcmsGetElement(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.
@@ -839,9 +839,9 @@ _XcmsGetElement(int format, char **pValue, unsigned long *pCount)
* SYNOPSIS
*/
static int
-_XcmsGetProperty(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
*
@@ -855,10 +855,10 @@ _XcmsGetProperty(Display *pDpy, Window w, Atom property, int *pFormat,
long len = 6516;
unsigned long nitems_ret, after_ret;
Atom atom_ret;
-
- while (XGetWindowProperty (pDpy, w, property, 0, len, False,
- XA_INTEGER, &atom_ret, &format_ret,
- &nitems_ret, &after_ret,
+
+ while (XGetWindowProperty (pDpy, w, property, 0, len, False,
+ XA_INTEGER, &atom_ret, &format_ret,
+ &nitems_ret, &after_ret,
(unsigned char **)&prop_ret)) {
if (after_ret > 0) {
len += nitems_ret * (format_ret >> 3);
@@ -867,7 +867,7 @@ _XcmsGetProperty(Display *pDpy, Window w, Atom property, int *pFormat,
break;
}
}
- if (format_ret == 0 || nitems_ret == 0) {
+ if (format_ret == 0 || nitems_ret == 0) {
/* the property does not exist or is of an unexpected type */
return(XcmsFailure);
}