rem: if (wd == NULL) error (EXIT_FAILURE, errno, _("cannot get current directory")); printf ("%s\n", wd);
add: if (wd != NULL) { puts (wd); free (wd); } else { struct Path *path = path_init (); robust_getcwd (path); puts (path->start); path_free (path); }
context: main (int argc, char **argv){  char *wd;  program_name = argv[0];  setlocale (LC_ALL, "");  bindtextdomain (PACKAGE, LOCALEDIR);  textdomain (PACKAGE);  atexit (close_stdout);  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,		      AUTHORS, usage);  if (argc != 1)    error (0, 0, _("ignoring non-option arguments"));  wd = xgetcwd ();  if (wd == NULL)    error (EXIT_FAILURE, errno, _("cannot get current directory"));  printf ("%s\n", wd);  exit (EXIT_SUCCESS);}