Commit | Line | Data |
---|---|---|
c862e87b JM |
1 | /* |
2 | * rlversion -- print out readline's version number | |
3 | */ | |
4 | ||
9255ee31 EZ |
5 | /* Copyright (C) 1987-2002 Free Software Foundation, Inc. |
6 | ||
7 | This file is part of the GNU Readline Library, a library for | |
8 | reading lines of text with interactive input and history editing. | |
9 | ||
10 | The GNU Readline Library is free software; you can redistribute it | |
11 | and/or modify it under the terms of the GNU General Public License | |
12 | as published by the Free Software Foundation; either version 2, or | |
13 | (at your option) any later version. | |
14 | ||
15 | The GNU Readline Library is distributed in the hope that it will be | |
16 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty | |
17 | of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | GNU General Public License for more details. | |
19 | ||
20 | The GNU General Public License is often shipped with GNU software, and | |
21 | is generally kept in a file called COPYING or LICENSE. If you do not | |
22 | have a copy of the license, write to the Free Software Foundation, | |
23 | 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ | |
24 | ||
c862e87b JM |
25 | #if defined (HAVE_CONFIG_H) |
26 | # include <config.h> | |
27 | #endif | |
28 | ||
29 | #include <stdio.h> | |
30 | #include <sys/types.h> | |
31 | #include "posixstat.h" | |
32 | ||
5bdf8622 DJ |
33 | #ifdef HAVE_STDLIB_H |
34 | # include <stdlib.h> | |
35 | #else | |
36 | extern void exit(); | |
37 | #endif | |
38 | ||
1b17e766 EZ |
39 | #ifdef READLINE_LIBRARY |
40 | # include "readline.h" | |
41 | #else | |
42 | # include <readline/readline.h> | |
43 | #endif | |
c862e87b JM |
44 | |
45 | main() | |
46 | { | |
47 | printf ("%s\n", rl_library_version ? rl_library_version : "unknown"); | |
48 | exit (0); | |
49 | } |