Changeset View
Changeset View
Standalone View
Standalone View
lib/libedit/histedit.h
/* $NetBSD: histedit.h,v 1.55 2016/02/17 19:47:49 christos Exp $ */ | /* $NetBSD: histedit.h,v 1.57 2017/09/01 10:19:10 christos Exp $ */ | ||||
/*- | /*- | ||||
* Copyright (c) 1992, 1993 | * Copyright (c) 1992, 1993 | ||||
* The Regents of the University of California. All rights reserved. | * The Regents of the University of California. All rights reserved. | ||||
* | * | ||||
* This code is derived from software contributed to Berkeley by | * This code is derived from software contributed to Berkeley by | ||||
* Christos Zoulas of Cornell University. | * Christos Zoulas of Cornell University. | ||||
* | * | ||||
▲ Show 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | |||||
int el_parse(EditLine *, int, const char **); | int el_parse(EditLine *, int, const char **); | ||||
/* | /* | ||||
* Low level editline access functions | * Low level editline access functions | ||||
*/ | */ | ||||
int el_set(EditLine *, int, ...); | int el_set(EditLine *, int, ...); | ||||
int el_get(EditLine *, int, ...); | int el_get(EditLine *, int, ...); | ||||
unsigned char _el_fn_complete(EditLine *, int); | unsigned char _el_fn_complete(EditLine *, int); | ||||
unsigned char _el_fn_sh_complete(EditLine *, int); | |||||
/* | /* | ||||
* el_set/el_get parameters | * el_set/el_get parameters | ||||
* | * | ||||
* When using el_wset/el_wget (as opposed to el_set/el_get): | * When using el_wset/el_wget (as opposed to el_set/el_get): | ||||
* Char is wchar_t, otherwise it is char. | * Char is wchar_t, otherwise it is char. | ||||
* prompt_func is el_wpfunc_t, otherwise it is el_pfunc_t . | * prompt_func is el_wpfunc_t, otherwise it is el_pfunc_t . | ||||
▲ Show 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | |||||
#define H_CLEAR 19 /* , void); */ | #define H_CLEAR 19 /* , void); */ | ||||
#define H_SETUNIQUE 20 /* , int); */ | #define H_SETUNIQUE 20 /* , int); */ | ||||
#define H_GETUNIQUE 21 /* , void); */ | #define H_GETUNIQUE 21 /* , void); */ | ||||
#define H_DEL 22 /* , int); */ | #define H_DEL 22 /* , int); */ | ||||
#define H_NEXT_EVDATA 23 /* , const int, histdata_t *); */ | #define H_NEXT_EVDATA 23 /* , const int, histdata_t *); */ | ||||
#define H_DELDATA 24 /* , int, histdata_t *);*/ | #define H_DELDATA 24 /* , int, histdata_t *);*/ | ||||
#define H_REPLACE 25 /* , const char *, histdata_t); */ | #define H_REPLACE 25 /* , const char *, histdata_t); */ | ||||
#define H_SAVE_FP 26 /* , FILE *); */ | #define H_SAVE_FP 26 /* , FILE *); */ | ||||
#define H_NSAVE_FP 27 /* , size_t, FILE *); */ | |||||
/* | /* | ||||
* ==== Tokenization ==== | * ==== Tokenization ==== | ||||
*/ | */ | ||||
typedef struct tokenizer Tokenizer; | typedef struct tokenizer Tokenizer; | ||||
Show All 18 Lines | |||||
/* | /* | ||||
* ==== Editing ==== | * ==== Editing ==== | ||||
*/ | */ | ||||
typedef struct lineinfow { | typedef struct lineinfow { | ||||
const wchar_t *buffer; | const wchar_t *buffer; | ||||
const wchar_t *cursor; | const wchar_t *cursor; | ||||
const wchar_t *lastchar; | const wchar_t *lastchar; | ||||
} LineInfoW; | } LineInfoW; | ||||
typedef int (*el_rfunc_t)(EditLine *, wchar_t *); | |||||
const wchar_t *el_wgets(EditLine *, int *); | const wchar_t *el_wgets(EditLine *, int *); | ||||
int el_wgetc(EditLine *, wchar_t *); | int el_wgetc(EditLine *, wchar_t *); | ||||
void el_wpush(EditLine *, const wchar_t *); | void el_wpush(EditLine *, const wchar_t *); | ||||
int el_wparse(EditLine *, int, const wchar_t **); | int el_wparse(EditLine *, int, const wchar_t **); | ||||
int el_wset(EditLine *, int, ...); | int el_wset(EditLine *, int, ...); | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |