php-src/ext/readline
Peter Kokot dcdcb3cbfe
Autotools: Replace AC_MSG_ERROR with AC_MSG_FAILURE (#15209)
This replaces the AC_MSG_ERROR with AC_MSG_FAILURE, where appropriate.

The AC_MSG_ERROR outputs given message and exits the configure step. The
AC_MSG_FAILURE does the same but also automatically outputs additional
message "See 'config.log' for more details." which might help directing
the user where to look further.

The AC_MSG_ERROR is used for errors where current test step isn't logged
in the config.log and wouldn't make sense, and AC_MSG_FAILURE is mostly
used in cases of library checks, compilation tests, headers checked with
AC_CHECK_HEADER* and similar tests that are also logged in the
config.log.

AC_MSG_ERROR([Sanity check failed.]) output:

```
configure: error: Sanity check failed.
```

AC_MSG_FAILURE([Sanity check failed.]) output:

```
configure: error: in '/path/to/php-src':
configure: error: Sanity check failed.
See 'config.log' for more details
```
2024-08-04 07:36:37 +02:00
..
tests ext/readline: readline_info fix usage when the buffer is not initialised (#15139) 2024-07-31 11:04:44 +01:00
config.m4 Autotools: Replace AC_MSG_ERROR with AC_MSG_FAILURE (#15209) 2024-08-04 07:36:37 +02:00
config.w32 add readline_list_history with libedit >= 3.1 and mingweditline 2019-02-19 08:51:56 +01:00
CREDITS
php_readline.h Sync #if/ifdef/defined (#14512) 2024-06-10 08:56:10 +02:00
readline_arginfo.h Sync #if/ifdef/defined (#14520) 2024-06-11 22:47:05 +02:00
readline_cli.c Preferably include from build dir (#13516) 2024-06-26 00:26:43 +02:00
readline_cli.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
readline.c ext/readline: readline_info fix usage when the buffer is not initialised (#15139) 2024-07-31 11:04:44 +01:00
readline.stub.php Sync #if/ifdef/defined (#14520) 2024-06-11 22:47:05 +02:00
README.md Allow overriding completion in auto_prepend_file 2020-08-01 11:39:08 -04:00

readline

Provides generic line editing, history, and tokenization functions. See https://www.php.net/manual/en/book.readline.php

Implementation Details

C variables starting with rl_* are declared by the readline library (or are macros referring to variables from the libedit library). See http://web.mit.edu/gnu/doc/html/rlman_2.html

This should only be used in the CLI SAPI. Historically, the code lived in sapi/cli, but many distributions build readline as a shared extension. Therefore, that code was split into ext/readline so that this can dynamically be loaded. With other SAPIs, readline is/should be disabled.

readline_cli.c implements most of the interactive shell(php -a).