summaryrefslogtreecommitdiff
path: root/android/compat/readline/readline.h
blob: 2d2fa37c05e60348e77628f7186d6e5720bfaf40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 *
 *  BlueZ - Bluetooth protocol stack for Linux
 *
 *  Copyright (C) 1987-2011 Free Software Foundation, Inc.
 *
 *
 */

#ifndef _READLINE_H_
#define _READLINE_H_

typedef void (*rl_vcpfunc_t)(char *c);
typedef void (*rl_compdisp_func_t)(char **c, int i, int j);
typedef char *(*rl_compentry_func_t)(const char *c, int i);
typedef char **(*rl_completion_func_t)(const char *c, int i, int j);

#define RL_STATE_DONE 0x1000000
#define RL_ISSTATE(x) (rl_readline_state & (x))

static int rl_end;
static int rl_point;
static int rl_readline_state;
static int rl_erase_empty_line;
static int rl_attempted_completion_over;
static char *rl_prompt;
static char *rl_line_buffer;
static rl_compdisp_func_t rl_completion_display_matches_hook;
static rl_completion_func_t rl_attempted_completion_function;

static inline void rl_callback_handler_install(const char *c, rl_vcpfunc_t f)
{
	printf("readline not available\n");
	exit(1);
}

static inline int rl_set_prompt(const char *c)
{
	return -1;
}

static inline void rl_replace_line(const char *c, int i)
{
}

static inline void rl_redisplay(void)
{
}

static inline char **rl_completion_matches(const char *c, rl_compentry_func_t f)
{
	return NULL;
}

static inline int rl_insert_text(const char *c)
{
	return -1;
}

static inline int rl_crlf(void)
{
	return -1;
}

static inline void rl_callback_read_char(void)
{
}

static inline int rl_message(const char *c, ...)
{
	return -1;
}

static inline void rl_callback_handler_remove(void)
{
}

static inline char *rl_copy_text(int i, int j)
{
	return NULL;
}

static inline void rl_save_prompt(void)
{
}

static inline void rl_restore_prompt(void)
{
}

static inline int rl_forced_update_display(void)
{
	return -1;
}

#endif