projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
send fix signed of length variable
[mmh]
/
sbr
/
print_sw.c
diff --git
a/sbr/print_sw.c
b/sbr/print_sw.c
index
7924fbc
..
02d00bc
100644
(file)
--- a/
sbr/print_sw.c
+++ b/
sbr/print_sw.c
@@
-13,14
+13,15
@@
void
print_sw(char *substr, struct swit *swp, char *prefix, FILE *fp)
{
int len, optno;
print_sw(char *substr, struct swit *swp, char *prefix, FILE *fp)
{
int len, optno;
- register int i;
- register char *cp, *cp1, *sp;
+ int i;
+ char *cp, *cp1, *sp;
char buf[128];
len = strlen(substr);
for (; swp->sw; swp++) {
/* null matches all strings */
char buf[128];
len = strlen(substr);
for (; swp->sw; swp++) {
/* null matches all strings */
- if (!*substr || (isprefix(substr, swp->sw) && len >= swp->minchars)) {
+ if (!*substr || (strncmp(swp->sw, substr, len)==0 &&
+ len >= swp->minchars)) {
optno = 0;
/* next switch */
if ((sp = (&swp[1])->sw)) {
optno = 0;
/* next switch */
if ((sp = (&swp[1])->sw)) {