rdf2bin: be smarter about extracting the format from argv[0]
commit2fa822b3b39122bc81745abb6374ec9e2ef15d04
authorH. Peter Anvin <hpa@zytor.com>
Mon, 6 Jul 2009 01:31:33 +0000 (5 18:31 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 6 Jul 2009 01:31:33 +0000 (5 18:31 -0700)
tree1621e5e3da6a782eec04abd40d4a6fa54c09ada7
parent3692a63e0ce705aff3fd8204cd91cc40b2aafa39
rdf2bin: be smarter about extracting the format from argv[0]

Consider that argv[0] may contain extensions like .exe as well as
pathname prefixes.  Handle it by searching backwards for the string
"rdf2" and then extract the alphanumeric tail that follows.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
rdoff/rdf2bin.c