- if (strcmp (string, "-C") == 0)
- {
- chdir_name = xstrdup (name_next (0));
- string = name_next (0);
- if (!chdir_name)
- FATAL_ERROR ((0, 0, _("Missing file name after -C")));
-
- if (chdir_name[0] != '/')
- {
- char *path = xmalloc (PATH_MAX);
-
- /* FIXME: Shouldn't we use xgetcwd? */
-#if HAVE_GETCWD
- if (!getcwd (path, PATH_MAX))
- FATAL_ERROR ((0, 0, _("Could not get current directory")));
-#else
- char *getwd ();
-
- if (!getwd (path))
- FATAL_ERROR ((0, 0, _("Could not get current directory: %s"),
- path));
-#endif
- chdir_name = new_name (path, chdir_name);
- free (path);
- }
- }
-