/* This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
/** terminal prompt interface (API)
 *  @note allows line editing and supports some ANSI escape codes
 *  @file terminal.h
 *  @author King Kévin <kingkevin@cuvoodoo.info>
 *  @date 2018
 */

/** terminal prompt prefix */
extern char* terminal_prefix;

/** initialize terminal prompt */
void terminal_setup(void);

/** send character to terminal
 *  @param[in] c character to send
 */
void terminal_send(char c);

/** called when a line is entered
 *  @param[in] line line entered by user (NULL on CTRL+D)
 */
extern void (*terminal_process)(char* line);
