*string = value ? xstrdup (value) : 0;
}
+#if 0
+/* This function is currently unused; perhaps it should be removed? */
+
/* Allocate a copy of the string quoted as in C, and returns that. If
the string does not have to be quoted, it returns a null pointer.
The allocated copy should normally be freed with free() after the
when reading directory files. This means that we can't use
quotearg, as quotearg is locale-dependent and is meant for human
consumption. */
-char *
+static char *
quote_copy_string (const char *string)
{
const char *source = string;
}
return 0;
}
+#endif
/* Takes a quoted C string (like those produced by quote_copy_string)
and turns it back into the un-quoted original. This is done in
return wd_count++;
}
+/* Index of current directory. */
+int chdir_current;
+
/* Change to directory I. If I is 0, change to the initial working
directory; otherwise, I must be a value returned by chdir_arg. */
void
chdir_do (int i)
{
- static int previous;
-
- if (previous != i)
+ if (chdir_current != i)
{
- struct wd *prev = &wd[previous];
+ struct wd *prev = &wd[chdir_current];
struct wd *curr = &wd[i];
if (prev->err < 0)
chdir_fatal (curr->name);
}
- previous = i;
+ chdir_current = i;
}
}
\f