1 /*******************************************************************************
2 3 Bindings to Readline library's main operations.
4 5 This module contains the D binding of the library functions of readline.h.
6 Please consult the original header documentation for details.
7 8 You need to have the library installed and link with -lreadline.
9 10 Copyright:
11 Copyright (c) 2009-2016 dunnhumby Germany GmbH.
12 All rights reserved.
13 14 License:
15 Boost Software License Version 1.0. See LICENSE_BOOST.txt for details.
16 Alternatively, this file may be distributed under the terms of the Tango
17 3-Clause BSD License (see LICENSE_BSD.txt for details).
18 19 Bear in mind this module provides bindings to an external library that
20 has its own license, which might be more restrictive. Please check the
21 external library license to see which conditions apply for linking.
22 23 *******************************************************************************/24 25 moduleocean.io.console.readline.c.readline;
26 27 28 29 importocean.transition;
30 31 32 publicextern (C)
33 {
34 /***************************************************************************
35 36 Function signature for functions used with the rl_bind_key functions and
37 various other functions.
38 39 ***************************************************************************/40 41 aliasintfunction (intcount, intc) rl_command_func_t;
42 43 /***************************************************************************
44 45 Abort pushing back character param ''c'' to input stream
46 47 ***************************************************************************/48 49 externmixin(global("rl_command_func_t rl_abort;"));
50 51 /***************************************************************************
52 53 Insert character param ``c'' back into input stream for param ``count''
54 times
55 56 ***************************************************************************/57 58 externmixin(global("rl_command_func_t rl_insert;"));
59 60 /***************************************************************************
61 62 Binds a key.
63 64 ***************************************************************************/65 66 intrl_bind_key(intkey, scoperl_command_func_t* _function);
67 68 /***************************************************************************
69 70 Reads input.
71 72 ***************************************************************************/73 74 char* readline(char*);
75 }