projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed unused parameter from mbx_copy().
[mmh]
/
sbr
/
print_sw.c
diff --git
a/sbr/print_sw.c
b/sbr/print_sw.c
index
8e489dc
..
3a70c54
100644
(file)
--- a/
sbr/print_sw.c
+++ b/
sbr/print_sw.c
@@
-10,7
+10,7
@@
void
void
-print_sw (char *substr, struct swit *swp, char *prefix, FILE *fp)
+print_sw(char *substr, struct swit *swp, char *prefix, FILE *fp)
{
int len, optno;
register int i;
{
int len, optno;
register int i;
@@
-20,12
+20,13
@@
print_sw (char *substr, struct swit *swp, char *prefix, FILE *fp)
len = strlen(substr);
for (; swp->sw; swp++) {
/* null matches all strings */
len = strlen(substr);
for (; swp->sw; swp++) {
/* null matches all strings */
- if (!*substr || (ssequal (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)) {
if (!*substr && sp[0] == 'n' && sp[1] == 'o' &&
optno = 0;
/* next switch */
if ((sp = (&swp[1])->sw)) {
if (!*substr && sp[0] == 'n' && sp[1] == 'o' &&
- strcmp (&sp[2], swp->sw) == 0 && (
+ strcmp(&sp[2], swp->sw) == 0 && (
((&swp[1])->minchars == 0 && swp->minchars == 0) ||
((&swp[1])->minchars == (swp->minchars) + 2)))
optno++;
((&swp[1])->minchars == 0 && swp->minchars == 0) ||
((&swp[1])->minchars == (swp->minchars) + 2)))
optno++;
@@
-35,14
+36,14
@@
print_sw (char *substr, struct swit *swp, char *prefix, FILE *fp)
cp = buf;
*cp++ = '(';
if (optno) {
cp = buf;
*cp++ = '(';
if (optno) {
- strcpy (cp, "[no]");
- cp += strlen (cp);
+ strcpy(cp, "[no]");
+ cp += strlen(cp);
}
for (cp1 = swp->sw, i = 0; i < swp->minchars; i++)
*cp++ = *cp1++;
*cp++ = ')';
while ((*cp++ = *cp1++));
}
for (cp1 = swp->sw, i = 0; i < swp->minchars; i++)
*cp++ = *cp1++;
*cp++ = ')';
while ((*cp++ = *cp1++));
- fprintf (fp, " %s%s\n", prefix, buf);
+ fprintf(fp, " %s%s\n", prefix, buf);
} else {
if (!swp->minchars)
fprintf(fp, optno ? " %s[no]%s\n" : " %s%s\n",
} else {
if (!swp->minchars)
fprintf(fp, optno ? " %s[no]%s\n" : " %s%s\n",