diff options
Diffstat (limited to 'miscutils/chat.c')
-rw-r--r-- | miscutils/chat.c | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/miscutils/chat.c b/miscutils/chat.c index 6b429f2a6..92a23441c 100644 --- a/miscutils/chat.c +++ b/miscutils/chat.c | |||
@@ -7,6 +7,72 @@ | |||
7 | * | 7 | * |
8 | * Licensed under GPLv2, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2, see file LICENSE in this source tree. |
9 | */ | 9 | */ |
10 | //config:config CHAT | ||
11 | //config: bool "chat" | ||
12 | //config: default y | ||
13 | //config: help | ||
14 | //config: Simple chat utility. | ||
15 | //config: | ||
16 | //config:config FEATURE_CHAT_NOFAIL | ||
17 | //config: bool "Enable NOFAIL expect strings" | ||
18 | //config: depends on CHAT | ||
19 | //config: default y | ||
20 | //config: help | ||
21 | //config: When enabled expect strings which are started with a dash trigger | ||
22 | //config: no-fail mode. That is when expectation is not met within timeout | ||
23 | //config: the script is not terminated but sends next SEND string and waits | ||
24 | //config: for next EXPECT string. This allows to compose far more flexible | ||
25 | //config: scripts. | ||
26 | //config: | ||
27 | //config:config FEATURE_CHAT_TTY_HIFI | ||
28 | //config: bool "Force STDIN to be a TTY" | ||
29 | //config: depends on CHAT | ||
30 | //config: default n | ||
31 | //config: help | ||
32 | //config: Original chat always treats STDIN as a TTY device and sets for it | ||
33 | //config: so-called raw mode. This option turns on such behaviour. | ||
34 | //config: | ||
35 | //config:config FEATURE_CHAT_IMPLICIT_CR | ||
36 | //config: bool "Enable implicit Carriage Return" | ||
37 | //config: depends on CHAT | ||
38 | //config: default y | ||
39 | //config: help | ||
40 | //config: When enabled make chat to terminate all SEND strings with a "\r" | ||
41 | //config: unless "\c" is met anywhere in the string. | ||
42 | //config: | ||
43 | //config:config FEATURE_CHAT_SWALLOW_OPTS | ||
44 | //config: bool "Swallow options" | ||
45 | //config: depends on CHAT | ||
46 | //config: default y | ||
47 | //config: help | ||
48 | //config: Busybox chat require no options. To make it not fail when used | ||
49 | //config: in place of original chat (which has a bunch of options) turn | ||
50 | //config: this on. | ||
51 | //config: | ||
52 | //config:config FEATURE_CHAT_SEND_ESCAPES | ||
53 | //config: bool "Support weird SEND escapes" | ||
54 | //config: depends on CHAT | ||
55 | //config: default y | ||
56 | //config: help | ||
57 | //config: Original chat uses some escape sequences in SEND arguments which | ||
58 | //config: are not sent to device but rather performs special actions. | ||
59 | //config: E.g. "\K" means to send a break sequence to device. | ||
60 | //config: "\d" delays execution for a second, "\p" -- for a 1/100 of second. | ||
61 | //config: Before turning this option on think twice: do you really need them? | ||
62 | //config: | ||
63 | //config:config FEATURE_CHAT_VAR_ABORT_LEN | ||
64 | //config: bool "Support variable-length ABORT conditions" | ||
65 | //config: depends on CHAT | ||
66 | //config: default y | ||
67 | //config: help | ||
68 | //config: Original chat uses fixed 50-bytes length ABORT conditions. Say N here. | ||
69 | //config: | ||
70 | //config:config FEATURE_CHAT_CLR_ABORT | ||
71 | //config: bool "Support revoking of ABORT conditions" | ||
72 | //config: depends on CHAT | ||
73 | //config: default y | ||
74 | //config: help | ||
75 | //config: Support CLR_ABORT directive. | ||
10 | 76 | ||
11 | //usage:#define chat_trivial_usage | 77 | //usage:#define chat_trivial_usage |
12 | //usage: "EXPECT [SEND [EXPECT [SEND...]]]" | 78 | //usage: "EXPECT [SEND [EXPECT [SEND...]]]" |