summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2008-06-05 20:13:35 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2008-06-05 20:13:35 -0700
commit2e8b928b2176a67a0d533748f385078ad8829cc3 (patch)
treee2cec8443ce9e46b763491c550cd3893b77af8b5
parentbd94a52404b0e23a61e6ca330b759fdd82a59996 (diff)
Include rgb(1) man page from Solaris
-rw-r--r--COPYING27
-rw-r--r--Makefile.am22
-rw-r--r--configure.ac5
-rw-r--r--rgb.man91
-rw-r--r--showrgb.man4
5 files changed, 137 insertions, 12 deletions
diff --git a/COPYING b/COPYING
index ffaa287..27a1bc0 100644
--- a/COPYING
+++ b/COPYING
@@ -21,3 +21,30 @@ Except as contained in this notice, the name of The Open Group shall
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.
+
+Copyright 1994, 2008 Sun Microsystems, Inc. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, and/or sell copies of the Software, and to permit persons
+to whom the Software is furnished to do so, provided that the above
+copyright notice(s) and this permission notice appear in all copies of
+the Software and that both the above copyright notice(s) and this
+permission notice appear in supporting documentation.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale, use
+or other dealings in this Software without prior written authorization
+of the copyright holder.
diff --git a/Makefile.am b/Makefile.am
index 9047b4f..c1a0892 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
@@ -27,13 +27,19 @@
#
-if RGB_TXT
bin_PROGRAMS = showrgb
-else
-bin_PROGRAMS = rgb showrgb
+
+showrgb_SOURCES = showrgb.c
+
+appman_PRE = showrgb.man
+
+if RGB_DB
+bin_PROGRAMS += rgb
rgb_SOURCES = rgb.c
+appman_PRE += rgb.man
+
$(RGB_DB_FILES): rgb rgb.txt
-rm -f $(RGB_DB_FILES)
./rgb rgb < $(srcdir)/rgb.txt
@@ -44,11 +50,6 @@ rgb_DATA = $(db_file).txt $(RGB_DB_FILES)
RGB_DB_DEFINES = -DRGB_DB=\"$(db_dir)/$(db_file)\"
AM_CFLAGS = $(RGB_CFLAGS) $(RGB_DB_DEFINES)
-showrgb_SOURCES = showrgb.c
-
-appman_PRE = \
- showrgb.man
-
EXTRA_DIST= \
rgb.txt \
others/README \
@@ -71,6 +72,9 @@ XORGRELSTRING = @PACKAGE_STRING@
MAN_SUBSTS = \
-e 's|__RGB_DB__|$(db_dir)/$(db_file)|' \
+ -e 's|__RGB_DB_DIR__|$(db_dir)|' \
+ -e 's|__RGB_DB_TYPE__|$(RGB_DB_TYPE)|' \
+ -e 's|__RGB_DB_FILES__|$(RGB_DB_FILES)|' \
-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xservername__|Xorg|g' \
diff --git a/configure.ac b/configure.ac
index 80c5872..2062269 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,6 +58,8 @@ AC_ARG_WITH([rgb-db-type],
[db_type=$withval], [db_type="text"])
AC_MSG_RESULT([$db_type])
+RGB_DB_TYPE=$db_type
+
case $db_type in
text)
RGB_DB_FILES=""
@@ -90,8 +92,9 @@ if test x$DBM_HEADER != x ; then
AC_DEFINE_UNQUOTED([DBM_HEADER], [$DBM_HEADER],
[Header file to include for dbm functions])
fi
+AC_SUBST([RGB_DB_TYPE])
AC_SUBST([RGB_DB_FILES])
-AM_CONDITIONAL(RGB_TXT, [test x$db_type = xtext])
+AM_CONDITIONAL(RGB_DB, [test x$db_type != xtext])
AC_SUBST(RGB_CFLAGS)
diff --git a/rgb.man b/rgb.man
new file mode 100644
index 0000000..f4b6329
--- /dev/null
+++ b/rgb.man
@@ -0,0 +1,91 @@
+.\" Copyright 1994, 2008 Sun Microsystems, Inc. All rights reserved.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, provided that the above
+.\" copyright notice(s) and this permission notice appear in all copies of
+.\" the Software and that both the above copyright notice(s) and this
+.\" permission notice appear in supporting documentation.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+.\" OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+.\" HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+.\" INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+.\" FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+.\" NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+.\" WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of a copyright holder
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" of the copyright holder.
+.\"
+.TH rgb __appmansuffix__ __xorgversion__
+.IX "rgb" "" "\f3rgb\fP(1) \(em build colorname database" ""
+.IX "color" "build" "color" "building the colorname database \(em \f3rgb\fP(1)" ""
+.SH NAME
+rgb \- build the color name database
+.SH SYNOPSIS
+.B rgb
+[
+.I dbname
+]
+.SH DESCRIPTION
+.B rgb
+reads from standard input lines of the form:
+.PP
+.nf
+.I
+ red\ \ green\ \ blue\ \ \ \ \ \ name
+.fi
+.PP
+where
+.I red
+/
+.I green
+/
+.I blue
+are decimal values between the range 0 to 255, and
+.I name
+is a description of the color.
+.B rgb
+then builds a color name database in
+.B __RGB_DB_TYPE__
+format. The color name database provides a mapping between ASCII color
+names and RGB color values. It is useful for increasing the
+portability of color programs. The input source for the database is
+in \fI__RGB_DB__.txt\fP. \fIrgb.txt\fP
+is compiled into the __RGB_DB_TYPE__ files
+.IR "__RGB_DB_FILES__" .
+When the server first starts up, it consults the contents of these
+files to build an internal representation of their contents. This
+internal representation is consulted to map color names to color
+values.
+.PP
+.B rgb
+uses the default color name database of \fI__RGB_DB__.txt\fP.
+.SH OPTIONS
+.IP "\fIdbname" 1i
+Color name database.
+.SH EXAMPLES
+example% rgb rgb < __RGB_DB__.txt
+.PP
+example% cat __RGB_DB__.txt
+.SH FILES
+.PD 0
+.TP 30
+.B __RGB_DB__.txt
+color name database source.
+Maps color names to RGB color values.
+.TP
+.B __RGB_DB_DIR__/__RGB_DB_FILES__
+__RGB_DB_TYPE__ files containing color name to RGB mapping.
+.PD
+.SH SEE ALSO
+.BR cat (1),
+.BR __RGB_DB_TYPE__ (3)
diff --git a/showrgb.man b/showrgb.man
index 9b910ff..9d07c0d 100644
--- a/showrgb.man
+++ b/showrgb.man
@@ -33,8 +33,8 @@ showrgb \- display an rgb color-name database
.SH DESCRIPTION
The
.I showrgb
-program reads an rgb color-name database from a text file or
-database and converts it back to source form, printing the
+program reads an rgb color-name database from a __RGB_DB_TYPE__ file
+and converts it back to source form, printing the
result to standard output. The default
database is the one that X was built with, and may be overridden on
the command line. Specify the database name without