Mercurial > ~dholland > hg > tradcpp > index.cgi
diff main.c @ 45:f263adbf7445
merge
author | David A. Holland |
---|---|
date | Sat, 30 Mar 2013 22:33:53 -0400 |
parents | 57e0c7a50b2d |
children | dc63e70e425d |
line wrap: on
line diff
--- a/main.c Sat Mar 30 22:29:42 2013 -0400 +++ b/main.c Sat Mar 30 22:33:53 2013 -0400 @@ -504,7 +504,7 @@ //////////////////////////////////////////////////////////// // complex modes -static +__dead static void commandline_iremap(const struct place *p, char *str) { @@ -824,14 +824,14 @@ bool check_prefix_option(const struct place *p, char *opt) { - unsigned i; + unsigned i, len; int r; for (i=0; i<num_prefix_options; i++) { - r = strncmp(opt, prefix_options[i].string, - strlen(prefix_options[i].string)); + len = strlen(prefix_options[i].string); + r = strncmp(opt, prefix_options[i].string, len); if (r == 0) { - prefix_options[i].func(p, opt); + prefix_options[i].func(p, opt + len); return true; } if (r < 0) { @@ -865,7 +865,7 @@ return false; } -static +__dead static void usage(void) {