summaryrefslogtreecommitdiffstats
BranchCommit messageAuthorAge
masterpatch 9.1.0708: Recursive window update does not account for reset skipcolLuuk van Baal6 days
 
TagDownloadAuthorAge
v9.1.0708commit 3d5065fc75...Christian Brabandt6 days
v9.1.0707commit 396fd1ec29...Christian Brabandt7 days
v9.1.0706commit 75ba87ba62...Christian Brabandt7 days
v9.1.0705commit 58d705238c...Christian Brabandt7 days
v9.1.0704commit 09b80d23cf...Christian Brabandt7 days
v9.1.0703commit c9bfed2fda...Christian Brabandt9 days
v9.1.0702commit f459d68ecf...Christian Brabandt10 days
v9.1.0701commit c3a02d78bd...Christian Brabandt10 days
v9.1.0700commit 1c815b54bb...Christian Brabandt10 days
v9.1.0699commit f8702aeb8f...Christian Brabandt10 days
v9.1.0698commit d56c451e1c...Christian Brabandt12 days
v9.1.0697commit 322ba91086...Christian Brabandt13 days
v9.1.0696commit 663950d700...Christian Brabandt13 days
v9.1.0695commit cd83173def...Christian Brabandt14 days
v9.1.0694commit 81e7513c86...Christian Brabandt14 days
v9.1.0693commit dc2c75c6b5...Christian Brabandt14 days
v9.1.0692commit d1c8d2de4b...Christian Brabandt2 weeks
v9.1.0691commit 3f7024cf86...Christian Brabandt2 weeks
v9.1.0690commit 38f99a1f0d...Christian Brabandt2 weeks
v9.1.0689commit cacb6693c1...Christian Brabandt2 weeks
v9.1.0
/* vi:set ts=8 sts=4 sw=4 noet:
 *
 * VIM - Vi IMproved	by Bram Moolenaar
 *
 * Do ":help uganda"  in Vim to read copying and usage conditions.
 * Do ":help credits" in Vim to see a list of people who contributed.
 */

/*
 * Definitions of various common control characters.
 * For EBCDIC we have to use different values.
 */

#ifndef EBCDIC

// IF_EB(ASCII_constant, EBCDIC_constant)
#define IF_EB(a, b)	a

#define CharOrd(x)	((x) < 'a' ? (x) - 'A' : (x) - 'a')
#define CharOrdLow(x)	((x) - 'a')
#define CharOrdUp(x)	((x) - 'A')
#define ROT13(c, a)	(((((c) - (a)) + 13) % 26) + (a))

#define NUL		'\000'
#define BELL		'\007'
#define BS		'\010'
#define TAB		'\011'
#define NL		'\012'
#define NL_STR		(char_u *)"\012"
#define FF		'\014'
#define CAR		'\015'	// CR is used by Mac OS X
#define ESC		'\033'
#define ESC_STR		(char_u *)"\033"
#define ESC_STR_nc	"\033"
#define DEL		0x7f
#define DEL_STR		(char_u *)"\177"

#define POUND		0xA3

#define Ctrl_chr(x)	(TOUPPER_ASC(x) ^ 0x40) // '?' -> DEL, '@' -> ^@, etc.
#define Meta(x)		((x) | 0x80)

#define CTRL_F_STR	"\006"
#define CTRL_H_STR	"\010"
#define CTRL_V_STR	"\026"

#define Ctrl_AT		0   // @
#define Ctrl_A		1
#define Ctrl_B		2
#define Ctrl_C		3
#define Ctrl_D		4
#define Ctrl_E		5
#define Ctrl_F		6
#define Ctrl_G		7
#define Ctrl_H		8
#define Ctrl_I		9
#define Ctrl_J		10
#define Ctrl_K		11
#define Ctrl_L		12
#define Ctrl_M		13
#define Ctrl_N		14
#define Ctrl_O		15
#define Ctrl_P		16
#define Ctrl_Q		17
#define Ctrl_R		18
#define Ctrl_S		19
#define Ctrl_T		20
#define Ctrl_U		21
#define Ctrl_V		22
#define Ctrl_W		23
#define Ctrl_X		24
#define Ctrl_Y		25
#define Ctrl_Z		26
			    // CTRL- [ Left Square Bracket == ESC
#define Ctrl_BSL	28  // \ BackSLash
#define Ctrl_RSB	29  // ] Right Square Bracket
#define Ctrl_HAT	30  // ^
#define Ctrl__		31

#else

// EBCDIC

// IF_EB(ASCII_constant, EBCDIC_constant)
#define IF_EB(a, b)	b

/*
 * Finding the position in the alphabet is not straightforward in EBCDIC.
 * There are gaps in the code table.
 * 'a' + 1 == 'b', but: 'i' + 7 == 'j' and 'r' + 8 == 's'
 */
