summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-02-20 18:30:34 -0500
committerJune McEnroe <june@causal.agency>2018-02-20 18:30:34 -0500
commit9749191d0625d1239c672ed6a583dd187002c8b0 (patch)
tree8416e35b88403ab5207c98185c4485cd30e5a9c5
parentReduce bit depth in pngo (diff)
downloadsrc-9749191d0625d1239c672ed6a583dd187002c8b0.tar.gz
src-9749191d0625d1239c672ed6a583dd187002c8b0.zip
Take multiple inputs to pngo
-rw-r--r--bin/pngo.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/pngo.c b/bin/pngo.c
index 0e13a7ec..ef4ded36 100644
--- a/bin/pngo.c
+++ b/bin/pngo.c
@@ -670,11 +670,11 @@ int main(int argc, char *argv[]) {
         }
     }
 
-    if (optind < argc) {
-        if (output || stdio) {
-            optimize(argv[optind], output);
-        } else {
-            optimize(argv[optind], argv[optind]);
+    if (argc - optind == 1 && (output || stdio)) {
+        optimize(argv[optind], output);
+    } else if (optind < argc) {
+        for (int i = optind; i < argc; ++i) {
+            optimize(argv[i], argv[i]);
         }
     } else {
         optimize(NULL, output);
=1.4.0&id=f03e3cb8a5c6b597b87321e1f082d3ab177e8baa&follow=1'>ui-shared: extract date formatting to a functionJohn Keeping 2015-08-13filter: don't use dlsym unnecessarilyJohn Keeping 2015-08-13ui-tree: use "sane" isgraph()John Keeping 2015-08-13cgit.h: move stdbool.h from ui-shared.hJohn Keeping 2015-08-13cache.c: fix header orderJohn Keeping 2015-08-13configfile.c: don't include system headers directlyJohn Keeping 2015-08-13Remove redundant includesJohn Keeping 2015-08-13Makefile: include Git's config.mak.unameJohn Keeping 2015-08-13tests: allow shell to be overriddenJohn Keeping 2015-08-13redirect: cleanlinessJason A. Donenfeld 2015-08-13redirect: be more careful for different cgi setupsJason A. Donenfeld 2015-08-12ui-log: fix double countingJohn Keeping 2015-08-12log: allow users to follow a fileJohn Keeping 2015-08-12shared: make cgit_diff_tree_cb publicJohn Keeping 2015-08-12t0110: Chain together using &&Jason A. Donenfeld 2015-08-12about: always ensure page has a trailing slashJason A. Donenfeld 2015-08-12filters: apply HTML escapingLazaros Koromilas 2015-08-12git: update to v2.5.0Christian Hesse 2015-08-12Fix processing of repo.hide and repo.ignoreDaniel Reichelt