From 1c6f4876b9a4f76f89a0df81ec2cc6c4ec76334e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 25 Jun 2009 00:29:25 +0100 Subject: [PATCH] supply OCEAN env var more often; turn on single page if output is only --find-island --- pctb/TODO | 3 --- pctb/convert.c | 14 ++++++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pctb/TODO b/pctb/TODO index 84ea667..36b39fc 100644 --- a/pctb/TODO +++ b/pctb/TODO @@ -6,9 +6,6 @@ speed it up ./ypp-commodities -Dpixmap -Drect --test-servers --find-island 2>u -./ypp-commodities --test-servers --raw-tsv >raw.tsv - results in `anonymous' uploads - liberator:pctb> ./ypp-commodities --test-servers --find-island >raw.tsv found YPP client (0x3200007): Midnight ocean - Eudoxus. collected 36 screenshots. diff --git a/pctb/convert.c b/pctb/convert.c index 433b043..21445c5 100644 --- a/pctb/convert.c +++ b/pctb/convert.c @@ -226,8 +226,14 @@ int main(int argc, char **argv) { /* Consequential changes to options */ if (o_mode & mf_analyse) { - if (!o_outmode_kind) - o_outmode_kind= (o_flags & ff_printisland) ? omk_none : omk_str; + if (!o_outmode_kind) { + if (o_flags & ff_printisland) { + o_outmode_kind= omk_none; + o_flags |= ff_singlepage; + } else { + o_outmode_kind= omk_str; + } + } if (o_outmode_kind==omk_upload) { o_flags |= ffs_upload; @@ -264,12 +270,12 @@ int main(int argc, char **argv) { if (!ocean) ocean= o_ocean; if (!pirate) pirate= o_pirate; - if (o_flags & ff_needisland) { + if (o_flags & ff_needisland) if (!ocean) badusage("need --ocean option when replaying images" " (consider supplying --pirate too)"); + if (ocean) sysassert(! setenv("YPPSC_OCEAN",ocean,1) ); - } if (pirate && (o_flags & ff_dict_pirate)) sysassert(! setenv("YPPSC_PIRATE",pirate,1) ); -- 2.30.2