1 /* version.c -- distribution and version numbers. */
3 /* Copyright (C) 1989 Free Software Foundation, Inc.
5 This file is part of GNU Bash, the Bourne Again SHell.
7 Bash is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 1, or (at your option) any later
12 Bash is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License along
18 with Bash; see the file COPYING. If not, write to the Free Software
19 Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
25 extern char *shell_name;
27 /* Defines from version.h */
28 char *dist_version = DISTVERSION;
29 int patch_level = PATCHLEVEL;
30 int build_version = BUILDVERSION;
32 char *release_status = RELSTATUS;
34 char *release_status = (char *)0;
36 char *sccs_version = SCCSVERSION;
38 /* Functions for getting, setting, and displaying the shell version. */
40 /* Give version information about this shell. */
42 shell_version_string ()
44 static char tt[32] = { '\0' };
49 sprintf (tt, "%s.%d(%d)-%s", dist_version, patch_level, build_version, release_status);
51 sprintf (tt, "%s.%d(%d)", dist_version, patch_level, build_version);
56 #if !defined (MACHTYPE)
57 # if defined (CONF_MACHTYPE)
58 # define MACHTYPE CONF_MACHTYPE
60 # define MACHTYPE "unknown"
65 show_shell_version (extended)
68 printf ("GNU bash, version %s (%s)\n", shell_version_string (), MACHTYPE);
70 printf ("Copyright 1998 Free Software Foundation, Inc.\n");