[hackers] [farbfeld] Remove the need of '#' for alpha masks || Laslo Hunhold
commit 4aa840bd871694cca0ae1608eab1086eef7d228b
Author: Laslo Hunhold <dev_AT_frign.de>
AuthorDate: Fri Apr 14 22:26:03 2017 +0200
Commit: Laslo Hunhold <dev_AT_frign.de>
CommitDate: Fri Apr 14 22:26:03 2017 +0200
Remove the need of '#' for alpha masks
To be honest, it can happen too easily that the user forgets to put
the colour in quotation marks, yielding in the rest of the
pipeline to be discarded as a comment.
diff --git a/ff2jpg.1 b/ff2jpg.1
index 5c8e97a..4555a66 100644
--- a/ff2jpg.1
+++ b/ff2jpg.1
_AT_@ -24,7 +24,7 @@ writes a diagnostic message to stderr.
.It Fl b Ar colour
Mix the background alpha channel with
.Ar colour
-specified as #rgb, #rrggbb or #rrrrggggbbbb. The default is #fff.
+specified as rgb, rrggbb or rrrrggggbbbb. The default is fff.
.It Fl o
Optimize the Huffman table, which reduces the file size but takes longer.
.It Fl q Ar quality
_AT_@ -46,7 +46,7 @@ $
.Pp
$ bunzip2 < image.ff.bz2 |
.Nm
--b '#00ff00' -q 90 > image.jpg
+-b 0f0 -q 90 > image.jpg
.Sh SEE ALSO
.Xr bzip2 1 ,
.Xr farbfeld 5
diff --git a/ff2ppm.1 b/ff2ppm.1
index 9bebf7a..feba2f3 100644
--- a/ff2ppm.1
+++ b/ff2ppm.1
_AT_@ -23,7 +23,7 @@ writes a diagnostic message to stderr.
.Ar colour
Mix the background alpha channel with
.Ar colour
-specified as #rgb, #rrggbb or #rrrrggggbbbb. The default is #fff.
+specified as rgb, rrggbb or rrrrggggbbbb. The default is fff.
.El
.Sh EXIT STATUS
.Bl -tag -width Ds
_AT_@ -39,7 +39,7 @@ $
.Pp
$ bunzip2 < image.ff.bz2 |
.Nm
--b '#00ff00' > image.ppm
+-b 0f0 > image.ppm
.Sh SEE ALSO
.Xr bzip2 1 ,
.Xr farbfeld 5
diff --git a/util.c b/util.c
index ea933ca..ba139b4 100644
--- a/util.c
+++ b/util.c
_AT_@ -57,10 +57,6 @@ parse_mask(const char *s, uint16_t mask[3])
unsigned int col[3], colfac;
char fmt[] = "%#x%#x%#x";
- if ((s++)[0] != '#') {
- return 1;
- }
-
slen = strlen(s);
if (slen != 3 && slen != 6 && slen != 12) {
return 1;
Received on Fri Apr 14 2017 - 22:27:26 CEST
This archive was generated by hypermail 2.3.0
: Fri Apr 14 2017 - 22:36:17 CEST