summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Makholm <henning@makholm.net>2006-04-16 18:00:00 (EDT)
committer Julien Jorge <julien.jorge@stuff-o-matic.com>2013-01-10 16:07:28 (EST)
commit83d97406fa275882067cd256b36eb8c3273d42be (patch)
treef3b74be6a88d069739b33e20ca9f4d4f456d575f
parent27f6ea800cfd66b1024b0379aa1ac9631e799ee7 (diff)
downloadxcftools-83d97406fa275882067cd256b36eb8c3273d42be.zip
xcftools-83d97406fa275882067cd256b36eb8c3273d42be.tar.gz
xcftools-83d97406fa275882067cd256b36eb8c3273d42be.tar.bz2
Import of release 1.0.3
-rw-r--r--ChangeLog6
-rwxr-xr-xconfigure18
-rw-r--r--configure.ac2
-rw-r--r--manpo/da.po105
-rw-r--r--manpo/manpages.pot99
-rw-r--r--options.i55
-rw-r--r--po/da.po22
-rw-r--r--po/xcftools.pot18
-rwxr-xr-xtest/dotest7
-rw-r--r--xcf2png.104
-rw-r--r--xcf2pnm.104
11 files changed, 192 insertions, 148 deletions
diff --git a/ChangeLog b/ChangeLog
index f6aed85..dd0c911 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-04-17 Henning Makholm <henning@makholm.net>
+
+ * Version 1.0.3
+ * Also look for color name database in other locations than
+ /usr/lib/X11, in an attempty to be X11R7 friendly
+
2006-02-22 Henning Makholm <henning@makholm.net>
* Version 1.0.2
diff --git a/configure b/configure
index 300ac3b..3454d07 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for Xcftools 1.0.2.
+# Generated by GNU Autoconf 2.59 for Xcftools 1.0.3.
#
# Report bugs to <henning@makholm.net>.
#
@@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='Xcftools'
PACKAGE_TARNAME='xcftools'
-PACKAGE_VERSION='1.0.2'
-PACKAGE_STRING='Xcftools 1.0.2'
+PACKAGE_VERSION='1.0.3'
+PACKAGE_STRING='Xcftools 1.0.3'
PACKAGE_BUGREPORT='henning@makholm.net'
ac_unique_file="xcfinfo.c"
@@ -780,7 +780,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures Xcftools 1.0.2 to adapt to many kinds of systems.
+\`configure' configures Xcftools 1.0.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -846,7 +846,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Xcftools 1.0.2:";;
+ short | recursive ) echo "Configuration of Xcftools 1.0.3:";;
esac
cat <<\_ACEOF
@@ -976,7 +976,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-Xcftools configure 1.0.2
+Xcftools configure 1.0.3
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -990,7 +990,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by Xcftools $as_me 1.0.2, which was
+It was created by Xcftools $as_me 1.0.3, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -6464,7 +6464,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
-This file was extended by Xcftools $as_me 1.0.2, which was
+This file was extended by Xcftools $as_me 1.0.3, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -6527,7 +6527,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-Xcftools config.status 1.0.2
+Xcftools config.status 1.0.3
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/configure.ac b/configure.ac
index 979a256..1a74cd8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
dnl
dnl ------------------------
dnl The following line is the MASTER SOURCE for the version number
-AC_INIT(Xcftools,1.0.2,henning@makholm.net,xcftools)
+AC_INIT(Xcftools,1.0.3,henning@makholm.net,xcftools)
AC_CONFIG_SRCDIR(xcfinfo.c)
AC_PROG_INSTALL
diff --git a/manpo/da.po b/manpo/da.po
index f613c3c..d381e68 100644
--- a/manpo/da.po
+++ b/manpo/da.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Xcftools 0.9.1a\n"
"Report-Msgid-Bugs-To: henning@makholm.net\n"
-"POT-Creation-Date: 2006-02-22 01:46+0100\n"
-"PO-Revision-Date: 2006-02-22 01:48+0100\n"
+"POT-Creation-Date: 2006-04-17 04:07+0200\n"
+"PO-Revision-Date: 2006-04-17 04:09+0200\n"
"Last-Translator: Henning Makholm <henning@makholm.net>\n"
"Language-Team: None; proof-of-concept translation by upstream author\n"
"MIME-Version: 1.0\n"
@@ -122,14 +122,15 @@ msgstr "Giv gennemsigtige partier af billedet denne farve."
#: options.i:110
msgid ""
"The color can be given as B{#rrggbb} or B{#rgb} hexadecimal\n"
-"values, or as an X11 color name that will be looked up in\n"
-"B{/usr/lib/X11/rgb.txt}."
+"values, or as an X11 color name (which will only work if a color\n"
+"name database can be found in one of a number of standard\n"
+"locations)."
msgstr ""
"Baggrundsfarven kan angives hexadecimalt som B{#rrggbb} eller\n"
-"B{#rgb}, eller med et X11-farvenavn som slås op i\n"
-"B{/usr/lib/X11/rgb.txt}."
+"B{#rgb}, eller med et X11-farvenavn (sidstnævnte virker kun\n"
+"hvis der kan findes en database med farvenavne i en standardplacering)."
-#: options.i:169
+#: options.i:180
msgid ""
"Invent a trivial alpha channel even if the flattened image is\n"
"completely opaque."
@@ -137,7 +138,7 @@ msgstr ""
"Konstruér en triviel gennemsigtighedskanal selvom billedet er\n"
"fuldstændig ugennemsigtigt."
-#: options.i:176
+#: options.i:187
msgid ""
"Force the output to use RGB color space even if it there are more\n"
"compact alternatives."
@@ -145,7 +146,7 @@ msgstr ""
"Brug RGB-format for uddata selvom der er mere kompakte\n"
"alternative formater."
-#: options.i:179
+#: options.i:190
msgid ""
"This will be selected automatically if the output file's name\n"
"ends with B{.ppm}."
@@ -153,27 +154,27 @@ msgstr ""
"Dette bliver valgt automatisk hvis uddatafilens navn ender\n"
"på B{.ppm}."
-#: options.i:188
+#: options.i:199
msgid ""
"Force the output to be a grayscale image even if it may be\n"
"monochrome."
msgstr "Repræsentér uddata som gråtoner selv hvis det er rent sort/hvidt."
-#: options.i:189
+#: options.i:200
msgid "If any colored pixels are encountered, exit with status 103."
msgstr "Stop med afslutningskode 103 hvis der mødes nogen farvede pixels."
-#: options.i:190
+#: options.i:201
msgid ""
"This will be selected automatically if the output file's name\n"
"ends with B{.pgm}."
msgstr "Dette bliver valgt automatisk hvis uddatafilens navn ender på B{.pgm}."
-#: options.i:199
+#: options.i:210
msgid "Force the output to be a monochrome image."
msgstr "Repræsentér uddata som et rent sort/hvidt billede."
-#: options.i:200
+#: options.i:211
msgid ""
"If any colors except black and white are encountered, exit with\n"
"status 103."
@@ -181,13 +182,13 @@ msgstr ""
"Stop med afslutningskode 103 hvis ikke alle pixels er enten sorte\n"
"eller hvide."
-#: options.i:202
+#: options.i:213
msgid ""
"This will be selected automatically if the output file's name\n"
"ends with B{.pbm}."
msgstr "Dette bliver valgt automatisk hvis uddatafilens navn ender på B{.pbm}."
-#: options.i:212
+#: options.i:223
msgid ""
"Suppress the automatic choice of B{-c}, B{-g}, or B{-m} based on\n"
"output filename, and instead select the output format based on\n"
@@ -197,7 +198,7 @@ msgstr ""
"B{-c}, B{-g} og B{-m}, og vælg i stedet et uddataformat på\n"
"grundlag af billedets indhold."
-#: options.i:219
+#: options.i:230
msgid ""
"This is the default if the filename is not recognized, and when\n"
"writing to stdout."
@@ -205,11 +206,11 @@ msgstr ""
"Dette er standardfremgangsmåden hvis filnavnet ikke kan genkendes,\n"
"og når billedet bliver skrevet til standarduddata."
-#: options.i:227
+#: options.i:238
msgid "Use standard RGB compositing for flattening indexed layers."
msgstr "Brug fuldt RGB-farverum til at fladgøre indekserede billeder."
-#: options.i:228
+#: options.i:239
msgid ""
"Without this option, B{%s} will mimic the Gimp's current strategy\n"
"of rounding each alpha value to either full transparency or full\n"
@@ -220,7 +221,7 @@ msgstr ""
"\"helt gennemsigtig\" eller \"helt ugennemsigtig\", og fortolke alle\n"
"lagtilstande som B{Normal}."
-#: options.i:239
+#: options.i:250
msgid ""
"Assert that the flattened image will have no partial transparency\n"
"(allowing a more compact representation of the alpha output)."
@@ -229,7 +230,7 @@ msgstr ""
"(hvilket muliggør en effektivere repræsentation af gennemsigtighed\n"
"i uddata)."
-#: options.i:241
+#: options.i:252
msgid ""
"Exit with status 102 if the flattened image has any partial\n"
"transparency."
@@ -237,7 +238,7 @@ msgstr ""
"Stop med afslutningskode 102 hvis der alligevel findes nogen\n"
"delvist gennemsigtige pixels."
-#: options.i:243
+#: options.i:254
msgid ""
"If B{-b} is also given, this tests whether there there is partial\n"
"transparency before applying the background color."
@@ -245,7 +246,7 @@ msgstr ""
"Hvis B{-b}-flaget også gives, handler denne test om om der er\n"
"delvist gennemsigtige pixels I{over} den angivne baggrund."
-#: options.i:252
+#: options.i:263
msgid ""
"Do a \"dissolve\" step to eliminate partial transparency after\n"
"flattening."
@@ -253,13 +254,13 @@ msgstr ""
"Foretag et \"opløs\"-skridt for at udrydde delvis gennemsigtighed\n"
"i det fladgjorte billede."
-#: options.i:254
+#: options.i:265
msgid ""
"If B{-b} is also given, this happens before the background color\n"
"is applied."
msgstr "Hvis B{-b}-flaget også gives, sker dette før baggrundsfarven påføres."
-#: options.i:262
+#: options.i:273
msgid ""
"First flatten the entire image to a memory buffer before writing\n"
"output. Then analyse the image to decide on the details of the\n"
@@ -269,7 +270,7 @@ msgstr ""
"før detaljerne i uddataformatet bliver besluttet (fx om gråtoner\n"
"er tilstrækkeligt til at repræsentere billeder)."
-#: options.i:265
+#: options.i:276
msgid ""
"Without this option, the program flattens only a singe row of\n"
"\"tiles\" (height 64) at a time."
@@ -277,19 +278,19 @@ msgstr ""
"Hvis dette flag ikke gives, vil programmet nøjes med at fladgøre\n"
"en enkelt række \"fliser\" (af højden 64 pixels) ad gangen."
-#: options.i:272
+#: options.i:283
msgid "wB{x}h"
msgstr "bB{x}h"
-#: options.i:272
+#: options.i:283
msgid "Crop the converted image to width I{w} and height I{h}."
msgstr "Beskær det konverterede billede til bredde I{b} og højde I{b}."
-#: options.i:289
+#: options.i:300
msgid "xB{,}y"
msgstr "xB{,}y"
-#: options.i:289
+#: options.i:300
msgid ""
"Offset the converted part of the image from the top-left corner\n"
"of the XCF canvas. Usually used with B{-S}."
@@ -297,7 +298,7 @@ msgstr ""
"Forskyd det konverterede billede fra det øverste venstre\n"
"hjørne af XCF-lærredet. Bruges normalt sammen med B{-S}."
-#: options.i:308
+#: options.i:319
msgid ""
"Crop and offset the converted part of the image to just include\n"
"the boundaries of the visible (or selected) layers."
@@ -305,7 +306,7 @@ msgstr ""
"Skær det konvertede billede til så det netop dækker alle de synlige\n"
"(eller valgte) lag."
-#: options.i:310
+#: options.i:321
msgid ""
"(Note that the I{contents} of the layers is not taken into\n"
"account when autocropping)."
@@ -313,25 +314,25 @@ msgstr ""
"(Bemærk at tilskæringen ikke tager hensyn til\n"
"I{indholdet} af lagene)."
-#: options.i:314
+#: options.i:325
msgid ""
"In the absence of options that specify otherwise, the converted\n"
"image will cover the entire XCF canvas."
msgstr "Normalt vil det konverterede område være det samme som XCF-lærredet."
-#: options.i:325
+#: options.i:336
msgid "mode"
msgstr "tilstand"
-#: options.i:325
+#: options.i:336
msgid "Set the layer mode (e.g., B{Normal} or B{Multiply})."
msgstr "Vælg lagtilstanden (fx B{Normal} eller B{LægTil})."
-#: options.i:348 options.i:362
+#: options.i:359 options.i:373
msgid "n"
msgstr "n"
-#: options.i:348
+#: options.i:359
msgid ""
"Set the opacity on a scale from 0 to 100 (as in the Gimp user\n"
"interface)."
@@ -339,21 +340,21 @@ msgstr ""
"Vælg gennemsigtighed på en skala fra 0 (helt gennemsigtigt)\n"
"til 100 (helt ugennemsigtig)."
-#: options.i:362
+#: options.i:373
msgid "Set the opacity on a scale from 0 to 255 (as used internally)"
msgstr ""
"Vælg gennemsigtighed på en skala fra 0 (helt gennemsigtigt)\n"
"til 255 (helt ugennemsigtig)."
-#: options.i:376
+#: options.i:387
msgid "Enable the layer mask."
msgstr "Aktivér lagmasken."
-#: options.i:382
+#: options.i:393
msgid "Disable the layer mask."
msgstr "Deaktivér lagmasken."
-#: options.i:392
+#: options.i:403
msgid ""
"Use the raw UTF-8 representation from the XCF file to compare and\n"
"display layer names."
@@ -361,7 +362,7 @@ msgstr ""
"Brug den rå UTF-8-repræsentation fra XCF-filen til at sammenligne\n"
"og vise lagnavne."
-#: options.i:394
+#: options.i:405
msgid ""
"Ordinarily, layer names will be converted to the character set of\n"
"the current locale."
@@ -493,17 +494,17 @@ msgstr "5)"
msgid "The name of the layer."
msgstr "Lagets navn."
-#: xcfinfo.10:77 xcf2pnm.10:127 xcf2png.10:106 xcfview.10:54
+#: xcfinfo.10:77 xcf2pnm.10:131 xcf2png.10:110 xcfview.10:54
msgid "AUTHOR"
msgstr "FORFATTER"
-#: xcfinfo.10:78 xcf2pnm.10:128 xcf2png.10:107 xcfview.10:55
+#: xcfinfo.10:78 xcf2pnm.10:132 xcf2png.10:111 xcfview.10:55
msgid "B{%s} was written by Henning Makholm <henning@makholm.net>."
msgstr ""
"B{%s} og denne manualside\n"
"er skrevet af Henning Makholm <henning@makholm>."
-#: xcfinfo.10:81 xcf2pnm.10:131 xcf2png.10:110 xcfview.10:61
+#: xcfinfo.10:81 xcf2pnm.10:135 xcf2png.10:114 xcfview.10:61
msgid "SEE ALSO"
msgstr "SE OGSÅ"
@@ -675,14 +676,22 @@ msgid "FILES"
msgstr "FILER"
#: xcf2pnm.10:124 xcf2png.10:103
+msgid "B{/etc/X11/rgb.txt}"
+msgstr "B{/etc/X11/rgb.txt}"
+
+#: xcf2pnm.10:126 xcf2png.10:105
+msgid "B{/usr/share/X11/rgb.txt}"
+msgstr "B{/usr/share/X11/rgb.txt}"
+
+#: xcf2pnm.10:128 xcf2png.10:107
msgid "B{/usr/lib/X11/rgb.txt}"
msgstr "B{/usr/lib/X11/rgb.txt}"
-#: xcf2pnm.10:125 xcf2png.10:104
+#: xcf2pnm.10:129 xcf2png.10:108
msgid "Color name database for B{-b}."
msgstr "Database med farvenavne der forstås af B{-b}."
-#: xcf2pnm.10:131
+#: xcf2pnm.10:135
msgid "B{xcfinfo}(1), B{xcf2png}(1)"
msgstr "B{xcfinfo}(1), B{xcf2png}(1)"
@@ -706,7 +715,7 @@ msgstr ""
msgid "B{-g}and B{-c}."
msgstr "B{-g} og B{-c}."
-#: xcf2png.10:110
+#: xcf2png.10:114
msgid "B{xcfinfo}(1), B{xcf2pnm}(1)"
msgstr "B{xcfinfo}(1), B{xcf2pnm}(1)"
diff --git a/manpo/manpages.pot b/manpo/manpages.pot
index f2ff83f..5f18420 100644
--- a/manpo/manpages.pot
+++ b/manpo/manpages.pot
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Xcftools-manpages VERSION\n"
"Report-Msgid-Bugs-To: henning@makholm.net\n"
-"POT-Creation-Date: 2006-02-22 01:46+0100\n"
+"POT-Creation-Date: 2006-04-17 04:07+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -96,177 +96,178 @@ msgstr ""
#: options.i:110
msgid "The color can be given as B{#rrggbb} or B{#rgb} hexadecimal\n"
- "values, or as an X11 color name that will be looked up in\n"
- "B{/usr/lib/X11/rgb.txt}."
+ "values, or as an X11 color name (which will only work if a color\n"
+ "name database can be found in one of a number of standard\n"
+ "locations)."
msgstr ""
-#: options.i:169
+#: options.i:180
msgid "Invent a trivial alpha channel even if the flattened image is\n"
"completely opaque."
msgstr ""
-#: options.i:176
+#: options.i:187
msgid "Force the output to use RGB color space even if it there are more\n"
"compact alternatives."
msgstr ""
-#: options.i:179
+#: options.i:190
msgid "This will be selected automatically if the output file's name\n"
"ends with B{.ppm}."
msgstr ""
-#: options.i:188
+#: options.i:199
msgid "Force the output to be a grayscale image even if it may be\n"
"monochrome."
msgstr ""
-#: options.i:189
+#: options.i:200
msgid "If any colored pixels are encountered, exit with status 103."
msgstr ""
-#: options.i:190
+#: options.i:201
msgid "This will be selected automatically if the output file's name\n"
"ends with B{.pgm}."
msgstr ""
-#: options.i:199
+#: options.i:210
msgid "Force the output to be a monochrome image."
msgstr ""
-#: options.i:200
+#: options.i:211
msgid "If any colors except black and white are encountered, exit with\n"
"status 103."
msgstr ""
-#: options.i:202
+#: options.i:213
msgid "This will be selected automatically if the output file's name\n"
"ends with B{.pbm}."
msgstr ""
-#: options.i:212
+#: options.i:223
msgid "Suppress the automatic choice of B{-c}, B{-g}, or B{-m} based on\n"
"output filename, and instead select the output format based on\n"
"image contents."
msgstr ""
-#: options.i:219
+#: options.i:230
msgid "This is the default if the filename is not recognized, and when\n"
"writing to stdout."
msgstr ""
-#: options.i:227
+#: options.i:238
msgid "Use standard RGB compositing for flattening indexed layers."
msgstr ""
-#: options.i:228
+#: options.i:239
msgid "Without this option, B{%s} will mimic the Gimp's current strategy\n"
"of rounding each alpha value to either full transparency or full\n"
"opacity, and interpret all layer modes as B{Normal}."
msgstr ""
-#: options.i:239
+#: options.i:250
msgid "Assert that the flattened image will have no partial transparency\n"
"(allowing a more compact representation of the alpha output)."
msgstr ""
-#: options.i:241
+#: options.i:252
msgid "Exit with status 102 if the flattened image has any partial\n"
"transparency."
msgstr ""
-#: options.i:243
+#: options.i:254
msgid "If B{-b} is also given, this tests whether there there is partial\n"
"transparency before applying the background color."
msgstr ""
-#: options.i:252
+#: options.i:263
msgid "Do a \"dissolve\" step to eliminate partial transparency after\n"
"flattening."
msgstr ""
-#: options.i:254
+#: options.i:265
msgid "If B{-b} is also given, this happens before the background color\n"
"is applied."
msgstr ""
-#: options.i:262
+#: options.i:273
msgid "First flatten the entire image to a memory buffer before writing\n"
"output. Then analyse the image to decide on the details of the\n"
"output format (e.g., whether a grayscale output is sufficient)."
msgstr ""
-#: options.i:265
+#: options.i:276
msgid "Without this option, the program flattens only a singe row of\n"
"\"tiles\" (height 64) at a time."
msgstr ""
-#: options.i:272
+#: options.i:283
msgid "wB{x}h"
msgstr ""
-#: options.i:272
+#: options.i:283
msgid "Crop the converted image to width I{w} and height I{h}."
msgstr ""
-#: options.i:289
+#: options.i:300
msgid "xB{,}y"
msgstr ""
-#: options.i:289
+#: options.i:300
msgid "Offset the converted part of the image from the top-left corner\n"
"of the XCF canvas. Usually used with B{-S}."
msgstr ""
-#: options.i:308
+#: options.i:319
msgid "Crop and offset the converted part of the image to just include\n"
"the boundaries of the visible (or selected) layers."
msgstr ""
-#: options.i:310
+#: options.i:321
msgid "(Note that the I{contents} of the layers is not taken into\n"
"account when autocropping)."
msgstr ""
-#: options.i:314
+#: options.i:325
msgid "In the absence of options that specify otherwise, the converted\n"
"image will cover the entire XCF canvas."
msgstr ""
-#: options.i:325
+#: options.i:336
msgid "mode"
msgstr ""
-#: options.i:325
+#: options.i:336
msgid "Set the layer mode (e.g., B{Normal} or B{Multiply})."
msgstr ""
-#: options.i:348 options.i:362
+#: options.i:359 options.i:373
msgid "n"
msgstr ""
-#: options.i:348
+#: options.i:359
msgid "Set the opacity on a scale from 0 to 100 (as in the Gimp user\n"
"interface)."
msgstr ""
-#: options.i:362
+#: options.i:373
msgid "Set the opacity on a scale from 0 to 255 (as used internally)"
msgstr ""
-#: options.i:376
+#: options.i:387
msgid "Enable the layer mask."
msgstr ""
-#: options.i:382
+#: options.i:393
msgid "Disable the layer mask."
msgstr ""
-#: options.i:392
+#: options.i:403
msgid "Use the raw UTF-8 representation from the XCF file to compare and\n"
"display layer names."
msgstr ""
-#: options.i:394
+#: options.i:405
msgid "Ordinarily, layer names will be converted to the character set of\n"
"the current locale."
msgstr ""
@@ -384,15 +385,15 @@ msgstr ""
msgid "The name of the layer."
msgstr ""
-#: xcfinfo.10:77 xcf2pnm.10:127 xcf2png.10:106 xcfview.10:54
+#: xcfinfo.10:77 xcf2pnm.10:131 xcf2png.10:110 xcfview.10:54
msgid "AUTHOR"
msgstr ""
-#: xcfinfo.10:78 xcf2pnm.10:128 xcf2png.10:107 xcfview.10:55
+#: xcfinfo.10:78 xcf2pnm.10:132 xcf2png.10:111 xcfview.10:55
msgid "B{%s} was written by Henning Makholm <henning@makholm.net>."
msgstr ""
-#: xcfinfo.10:81 xcf2pnm.10:131 xcf2png.10:110 xcfview.10:61
+#: xcfinfo.10:81 xcf2pnm.10:135 xcf2png.10:114 xcfview.10:61
msgid "SEE ALSO"
msgstr ""
@@ -526,14 +527,22 @@ msgid "FILES"
msgstr ""
#: xcf2pnm.10:124 xcf2png.10:103
+msgid "B{/etc/X11/rgb.txt}"
+msgstr ""
+
+#: xcf2pnm.10:126 xcf2png.10:105
+msgid "B{/usr/share/X11/rgb.txt}"
+msgstr ""
+
+#: xcf2pnm.10:128 xcf2png.10:107
msgid "B{/usr/lib/X11/rgb.txt}"
msgstr ""
-#: xcf2pnm.10:125 xcf2png.10:104
+#: xcf2pnm.10:129 xcf2png.10:108
msgid "Color name database for B{-b}."
msgstr ""
-#: xcf2pnm.10:131
+#: xcf2pnm.10:135
msgid "B{xcfinfo}(1), B{xcf2png}(1)"
msgstr ""
@@ -552,7 +561,7 @@ msgstr ""
msgid "B{-g}and B{-c}."
msgstr ""
-#: xcf2png.10:110
+#: xcf2png.10:114
msgid "B{xcfinfo}(1), B{xcf2pnm}(1)"
msgstr ""
diff --git a/options.i b/options.i
index bc59e5a..79ac826 100644
--- a/options.i
+++ b/options.i
@@ -112,8 +112,9 @@ OPTION('b',--background,(color) select background color,
or
.B #rgb
hexadecimal values,
- or as an X11 color name that will be looked up in
- .BR /usr/lib/X11/rgb.txt .
+ or as an X11 color name
+ (which will only work if a color name database can be found
+ in one of a number of standard locations).
));
{
unsigned r,g,b ;
@@ -134,26 +135,36 @@ OPTION('b',--background,(color) select background color,
else if( strcasecmp(optarg,"white") == 0 )
r = g = b = 255 ;
else {
- const char filename[] = "/usr/lib/X11/rgb.txt" ;
- FILE *colortable = fopen(filename,"rt");
- if( colortable ) {
- int clen ;
- char colorbuf[80] ;
- do {
- if( !fgets(colorbuf,sizeof colorbuf,colortable) ) {
- r = (unsigned)-1 ;
- break ;
- }
- clen = strlen(colorbuf);
- while( clen && isspace(colorbuf[clen-1]) )
- clen-- ;
- colorbuf[clen] = '\0' ;
- clen = 0 ;
- sscanf(colorbuf," %u %u %u %n",&r,&g,&b,&clen);
- } while( clen == 0 || strcasecmp(colorbuf+clen,optarg) != 0 );
- } else {
- fprintf(stderr,_("Could not open color database file %s\n"),filename);
- r = (unsigned)-1 ;
+ const char *filenames[] = { "/etc/X11/rgb.txt",
+ "/usr/lib/X11/rgb.txt",
+ "/usr/share/X11/rgb.txt",
+ NULL };
+ const char **fnp ;
+ r = (unsigned)-1 ;
+ int any = 0 ;
+ for( fnp = filenames; r == (unsigned)-1 && fnp && *fnp; fnp++ ) {
+ FILE *colortable = fopen(*fnp,"rt");
+ if( colortable ) {
+ any = 1 ;
+ int clen ;
+ char colorbuf[80] ;
+ do {
+ if( !fgets(colorbuf,sizeof colorbuf,colortable) ) {
+ r = (unsigned)-1 ;
+ break ;
+ }
+ clen = strlen(colorbuf);
+ while( clen && isspace(colorbuf[clen-1]) )
+ clen-- ;
+ colorbuf[clen] = '\0' ;
+ clen = 0 ;
+ sscanf(colorbuf," %u %u %u %n",&r,&g,&b,&clen);
+ } while( clen == 0 || strcasecmp(colorbuf+clen,optarg) != 0 );
+ fclose(colortable) ;
+ }
+ }
+ if( !any ) {
+ fprintf(stderr,_("Could not find X11 color database\n"));
}
}
if( r == (unsigned)-1 )
diff --git a/po/da.po b/po/da.po
index 6f21cc9..9ba1b8a 100644
--- a/po/da.po
+++ b/po/da.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: xcftools 0.9\n"
"Report-Msgid-Bugs-To: henning@makholm.net\n"
-"POT-Creation-Date: 2006-02-22 01:38+0100\n"
-"PO-Revision-Date: 2006-02-22 01:45+0100\n"
+"POT-Creation-Date: 2006-04-17 04:06+0200\n"
+"PO-Revision-Date: 2006-04-17 04:07+0200\n"
"Last-Translator: Henning Makholm <henning@makholm.net>\n"
"Language-Team: Til test af l10n-faciliteter; ikke vedligeholdt\n"
"MIME-Version: 1.0\n"
@@ -161,37 +161,37 @@ msgstr "aktivér lagmaske"
msgid "disable layer mask"
msgstr "deaktivér lagmaske"
-#: options.i:155
+#: options.i:167
#, c-format
-msgid "Could not open color database file %s\n"
-msgstr "Kunne ikke åbne farvenavnsdatabasen %s\n"
+msgid "Could not find X11 color database\n"
+msgstr "Kunne ikke åbne farvenavnsdatabasen\n"
-#: options.i:160
+#: options.i:171
#, c-format
msgid "Unknown background color '%s'"
msgstr "Ukendt baggrundsfarve »%s«"
-#: options.i:284
+#: options.i:295
#, c-format
msgid "-S option must have an argument of the form wxh"
msgstr "-S-flaget skal have et argument på formen bxh"
-#: options.i:303
+#: options.i:314
#, c-format
msgid "-O option must have an argument of the form x,y"
msgstr "-O-flaget skal have et argument på formen x,y"
-#: options.i:340
+#: options.i:351
#, c-format
msgid "Layer mode '%s' is unknown"
msgstr "Lagtilstanden »%s« er ukendt"
-#: options.i:356
+#: options.i:367
#, c-format
msgid "The argument to --percent is not a percentage"
msgstr "Argumentet til --percent er ikke et procenttal"
-#: options.i:369
+#: options.i:380
#, c-format
msgid "The argument to --opacity is not a number between 0 and 255"
msgstr "Argumentet til --opacity er ikke et tal mellem 0 og 255"
diff --git a/po/xcftools.pot b/po/xcftools.pot
index 48e3cea..576bddc 100644
--- a/po/xcftools.pot
+++ b/po/xcftools.pot
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: henning@makholm.net\n"
-"POT-Creation-Date: 2006-02-22 01:38+0100\n"
+"POT-Creation-Date: 2006-04-17 04:06+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -162,37 +162,37 @@ msgstr ""
msgid "disable layer mask"
msgstr ""
-#: options.i:155
+#: options.i:167
#, c-format
-msgid "Could not open color database file %s\n"
+msgid "Could not find X11 color database\n"
msgstr ""
-#: options.i:160
+#: options.i:171
#, c-format
msgid "Unknown background color '%s'"
msgstr ""
-#: options.i:284
+#: options.i:295
#, c-format
msgid "-S option must have an argument of the form wxh"
msgstr ""
-#: options.i:303
+#: options.i:314
#, c-format
msgid "-O option must have an argument of the form x,y"
msgstr ""
-#: options.i:340
+#: options.i:351
#, c-format
msgid "Layer mode '%s' is unknown"
msgstr ""
-#: options.i:356
+#: options.i:367
#, c-format
msgid "The argument to --percent is not a percentage"
msgstr ""
-#: options.i:369
+#: options.i:380
#, c-format
msgid "The argument to --opacity is not a number between 0 and 255"
msgstr ""
diff --git a/test/dotest b/test/dotest
index 17b9e83..d75dbfb 100755
--- a/test/dotest
+++ b/test/dotest
@@ -257,9 +257,10 @@ echo > expected:stderr \
errtest 20 xcfinfo $S/tiletest.xcf.gz Background 'Long and low'
rm expected:stderr
-rgbfile=/usr/lib/X11/rgb.txt
-( [ -f $rgbfile ] || echo "Could not open color database file $rgbfile" ) \
- > expected.stderr
+( for a in /etc/X11/rgb.txt /usr/share/X11/rgb.txt /usr/lib/X11/rgb.txt /-/ ;
+ do [ -f $a ] && break ;
+ [ $a = /-/ ] && echo "Could not find X11 color database" ;
+ done ) > expected.stderr
echo "${XCFTOOLS_PREFIX}xcf2pnm: Unknown background color 'Plaid'" \
>> expected.stderr
errtest 20 xcf2pnm $S/tiletest.xcf.gz -b Plaid
diff --git a/xcf2png.10 b/xcf2png.10
index f2e14fe..eb6cc49 100644
--- a/xcf2png.10
+++ b/xcf2png.10
@@ -100,6 +100,10 @@ one, please notify the author.
.SH FILES
.TP 8
+.B /etc/X11/rgb.txt
+.TP 8
+.B /usr/share/X11/rgb.txt
+.TP 8
.B /usr/lib/X11/rgb.txt
Color name database for
.BR \-b .
diff --git a/xcf2pnm.10 b/xcf2pnm.10
index 0b6c3aa..8dd9126 100644
--- a/xcf2pnm.10
+++ b/xcf2pnm.10
@@ -121,6 +121,10 @@ one, please notify the author.
.SH FILES
.TP 8
+.B /etc/X11/rgb.txt
+.TP 8
+.B /usr/share/X11/rgb.txt
+.TP 8
.B /usr/lib/X11/rgb.txt
Color name database for
.BR \-b .