summaryrefslogtreecommitdiff
path: root/lib-src/ebrowse.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-06-20 08:56:22 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-06-20 08:57:25 -0700
commitb6af27927c2f06c5a091fbc1b04e819a70e0e2a2 (patch)
tree3e227d83e43b2e94e1dad66590a2fd83b21f4871 /lib-src/ebrowse.c
parentde4e1bddb1c4823af4d04f0bff5b4a0217e9701d (diff)
downloademacs-b6af27927c2f06c5a091fbc1b04e819a70e0e2a2.tar.gz
Simplify lib-src version printing
* lib-src/Makefile.in (etags_cflags): Remove. All uses replaced by a simple ‘-o $@’. (ebrowse${EXEEXT}, emacsclient${EXEEXT}, emacsclientw${EXEEXT}): Omit -DVERSION= option. * lib-src/ebrowse.c (VERSION): * lib-src/emacsclient.c (VERSION): * lib-src/etags.c (EMACS_NAME, VERSION): Remove. All uses replaced by PACKAGE_NAME and PACKAGE_VERSION. * lib-src/ebrowse.c (version): * lib-src/etags.c (print_version): Use fputs to output the version info, since that’s fputs_unlocked. * lib-src/etags.c (PROGRAM_NAME): New macro. (print_version): Use it.
Diffstat (limited to 'lib-src/ebrowse.c')
-rw-r--r--lib-src/ebrowse.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c
index 938b405f3cf..aaa0893ea44 100644
--- a/lib-src/ebrowse.c
+++ b/lib-src/ebrowse.c
@@ -3573,21 +3573,15 @@ usage (int error)
}
-/* Display version and copyright info. The VERSION macro is set
- from config.h and contains the Emacs version. */
-
-#ifndef VERSION
-# define VERSION "21"
-#endif
+/* Display version and copyright info. */
static _Noreturn void
version (void)
{
- char emacs_copyright[] = COPYRIGHT;
-
- printf ("ebrowse %s\n", VERSION);
- puts (emacs_copyright);
- puts ("This program is distributed under the same terms as Emacs.");
+ fputs (("ebrowse " PACKAGE_VERSION "\n"
+ COPYRIGHT "\n"
+ "This program is distributed under the same terms as Emacs.\n"),
+ stdout);
exit (EXIT_SUCCESS);
}