summaryrefslogtreecommitdiff
path: root/libguile
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-11-17 22:03:13 +0100
committerLudovic Courtès <ludo@gnu.org>2009-11-17 23:42:30 +0100
commit4f02b98d0ed4a314916c69a225d7a45dda3f5f8c (patch)
tree8c1c3ad43ff6773767a38b13299330d4cb9d9b96 /libguile
parent8bcecbd302912f802026b00fbd15abc93c81860c (diff)
downloadguile-4f02b98d0ed4a314916c69a225d7a45dda3f5f8c.tar.gz
Use Gnulib's `version-etc-fsf' for `--version' and `--help' output.
* m4/gnulib-cache.m4: Add `version-etc-fsf'. Switch to LGPLv3+. * GUILE-VERSION (PACKAGE): Change to "GNU Guile". * Makefile.am (distdir): New variable. * libguile/script.c (scm_shell_usage): Improve formatting. Use `emit_bug_reporting_address ()'. (scm_compile_shell_switches): Use `version_etc ()'.
Diffstat (limited to 'libguile')
-rw-r--r--libguile/script.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/libguile/script.c b/libguile/script.c
index 8c4e8ef55..89ff7a0c4 100644
--- a/libguile/script.c
+++ b/libguile/script.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 3 of
@@ -26,6 +26,8 @@
#include <errno.h>
#include <ctype.h>
+#include <version-etc.h>
+
#include "libguile/_scm.h"
#include "libguile/eval.h"
#include "libguile/feature.h"
@@ -358,13 +360,13 @@ scm_shell_usage (int fatal, char *message)
if (message)
fprintf (fp, "%s\n", message);
- fprintf (fp,
- "Usage: %s OPTION ...\n"
+ fprintf (fp,
+ "Usage: %s [OPTION]... [FILE]...\n"
"Evaluate Scheme code, interactively or from a script.\n"
"\n"
" [-s] FILE load Scheme source code from FILE, and exit\n"
" -c EXPR evalute Scheme expression EXPR, and exit\n"
- " -- stop scanning arguments; run interactively\n"
+ " -- stop scanning arguments; run interactively\n\n"
"The above switches stop argument processing, and pass all\n"
"remaining arguments as the value of (command-line).\n"
"If FILE begins with `-' the -s switch is mandatory.\n"
@@ -388,11 +390,11 @@ scm_shell_usage (int fatal, char *message)
" which is a list of numbers like \"2,13,14\"\n"
" -h, --help display this help and exit\n"
" -v, --version display version information and exit\n"
- " \\ read arguments from following script lines\n"
- "\n"
- "Please report bugs to bug-guile@gnu.org\n",
+ " \\ read arguments from following script lines\n",
scm_usage_name);
+ emit_bug_reporting_address ();
+
if (fatal)
exit (fatal);
}
@@ -656,13 +658,9 @@ scm_compile_shell_switches (int argc, char **argv)
|| ! strcmp (argv[i], "--version"))
{
/* Print version number. */
- printf ("Guile %s\n"
- "Copyright (c) 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation\n"
- "Guile may be distributed under the terms of the GNU General Public Licence;\n"
- "certain other uses are permitted as well. For details, see the file\n"
- "`COPYING', which is included in the Guile distribution.\n"
- "There is no warranty, to the extent permitted by law.\n",
- scm_to_locale_string (scm_version ()));
+ version_etc (stdout, scm_usage_name, PACKAGE_NAME, PACKAGE_VERSION,
+ /* XXX: Use gettext for the string below. */
+ "the Guile developers", NULL);
exit (0);
}