case 'z': if (!have_upper || n < 1 || line[n - 1] != 'H') { have_lower = true; } break; break;
LGTM. I can't come up with any credible case where that would fail badly. I suppose if someone wanted SHMOOZHz that would be okay albeit weird. One would normally expect a limited number of things before the H, but I don't think we need be concerned about that.
There are some comments about around 1402 that would need a fixin' too. Greg