#define CharOrd__(c) ((c) < ('j' - 'a') ? (c) : ((c) < ('s' - 'a') ? (c) - 7 : (c) - 7 - 8))
#define CharOrdLow(x) (CharOrd__((x) - 'a'))
#define CharOrdUp(x) (CharOrd__((x) - 'A'))
#define CharOrd(x) (isupper(x) ? CharOrdUp(x) : CharOrdLow(x))

#define EBCDIC_CHAR_ADD_(x) ((x) < 0?'a':(x)>25?'z':"abcdefghijklmnopqrstuvwxyz"[x])
#define EBCDIC_CHAR_ADD(c,s) (isupper(c) ? toupper(EBCDIC_CHAR_ADD_(CharOrdUp(c)+(s))) : EBCDIC_CHAR_ADD_(CharOrdLow(c)+(s)))

#define R13_(c) ("abcdefghijklmnopqrstuvwxyz"[((c) + 13) % 26])
#define ROT13(c, a)  (isupper(c) ? toupper(R13_(CharOrdUp(c))) : R13_(CharOrdLow(c)))

#define NUL		'\000'
#define BELL		'\x2f'
#define BS		'\x16'
#define TAB		'\x05'
#define NL		'\x15'
#define NL_STR		(char_u *)"\x15"
#define FF		'\x0C'
#define CAR		'\x0D'
#define ESC		'\x27'
#define ESC_STR		(char_u *)"\x27"
#define ESC_STR_nc	"\x27"
#define DEL		0x07
#define DEL_STR		(char_u *)"\007"

#define POUND		0xB1

#define CTRL_F_STR	"\056"
#define CTRL_H_STR	"\026"
#define CTRL_V_STR	"\062"

#define Ctrl_AT		0x00   // @
#define Ctrl_A		0x01
#define Ctrl_B		0x02
#define Ctrl_C		0x03
#define Ctrl_D		0x37
#define Ctrl_E		0x2D
#define Ctrl_F		0x2E
#define Ctrl_G		0x2F
#define Ctrl_H		0x16
#define Ctrl_I		0x05
#define Ctrl_J		0x15
#define Ctrl_K		0x0B
#define Ctrl_L		0x0C
#define Ctrl_M		0x0D
#define Ctrl_N		0x0E
#define Ctrl_O		0x0F
#define Ctrl_P		0x10
#define Ctrl_Q		0x11
#define Ctrl_R		0x12
#define Ctrl_S		0x13
#define Ctrl_T		0x3C
#define Ctrl_U		0x3D
#define Ctrl_V		0x32
#define Ctrl_W		0x26
#define Ctrl_X		0x18
#define Ctrl_Y		0x19
#define Ctrl_Z		0x3F
			    // CTRL- [ Left Square Bracket == ESC
#define Ctrl_RSB	0x1D  // ] Right Square Bracket
#define Ctrl_BSL	0x1C  // \ BackSLash
#define Ctrl_HAT	0x1E  // ^
#define Ctrl__		0x1F

#define Ctrl_chr(x)	(CtrlTable[(x)])
extern char CtrlTable[];

#define CtrlChar(x)	((x < ' ') ? CtrlCharTable[(x)] : 0)
extern char CtrlCharTable[];

#define MetaChar(x)	((x < ' ') ? MetaCharTable[(x)] : 0)
extern char MetaCharTable[];

#endif // defined EBCDIC

// TODO: EBCDIC Code page dependent (here 1047)
#define CSI		0x9b	// Control Sequence Introducer
#define CSI_STR		"\233"
#define DCS		0x90	// Device Control String
#define OSC		0x9d	// Operating System Command
#define STERM		0x9c	// String Terminator

/*
 * Character that separates dir names in a path.
 * For MS-DOS, WIN32 and OS/2 we use a backslash.  A slash mostly works
 * fine, but there are places where it doesn't (e.g. in a command name).
 * For Acorn we use a dot.
 */
