1 /* 2 * rlversion -- print out readline's version number 3 */ 4 5 /* Copyright (C) 1987-2009 Free Software Foundation, Inc. 6 7 This file is part of the GNU Readline Library (Readline), a library for 8 reading lines of text with interactive input and history editing. 9 10 Readline is free software: you can redistribute it and/or modify 11 it under the terms of the GNU General Public License as published by 12 the Free Software Foundation, either version 3 of the License, or 13 (at your option) any later version. 14 15 Readline is distributed in the hope that it will be useful, 16 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 GNU General Public License for more details. 19 20 You should have received a copy of the GNU General Public License 21 along with Readline. If not, see <http://www.gnu.org/licenses/>. 22 */ 23 24 #if defined (HAVE_CONFIG_H) 25 # include <config.h> 26 #endif 27 28 #include <stdio.h> 29 #include <sys/types.h> 30 #include "posixstat.h" 31 32 #ifdef HAVE_STDLIB_H 33 # include <stdlib.h> 34 #else 35 extern void exit(); 36 #endif 37 38 #ifdef READLINE_LIBRARY 39 # include "readline.h" 40 #else 41 # include <readline/readline.h> 42 #endif 43 44 int 45 main() 46 { 47 printf ("%s\n", rl_library_version ? rl_library_version : "unknown"); 48 exit (0); 49 } 50