-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompat.c.v
41 lines (34 loc) · 1.28 KB
/
compat.c.v
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
// Copyright (c) 2023 Tim Marston <[email protected]>. All rights reserved.
// Use of this file is permitted under the terms of the GNU General Public
// Licence, version 3 or later, which can be found in the LICENCE file.
module greadline
#flag darwin -I/usr/local/opt/readline/include
#flag darwin -L/usr/local/opt/readline/lib
#flag darwin -lreadline
#flag linux -lreadline
#include <readline/readline.h>
fn C.readline(prompt &char) &char
fn C.rl_parse_and_bind(line &char) int
fn C.rl_read_init_file(filename &char) int
fn C.rl_replace_line(text &char, clear_undo int)
fn C.rl_insert_text(text &char) int
fn C.rl_delete_text(start int, end int) int
fn C.rl_clear_history()
fn C.rl_add_funmap_entry(name &char, f voidptr) int
fn C.rl_mark_active_p() int
fn C.rl_activate_mark()
fn C.rl_deactivate_mark()
#include <readline/history.h>
pub struct C._hist_entry {
line &char
timestamp &char
data voidptr
}
fn C.read_history(filename &char) int
fn C.write_history(filename &char) int
fn C.append_history(nelements int, filename &char) int
fn C.history_truncate_file(filename &char, nlines int) int
fn C.history_get(offset int) &C._hist_entry
fn C.remove_history(which int) &C._hist_entry
fn C.replace_history_entry(which int, line &char, data voidptr) &C._hist_entry
fn C.add_history(str &char)