projects
/
cobramush.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f57d785
)
A percent sign followed by a space or placed at the end of the line will be parsed...
author
Ari Johnson
<ari@cobramush.org>
Wed, 21 Feb 2007 04:47:48 +0000
(
04:47
+0000)
committer
Ari Johnson
<ari@cobramush.org>
Wed, 21 Feb 2007 04:47:48 +0000
(
04:47
+0000)
src/parse.c
patch
|
blob
|
history
diff --git
a/src/parse.c
b/src/parse.c
index f99957ecf55ecbd414d7c4c56fb5ff983b2bf7c5..ea2004467019f2cbd3c7b711871a7619f4708d53 100644
(file)
--- a/
src/parse.c
+++ b/
src/parse.c
@@
-716,8
+716,11
@@
process_expression(char *buff, char **bp, char const **str,
(*str)++;
savec = **str;
- if (!savec)
+ if (!savec) {
+ /* Line ended in %, so treat it as a literal */
+ safe_chr('%', buff, bp);
goto exit_sequence;
+ }
savepos = *bp;
(*str)++;
@@
-725,6
+728,9
@@
process_expression(char *buff, char **bp, char const **str,
case '%': /* %% - a real % */
safe_chr('%', buff, bp);
break;
+ case ' ': /* "% " for more natural typing */
+ safe_str("% ", buff, bp);
+ break;
case '!': /* executor dbref */
safe_dbref(executor, buff, bp);
break;