wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Enumerations | Functions
edit.c File Reference

Command line editing and history. More...

#include "includes.h"
#include <termios.h>
#include "common.h"
#include "eloop.h"
#include "list.h"
#include "edit.h"

Data Structures

struct  edit_history
 

Macros

#define CMD_BUF_LEN   4096
 
#define HISTORY_MAX   100
 
#define CLEAR_END_LINE   "\e[K"
 

Enumerations

enum  edit_key_code {
  EDIT_KEY_NONE = 256, EDIT_KEY_TAB, EDIT_KEY_UP, EDIT_KEY_DOWN,
  EDIT_KEY_RIGHT, EDIT_KEY_LEFT, EDIT_KEY_ENTER, EDIT_KEY_BACKSPACE,
  EDIT_KEY_INSERT, EDIT_KEY_DELETE, EDIT_KEY_HOME, EDIT_KEY_END,
  EDIT_KEY_PAGE_UP, EDIT_KEY_PAGE_DOWN, EDIT_KEY_F1, EDIT_KEY_F2,
  EDIT_KEY_F3, EDIT_KEY_F4, EDIT_KEY_F5, EDIT_KEY_F6,
  EDIT_KEY_F7, EDIT_KEY_F8, EDIT_KEY_F9, EDIT_KEY_F10,
  EDIT_KEY_F11, EDIT_KEY_F12, EDIT_KEY_CTRL_UP, EDIT_KEY_CTRL_DOWN,
  EDIT_KEY_CTRL_RIGHT, EDIT_KEY_CTRL_LEFT, EDIT_KEY_CTRL_A, EDIT_KEY_CTRL_B,
  EDIT_KEY_CTRL_D, EDIT_KEY_CTRL_E, EDIT_KEY_CTRL_F, EDIT_KEY_CTRL_G,
  EDIT_KEY_CTRL_H, EDIT_KEY_CTRL_J, EDIT_KEY_CTRL_K, EDIT_KEY_CTRL_L,
  EDIT_KEY_CTRL_N, EDIT_KEY_CTRL_O, EDIT_KEY_CTRL_P, EDIT_KEY_CTRL_R,
  EDIT_KEY_CTRL_T, EDIT_KEY_CTRL_U, EDIT_KEY_CTRL_V, EDIT_KEY_CTRL_W,
  EDIT_KEY_ALT_UP, EDIT_KEY_ALT_DOWN, EDIT_KEY_ALT_RIGHT, EDIT_KEY_ALT_LEFT,
  EDIT_KEY_SHIFT_UP, EDIT_KEY_SHIFT_DOWN, EDIT_KEY_SHIFT_RIGHT, EDIT_KEY_SHIFT_LEFT,
  EDIT_KEY_ALT_SHIFT_UP, EDIT_KEY_ALT_SHIFT_DOWN, EDIT_KEY_ALT_SHIFT_RIGHT, EDIT_KEY_ALT_SHIFT_LEFT,
  EDIT_KEY_EOF
}
 

Functions

void edit_clear_line (void)
 
int edit_init (void(*cmd_cb)(void *ctx, char *cmd), void(*eof_cb)(void *ctx), char **(*completion_cb)(void *ctx, const char *cmd, int pos), void *ctx, const char *history_file, const char *ps)
 
void edit_deinit (const char *history_file, int(*filter_cb)(void *ctx, const char *cmd))
 
void edit_redraw (void)
 

Detailed Description

Command line editing and history.