aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2020-09-09 08:18:04 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2020-09-09 08:18:04 +0000
commit7cef6c685d23e4dcdf3f64b0b2ea92151e652db6 (patch)
tree9fb6528188c03aa1eb914f1d97572a3e49dec386 /common
parent2a1ac9cdf3c720b70043224e0e4320f5ae5226ca (diff)
downloadsrc-7cef6c685d23e4dcdf3f64b0b2ea92151e652db6.tar.gz
src-7cef6c685d23e4dcdf3f64b0b2ea92151e652db6.zip
Import missing files from the nvi 2.2.0 previous half done importvendor/nvi/2.2.0
Notes
Notes: svn path=/vendor/nvi/dist/; revision=365497 svn path=/vendor/nvi/2.2.0/; revision=365498; tag=vendor/nvi/2.2.0
Diffstat (limited to 'common')
-rw-r--r--common/extern.h131
-rw-r--r--common/options_def.h84
2 files changed, 215 insertions, 0 deletions
diff --git a/common/extern.h b/common/extern.h
new file mode 100644
index 000000000000..c887696080de
--- /dev/null
+++ b/common/extern.h
@@ -0,0 +1,131 @@
+char * codeset(void);
+void conv_init(SCR *, SCR *);
+int conv_enc(SCR *, int, char *);
+void conv_end(SCR *);
+int cut(SCR *, CHAR_T *, MARK *, MARK *, int);
+int cut_line(SCR *, recno_t, size_t, size_t, CB *);
+void cut_close(GS *);
+TEXT *text_init(SCR *, const CHAR_T *, size_t, size_t);
+void text_lfree(TEXTH *);
+void text_free(TEXT *);
+int del(SCR *, MARK *, MARK *, int);
+int looks_utf8(const char *, size_t);
+int looks_utf16(const char *, size_t);
+int decode_utf8(const char *);
+int decode_utf16(const char *, int);
+FREF *file_add(SCR *, char *);
+int file_init(SCR *, FREF *, char *, int);
+int file_end(SCR *, EXF *, int);
+int file_write(SCR *, MARK *, MARK *, char *, int);
+int file_m1(SCR *, int, int);
+int file_m2(SCR *, int);
+int file_m3(SCR *, int);
+int file_aw(SCR *, int);
+void set_alt_name(SCR *, char *);
+lockr_t file_lock(SCR *, char *, int, int);
+int v_key_init(SCR *);
+void v_key_ilookup(SCR *);
+size_t v_key_len(SCR *, ARG_CHAR_T);
+char *v_key_name(SCR *, ARG_CHAR_T);
+e_key_t v_key_val(SCR *, ARG_CHAR_T);
+int v_event_push(SCR *, EVENT *, CHAR_T *, size_t, u_int);
+int v_event_get(SCR *, EVENT *, int, u_int32_t);
+void v_event_err(SCR *, EVENT *);
+int v_event_flush(SCR *, u_int);
+int db_eget(SCR *, recno_t, CHAR_T **, size_t *, int *);
+int db_get(SCR *, recno_t, u_int32_t, CHAR_T **, size_t *);
+int db_delete(SCR *, recno_t);
+int db_append(SCR *, int, recno_t, CHAR_T *, size_t);
+int db_insert(SCR *, recno_t, CHAR_T *, size_t);
+int db_set(SCR *, recno_t, CHAR_T *, size_t);
+int db_exist(SCR *, recno_t);
+int db_last(SCR *, recno_t *);
+int db_rget(SCR *, recno_t, char **, size_t *);
+int db_rset(SCR *, recno_t, char *, size_t);
+void db_err(SCR *, recno_t);
+int log_init(SCR *, EXF *);
+int log_end(SCR *, EXF *);
+int log_cursor(SCR *);
+int log_line(SCR *, recno_t, u_int);
+int log_mark(SCR *, LMARK *);
+int log_backward(SCR *, MARK *);
+int log_setline(SCR *);
+int log_forward(SCR *, MARK *);
+int editor(GS *, int, char *[]);
+void v_end(GS *);
+int mark_init(SCR *, EXF *);
+int mark_end(SCR *, EXF *);
+int mark_get(SCR *, ARG_CHAR_T, MARK *, mtype_t);
+int mark_set(SCR *, ARG_CHAR_T, MARK *, int);
+int mark_insdel(SCR *, lnop_t, recno_t);
+void msgq(SCR *, mtype_t, const char *, ...);
+void msgq_wstr(SCR *, mtype_t, const CHAR_T *, const char *);
+void msgq_str(SCR *, mtype_t, const char *, const char *);
+void mod_rpt(SCR *);
+void msgq_status(SCR *, recno_t, u_int);
+int msg_open(SCR *, char *);
+void msg_close(GS *);
+const char *msg_cmsg(SCR *, cmsg_t, size_t *);
+const char *msg_cat(SCR *, const char *, size_t *);
+char *msg_print(SCR *, const char *, int *);
+int opts_init(SCR *, int *);
+int opts_set(SCR *, ARGS *[], char *);
+int o_set(SCR *, int, u_int, char *, u_long);
+int opts_empty(SCR *, int, int);
+void opts_dump(SCR *, enum optdisp);
+int opts_save(SCR *, FILE *);
+OPTLIST const *opts_search(CHAR_T *);
+void opts_nomatch(SCR *, CHAR_T *);
+int opts_copy(SCR *, SCR *);
+void opts_free(SCR *);
+int f_altwerase(SCR *, OPTION *, char *, u_long *);
+int f_columns(SCR *, OPTION *, char *, u_long *);
+int f_lines(SCR *, OPTION *, char *, u_long *);
+int f_lisp(SCR *, OPTION *, char *, u_long *);
+int f_msgcat(SCR *, OPTION *, char *, u_long *);
+int f_print(SCR *, OPTION *, char *, u_long *);
+int f_readonly(SCR *, OPTION *, char *, u_long *);
+int f_recompile(SCR *, OPTION *, char *, u_long *);
+int f_reformat(SCR *, OPTION *, char *, u_long *);
+int f_ttywerase(SCR *, OPTION *, char *, u_long *);
+int f_w300(SCR *, OPTION *, char *, u_long *);
+int f_w1200(SCR *, OPTION *, char *, u_long *);
+int f_w9600(SCR *, OPTION *, char *, u_long *);
+int f_window(SCR *, OPTION *, char *, u_long *);
+int f_encoding(SCR *, OPTION *, char *, u_long *);
+int put(SCR *, CB *, CHAR_T *, MARK *, MARK *, int);
+int rcv_tmp(SCR *, EXF *, char *);
+int rcv_init(SCR *);
+int rcv_sync(SCR *, u_int);
+int rcv_list(SCR *);
+int rcv_read(SCR *, FREF *);
+int screen_init(GS *, SCR *, SCR **);
+int screen_end(SCR *);
+SCR *screen_next(SCR *);
+int f_search(SCR *,
+ MARK *, MARK *, CHAR_T *, size_t, CHAR_T **, u_int);
+int b_search(SCR *,
+ MARK *, MARK *, CHAR_T *, size_t, CHAR_T **, u_int);
+void search_busy(SCR *, busy_t);
+int seq_set(SCR *, CHAR_T *,
+ size_t, CHAR_T *, size_t, CHAR_T *, size_t, seq_t, int);
+int seq_delete(SCR *, CHAR_T *, size_t, seq_t);
+int seq_free(SEQ *);
+SEQ *seq_find
+ (SCR *, SEQ **, EVENT *, CHAR_T *, size_t, seq_t, int *);
+void seq_close(GS *);
+int seq_dump(SCR *, seq_t, int);
+int seq_save(SCR *, FILE *, char *, seq_t);
+int e_memcmp(CHAR_T *, EVENT *, size_t);
+void *binc(SCR *, void *, size_t *, size_t);
+int nonblank(SCR *, recno_t, size_t *);
+char *join(char *, char *);
+char *expanduser(char *);
+char *quote(char *);
+char *v_strdup(SCR *, const char *, size_t);
+CHAR_T *v_wstrdup(SCR *, const CHAR_T *, size_t);
+enum nresult nget_uslong(u_long *, const CHAR_T *, CHAR_T **, int);
+enum nresult nget_slong(long *, const CHAR_T *, CHAR_T **, int);
+void timepoint_steady(struct timespec *);
+void timepoint_system(struct timespec *);
+void TRACE(SCR *, const char *, ...);
diff --git a/common/options_def.h b/common/options_def.h
new file mode 100644
index 000000000000..54dd6c20c891
--- /dev/null
+++ b/common/options_def.h
@@ -0,0 +1,84 @@
+#define O_ALTWERASE 0
+#define O_AUTOINDENT 1
+#define O_AUTOPRINT 2
+#define O_AUTOWRITE 3
+#define O_BACKUP 4
+#define O_BEAUTIFY 5
+#define O_CDPATH 6
+#define O_CEDIT 7
+#define O_COLUMNS 8
+#define O_COMBINED 9
+#define O_COMMENT 10
+#define O_TMPDIR 11
+#define O_EDCOMPATIBLE 12
+#define O_ERRORBELLS 13
+#define O_ESCAPETIME 14
+#define O_EXPANDTAB 15
+#define O_EXRC 16
+#define O_EXTENDED 17
+#define O_FILEC 18
+#define O_FILEENCODING 19
+#define O_FLASH 20
+#define O_HARDTABS 21
+#define O_ICLOWER 22
+#define O_IGNORECASE 23
+#define O_INPUTENCODING 24
+#define O_KEYTIME 25
+#define O_LEFTRIGHT 26
+#define O_LINES 27
+#define O_LISP 28
+#define O_LIST 29
+#define O_LOCKFILES 30
+#define O_MAGIC 31
+#define O_MATCHCHARS 32
+#define O_MATCHTIME 33
+#define O_MESG 34
+#define O_MODELINE 35
+#define O_MSGCAT 36
+#define O_NOPRINT 37
+#define O_NUMBER 38
+#define O_OCTAL 39
+#define O_OPEN 40
+#define O_OPTIMIZE 41
+#define O_PARAGRAPHS 42
+#define O_PATH 43
+#define O_PRINT 44
+#define O_PROMPT 45
+#define O_READONLY 46
+#define O_RECDIR 47
+#define O_REDRAW 48
+#define O_REMAP 49
+#define O_REPORT 50
+#define O_RULER 51
+#define O_SCROLL 52
+#define O_SEARCHINCR 53
+#define O_SECTIONS 54
+#define O_SECURE 55
+#define O_SHELL 56
+#define O_SHELLMETA 57
+#define O_SHIFTWIDTH 58
+#define O_SHOWMATCH 59
+#define O_SHOWMODE 60
+#define O_SIDESCROLL 61
+#define O_SLOWOPEN 62
+#define O_SOURCEANY 63
+#define O_TABSTOP 64
+#define O_TAGLENGTH 65
+#define O_TAGS 66
+#define O_TERM 67
+#define O_TERSE 68
+#define O_TILDEOP 69
+#define O_TIMEOUT 70
+#define O_TTYWERASE 71
+#define O_VERBOSE 72
+#define O_W1200 73
+#define O_W300 74
+#define O_W9600 75
+#define O_WARN 76
+#define O_WINDOW 77
+#define O_WINDOWNAME 78
+#define O_WRAPLEN 79
+#define O_WRAPMARGIN 80
+#define O_WRAPSCAN 81
+#define O_WRITEANY 82
+#define O_OPTIONCOUNT 83