# HG changeset patch # User jwe # Date 790209099 0 # Node ID 69e610fb0013f17a6239ba13bec7f4574a0e1842 # Parent ad8d79f99b2895b1be30a53dc004ae69eb579cc8 [project @ 1995-01-15 22:31:39 by jwe] diff -r ad8d79f99b28 -r 69e610fb0013 src/input.cc --- a/src/input.cc Sun Jan 15 21:48:53 1995 +0000 +++ b/src/input.cc Sun Jan 15 22:31:39 1995 +0000 @@ -734,17 +734,24 @@ static int match_sans_spaces (const char *standard, const char *test) { - const char *tp = test; + char *tmp = strsave (test); + + char *tp = tmp; while (*tp == ' ' || *tp == '\t') tp++; - const char *ep = test + strlen (test) - 1; + char *ep = test + strlen (test) - 1; while (*ep == ' ' || *ep == '\t') ep--; - int len = ep - tp + 1; + *(ep+1) = '\0'; + + int retval = strcmp (standard, tp) == 0; - return (strncmp (standard, tp, len) == 0); + delete [] tmp; + + return retval; + } // If the user simply hits return, this will produce an empty matrix.