summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/cnf.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/kpathsea/cnf.c')
-rw-r--r--Build/source/texk/kpathsea/cnf.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/Build/source/texk/kpathsea/cnf.c b/Build/source/texk/kpathsea/cnf.c
index 91ce92cb785..5c11ae30d00 100644
--- a/Build/source/texk/kpathsea/cnf.c
+++ b/Build/source/texk/kpathsea/cnf.c
@@ -55,15 +55,15 @@ do_line (kpathsea kpse, string line)
string start;
string value, var;
string prog = NULL;
-
+
/* Skip leading whitespace. */
while (ISSPACE (*line))
line++;
-
+
/* More to do only if we have non-comment material left. */
if (*line == 0 || *line == '%' || *line == '#')
return;
-
+
/* The variable name is everything up to the next space or = or `.'. */
start = line;
while (!ISSPACE (*line) && *line != '=' && *line != '.')
@@ -74,7 +74,7 @@ do_line (kpathsea kpse, string line)
var = (string)xmalloc (len + 1);
strncpy (var, start, len);
var[len] = 0;
-
+
/* If the variable is qualified with a program name, find out which. */
while (ISSPACE (*line))
line++;
@@ -103,13 +103,13 @@ do_line (kpathsea kpse, string line)
while (ISSPACE (*line))
line++;
}
-
+
/* The value is whatever remains. Remove trailing whitespace. */
start = line;
len = strlen (start);
while (len > 0 && ISSPACE (start[len - 1]))
len--;
-
+
value = (string)xmalloc (len + 1);
strncpy (value, start, len);
value[len] = 0;
@@ -119,11 +119,11 @@ do_line (kpathsea kpse, string line)
: on Unix, ; on NT. We can't switch NT to allowing :'s, since :
is the drive separator. So we switch Unix to allowing ;'s. On the
other hand, we don't want to change IS_ENV_SEP and all the rest.
-
+
So, simply translate all ;'s in the path
values to :'s if we are a Unix binary. (Fortunately we don't use ;
in other kinds of texmf.cnf values.) */
-
+
if (IS_ENV_SEP(':')) {
string loc;
for (loc = value; *loc; loc++) {
@@ -143,7 +143,7 @@ do_line (kpathsea kpse, string line)
var = lhs;
}
hash_insert (&(kpse->cnf_hash), var, value);
-
+
/* We could check that anything remaining is preceded by a comment
character, but let's not bother. */
}
@@ -201,7 +201,7 @@ read_all_cnf (kpathsea kpse)
string warn = getenv ("KPATHSEA_WARNING");
if (!(warn && STREQ (warn, "0"))) {
WARNING1
- ("kpathsea: configuration file texmf.cnf not found in these directories: %s",
+ ("kpathsea: configuration file texmf.cnf not found in these directories: %s",
cnf_path);
}
}
@@ -224,19 +224,19 @@ kpathsea_cnf_get (kpathsea kpse, const_string name)
compile-time path does not contain variable references. */
if (kpse->doing_cnf_init)
return NULL;
-
+
if (kpse->cnf_hash.size == 0) {
/* Read configuration files and initialize databases. */
kpse->doing_cnf_init = true;
read_all_cnf (kpse);
kpse->doing_cnf_init = false;
-
+
/* Since `kpse_init_db' recursively calls us, we must call it from
outside a `kpse_path_element' loop (namely, the one in
`read_all_cnf' above): `kpse_path_element' is not reentrant. */
kpathsea_init_db (kpse);
}
-
+
/* First look up NAME.`kpse->program_name', then NAME. */
assert (kpse->program_name);
ctry = concat3 (name, ".", kpse->program_name);
@@ -254,7 +254,7 @@ kpathsea_cnf_get (kpathsea kpse, const_string name)
ret = NULL;
}
}
-
+
return ret;
}