(WRITTEN_BY): Rename from AUTHORS.
[platform/upstream/coreutils.git] / src / pwd.c
index 6a4ce2a..1c0a037 100644 (file)
--- a/src/pwd.c
+++ b/src/pwd.c
@@ -1,5 +1,5 @@
 /* pwd - print current directory
-   Copyright (C) 1994-1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1994-1997, 1999-2003 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #include <sys/types.h>
 
 #include "system.h"
-#include "closeout.h"
 #include "long-options.h"
 #include "error.h"
+#include "xgetcwd.h"
 
 /* The official name of this program (e.g., no `g' prefix).  */
 #define PROGRAM_NAME "pwd"
 
-#define AUTHORS "Jim Meyering"
-
-char *xgetcwd ();
+#define WRITTEN_BY _("Written by Jim Meyering.")
 
 /* The name this program was run with. */
 char *program_name;
@@ -61,6 +59,7 @@ main (int argc, char **argv)
 {
   char *wd;
 
+  initialize_main (&argc, &argv);
   program_name = argv[0];
   setlocale (LC_ALL, "");
   bindtextdomain (PACKAGE, LOCALEDIR);
@@ -69,9 +68,9 @@ main (int argc, char **argv)
   atexit (close_stdout);
 
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
-                     AUTHORS, usage);
+                     WRITTEN_BY, usage);
 
-  if (argc != 1)
+  if (1 < argc)
     error (0, 0, _("ignoring non-option arguments"));
 
   wd = xgetcwd ();
@@ -79,5 +78,5 @@ main (int argc, char **argv)
     error (EXIT_FAILURE, errno, _("cannot get current directory"));
   printf ("%s\n", wd);
 
-  exit (0);
+  exit (EXIT_SUCCESS);
 }