rlversion.c 1.3 KB

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