Re this: +#if HASH_ALGO_CKSUM + /* TODO: Remove these restrictions. */ + switch (cksum_algorithm) + { + case bsd: + case sysv: + case crc: + if (delim != '\n') + die (EXIT_FAILURE, 0, + _("--zero is not supported with --algorithm={bsd,sysv,crc}")); + if (prefix_tag) + die (EXIT_FAILURE, 0, + _("--tag is not supported with --algorithm={bsd,sysv,crc}")); + if (do_check) + die (EXIT_FAILURE, 0, + _("--check is not supported with --algorithm={bsd,sysv,crc}")); + break; + default: + break; + }
I like the new table-driven code. Thanks! Depending on when you want to address that TODO, you may want to diagnose multiple errors before exiting, so as to diagnose two or three errors when using more than one of these: --zero --tag --check