+ /* Time to see if there's a generic terminus that matches.
+ Is there a hyphen? */
+ char *c = strchr(s, '-');
+
+ /* A conjunction hyphen normally indicates a residue-specific
+ terminus, which is named like "GLY-COOH". A generic terminus
+ won't have a hyphen. */
+ bool bFoundAnyHyphen = (c != NULL);
+ /* '-' as the last character indicates charge, so if that's
+ the only one found e.g. "COO-", then it was not a conjunction
+ hyphen, so this is a generic terminus */
+ bool bOnlyFoundChargeHyphen = (bFoundAnyHyphen &&
+ *(c+1) == '\0');
+ /* Thus, "GLY-COO-" is not recognized as a generic terminus. */
+ bool bFoundGenericTerminus = !bFoundAnyHyphen || bOnlyFoundChargeHyphen;
+ if (bFoundGenericTerminus)