⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 maketerm.ed

📁 操作系统SunOS 4.1.3版本的源码
💻 ED
字号:
# @(#)maketerm.ed 1.1 92/07/30 SMI; from S5R3.1 1.28H!rm -f bool num str boolnames numnames strnames boolvals numvals strvals tnames.c tinames.c tifnames.c term.h ./tmp/term.h.new ./tmp/tmp.awk ./tmp/term.he capsg/^#/d/--- begin bool/+1,/--- end bool/-1 w bool/--- begin num/+1,/--- end num/-1 w num/--- begin str/+1,/--- end str/-1 w strE bool1,$s/"	.*/", /1,$s/.*	"/"/1,$-10g/^/.,+9j+,$j1ichar	*boolnames[] =	{.$a0	};.w tinames.ce bool1,$s/^[^"]*"[^"]*".//1,$s/"	.*/", /1,$-10g/^/.,+9j+,$j1ichar	*boolcodes[] =	{.$a0	};.w tnames.ce bool1,$s/^\([a-z][0-9a-z_]*\),.*/"\1", /1,$-4g/^/.,+3j+,$j1ichar	*boolfnames[] =	{.$a0	};.w tifnames.ce bool1,$s;"[^"]*"[ 	]*".."	;/* ;1,$s;$; */;1,$s;^;	;1i    char.$a	Sentinel;		/* End of bools. DO NOT MOVE! */.w boolvalse num1,$s/"	.*/", /1,$s/.*	"/"/1,$-10g/^/.,+9j+,$j1ichar	*numnames[] =	{.$a0	};.0r tinames.cw tinames.ce num1,$s/^[^"]*"[^"]*".//1,$s/"	.*/", /1,$-10g/^/.,+9j+,$j1ichar	*numcodes[] =	{.$a0	};.0r tnames.cw tnames.ce num1,$s/^\([a-z][0-9a-z_]*\),.*/"\1", /1,$-4g/^/.,+3j+,$j1ichar	*numfnames[] =	{.$a0	};.0r tifnames.cw tifnames.ce num1,$s;"[^"]*"[ 	]*".."	;/* ;1,$s;$; */;1,$s;^;	;1i    short.$a	Sentinel;		/* End of nums. DO NOT MOVE! */.w numvalse str1,$s/"	.*/", /1,$s/.*	"/"/1,$-10g/^/.,+9j+,$j1ichar	*strnames[] =	{.$a0	};.0r tinames.cw tinames.ce str1,$s/^[^"]*"[^"]*".//1,$s/"	.*/", /1,$-10g/^/.,+9j+,$j1ichar	*strcodes[] =	{.$a0	};.0r tnames.cw tnames.ce str1,$s/^\([a-z][0-9a-z_]*\),.*/"\1", /1,$-4g/^/.,+3j+,$j1ichar	*strfnames[] =	{.$a0	};.0r tifnames.cw tifnames.ce str1,$s;"[^"]*"[ 	]*".."	;/* ;1,$s;$; */;1,$s;^;	strs.;$a	Sentinel;		/* End of strings. DO NOT MOVE! */.w strvals1,$dr tnames.c1i#ifndef lintstatic	char sccsid[] = "@(#)maketerm.ed 1.1 92/07/30 SMI"; /* from S5R3.1 1.28 */#endif/* tnames.c: Made automatically from caps and maketerm.ed - don't edit me! */.1,$s/ $//0r copyright.h/SMI/dw tnames.c1,$dr tinames.c1i#ifndef lintstatic	char sccsid[] = "@(#)maketerm.ed 1.1 92/07/30 SMI"; /* from S5R3.1 1.28 */#endif/* tinames.c: Made automatically from caps and maketerm.ed - don't edit me! */.1,$s/ $//0r copyright.h/SMI/dw tinames.c1,$dr tifnames.c1i#ifndef lintstatic	char sccsid[] = "@(#)maketerm.ed 1.1 92/07/30 SMI"; /* from S5R3.1 1.28 */#endif/* tifnames.c: Made automatically from caps and maketerm.ed - don't edit me! */.1,$s/ $//0r copyright.h/SMI/dw tifnames.c1,$datypedef char *charptr;struct strs {    charptr.r strvals1,.s/strs\.//$a};struct _bool_struct {.r boolvalsa};struct _num_struct {.r numvalsa};.w ./tmp/term.h.newe ./tmp/term.h.newg/^	./s/^	/	_/w ./tmp/term.h.newe ./tmp/term.h.new0r boolvals.kb.r numvals.kn.r strvals.ks1,'sv/^	/d1,'ss/^	//1,'ss/	[^	].*/	/1,'ss/,/ /1,'bs/.*/#define &	CURB _&/'b+1,'ns/.*/#define &	CURN _&/'n+1,'ss/.*/#define &	CURS _&/1,'ss/strs\.//1,'ss/strs.\(.\)/strs._\1/1,'s+1g/;/dw ./tmp/term.h.newe ./tmp/term.h.new1,$s/[ 	]*$//1,$s/CURS _strs/CURS strs/1;/CURS strs/+100;.,+99s/CURS strs/CURS strs2/.+1,$s/CURS strs/CURS strs3//^struct strs/+101s/,/;/a};struct strs2 {    charptr.+100s/,/;/a};struct strs3 {    charptr.1,$s/_Sentinel/Sentinel/g/[ 	.]_cursor_/s/_cursor_/_crsr_/g/[ 	.]_delete_/s/_delete_/_dlt_/g/[ 	.]_enter_/s/_enter_/_entr_/g/[ 	.]_insert_/s/_insert_/_ins_/g/[ 	.]_key_/s/_key_/_ky_/g/[ 	.]_keypad_/s/_keypad_/_kpad_/g/[ 	.]_label_/s/_label_/_labl_/g/[ 	.]_memory_/s/_memory_/_mem_/g/[ 	.]_parm_/s/_parm_/_prm_/g/[ 	.]_scroll_/s/_scroll_/_scrll_/g/^	_......[,;]			\//s/,	/,/g/^	_..............[,;]		\//s/,	/,/g/^	_......................[,;]	\//s/,	/,/w ./tmp/term.h.newe ./tmp/term.h.new# the following lines GO away when Vr2 compat code goes away1;/^#define auto_left_margin/,/^#define xon_xoff/s/CURB.*/CUR _b/1;/^#define auto_left_margin/,/^#define xon_xoff/w ./tmp/tmp.term.h1;/^#define auto_left_margin/,/^#define xon_xoff/d!/usr/5bin/echo '{printf "\%s\%d\\n", $0,++i}' > ./tmp/tmp.awk.-1r !awk -f ./tmp/tmp.awk < ./tmp/tmp.term.h1;/^#define columns/,/^#define width_status_line/s/CURN.*/CUR _c/1;/^#define columns/,/^#define width_status_line/w ./tmp/tmp.term.h1;/^#define columns/,/^#define width_status_line/d!/usr/5bin/echo '{printf "\%s\%d\\n", $0,++i}' > ./tmp/tmp.awk.-1r !awk -f ./tmp/tmp.awk < ./tmp/tmp.term.h1;/^#define back_tab/,/^#define lab_f8/s/CURS.*/CUR _Vr2_Astrs._s/1;/^#define back_tab/,/^#define lab_f8/w ./tmp/tmp.term.h1;/^#define back_tab/,/^#define lab_f8/d!/usr/5bin/echo '{printf "\%s\%d\\n", $0,++i}' > ./tmp/tmp.awk.-1r !awk -f ./tmp/tmp.awk < ./tmp/tmp.term.h1;/^#define lab_f9/,/^#define prtr_non/s/CURS.*/CUR _Vr2_Bstrs._s/1;/^#define lab_f9/,/^#define prtr_non/w ./tmp/tmp.term.h1;/^#define lab_f9/,/^#define prtr_non/d!/usr/5bin/echo 'BEGIN{i=100}\n{printf "\%s\%d\\n", $0,++i}' > ./tmp/tmp.awk.-1r !awk -f ./tmp/tmp.awk < ./tmp/tmp.term.h!rm -f ./tmp/tmp.term.h ./tmp/tmp.awkw ./tmp/term.h.newe ./tmp/term.h.new!# Vr2 compat code ends here1i/*	@(#)maketerm.ed 1.1 92/07/30 SMI; from S5R3.1 1.28	*//* * term.h - this file is automatically made from caps and maketerm.ed. * Don't make changes directly to term.h. * * Guard against multiple includes. */#ifndef auto_left_margin.$astruct _str_struct {	struct strs strs;	struct strs2 strs2;	struct strs3 strs3;};#define NUM_ATTRIBUTES	9#define	UNACCESSIBLE		1#define	NO_TERMINAL		2#define CORRUPTED		3#define	ENTRY_TOO_LONG		4#define	TERMINFO_TOO_LONG	5#define	TERM_BAD_MALLOC		6#define NOT_READABLE		7#define _VR2_COMPAT_CODE#ifdef _VR2_COMPAT_CODEstruct _Vr2_Astrs {    charptr	_s1,  _s2,  _s3,  _s4,  _s5,  _s6,  _s7,  _s8,  _s9,  _s10,	_s11, _s12, _s13, _s14, _s15, _s16, _s17, _s18, _s19, _s20,	_s21, _s22, _s23, _s24, _s25, _s26, _s27, _s28, _s29, _s30,	_s31, _s32, _s33, _s34, _s35, _s36, _s37, _s38, _s39, _s40,	_s41, _s42, _s43, _s44, _s45, _s46, _s47, _s48, _s49, _s50,	_s51, _s52, _s53, _s54, _s55, _s56, _s57, _s58, _s59, _s60,	_s61, _s62, _s63, _s64, _s65, _s66, _s67, _s68, _s69, _s70,	_s71, _s72, _s73, _s74, _s75, _s76, _s77, _s78, _s79, _s80,	_s81, _s82, _s83, _s84, _s85, _s86, _s87, _s88, _s89, _s90,	_s91, _s92, _s93, _s94, _s95, _s96, _s97, _s98, _s99, _s100;};struct _Vr2_Bstrs {    charptr	_s101, _s102, _s103, _s104, _s105, _s106, _s107, _s108, _s109, _s110,	_s111, _s112, _s113, _s114, _s115, _s116, _s117, _s118, _s119, _s120,	_s121, _s122, _s123, _s124, _s125, _s126, _s127, _s128, _s129, _s130,	_s131, _s132, _s133, _s134, _s135, _s136, _s137, _s138, _s139, _s140,	_s141, _s142, _s143, _s144, _s145;};#endif /* _VR2_COMPAT_CODE */typedef struct {	char *_sends;	/* Characters sent when key is pressed */	short _keyval;	/* "char" we pass back to program */} _KEY_MAP;/* * This definition for the term struct allows the boolean, number * and string information to grow in the future and still allow .o * compatibility. */struct term {#ifdef _VR2_COMPAT_CODE    char	_b1,  _b2,  _b3,  _b4,  _b5,  _b6,  _b7,  _b8,  _b9,  _b10,	_b11, _b12, _b13, _b14, _b15, _b16, _b17, _b18, _b19, _b20, _b21;    short	_c1, _c2, _c3, _c4, _c5, _c6, _c7, _c8;	struct _Vr2_Astrs _Vr2_Astrs;	struct _Vr2_Bstrs _Vr2_Bstrs;#endif /* _VR2_COMPAT_CODE */	short Filedes;		/* file descriptor being written to */	SGTTY Ottyb,		/* original state of the terminal */	      Nttyb;		/* current state of the terminal */#ifdef DIOCSETT	struct termcb new, old;	/* CB/UNIX virtual terminals */#endif#ifdef LTILDE	int newlmode, oldlmode;	/* BSD tty driver */#endif	/* end of Vr2 structure */	struct _bool_struct *_bools;	struct _num_struct *_nums;	struct _str_struct *_strs;	char *_strtab;	/* end of Vr3 structure */	chtype sgr_mode;		/* current phys. graphic rendition */	chtype sgr_faked;		/* attributes faked by vidputs */	int    _delay;			/* timeout for inputs */	int    _inputfd;		/* input file descriptor */	int    _check_fd;		/* typeahead file descriptor */	_KEY_MAP	**_keys,	/* key map */			*internal_keys;	/* pointer to free key structures */	short		_ksz,		/* size of keymap */			_lastkey_ordered,/* where the last ordered key is */			_lastmacro_ordered,/* where the last ordered macro is */			_first_macro;	bool				/* map of which chars start fn keys */			funckeystarter[0400];		bool		_fl_rawmode,	/* in cbreak(=1) or raw(=2) mode */			fl_typeahdok,	/* ok to use typeahead */			_cursorstate,	/* cursor: 0=invis, 1=norm, 2=vvis */			_iwait,		/* true if input-pending */			_forceupdate;	/* true if should not check input */	short		_regs[26];	/* tparm static registers */#define INP_QSIZE	32	short				/* a place to put stuff ungetch'ed */			_input_queue[INP_QSIZE],			_ungotten;	/* # chars ungotten by ungetch() */	char		_chars_on_queue; /* # chars on queue */#ifdef _VR3_COMPAT_CODE	_ochtype	*_acsmap;	chtype		*_acs32map;	/* map of alternate char set chars */#else /* _VR3_COMPAT_CODE */	chtype		*_acsmap;	/* map of alternate char set chars */#endif /* _VR3_COMPAT_CODE */	char		*turn_on_seq[NUM_ATTRIBUTES];	chtype		bit_vector;	char		*cursor_seq[3];	char		_termname[50+1];	/* same as in old "curses" */	char		*turn_off_seq[3];	chtype		check_turn_off;	chtype		non_faked_mode;};typedef struct term TERMINAL;/* allow old names for these capabilities */#define beehive_glitch	no_esc_ctlc#define teleray_glitch	dest_tabs_magic_smsoextern TERMINAL			*cur_term;extern struct _bool_struct	*cur_bools;extern struct _num_struct	*cur_nums;extern struct _str_struct	*cur_strs;#ifdef SINGLEextern TERMINAL			_first_term;extern struct _bool_struct	_frst_bools;extern struct _num_struct	_frst_nums;extern struct _str_struct	_frst_strs;# define CUR			_first_term.# define CURB			_frst_bools.# define CURN			_frst_nums.# define CURS			_frst_strs.# define PROGTTY		_first_term.Nttyb# define SHELLTTY		_first_term.Ottyb#else# define CUR			cur_term-># define CURB			cur_bools-># define CURN			cur_nums-># define CURS			cur_strs-># define PROGTTY		(cur_term->Nttyb)# define SHELLTTY		(cur_term->Ottyb)#endif extern	chtype		termattrs();extern	TERMINAL	*setcurterm(/* TERMINAL *newterminal */);#if	defined(NOMACROS) || defined(lint)extern	TERMINAL	*set_curterm(/* TERMINAL *newterminal */);extern	int	del_curterm();#else#define del_curterm	delterm#define set_curterm	setcurterm#endif	/* NOMACROS || lint */extern	short	term_errno;extern	char	*tparm(), *tgoto(), *tgetstr(), *tigetstr(),		term_parm_err[], *term_err_strings[], *Def_term, *termname();extern	char	*boolnames[], *boolcodes[], *boolfnames[],		*numnames[], *numcodes[], *numfnames[],		*strnames[], *strcodes[], *strfnames[];extern	int	tputs(), putp(), vidputs(), vidattr();extern	int	resetterm(), fixterm(), saveterm(), restartterm(), delterm();extern	void	termerr(), tinputfd();#endif /* auto_left_margin */.0r copyright.h/SMI/dw term.h!rm -f boolnames boolvals bool numnames numvals num strnames strvals str ./tmp/term.h.new ./tmp/tmp.awk ./tmp/tmp.term.hq

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -