X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=blobdiff_plain;f=pctb%2Fstructure.c;h=5309489038bce03f9b3d1646d4357222a5d85e44;hp=2dc98d1c77a1590e0ae8d91e78eed19d4cbf90d0;hb=62c6511084ac851f374aaeb68b4d1d9f117690a1;hpb=49e1be1a94ba3dc9d951056ebec2784286d3e928 diff --git a/pctb/structure.c b/pctb/structure.c index 2dc98d1..5309489 100644 --- a/pctb/structure.c +++ b/pctb/structure.c @@ -92,10 +92,16 @@ const CanonColourInfo canoncolourinfos[]= { static void mustfail1(const char *file, int line, const char *what) { fprintf(stderr, - "\n\n" - "Unable to figure out contents of YPP client display.\n" - " Check that your client is logged in has the correct display.\n" - " If that isn't the problem, please report this as a fault.\n\n" + "\n\n" + "Unable to figure out contents of YPP client display.\n" + "Please check the following:\n" + " * YPP client is showing commodity listing screen\n" + " * YPP client has antialiased text turned off (Ye / Options / General)\n" + " * YPP client window is on top (we try to raise it but your window\n" + " manager might have prevented that from succeeding)\n" + " * Your X display is 24bpp (NB some VNC servers use 16bpp by default)\n" + "\n" + "If all of these are true, please report this as a fault.\n\n" "Technical details:" " %s:%d: requirement failed:\n" " %s\n", @@ -547,6 +553,8 @@ Rect find_sunshine_widget(void) { } void find_islandname(RgbImage *ri) { + find_structure(page_images[0], 0); + Rect sunshiner= find_sunshine_widget(); char sunshine[MAXIMGIDENT], archisland[MAXIMGIDENT]; @@ -628,6 +636,7 @@ void find_islandname(RgbImage *ri) { Point p; int nspaces=1, might_be_colon=0; uint32_t colon_pattern= 0; + p.y=-1; for (p.x=islandnamer.br.x; p.x>islandnamer.tl.x; p.x--) { colondebugf("structcolon: x=%4d nsp=%2d mbc=%d cp=%08"PRIx32" ", @@ -679,13 +688,11 @@ void find_islandname(RgbImage *ri) { islandnamer.br.x= p.x; identify_rgbimage(ri, islandnamer, archisland, "island"); - - assert(!"not vessel"); } char *delim= strstr(archisland," - "); assert(delim); - archipelago= masprintf("%.*s", delim-archisland, archisland); + archipelago= masprintf("%.*s", (int)(delim-archisland), archisland); island= masprintf("%s", delim+3); free(ri);