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 36b39fc..33e66e7 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 21445c5..c79477f 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 32e429a..ca2428d 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 c6d2387..5adf557 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