Mercurial > emacs
view lispintro/cons-5.eps @ 83008:040dd41ed7d0
Hookified termcap devices, added bootstrap display device, plus many bugfixes.
lisp/frame.el (display-color-cells): Pass display parameter to tty-display-color-cells.
lisp/term/xterm.el (xterm-register-default-colors): Pass the selected-frame to display-color-cells.
src/dispextern.h (set_terminal_modes, reset_terminal_modes): Removed declarations.
(get_named_tty_display): New prototype.
(tty_clear_end_of_line, term_init): Updated to new prototype.
(initial_term_init): Renamed to init_initial_display.
src/dispnew.c (Fredraw_frame): ifdef-out DOS-specific code. Add display parameter to set_terminal_modes call.
(update_frame): Don't flush the tty of there is no tty.
(init_display): Set up a termcap display on the controlling tty and
change the initial frame to use that. Delete the initial display.
src/frame.c (Fframep): Return t for the initial frame.
(make_initial_frame): New function for creating the initial frame during bootstrap. Use init_initial_display, not initial_term_init.
(make_terminal_frame): Removed special cases for creating the initial frame.
src/frame.h (enum output_method): New entry: output_initial for the bootstrap display.
(FRAME_INITIAL_P): New macro.
(make_initial_frame): New prototype.
src/keyboard.c (interrupt_signal): Exit Emacs on SIGINT from the (frameless) controlling tty, if possible. Explain this in a comment.
(init_keyboard): Added comment about exiting on SIGINT.
(Fset_input_mode): A termcap frame is never the initial frame anymore.
src/sysdep.c (init_sys_modes): Update tty_set_terminal_modes call to the new prototype.
(reset_sys_modes): Comment out tty_clear_end_of_line call; it doesn't work anymore. Update tty_reset_terminal_modes call.
src/termchar.h (struct tty_display_info): Added pointer to the display structure, for reset_sys_modes.
src/termhooks.h (struct display): Added display parameter to set_terminal_modes_hook and reset_terminal_modes_hook.
src/term.c (initial_display): New variable.
(tty_ring_bell, tty_update_end, tty_set_terminal_window, tty_cursor_to)
(tty_raw_cursor_to, tty_clear_to_end, tty_clear_frame, tty_clear_end_of_line)
(tty_write_glyphs, tty_insert_glyphs, tty_delete_glyphs, tty_ins_del_lines): New functions.
(ring_bell, update_end, set_terminal_window, cursor_to, raw_cursor_to)
(clear_to_end, clear_frame, clear_end_of_line, write_glyphs, insert_glyphs)
(delete_glyphs, ins_del_lines): Removed special casing of termcap displays.
(get_tty_display): New function.
(Ftty_display_color_p, Ftty_display_color_cells): Use it.
(get_named_tty_display): Removed static.
(tty_set_terminal_modes, tty_reset_terminal_modes): Changed to use a display parameter
instead of tty_display_info for hook compatibility.
(set_terminal_modes, reset_terminal_modes): Removed.
(initial_term_init): Renamed to init_initial_display. Set up an
output_initial device, not a termcap display.
(delete_initial_display): New function.
(maybe_fatal): New function, for private use of term_init.
(term_init): New parameter for choosing between fatal and simple errors.
Removed incomprehensible special casing for the second initialization of the
controlling tty. Use maybe_fatal for error handling.
Initialize termcap display hooks in the new device.
Initialize the display pointer in the tty_display_info structure.
(delete_tty): Replace order of reset_sys_modes and delete_display.
src/window.c (init_window_once): Call make_initial_frame instead of make_terminal_frame.
src/xfaces.c (realize_default_face, realize_face): Don't abort on the bootstrap display device.
src/xterm.c (XTset_terminal_modes, XTreset_terminal_modes): Added display parameter.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-48
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Fri, 09 Jan 2004 18:57:53 +0000 |
parents | a8ee89e61d20 |
children | 6ad2412f0362 |
line wrap: on
line source
%! %%BoundingBox: 15 680 305 764 %%Title: cons-cell-diagram5 %%CreationDate: Wed Mar 8 14:27:28 1995 %%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu) % % Due to bugs in Transcript, the 'PS-Adobe-' stuff is omitted from line 1 % /tgifdict 132 dict def tgifdict begin % % Using a zero value radius for an ellipse or an arc would result % in a non-invertible CTM matrix which causes problem when this % when this PostScript is wrapped inside other routines, such as % the multi.ps package from % ftp.ucc.su.oz.au:/pub/ps_printing/multi. You can overcome such % error by uncommenting the sole line of the procedure below: % /tgif_min_radius { % dup 0.01 lt { pop 0.01 } if } bind def /tgifellipsedict 6 dict def tgifellipsedict /mtrx matrix put /tgifellipse { tgifellipsedict begin /yrad exch def /xrad exch def /y exch def /x exch def /savematrix mtrx currentmatrix def x y translate xrad yrad scale 0 0 1 0 360 arc savematrix setmatrix end } def /tgifarrowtipdict 8 dict def tgifarrowtipdict /mtrx matrix put /tgifarrowtip { tgifarrowtipdict begin /dy exch def /dx exch def /h exch def /w exch def /y exch def /x exch def /savematrix mtrx currentmatrix def x y translate dy dx atan rotate 0 0 moveto w neg h lineto w neg h neg lineto savematrix setmatrix end } def /tgifarcdict 8 dict def tgifarcdict /mtrx matrix put /tgifarcn { tgifarcdict begin /endangle exch def /startangle exch def /yrad exch def /xrad exch def /y exch def /x exch def /savematrix mtrx currentmatrix def x y translate xrad yrad scale 0 0 1 startangle endangle arc savematrix setmatrix end } def /tgifarc { tgifarcdict begin /endangle exch def /startangle exch def /yrad exch def /xrad exch def /y exch def /x exch def /savematrix mtrx currentmatrix def x y translate xrad yrad scale 0 0 1 startangle endangle arcn savematrix setmatrix end } def /tgifsetuserscreendict 22 dict def tgifsetuserscreendict begin /tempctm matrix def /temprot matrix def /tempscale matrix def /concatprocs { /proc2 exch cvlit def /proc1 exch cvlit def /newproc proc1 length proc2 length add array def newproc 0 proc1 putinterval newproc proc1 length proc2 putinterval newproc cvx } def /resmatrix matrix def /findresolution { 72 0 resmatrix defaultmatrix dtransform /yres exch def /xres exch def xres dup mul yres dup mul add sqrt } def end /tgifsetuserscreen { tgifsetuserscreendict begin /spotfunction exch def /screenangle exch def /cellsize exch def /m tempctm currentmatrix def /rm screenangle temprot rotate def /sm cellsize dup tempscale scale def sm rm m m concatmatrix m concatmatrix pop 1 0 m dtransform /y1 exch def /x1 exch def /veclength x1 dup mul y1 dup mul add sqrt def /frequency findresolution veclength div def /newscreenangle y1 x1 atan def m 2 get m 1 get mul m 0 get m 3 get mul sub 0 gt {{neg} /spotfunction load concatprocs /spotfunction exch def } if frequency newscreenangle /spotfunction load setscreen end } def /tgifsetpatterndict 18 dict def tgifsetpatterndict begin /bitison { /ybit exch def /xbit exch def /bytevalue bstring ybit bwidth mul xbit 8 idiv add get def /mask 1 7 xbit 8 mod sub bitshift def bytevalue mask and 0 ne } def end /tgifbitpatternspotfunction { tgifsetpatterndict begin /y exch def /x exch def /xindex x 1 add 2 div bpside mul cvi def /yindex y 1 add 2 div bpside mul cvi def xindex yindex bitison { /onbits onbits 1 add def 1 } { /offbits offbits 1 add def 0 } ifelse end } def /tgifsetpattern { tgifsetpatterndict begin /cellsz exch def /angle exch def /bwidth exch def /bpside exch def /bstring exch def /onbits 0 def /offbits 0 def cellsz angle /tgifbitpatternspotfunction load tgifsetuserscreen {} settransfer offbits offbits onbits add div setgray end } def /tgifxpmdict 4 dict def /tgifbwpicstr 1 string def /tgifcolorpicstr 3 string def /tgifsetpixels { tgifxpmdict begin /pixels exch def end } def /tgifsetpix { tgifxpmdict begin pixels 3 1 roll putinterval end } def /tgifbwspot { tgifxpmdict begin /index exch def tgifbwpicstr 0 pixels index 3 mul 3 getinterval aload pop 255 mul .114 mul exch 255 mul .587 mul add exch 255 mul .299 mul add cvi put tgifbwpicstr end } def /tgifcolorspot { tgifxpmdict begin /index exch def pixels index 3 mul 3 getinterval aload pop 255 mul cvi tgifcolorpicstr 2 3 -1 roll put 255 mul cvi tgifcolorpicstr 1 3 -1 roll put 255 mul cvi tgifcolorpicstr 0 3 -1 roll put tgifcolorpicstr end } def /tgifnewcolorspot { tgifxpmdict begin /index exch def pixels index 3 mul 3 getinterval aload pop setrgbcolor end } def /tgifcolordict 4 dict def /colorimage where { pop } { /colorimage { tgifcolordict begin pop pop pop pop pop /ih exch def /iw exch def /x 0 def /y 0 def 1 1 ih { pop 1 1 iw { pop currentfile tgifbwpicstr readhexstring pop 0 get tgifnewcolorspot x y moveto 1 0 rlineto 0 1 rlineto -1 0 rlineto closepath fill /x x 1 add def } for /y y 1 add def /x 0 def } for end } def } ifelse /tgifpatdict 10 dict def /tgifpatbyte { currentdict /retstr get exch pat i cellsz mod get put } def /tgifpatproc { 0 1 widthlim {tgifpatbyte} for retstr /i i 1 add def } def /tgifpatfill { tgifpatdict begin /h exch def /w exch def /lty exch def /ltx exch def /cellsz exch def /pat exch def /widthlim w cellsz div cvi 1 sub def /retstr widthlim 1 add string def /i 0 def ltx lty translate w h true [1 0 0 1 0 0] {tgifpatproc} imagemask ltx neg lty neg translate end } def /pat1 <ffffffffffffffff> def /pat2 <0000000000000000> def /pat3 <8000000008000000> def /pat4 <8800000022000000> def /pat5 <8800220088002200> def /pat6 <8822882288228822> def /pat7 <aa55aa55aa55aa55> def /pat8 <77dd77dd77dd77dd> def /pat9 <77ffddff77ffddff> def /pat10 <77ffffff77ffffff> def /pat11 <7fffffff7fffffff> def /pat12 <8040200002040800> def /pat13 <40a00000040a0000> def /pat14 <ff888888ff888888> def /pat15 <ff808080ff080808> def /pat16 <f87422478f172271> def /pat17 <038448300c020101> def /pat18 <081c22c180010204> def /pat19 <8080413e080814e3> def /pat20 <8040201008040201> def /pat21 <8844221188442211> def /pat22 <77bbddee77bbddee> def /pat23 <c1e070381c0e0783> def /pat24 <7fbfdfeff7fbfdfe> def /pat25 <3e1f8fc7e3f1f87c> def /pat26 <0102040810204080> def /pat27 <1122448811224488> def /pat28 <eeddbb77eeddbb77> def /pat29 <83070e1c3870e0c1> def /pat30 <fefdfbf7efdfbf7f> def /pat31 <7cf8f1e3c78f1f3e> def /tgifcentertext { dup stringwidth pop 2 div neg 0 rmoveto } def /tgifrighttext { dup stringwidth pop neg 0 rmoveto } def /tgifreencsmalldict 12 dict def /tgifReEncodeSmall { tgifreencsmalldict begin /newcodesandnames exch def /newfontname exch def /basefontname exch def /basefontdict basefontname findfont def /newfont basefontdict maxlength dict def basefontdict { exch dup /FID ne { dup /Encoding eq { exch dup length array copy newfont 3 1 roll put } { exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall newfont /FontName newfontname put newcodesandnames aload pop newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put} repeat newfontname newfont definefont pop end } def /tgifgray { 8 1 0 72 300 32 div div tgifsetpattern } bind def /tgifboxdict 6 dict def /tgifboxstroke { tgifboxdict begin /pat def /w def /y2 exch def /x2 exch def /y1 exch def /x1 exch def 1.415 setmiterlimit w 1 eq { w setlinewidth } if pat pat1 ne pat pat2 ne and { gsave pat tgifgray } if newpath x1 y1 moveto x2 y1 lineto x2 y2 lineto x1 y2 lineto closepath pat pat2 eq { 1 setgray stroke 0 setgray } { stroke } ifelse pat pat1 ne pat pat2 ne and { grestore } if w 1 eq { 1 setlinewidth } if 1 setmiterlimit end } def /tgifboxfill { tgifboxdict begin /pat def /y2 exch def /x2 exch def /y1 exch def /x1 exch def pat pat1 ne pat pat2 ne and { gsave pat tgifgray } if newpath x1 y1 moveto x2 y1 lineto x2 y2 lineto x1 y2 lineto closepath pat pat2 eq { 1 setgray fill 0 setgray } { fill } ifelse pat pat1 ne pat pat2 ne and { grestore } if end } def end %%PageBoundingBox: 15 680 305 764 tgifdict begin /tgifsavedpage save def 1 setmiterlimit 1 setlinewidth 0 setgray 72 0 mul 72 11.00 mul translate 72 128 div 100 mul 100 div dup neg scale gsave % POLY/OPEN-SPLINE gsave newpath 156 105 moveto 156 137 lineto stroke grestore % POLY/OPEN-SPLINE gsave newpath 171 125 moveto 0 56 atan dup cos 8 mul 227 exch sub exch sin 8 mul 125 exch sub lineto stroke grestore gsave newpath 227 125 8 3 56 0 tgifarrowtip closepath fill grestore % BOX gsave 1.415 setmiterlimit newpath 232 103 moveto 296 103 lineto 296 135 lineto 232 135 lineto closepath stroke 1 setmiterlimit grestore % POLY/OPEN-SPLINE gsave newpath 264 103 moveto 264 135 lineto stroke grestore % POLY/OPEN-SPLINE gsave newpath 279 117 moveto 0 59 atan dup cos 8 mul 338 exch sub exch sin 8 mul 117 exch sub lineto stroke grestore gsave newpath 338 117 8 3 59 0 tgifarrowtip closepath fill grestore % TEXT 0 setgray /Courier findfont [17 0 0 -17 0 0] makefont setfont gsave 289 172 moveto (a different piece of text) show grestore % POLY/OPEN-SPLINE gsave newpath 248 119 moveto 248 168 lineto 0 29 atan dup cos 8 mul 277 exch sub exch sin 8 mul 168 exch sub lineto stroke grestore gsave newpath 277 168 8 3 29 0 tgifarrowtip closepath fill grestore % TEXT 0 setgray /Courier findfont [17 0 0 -17 0 0] makefont setfont gsave 147 66 moveto (kill-ring-yank-pointer) show grestore % POLY/OPEN-SPLINE gsave newpath 207 76 moveto 207 114 lineto 0 18 atan dup cos 8 mul 225 exch sub exch sin 8 mul 114 exch sub lineto stroke grestore gsave newpath 225 114 8 3 18 0 tgifarrowtip closepath fill grestore % BOX gsave 1.415 setmiterlimit newpath 341 98 moveto 405 98 lineto 405 130 lineto 341 130 lineto closepath stroke 1 setmiterlimit grestore % POLY/OPEN-SPLINE gsave newpath 372 98 moveto 372 130 lineto stroke grestore % POLY/OPEN-SPLINE gsave newpath 388 115 moveto 0 48 atan dup cos 8 mul 436 exch sub exch sin 8 mul 115 exch sub lineto stroke grestore gsave newpath 436 115 8 3 48 0 tgifarrowtip closepath fill grestore % TEXT 0 setgray /Courier findfont [17 0 0 -17 0 0] makefont setfont gsave 448 121 moveto (nil) show grestore % TEXT 0 setgray /Courier findfont [17 0 0 -17 0 0] makefont setfont gsave 397 154 moveto (yet more text) show grestore % POLY/OPEN-SPLINE gsave newpath 356 112 moveto 356 149 lineto 0 35 atan dup cos 8 mul 391 exch sub exch sin 8 mul 149 exch sub lineto stroke grestore gsave newpath 391 149 8 3 35 0 tgifarrowtip closepath fill grestore % BOX gsave 1.415 setmiterlimit newpath 126 105 moveto 190 105 lineto 190 137 lineto 126 137 lineto closepath stroke 1 setmiterlimit grestore % TEXT 0 setgray /Courier findfont [17 0 0 -17 0 0] makefont setfont gsave 206 192 moveto (some text) show grestore % POLY/OPEN-SPLINE gsave newpath 142 120 moveto 142 187 lineto 0 48 atan dup cos 8 mul 190 exch sub exch sin 8 mul 187 exch sub lineto stroke grestore gsave newpath 190 187 8 3 48 0 tgifarrowtip closepath fill grestore % TEXT 0 setgray /Courier findfont [17 0 0 -17 0 0] makefont setfont gsave 32 66 moveto (kill-ring) show grestore % POLY/OPEN-SPLINE gsave newpath 65 81 moveto 65 121 lineto 0 51 atan dup cos 8 mul 116 exch sub exch sin 8 mul 121 exch sub lineto stroke grestore gsave newpath 116 121 8 3 51 0 tgifarrowtip closepath fill grestore grestore tgifsavedpage restore end %MatchingCreationDate: Wed Mar 8 14:27:28 1995