summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-06-10 09:34:57 +0000
committerbrian <brian@FreeBSD.org>1999-06-10 09:34:57 +0000
commit0a48bba6aa2f009105a2aff213b9b977aa2dff2e (patch)
tree8f50f6a2df5de3bfb64afaf5db1e984dec56368d /usr.sbin/ppp
parentfa9febb9acef2ba29d2f7961592d7428ec050fb4 (diff)
downloadFreeBSD-src-0a48bba6aa2f009105a2aff213b9b977aa2dff2e.zip
FreeBSD-src-0a48bba6aa2f009105a2aff213b9b977aa2dff2e.tar.gz
Allow reserved substitution strings to be escaped by preceeding them
with a backslash.
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/command.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c
index 151d4e0..dad0acb 100644
--- a/usr.sbin/ppp/command.c
+++ b/usr.sbin/ppp/command.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: command.c,v 1.200 1999/06/09 08:47:32 brian Exp $
+ * $Id: command.c,v 1.201 1999/06/09 16:54:02 brian Exp $
*
*/
#include <sys/param.h>
@@ -144,7 +144,7 @@
#define NEG_VJCOMP 53
const char Version[] = "2.22";
-const char VersionDate[] = "$Date: 1999/06/09 08:47:32 $";
+const char VersionDate[] = "$Date: 1999/06/09 16:54:02 $";
static int ShowCommand(struct cmdargs const *);
static int TerminalCommand(struct cmdargs const *);
@@ -354,10 +354,12 @@ strstrword(char *big, const char *little)
len = strlen(little);
while ((pos = strstr(pos, little)) != NULL)
- if ((pos == big || !isinword(pos[-1])) && !isinword(pos[len]))
- break;
- else
+ if ((pos != big && isinword(pos[-1])) || isinword(pos[len]))
pos++;
+ else if (pos != big && pos[-1] == '\\')
+ memmove(pos - 1, pos, strlen(pos) + 1);
+ else
+ break;
return pos;
}
OpenPOWER on IntegriCloud