diff options
author | bapt <bapt@FreeBSD.org> | 2015-01-09 07:40:56 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2015-01-09 07:40:56 +0000 |
commit | 9092259f68a804406ade5c84b5ceb67aae8c8303 (patch) | |
tree | d33ef1b987208879e7fa795c6b8d9fb885b151a9 /lib/libedit/prompt.h | |
parent | ced5b3dac1efcd02dc8fdf099780b1245832ae94 (diff) | |
download | FreeBSD-src-9092259f68a804406ade5c84b5ceb67aae8c8303.zip FreeBSD-src-9092259f68a804406ade5c84b5ceb67aae8c8303.tar.gz |
Synchronize libedit with NetBSD and activate UTF-8 support [1]
Differences with NetBSD
Reapply our local patches on top of it
Fix Unicode environement detection
Fix reading a line in unicode environment.
It allows /bin/sh to works in UTF-8 envs
Differential Revision: https://reviews.freebsd.org/D1455
Reviewed by: jilles, pfg
Obtained from: NetBSD [1]
MFC after: 1 month
Relnotes: yes
Diffstat (limited to 'lib/libedit/prompt.h')
-rw-r--r-- | lib/libedit/prompt.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/libedit/prompt.h b/lib/libedit/prompt.h index c796d93..260c818 100644 --- a/lib/libedit/prompt.h +++ b/lib/libedit/prompt.h @@ -1,3 +1,5 @@ +/* $NetBSD: prompt.h,v 1.10 2009/12/30 22:37:40 christos Exp $ */ + /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -30,7 +32,6 @@ * SUCH DAMAGE. * * @(#)prompt.h 8.1 (Berkeley) 6/4/93 - * $NetBSD: prompt.h,v 1.9 2009/03/31 17:38:27 christos Exp $ * $FreeBSD$ */ @@ -42,18 +43,18 @@ #include "histedit.h" -typedef char * (*el_pfunc_t)(EditLine*); +typedef Char *(*el_pfunc_t)(EditLine *); typedef struct el_prompt_t { el_pfunc_t p_func; /* Function to return the prompt */ coord_t p_pos; /* position in the line after prompt */ - char p_ignore; /* character to start/end literal -*/ + Char p_ignore; /* character to start/end literal */ + int p_wide; } el_prompt_t; protected void prompt_print(EditLine *, int); -protected int prompt_set(EditLine *, el_pfunc_t, char, int); -protected int prompt_get(EditLine *, el_pfunc_t *, char *, int); +protected int prompt_set(EditLine *, el_pfunc_t, Char, int, int); +protected int prompt_get(EditLine *, el_pfunc_t *, Char *, int); protected int prompt_init(EditLine *); protected void prompt_end(EditLine *); |