readline_cli.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Copyright (c) The PHP Group |
  4. +----------------------------------------------------------------------+
  5. | This source file is subject to version 3.01 of the PHP license, |
  6. | that is bundled with this package in the file LICENSE, and is |
  7. | available through the world-wide-web at the following url: |
  8. | https://www.php.net/license/3_01.txt |
  9. | If you did not receive a copy of the PHP license and are unable to |
  10. | obtain it through the world-wide-web, please send a note to |
  11. | license@php.net so we can mail you a copy immediately. |
  12. +----------------------------------------------------------------------+
  13. | Author: Marcus Boerger <helly@php.net> |
  14. | Johannes Schlueter <johannes@php.net> |
  15. +----------------------------------------------------------------------+
  16. */
  17. #include "php.h"
  18. #include "zend_smart_str_public.h"
  19. ZEND_BEGIN_MODULE_GLOBALS(cli_readline)
  20. char *pager;
  21. char *prompt;
  22. smart_str *prompt_str;
  23. ZEND_END_MODULE_GLOBALS(cli_readline)
  24. #ifdef ZTS
  25. # define CLIR_G(v) TSRMG(cli_readline_globals_id, zend_cli_readline_globals *, v)
  26. #else
  27. # define CLIR_G(v) (cli_readline_globals.v)
  28. #endif
  29. extern PHP_MINIT_FUNCTION(cli_readline);
  30. extern PHP_MSHUTDOWN_FUNCTION(cli_readline);
  31. extern PHP_MINFO_FUNCTION(cli_readline);
  32. char **php_readline_completion_cb(const char *text, int start, int end);
  33. ZEND_EXTERN_MODULE_GLOBALS(cli_readline)