xref: /php-src/ext/readline/readline_cli.h (revision 01b3fc03)
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 
18 #include "php.h"
19 #include "zend_smart_str_public.h"
20 
21 ZEND_BEGIN_MODULE_GLOBALS(cli_readline)
22 	char *pager;
23 	char *prompt;
24 	smart_str *prompt_str;
25 ZEND_END_MODULE_GLOBALS(cli_readline)
26 
27 #ifdef ZTS
28 # define CLIR_G(v) TSRMG(cli_readline_globals_id, zend_cli_readline_globals *, v)
29 #else
30 # define CLIR_G(v) (cli_readline_globals.v)
31 #endif
32 
33 extern PHP_MINIT_FUNCTION(cli_readline);
34 extern PHP_MSHUTDOWN_FUNCTION(cli_readline);
35 extern PHP_MINFO_FUNCTION(cli_readline);
36 
37 char **php_readline_completion_cb(const char *text, int start, int end);
38 
39 ZEND_EXTERN_MODULE_GLOBALS(cli_readline)
40