chiark / gitweb /
Fix stupid black image bug; various other minor fixes
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Fri, 26 Jun 2009 20:22:36 +0000 (21:22 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Fri, 26 Jun 2009 20:22:36 +0000 (21:22 +0100)
pctb/TODO
pctb/convert.c
pctb/pages.c
pctb/x.gdb

index 36b39fcfaba21f4552e8d07f4a93c6cefdf51b82..33e66e7c0874c183ddafd0a94587a43859dd9d70 100644 (file)
--- a/pctb/TODO
+++ b/pctb/TODO
@@ -3,11 +3,3 @@ write real uploader
 test real uploader
 building island name extractor
 speed it up
-
-./ypp-commodities -Dpixmap -Drect --test-servers --find-island 2>u
-
-liberator:pctb> ./ypp-commodities --test-servers --find-island >raw.tsv 
-found YPP client (0x3200007): Midnight ocean - Eudoxus.
-collected 36 screenshots.                
-Segmentation fault
-liberator:pctb> 
index 21445c563b6108ed117304c8a27fb9eb4fdd23ab..c79477f80394810b5ead5abe7644500379693945 100644 (file)
@@ -283,6 +283,7 @@ int main(int argc, char **argv) {
     open_screenshot_file("w");
     if (o_flags & ff_singlepage) take_one_screenshot();
     else take_screenshots();
+    progress_log("OK for you to move the mouse now.");
   }
   if (o_mode & mf_readscreenshot) {
     open_screenshot_file("r");
index 32e429ab39df1be1220b2bedbe083a1be7ccf17d..ca2428d874d9a7b87ee0f3b231fc8f37bb7594c8 100644 (file)
@@ -322,15 +322,13 @@ static void wait_for_stability(Snapshot **output,
   /* waits longer if we're going to return an image identical to previously
    * if previously==0, all images are considered identical to it */
 
-  debugf("PAGING  wait_for_stability"
-         "  last_input=%f previously=%p\n",
-         last_input, previously);
-
-  char *doing;
-  sysassert( vasprintf(&doing,fmt,al) >=0);
-
+  char *doing= masprintf(fmt,al);
   progress("%s",doing);
 
+  debugf("PAGING  wait_for_stability"
+         "  last_input=%f previously=%p `%s'\n",
+         last_input, previously, doing);
+
   for (;;) {
     double at_snapshot= timestamp();
     double need_sleep= min_update_allowance - (at_snapshot - last_input);
@@ -514,7 +512,7 @@ static void prepare_ypp_client(void) {
   raise_and_get_details();
   wait_for_stability(&current,0,0, "checking current YPP client screen...");
 
-#if 1
+#if 0
 timestamp();
 snapshot(&current);
 snapshot(&current);
@@ -596,7 +594,7 @@ void take_one_screenshot(void) {
   prepare_ypp_client();
   wait_for_stability(&current,0,0, "taking screenshot...");
   page0_rgbimage= alloc_rgb_image(current->w, current->h);
-  page_images[0]= convert_page(current, 0);
+  page_images[0]= convert_page(current, page0_rgbimage);
   npages= 1;
   progress_log("collected single screenshot.");
 }
index c6d2387b18f1795ee0911cec77dc07c6bc650922..5adf557e0ffb9d27784328376e6030b4664de9d1 100644 (file)
@@ -1,5 +1,8 @@
 file ypp-commodities
-set confirm off
-set args -Dcallout --ocean midnight --pirate aristarchus --same --raw-tsv >raw.tsv 
-break convert.c:260
+set args -Dpages --test-servers --find-island
+break pages.c:596
+
+#set args -Dcallout --ocean midnight --pirate aristarchus --same --raw-tsv >raw.tsv 
+#break convert.c:260
+
 run