tags 602585 + patch
retitle 602585 pngquant: [PATCH] Please switch to more standard option syntax 
(-a short, --long)
thanks

See attached patches to implement this.

Jari

>From 9ecda181bbbff6f96c8be3d89c2de4dd517d3355 Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aa...@cante.net>
Date: Sat, 6 Nov 2010 11:31:30 +0200
Subject: [PATCH] pngquant.c: use --long option notation
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit


Signed-off-by: Jari Aalto <jari.aa...@cante.net>
---
 pngquant.c |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/pngquant.c b/pngquant.c
index 46d6899..6438f76 100644
--- a/pngquant.c
+++ b/pngquant.c
@@ -29,17 +29,17 @@
 
 #define PNGQUANT_USAGE "\
    usage:  pngquant [options] <ncolors> [pngfile [pngfile ...]]\n\
-                    [options] -map mapfile [pngfile [pngfile ...]]\n\
+                    [options] --map mapfile [pngfile [pngfile ...]]\n\
    options:\n\
-      -force         overwrite existing output files\n\
-      -ordered       use ordered dithering (synonyms:  -nofloyd, -nofs)\n\
-      -verbose       print status messages (synonyms:  -noquiet)\n\n\
+      --force         overwrite existing output files\n\
+      --ordered       use ordered dithering (synonyms:  --nofloyd, --nofs)\n\
+      --verbose       print status messages (synonyms:  --noquiet)\n\n\
    Quantizes one or more 32-bit RGBA PNGs to 8-bit (or smaller) RGBA-palette\n\
    PNGs using either ordered dithering or Floyd-Steinberg diffusion dithering\n\
    (default).  The output filename is the same as the input name except that\n\
    it ends in \"-fs8.png\" or \"-or8.png\" (unless the input is stdin, in which\n\
    case the quantized image will go to stdout).  The default behavior if the\n\
-   output file exists is to skip the conversion; use -force to overwrite.\n\n\
+   output file exists is to skip the conversion; use --force to overwrite.\n\n\
    NOTE:  the -map option is NOT YET SUPPORTED.\n"
 
 
@@ -210,25 +210,25 @@ main( argc, argv )
     mapapixels = (apixel **)0;
 
     while ( argn < argc && argv[argn][0] == '-' && argv[argn][1] != '\0' ) {
-        if ( 0 == strncmp( argv[argn], "-fs", 3 ) ||
-             0 == strncmp( argv[argn], "-floyd", 3 ) )
+        if ( 0 == strncmp( argv[argn], "--fs", 4 ) ||
+             0 == strncmp( argv[argn], "--floyd", 4 ) )
             floyd = TRUE;
-        else if ( 0 == strncmp( argv[argn], "-nofs", 5 ) ||
-                  0 == strncmp( argv[argn], "-nofloyd", 5 ) ||
-                  0 == strncmp( argv[argn], "-ordered", 3 ) )
+        else if ( 0 == strncmp( argv[argn], "--nofs", 6 ) ||
+                  0 == strncmp( argv[argn], "--nofloyd", 6 ) ||
+                  0 == strncmp( argv[argn], "--ordered", 4 ) )
             floyd = FALSE;
-        else if ( 0 == strncmp( argv[argn], "-force", 2 ) )
+        else if ( 0 == strncmp( argv[argn], "--force", 3 ) )
             force = TRUE;
-        else if ( 0 == strncmp( argv[argn], "-noforce", 4 ) )
+        else if ( 0 == strncmp( argv[argn], "--noforce", 5 ) )
             force = FALSE;
-        else if ( 0 == strncmp( argv[argn], "-verbose", 2 ) ||
-                  0 == strncmp( argv[argn], "-noquiet", 4 ) )
+        else if ( 0 == strncmp( argv[argn], "--verbose", 3 ) ||
+                  0 == strncmp( argv[argn], "--noquiet", 5 ) )
             verbose = TRUE;
-        else if ( 0 == strncmp( argv[argn], "-noverbose", 4 ) ||
-                  0 == strncmp( argv[argn], "-quiet", 2 ) )
+        else if ( 0 == strncmp( argv[argn], "--noverbose", 5 ) ||
+                  0 == strncmp( argv[argn], "--quiet", 3 ) )
             verbose = FALSE;
 #ifdef SUPPORT_MAPFILE
-        else if ( 0 == strncmp( argv[argn], "-map", 2 ) ) {
+        else if ( 0 == strncmp( argv[argn], "--map", 3 ) ) {
             ++argn;
             if ( argn == argc ) {
                 fprintf( stderr, pq_usage );
-- 
1.7.2.3

>From c349f195785c8f258a6a222437a31eb503a91bba Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aa...@cante.net>
Date: Sat, 6 Nov 2010 11:33:23 +0200
Subject: [PATCH] debian/pngquant.1: use --long option notation
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit


Signed-off-by: Jari Aalto <jari.aa...@cante.net>
---
 debian/pngquant.1 |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/debian/pngquant.1 b/debian/pngquant.1
index e544745..47ee48f 100644
--- a/debian/pngquant.1
+++ b/debian/pngquant.1
@@ -6,7 +6,7 @@ pngquant \- PNG image optimising utility
 .RI "[ options ] <ncolors> [pngfile [pngfile ...]]"
 .br
 .B pngquant
-.RI "[ options ] \-map mapfile [pngfile [pngfile ...]]"
+.RI "[ options ] \-\-map mapfile [pngfile [pngfile ...]]"
 .br
 .PP
 Note that it's \fBrequired\fP to specify the number of colors (\fI<ncolors>\fP) or the \fImapfile\fP. Arguments in square brackets are optional.
@@ -18,17 +18,17 @@ command.
 \fBpngquant\fP quantizes one or more 32-bit RGBA PNGs to 8-bit (or smaller) RGBA-palette PNGs using either ordered dithering or Floyd-Steinberg diffusion dithering (default). The output filename is the same as the input name except that it ends in \fI-fs8.png\fP or \fI-or8.png\fP (unless the input is stdin, in which case the quantized image will go to stdout).  The default behavior if the output file exists is to skip the conversion; use \fI-force\fP to overwrite.
 .SH OPTIONS
 .TP
-.B \-force
+.B \-\-force
 Overwrite existing output files.
 .TP
-.B \-ordened, \-nofloyd, \-nofs
+.B \-\-ordened, \-\-nofloyd, \-\-nofs
 Use ordered dithering.
 .TP
-.B \-verbose, \-noquiet
+.B \-\-verbose, \-\-noquiet
 Print status messages.
 .TP
 .B NOTE:
-the \-map option is NOT YET SUPPORTED.
+the \-\-map option is NOT YET SUPPORTED.
 .SH EXAMPLE
 Creating a new image with the number of colors reduced to 64:
 .TP
-- 
1.7.2.3

Reply via email to