Peter Wemm f0957ccae4 Update nvi-1.79 to 2.1.1-4334a8297f
This is the gsoc-2011 project to clean up and backport multibyte support
from other nvi forks in a form we can use.

USE_WIDECHAR is on unless building for the rescue crunchgen. This should
allow editing in the native locale encoding.

USE_ICONV depends on make.conf having 'WITH_ICONV=YES' for now.  This
adds the ability to do things like edit a KOI8-R file while having $LANG
set to (say) en_US.UTF-8.  iconv is used to transcode the characters for
display.

Other points:
* It uses gencat and catopen/etc instead of homegrown msg catalog stuff.
* A lot of stuff has been trimmed out, eg: the perl and tcl bindings which
  we could never use in base anyway.
* It uses ncursesw when in widechar mode.  This could be interesting.

GSoC info: http://www.google-melange.com/gsoc/proposal/review/google/gsoc2011/zy/1
Repo at: https://github.com/lichray/nvi2

Obtained from:  Zhihao Yuan <lichray@gmail.com>
2013-08-11 20:03:12 +00:00

133 lines
5.7 KiB
C

char * codeset __P((void));
void conv_init __P((SCR *, SCR *));
int conv_enc __P((SCR *, int, char *));
void conv_end __P((SCR *));
int cut __P((SCR *, CHAR_T *, MARK *, MARK *, int));
int cut_line __P((SCR *, recno_t, size_t, size_t, CB *));
void cut_close __P((GS *));
TEXT *text_init __P((SCR *, const CHAR_T *, size_t, size_t));
void text_lfree __P((TEXTH *));
void text_free __P((TEXT *));
int del __P((SCR *, MARK *, MARK *, int));
int looks_utf8 __P((const char *, size_t));
int looks_utf16 __P((const char *, size_t));
int decode_utf8 __P((const char *));
int decode_utf16 __P((const char *, int));
FREF *file_add __P((SCR *, char *));
int file_init __P((SCR *, FREF *, char *, int));
int file_end __P((SCR *, EXF *, int));
int file_write __P((SCR *, MARK *, MARK *, char *, int));
int file_m1 __P((SCR *, int, int));
int file_m2 __P((SCR *, int));
int file_m3 __P((SCR *, int));
int file_aw __P((SCR *, int));
void set_alt_name __P((SCR *, char *));
lockr_t file_lock __P((SCR *, char *, int, int));
int v_key_init __P((SCR *));
void v_key_ilookup __P((SCR *));
size_t v_key_len __P((SCR *, ARG_CHAR_T));
char *v_key_name __P((SCR *, ARG_CHAR_T));
e_key_t v_key_val __P((SCR *, ARG_CHAR_T));
int v_event_push __P((SCR *, EVENT *, CHAR_T *, size_t, u_int));
int v_event_get __P((SCR *, EVENT *, int, u_int32_t));
void v_event_err __P((SCR *, EVENT *));
int v_event_flush __P((SCR *, u_int));
int db_eget __P((SCR *, recno_t, CHAR_T **, size_t *, int *));
int db_get __P((SCR *, recno_t, u_int32_t, CHAR_T **, size_t *));
int db_delete __P((SCR *, recno_t));
int db_append __P((SCR *, int, recno_t, CHAR_T *, size_t));
int db_insert __P((SCR *, recno_t, CHAR_T *, size_t));
int db_set __P((SCR *, recno_t, CHAR_T *, size_t));
int db_exist __P((SCR *, recno_t));
int db_last __P((SCR *, recno_t *));
int db_rget __P((SCR *, recno_t, char **, size_t *));
int db_rset __P((SCR *, recno_t, char *, size_t));
void db_err __P((SCR *, recno_t));
int log_init __P((SCR *, EXF *));
int log_end __P((SCR *, EXF *));
int log_cursor __P((SCR *));
int log_line __P((SCR *, recno_t, u_int));
int log_mark __P((SCR *, LMARK *));
int log_backward __P((SCR *, MARK *));
int log_setline __P((SCR *));
int log_forward __P((SCR *, MARK *));
int editor __P((GS *, int, char *[]));
void v_end __P((GS *));
int mark_init __P((SCR *, EXF *));
int mark_end __P((SCR *, EXF *));
int mark_get __P((SCR *, ARG_CHAR_T, MARK *, mtype_t));
int mark_set __P((SCR *, ARG_CHAR_T, MARK *, int));
int mark_insdel __P((SCR *, lnop_t, recno_t));
void msgq __P((SCR *, mtype_t, const char *, ...));
void msgq_wstr __P((SCR *, mtype_t, const CHAR_T *, const char *));
void msgq_str __P((SCR *, mtype_t, const char *, const char *));
void mod_rpt __P((SCR *));
void msgq_status __P((SCR *, recno_t, u_int));
int msg_open __P((SCR *, char *));
void msg_close __P((GS *));
const char *msg_cmsg __P((SCR *, cmsg_t, size_t *));
const char *msg_cat __P((SCR *, const char *, size_t *));
char *msg_print __P((SCR *, const char *, int *));
int opts_init __P((SCR *, int *));
int opts_set __P((SCR *, ARGS *[], char *));
int o_set __P((SCR *, int, u_int, char *, u_long));
int opts_empty __P((SCR *, int, int));
void opts_dump __P((SCR *, enum optdisp));
int opts_save __P((SCR *, FILE *));
OPTLIST const *opts_search __P((CHAR_T *));
void opts_nomatch __P((SCR *, CHAR_T *));
int opts_copy __P((SCR *, SCR *));
void opts_free __P((SCR *));
int f_altwerase __P((SCR *, OPTION *, char *, u_long *));
int f_columns __P((SCR *, OPTION *, char *, u_long *));
int f_lines __P((SCR *, OPTION *, char *, u_long *));
int f_lisp __P((SCR *, OPTION *, char *, u_long *));
int f_msgcat __P((SCR *, OPTION *, char *, u_long *));
int f_print __P((SCR *, OPTION *, char *, u_long *));
int f_readonly __P((SCR *, OPTION *, char *, u_long *));
int f_recompile __P((SCR *, OPTION *, char *, u_long *));
int f_reformat __P((SCR *, OPTION *, char *, u_long *));
int f_ttywerase __P((SCR *, OPTION *, char *, u_long *));
int f_w300 __P((SCR *, OPTION *, char *, u_long *));
int f_w1200 __P((SCR *, OPTION *, char *, u_long *));
int f_w9600 __P((SCR *, OPTION *, char *, u_long *));
int f_window __P((SCR *, OPTION *, char *, u_long *));
int f_encoding __P((SCR *, OPTION *, char *, u_long *));
int put __P((SCR *, CB *, CHAR_T *, MARK *, MARK *, int));
int rcv_tmp __P((SCR *, EXF *, char *));
int rcv_init __P((SCR *));
int rcv_sync __P((SCR *, u_int));
int rcv_list __P((SCR *));
int rcv_read __P((SCR *, FREF *));
int screen_init __P((GS *, SCR *, SCR **));
int screen_end __P((SCR *));
SCR *screen_next __P((SCR *));
int f_search __P((SCR *,
MARK *, MARK *, CHAR_T *, size_t, CHAR_T **, u_int));
int b_search __P((SCR *,
MARK *, MARK *, CHAR_T *, size_t, CHAR_T **, u_int));
void search_busy __P((SCR *, busy_t));
int seq_set __P((SCR *, CHAR_T *,
size_t, CHAR_T *, size_t, CHAR_T *, size_t, seq_t, int));
int seq_delete __P((SCR *, CHAR_T *, size_t, seq_t));
int seq_free __P((SEQ *));
SEQ *seq_find
__P((SCR *, SEQ **, EVENT *, CHAR_T *, size_t, seq_t, int *));
void seq_close __P((GS *));
int seq_dump __P((SCR *, seq_t, int));
int seq_save __P((SCR *, FILE *, char *, seq_t));
int e_memcmp __P((CHAR_T *, EVENT *, size_t));
void *binc __P((SCR *, void *, size_t *, size_t));
int nonblank __P((SCR *, recno_t, size_t *));
char *tail __P((char *));
char *join __P((char *, char *));
char *expanduser __P((char *));
char *quote __P((char *));
char *v_strdup __P((SCR *, const char *, size_t));
CHAR_T *v_wstrdup __P((SCR *, const CHAR_T *, size_t));
enum nresult nget_uslong __P((u_long *, const CHAR_T *, CHAR_T **, int));
enum nresult nget_slong __P((long *, const CHAR_T *, CHAR_T **, int));
void timepoint_steady __P((struct timespec *));
void timepoint_system __P((struct timespec *));
void TRACE __P((SCR *, const char *, ...));