summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:49:23 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:49:23 +0000
commit715762afbe9f4fc5ea908ee001d78b7711db3469 (patch)
tree2f0262fd67009cbbbe6e743cc8e7b6a4d25a1ba0
parent4ef09824a6edd2981de3aec61a9472232fd9e4b7 (diff)
-rw-r--r--xstdcmap.c49
-rw-r--r--xstdcmap.man9
2 files changed, 31 insertions, 27 deletions
diff --git a/xstdcmap.c b/xstdcmap.c
index 726b610..26c377b 100644
--- a/xstdcmap.c
+++ b/xstdcmap.c
@@ -26,8 +26,10 @@ in this Software without prior written authorization from The Open Group.
* *
* Author: Donna Converse, MIT X Consortium
*/
+/* $XFree86: xc/programs/xstdcmap/xstdcmap.c,v 1.8 2001/12/14 20:02:30 dawes Exp $ */
#include <stdio.h>
+#include <stdlib.h>
#include <X11/Xos.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -35,8 +37,6 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xatom.h>
#include <X11/Xmu/StdCmap.h>
-extern void exit();
-
#define REPLACE 1
#define DO_NOT_REPLACE 0
#define RETAIN 1
@@ -107,9 +107,10 @@ static XrmOptionDescRec optionTable[]=
};
#define NOPTIONS (sizeof optionTable / sizeof optionTable[0])
-static void parse(argc, argv)
- int argc;
- char **argv;
+static void usage(Status status);
+
+static void
+parse(int argc, char **argv)
{
XrmDatabase database = NULL;
char *type;
@@ -179,16 +180,16 @@ static void parse(argc, argv)
verbose++;
}
-Exit(status)
- Status status;
+static void
+Exit(Status status)
{
if (dpy)
XCloseDisplay(dpy);
exit(status);
}
-usage(status)
- Status status;
+static void
+usage(Status status)
{
register char **i;
(void) fprintf(stderr, "usage: %s [-options]\n\n", program_name);
@@ -201,10 +202,10 @@ usage(status)
/* Determine the visual of greatest depth in a given visual class.
* If no such visual exists, return NULL.
*/
-static XVisualInfo *getDeepestVisual(visual_class, vinfo, nvisuals)
- int visual_class; /* specifies the desired visual class */
- XVisualInfo *vinfo; /* specifies all visuals for a screen */
- int nvisuals; /* specifies number of visuals in the list */
+static XVisualInfo *
+getDeepestVisual(int visual_class, /* specifies the desired visual class */
+ XVisualInfo *vinfo, /* specifies all visuals for a screen */
+ int nvisuals) /* specifies number of visuals in the list */
{
register int i;
unsigned int maxdepth = 0;
@@ -222,10 +223,10 @@ static XVisualInfo *getDeepestVisual(visual_class, vinfo, nvisuals)
/* Determine the ``best'' visual of the screen for a standard colormap
* property. Return NULL if no visual is appropriate.
*/
-static XVisualInfo *getBestVisual(property, vinfo, nvisuals)
- Atom property; /* specifies the standard colormap */
- XVisualInfo *vinfo; /* specifies all visuals of the screen */
- int nvisuals; /* specifies number of visuals of screen */
+static XVisualInfo *
+getBestVisual(Atom property, /* specifies the standard colormap */
+ XVisualInfo *vinfo, /* specifies all visuals of the screen */
+ int nvisuals) /* specifies number of visuals of screen */
{
XVisualInfo *v1 = NULL, *v2 = NULL;
@@ -253,8 +254,8 @@ static XVisualInfo *getBestVisual(property, vinfo, nvisuals)
}
-static char *visualStringFromClass(class)
- int class;
+static char *
+visualStringFromClass(int class)
{
switch (class) {
case PseudoColor: return "PseudoColor";
@@ -267,10 +268,11 @@ static char *visualStringFromClass(class)
return "unknown visual class";
}
-static int doIndividualColormaps()
+static int
+doIndividualColormaps(void)
{
int i, screen, nvisuals;
- Status status;
+ Status status = -1;
XVisualInfo *vinfo = NULL, *v = NULL, template;
screen = DefaultScreen(dpy);
@@ -325,9 +327,8 @@ static int doIndividualColormaps()
}
/* Bare bones standard colormap generation utility */
-main(argc, argv)
- int argc;
- char **argv;
+int
+main(int argc, char *argv[])
{
Status status = 0;
diff --git a/xstdcmap.man b/xstdcmap.man
index 57219fe..09c045c 100644
--- a/xstdcmap.man
+++ b/xstdcmap.man
@@ -22,6 +22,9 @@
.\" not be used in advertising or otherwise to promote the sale, use or
.\" other dealings in this Software without prior written authorization
.\" from The Open Group.
+.\"
+.\" $XFree86: xc/programs/xstdcmap/xstdcmap.man,v 1.8 2001/12/14 20:02:30 dawes Exp $
+.\"
.de EX \"Begin example
.ne 5
.if n .sp 1
@@ -35,7 +38,7 @@
.if n .sp 1
.if t .sp .5
..
-.TH XSTDCMAP 1 "Release 6.4" "X Version 11"
+.TH XSTDCMAP 1 __xorgversion__
.SH NAME
xstdcmap - X standard colormap utility
.SH SYNOPSIS
@@ -76,7 +79,7 @@ all such properties, should be removed.
\fImap\fP may be one of: default, best, red, green, blue, gray, or all.
.TP 8
.B \-display \fIdisplay\fP
-This option specifies the host and display to use; see \fIX(1)\fP.
+This option specifies the host and display to use; see \fIX(__miscmansuffix__)\fP.
.TP 8
.B \-gray
This option indicates that the RGB_GRAY_MAP should be defined.
@@ -103,7 +106,7 @@ standard colormap properties.
.B DISPLAY
to get default host and display number.
.SH SEE ALSO
-X(1)
+X(__miscmansuffix__)
.SH AUTHOR
Donna Converse, MIT X Consortium