+ islandnamer.tl.y= islandnamer.br.y-1;
+ islandnamer.br.y= islandnamer.br.y+1;
+ debug_rect("islandnamer",__LINE__, islandnamer);
+
+ ADJUST_BOX(islandnamer,"*",>=,RW, cim->h, MUST,br,y,+1);
+ debug_rect("islandnamer",__LINE__, islandnamer);
+
+ ADJUST_BOX(islandnamer,"*",<, RH, cim->w, MUST,tl,x,+1);
+ debug_rect("islandnamer",__LINE__, islandnamer);
+
+ MUST( RECT_H(islandnamer) <= 30, MR(islandnamer));
+
+ 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" ",
+ p.x, nspaces, might_be_colon, colon_pattern);
+
+ uint32_t pattern=0;
+ int runs[32], nruns=0;
+ runs[0]=0; runs[1]=0;
+
+ for (p.y=islandnamer.tl.y; p.y<=islandnamer.br.y; p.y++) {
+ pattern <<= 1;
+ switch (get_p(p)) {
+ case '*': if (runs[nruns]) { nruns++; runs[nruns]=0; } break;
+ case 'O': runs[nruns]++; pattern |= 1u; break;
+ default: pattern |= 1UL<<31; break;
+ }
+ }
+
+ colondebugf(" pat=%08"PRIx32" nruns=%d runs[]={%d,%d..} ",
+ pattern, nruns, runs[0],runs[1]);
+
+ if (!pattern) {
+ if (might_be_colon)
+ /* omg it _is_ a colon */
+ goto colon_found;
+ nspaces++;
+ might_be_colon=0;
+ } else {
+ if (!(pattern & 1UL<<31) && nruns==2 && runs[1]==runs[0]) {
+ if (!nspaces) {
+ if (pattern==colon_pattern)
+ goto ok_might_be_colon;
+ } else if (nspaces>=2) {
+ colon_pattern= pattern;
+ might_be_colon=1;
+ goto ok_might_be_colon;
+ }
+ }
+ might_be_colon=0;
+ ok_might_be_colon:
+ nspaces= 0;
+ }
+ colondebugf(" nsp=%2d mbc=%d\n", nspaces, might_be_colon);
+ }
+ MUST(!"colon found", MP(p);MR(islandnamer) );
+
+ colon_found:
+ colondebugf(" found\n");
+ islandnamer.br.x= p.x;
+
+ identify_rgbimage(ri, islandnamer, archisland, "island");
+ } else {
+
+ MUST(!"sunshine shows ship or ahoy", MS(sunshine) );
+
+ }
+
+ char *delim= strstr(archisland," - ");
+ assert(delim);
+ archipelago= masprintf("%.*s", (int)(delim-archisland), archisland);
+ island= masprintf("%s", delim+3);
+
+}