#ifdef BACKSLASH_IN_FILENAME
# define PATHSEP	psepc
# define PATHSEPSTR	pseps
#else
# define PATHSEP	'/'
# define PATHSEPSTR	"/"
#endif
s v9.1.0636commit f4572cee35...Christian Brabandt6 weeks v9.1.0635commit e57c9a19ed...Christian Brabandt6 weeks v9.1.0634commit 13032a49b7...Christian Brabandt6 weeks v9.1.0633commit 0268ff3af3...Christian Brabandt6 weeks v9.1.0632commit 073cb02cb5...Christian Brabandt6 weeks v9.1.0631commit 6b6280c4a2...Christian Brabandt6 weeks v9.1.0630commit f0ce176b5f...Christian Brabandt6 weeks v9.1.0629commit 4100852e09...Christian Brabandt6 weeks v9.1.0628commit f08865ce83...Christian Brabandt6 weeks v9.1.0627commit e4486bad10...Christian Brabandt6 weeks v9.1.0626commit 94082b60d5...Christian Brabandt6 weeks v9.1.0625commit 6ed8ae837b...Christian Brabandt6 weeks v9.1.0624commit 70a11a6bf6...Christian Brabandt6 weeks v9.1.0622commit 032accd98b...Christian Brabandt6 weeks v9.1.0623commit 325420ebe4...Christian Brabandt6 weeks v9.1.0621commit b32d0a479d...Christian Brabandt6 weeks v9.1.0620commit be82825687...Christian Brabandt6 weeks v9.1.0619commit 8754efe437...Christian Brabandt6 weeks v9.1.0618commit 508e7856ec...Christian Brabandt6 weeks v9.1.0617commit dc373d456b...Christian Brabandt6 weeks v9.1.0616commit eb4b903c9b...Christian Brabandt6 weeks v9.1.0615commit 242667ae14...Christian Brabandt6 weeks v9.1.0614commit 377a085ea3...Christian Brabandt6 weeks v9.1.0613commit 2979cfc262...Christian Brabandt6 weeks v9.1.0612commit df77c8ad39...Christian Brabandt6 weeks v9.1.0611commit 56904f90d1...Christian Brabandt7 weeks v9.1.0610commit e4b991ed36...Christian Brabandt7 weeks v9.1.0609commit 4c3616d7a2...Christian Brabandt7 weeks v9.1.0608commit 220474d239...Christian Brabandt7 weeks v9.1.0607commit a90b0b4ba2...Christian Brabandt7 weeks v9.1.0606commit c8a582aad5...Christian Brabandt7 weeks v9.1.0605commit 0be03e14b9...Christian Brabandt7 weeks v9.1.0604commit b14c325a5b...Christian Brabandt7 weeks v9.1.0603commit 5fb801a74f...Christian Brabandt7 weeks v9.1.0602commit 37853b7de3...Christian Brabandt7 weeks v9.1.0601commit b5d6b5caac...Christian Brabandt7 weeks v9.1.0600commit 1165f7850b...Christian Brabandt7 weeks v9.1.0599commit aef6179bcf...Christian Brabandt7 weeks v9.1.0598commit 8159fb18a9...Christian Brabandt7 weeks v9.1.0597commit fcc1b5741e...Christian Brabandt7 weeks v9.1.0596commit 76c19028ff...Christian Brabandt7 weeks v9.1.0595commit 30d54fdddf...Christian Brabandt7 weeks v9.1.0594commit ac4ce9e15b...Christian Brabandt7 weeks v9.1.0591commit c6d7dc0393...Christian Brabandt7 weeks v9.1.0593commit 3088ef094d...Christian Brabandt8 weeks v9.1.0592commit b5844104ab...Christian Brabandt8 weeks v9.1.0590commit d4d1207208...Christian Brabandt8 weeks v9.1.0589commit 22105fd1fe...Christian Brabandt8 weeks v9.1.0588commit 3ce274682b...Christian Brabandt8 weeks v9.1.0587commit 490c1daa24...Christian Brabandt8 weeks v9.1.0586commit 700cf8cfa1...Christian Brabandt8 weeks v9.1.0585commit bb5d27dc79...Christian Brabandt8 weeks v9.1.0584commit b3b2beea5e...Christian Brabandt8 weeks v9.1.0583commit 28145e005d...Christian Brabandt8 weeks v9.1.0582commit 7d664bf0eb...Christian Brabandt8 weeks v9.1.0581commit d9be94cf03...Christian Brabandt8 weeks v9.1.0580commit 90a800274d...Christian Brabandt8 weeks v9.1.0579commit d1b5ea984d...Christian Brabandt8 weeks v9.1.0578commit 360c51208e...Christian Brabandt8 weeks v9.1.0577commit 69a28f6c08...Christian Brabandt8 weeks v9.1.0576commit 71de259e78...Christian Brabandt8 weeks v9.1.0575commit 1a3dd7dc78...Christian Brabandt8 weeks v9.1.0574commit 8c446da349...Christian Brabandt8 weeks v9.1.0573commit c25a7084e9...Christian Brabandt8 weeks v9.1.0572commit 5247b0b92e...Christian Brabandt8 weeks v9.1.0571commit 231bb03946...Christian Brabandt8 weeks v9.1.0570commit 8a7563bbea...Christian Brabandt8 weeks v9.1.0569commit 1ee7420460...Christian Brabandt8 weeks v9.1.0568commit a20bf69a3b...Christian Brabandt8 weeks v9.1.0567commit 764526e279...Christian Brabandt8 weeks v9.1.0566commit e6ab23bd4a...Christian Brabandt8 weeks v9.1.0565commit 68819afb2c...Christian Brabandt8 weeks v9.1.0564commit 0512425891...Christian Brabandt8 weeks v9.1.0563commit 8367884909...Christian Brabandt8 weeks v9.1.0562commit e7b98ab96e...Christian Brabandt8 weeks v9.1.0561commit b7e09b0442...Christian Brabandt8 weeks v9.1.0560commit 8252ef134f...Christian Brabandt8 weeks v9.1.0559commit 965091001f...Christian Brabandt8 weeks v9.1.0558commit 50dc83cf92...Christian Brabandt8 weeks v9.1.0557commit 893eeeb445...Christian Brabandt8 weeks v9.1.0556commit 2e7d89b398...Christian Brabandt8 weeks v9.1.0555commit c03f631b7b...Christian Brabandt8 weeks v9.1.0554commit 4ff3a9b1e3...Christian Brabandt9 weeks v9.1.0553commit d33a518025...Christian Brabandt9 weeks v9.1.0552commit 8fc23bb8a4...Christian Brabandt9 weeks v9.1.0551commit 1ad194c0df...Christian Brabandt9 weeks v9.1.0550commit 4a7a4a3675...Christian Brabandt9 weeks v9.1.0549commit 600a12d08e...Christian Brabandt9 weeks v9.1.0548commit c8e158be0e...Christian Brabandt9 weeks v9.1.0547commit 48b7d05a4f...Christian Brabandt9 weeks v9.1.0546commit 03acd4761b...Christian Brabandt9 weeks v9.1.0545commit 5285b3cd29...Christian Brabandt9 weeks v9.1.0544commit 62f31e9499...Christian Brabandt2 months v9.1.0543commit 8145620a95...Christian Brabandt2 months v9.1.0542commit 9d779c514f...Christian Brabandt2 months v9.1.0541commit 52123879c0...Christian Brabandt2 months v9.1.0540commit fc3f5dba52...Christian Brabandt2 months v9.1.0539commit 248efab9b5...Christian Brabandt2 months v9.1.0538commit b975ddfdf9...Christian Brabandt2 months v9.1.0537commit 25ac6d67d9...Christian Brabandt2 months v9.1.0536commit f095539b39...Christian Brabandt2 months v9.1.0535commit f3daa4525b...Christian Brabandt2 months v9.1.0534commit 65407ce1d2...Christian Brabandt2 months v9.1.0533commit f397549332...Christian Brabandt2 months v9.1.0532commit 15addb24dd...Christian Brabandt2 months v9.1.0531commit 93a3d2b905...Christian Brabandt2 months v9.1.0530commit 470c0db2b3...Christian Brabandt2 months v9.1.0529commit 749ba0f6d9...Christian Brabandt2 months v9.1.0528commit 68f5ceddca...Christian Brabandt2 months v9.1.0527commit cd33faf614...Christian Brabandt2 months v9.1.0526commit 8ccb89016e...Christian Brabandt2 months v9.1.0525commit 761a420c66...Christian Brabandt2 months v9.1.0524commit 7ccd1a2e85...Christian Brabandt2 months v9.1.0523commit 50d485432c...Christian Brabandt2 months v9.1.0522commit 05ff4e42fb...Christian Brabandt2 months v9.1.0521commit 4179f193cc...Christian Brabandt2 months v9.1.0520commit f4af331d08...Christian Brabandt2 months v9.1.0519commit 9554ace1d9...Christian Brabandt2 months v9.1.0518commit 9987fe8ca0...Christian Brabandt2 months v9.1.0517commit 898b3740c7...Christian Brabandt2 months v9.1.0516commit 88bbdb04c2...Christian Brabandt3 months v9.1.0515commit 8625714ac1...Christian Brabandt3 months v9.1.0514commit 7b29cc97d6...Christian Brabandt3 months v9.1.0513commit f0e6914420...Christian Brabandt3 months v9.1.0512commit 7002c055d5...Christian Brabandt3 months v9.1.0511commit bc6f96708e...Christian Brabandt3 months v9.1.0510commit 6bc11c06d2...Christian Brabandt3 months v9.1.0509commit ce0ef910df...Christian Brabandt3 months v9.1.0508commit f7f8f0b76d...Christian Brabandt3 months v9.1.0507commit d09521476f...Christian Brabandt3 months v9.1.0506commit 49012cd8c2...Christian Brabandt3 months v9.1.0505commit aa61b8a908...Christian Brabandt3 months v9.1.0504commit ca7f93e6f3...Christian Brabandt3 months v9.1.0503commit 43eef882ff...Christian Brabandt3 months v9.1.0502commit 56f587b3f8...Christian Brabandt3 months v9.1.0501