003 File Manager
Current Path:
/usr/src/contrib/nvi/common
usr
/
src
/
contrib
/
nvi
/
common
/
📁
..
📄
args.h
(844 B)
📄
common.h
(2.54 KB)
📄
conv.c
(9.52 KB)
📄
conv.h
(1.32 KB)
📄
cut.c
(8.38 KB)
📄
cut.h
(2.52 KB)
📄
delete.c
(3.47 KB)
📄
encoding.c
(5.48 KB)
📄
exf.c
(38.68 KB)
📄
exf.h
(2.69 KB)
📄
extern.h
(4.88 KB)
📄
gs.h
(6.72 KB)
📄
key.c
(23.01 KB)
📄
key.h
(8.61 KB)
📄
line.c
(12.69 KB)
📄
log.c
(16.88 KB)
📄
log.h
(487 B)
📄
main.c
(12.91 KB)
📄
mark.c
(6.3 KB)
📄
mark.h
(1.46 KB)
📄
mem.h
(6.5 KB)
📄
msg.c
(20.35 KB)
📄
msg.h
(2.19 KB)
📄
multibyte.h
(3.1 KB)
📄
options.awk
(166 B)
📄
options.c
(29.22 KB)
📄
options.h
(3.58 KB)
📄
options_def.h
(1.73 KB)
📄
options_f.c
(5.98 KB)
📄
put.c
(5.85 KB)
📄
recover.c
(21.47 KB)
📄
screen.c
(4.48 KB)
📄
screen.h
(8.2 KB)
📄
search.c
(10.59 KB)
📄
seq.c
(7.81 KB)
📄
seq.h
(1.53 KB)
📄
util.c
(7.28 KB)
📄
util.h
(2.89 KB)
Editing: cut.h
/*- * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1991, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ typedef struct _texth TEXTH; /* TEXT list head structure. */ TAILQ_HEAD(_texth, _text); /* Cut buffers. */ struct _cb { SLIST_ENTRY(_cb) q; /* Linked list of cut buffers. */ TEXTH textq[1]; /* Linked list of TEXT structures. */ /* XXXX Needed ? Can non ascii-chars be cut buffer names ? */ CHAR_T name; /* Cut buffer name. */ size_t len; /* Total length of cut text. */ #define CB_LMODE 0x01 /* Cut was in line mode. */ u_int8_t flags; }; /* Lines/blocks of text. */ struct _text { /* Text: a linked list of lines. */ TAILQ_ENTRY(_text) q; /* Linked list of text structures. */ CHAR_T *lb; /* Line buffer. */ size_t lb_len; /* Line buffer length. */ size_t len; /* Line length. */ /* These fields are used by the vi text input routine. */ recno_t lno; /* 1-N: file line. */ #define ENTIRE_LINE ((size_t)-1) /* cno: end of the line. */ size_t cno; /* 0-N: file character in line. */ size_t ai; /* 0-N: autoindent bytes. */ size_t insert; /* 0-N: bytes to insert (push). */ size_t offset; /* 0-N: initial, unerasable chars. */ size_t owrite; /* 0-N: chars to overwrite. */ size_t R_erase; /* 0-N: 'R' erase count. */ size_t sv_cno; /* 0-N: Saved line cursor. */ size_t sv_len; /* 0-N: Saved line length. */ /* * These fields returns information from the vi text input routine. * * The termination condition. Note, this field is only valid if the * text input routine returns success. * TERM_BS: User backspaced over the prompt. * TERM_CEDIT: User entered <edit-char>. * TERM_CR: User entered <carriage-return>; no data. * TERM_ESC: User entered <escape>; no data. * TERM_OK: Data available. * TERM_SEARCH: Incremental search. */ enum { TERM_BS, TERM_CEDIT, TERM_CR, TERM_ESC, TERM_OK, TERM_SEARCH } term; }; /* * Get named buffer 'name'. * Translate upper-case buffer names to lower-case buffer names. */ #define CBNAME(sp, cbp, nch) do { \ CHAR_T L__name; \ L__name = isupper(nch) ? tolower(nch) : (nch); \ SLIST_FOREACH(cbp, sp->gp->cutq, q) \ if (cbp->name == L__name) \ break; \ } while (0) /* Flags to the cut() routine. */ #define CUT_LINEMODE 0x01 /* Cut in line mode. */ #define CUT_NUMOPT 0x02 /* Numeric buffer: optional. */ #define CUT_NUMREQ 0x04 /* Numeric buffer: required. */
Upload File
Create Folder