chiark
/
gitweb
/
~ian
/
userv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
@@ -7,7 +7,7 @@
[userv.git]
/
parser.c
diff --git
a/parser.c
b/parser.c
index 5f6ebadc7da07b2f2efe6d09bbd7a1b1039b6c23..0d1054ff29ae454f92474e6711e711549a4ab0e6 100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-370,6
+370,7
@@
static int paa_message(const char **message_r) {
/* Returned value is invalidated by repeated calls. */
static char *buildbuf;
static int buildbuflen;
/* Returned value is invalidated by repeated calls. */
static char *buildbuf;
static int buildbuflen;
+ const char *usetext;
int r, tl;
int r, tl;
@@
-384,9
+385,10
@@
static int paa_message(const char **message_r) {
return tokv_error;
}
if (r == tokv_newline) break;
return tokv_error;
}
if (r == tokv_newline) break;
- tl+= strlen(yytext);
+ usetext= r == tokv_lwsp ? " " : yytext;
+ tl+= strlen(usetext);
if (makeroom(&buildbuf,&buildbuflen,tl)) return stringoverflow("message");
if (makeroom(&buildbuf,&buildbuflen,tl)) return stringoverflow("message");
- strcat(buildbuf,
yy
text);
+ strcat(buildbuf,
use
text);
}
*message_r= buildbuf;
return 0;
}
*message_r= buildbuf;
return 0;
@@
-1089,8
+1091,14
@@
int df_includelookup(int dtoken) {
} else {
if (*p=='.') *q++= ':';
while ((c= *p++)) {
} else {
if (*p=='.') *q++= ':';
while ((c= *p++)) {
- if (c=='/') { *q++= ':'; c='-'; }
- else if (c==':') { *q++= ':'; }
+ if (c=='/') {
+ *q++= ':';
+ c= '-';
+ } else if (!((c >= '0' && c <= '9') ||
+ (c >= 'a' && c <= 'z') ||
+ c == '-' || c == '_')) {
+ *q++= ':';
+ }
*q++= c;
}
*q++= 0;
*q++= c;
}
*q++= 0;