chiark
/
gitweb
/
~ian
/
userv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
init script: Source init-functions
[userv.git]
/
parser.c
diff --git
a/parser.c
b/parser.c
index 1bdf56d3441188e25a958b715100685fcfd6a860..ade124e1f64afd09349533171b7fd0c144aa0016 100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-6,11
+6,12
@@
* about m4 quoting &c., but we have to #include it so that the C
* objects from the lexer are available.
*
* about m4 quoting &c., but we have to #include it so that the C
* objects from the lexer are available.
*
- * Copyright (C)1996-1999,2001,2006,2012 Ian Jackson
+ * userv is copyright Ian Jackson and other contributors.
+ * See README for full authorship information.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version
2
of the License, or
+ * the Free Software Foundation; either version
3
of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
@@
-19,8
+20,7
@@
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with userv; if not, write to the Free Software
- * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * along with userv; if not, see <http://www.gnu.org/licenses/>.
*/
static int parse_file(const char *string, int *didexist);
*/
static int parse_file(const char *string, int *didexist);
@@
-1034,6
+1034,15
@@
x_err:
return r;
}
return r;
}
+static int oldquote = 0;
+
+int dfg_lookupquotemode(int dtoken) {
+ int r;
+ r= pa_mnl(); if (r) return r;
+ oldquote = dtoken == tokv_word_includelookupquoteold;
+ return r;
+}
+
int df_includelookup(int dtoken) {
static char *buildbuf=0;
int buildbuflen=0;
int df_includelookup(int dtoken) {
static char *buildbuf=0;
int buildbuflen=0;
@@
-1085,9
+1094,11
@@
int df_includelookup(int dtoken) {
if (c=='/') {
*q++= ':';
c= '-';
if (c=='/') {
*q++= ':';
c= '-';
- } else if (!((c >= '0' && c <= '9') ||
+ } else if (oldquote ?
+ !((c >= '0' && c <= '9') ||
(c >= 'a' && c <= 'z') ||
(c >= 'a' && c <= 'z') ||
- c == '-' || c == '_')) {
+ c == '-' || c == '_') :
+ (c==':')) {
*q++= ':';
}
*q++= c;
*q++= ':';
}
*q++= c;