home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1992 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1992.iso
/
usenet
/
altsrcs
/
1
/
1136
< prev
next >
Wrap
Internet Message Format
|
1990-12-28
|
34KB
From: howard@hasse.ericsson.se (Howard Gayle)
Newsgroups: alt.sources
Subject: GNU Emacs 8-bit mods part 09 of 12
Message-ID: <1990Apr5.134111.9195@ericsson.se>
Date: 5 Apr 90 13:41:11 GMT
*** ../18.55/src/xdisp.c Wed Apr 26 22:13:59 1989
--- src/xdisp.c Thu Apr 5 09:17:31 1990
***************
*** 1,5 ****
/* Display generation from window structure and buffer text.
! Copyright (C) 1985, 1986, 1987, 1988 Free Software Foundation, Inc.
This file is part of GNU Emacs.
--- 1,5 ----
/* Display generation from window structure and buffer text.
! Copyright (C) 1985, 1986, 1987, 1988, 1990 Free Software Foundation, Inc.
This file is part of GNU Emacs.
***************
*** 19,29 ****
--- 19,34 ----
and this notice must be preserved on all copies. */
+ /* Modified 1990 for 8-bit character support by Howard Gayle.
+ * See chartab.c for details. */
+
+
#include "config.h"
#include <stdio.h>
/*#include <ctype.h>*/
#undef NULL
#include "lisp.h"
+ #include "chartab.h"
#include "window.h"
#include "termchar.h"
#include "dispextern.h"
***************
*** 349,357 ****
&& end_unchanged >= tlendpos
&& bf_s2 >= tlendpos)))
{
! if (tlbufpos > FirstCharacter && CharAt (tlbufpos - 1) != '\n'
&& (tlbufpos == NumCharacters + 1
! || CharAt (tlbufpos) == '\n'))
/* Former continuation line has disappeared by becoming empty */
goto cancel;
else if (XFASTINT (w->last_modified) < bf_modified
--- 354,362 ----
&& end_unchanged >= tlendpos
&& bf_s2 >= tlendpos)))
{
! if (tlbufpos > FirstCharacter && CharAt (tlbufpos - 1) != NEWLINE
&& (tlbufpos == NumCharacters + 1
! || CharAt (tlbufpos) == NEWLINE))
/* Former continuation line has disappeared by becoming empty */
goto cancel;
else if (XFASTINT (w->last_modified) < bf_modified
***************
*** 689,695 ****
but no longer is, find a new starting point. */
else if (!NULL (w->start_at_line_beg)
&& !(startp == FirstCharacter
! || CharAt (startp - 1) == '\n'))
{
goto recenter;
}
--- 694,700 ----
but no longer is, find a new starting point. */
else if (!NULL (w->start_at_line_beg)
&& !(startp == FirstCharacter
! || CharAt (startp - 1) == NEWLINE))
{
goto recenter;
}
***************
*** 764,770 ****
startp = marker_position (w->start);
w->start_at_line_beg =
! (startp == FirstCharacter || CharAt (startp - 1) == '\n') ? Qt : Qnil;
done:
/* If window not full width, must redo its mode line
--- 769,775 ----
startp = marker_position (w->start);
w->start_at_line_beg =
! (startp == FirstCharacter || CharAt (startp - 1) == NEWLINE) ? Qt : Qnil;
done:
/* If window not full width, must redo its mode line
***************
*** 811,817 ****
if (pos != val.bufpos)
last_text_vpos
/* Next line, unless prev line ended in end of buffer with no cr */
! = vpos - (val.vpos && CharAt (val.bufpos - 1) != '\n');
pos = val.bufpos;
}
--- 816,822 ----
if (pos != val.bufpos)
last_text_vpos
/* Next line, unless prev line ended in end of buffer with no cr */
! = vpos - (val.vpos && CharAt (val.bufpos - 1) != NEWLINE);
pos = val.bufpos;
}
***************
*** 930,936 ****
newline before it, so the following line must be redrawn. */
if (stop_vpos == ep.vpos
&& (ep.bufpos == FirstCharacter
! || CharAt (ep.bufpos - 1) != '\n'
|| ep.bufpos == bf_s1 + bf_s2 + 1 - end_unchanged))
stop_vpos = ep.vpos + 1;
--- 935,941 ----
newline before it, so the following line must be redrawn. */
if (stop_vpos == ep.vpos
&& (ep.bufpos == FirstCharacter
! || CharAt (ep.bufpos - 1) != NEWLINE
|| ep.bufpos == bf_s1 + bf_s2 + 1 - end_unchanged))
stop_vpos = ep.vpos + 1;
***************
*** 952,958 ****
for (i = ep.bufpos; i < xp.bufpos; i++)
{
tem = CharAt (i);
! if (tem != ' ' && tem != '\n' && tem != '\t')
break;
}
if (i == xp.bufpos)
--- 957,963 ----
for (i = ep.bufpos; i < xp.bufpos; i++)
{
tem = CharAt (i);
! if (tem != SPACE && tem != NEWLINE && tem != HTAB)
break;
}
if (i == xp.bufpos)
***************
*** 1063,1069 ****
if (pos != val.bufpos)
last_text_vpos
/* Next line, unless prev line ended in end of buffer with no cr */
! = vpos - (val.vpos && CharAt (val.bufpos - 1) != '\n');
pos = val.bufpos;
}
--- 1068,1074 ----
if (pos != val.bufpos)
last_text_vpos
/* Next line, unless prev line ended in end of buffer with no cr */
! = vpos - (val.vpos && CharAt (val.bufpos - 1) != NEWLINE);
pos = val.bufpos;
}
***************
*** 1167,1172 ****
--- 1172,1194 ----
return 1;
}
+ glyf_t *copy_rope (t, s, r)
+ register glyf_t *t; /* Copy to here. */
+ register glyf_t *s; /* Starting point. */
+ register rope_t *r; /* Copy from here. */
+ {
+ register int n = r->r_len; /* Number of glyfs in rope. */
+ register glyf_t *f = r->r_glyfs; /* Step through glyfs in rope. */
+
+ while (n--)
+ {
+ if (t >= s) *t = *f;
+ ++t;
+ ++f;
+ }
+ return (t);
+ }
+
/* Display one line of window w, starting at position `start' in w's buffer.
Display starting at horizontal position `hpos',
which is normally zero or negative.
***************
*** 1193,1209 ****
int taboffset;
{
register int pos = start;
! register int c;
! register char *p1;
int end;
register int pause;
! register unsigned char *p;
! char *endp;
! register char *startp;
! register char *p1prev;
register struct display_line *line;
int tab_width = XINT (bf_cur->tab_width);
- int ctl_arrow = !NULL (bf_cur->ctl_arrow);
int width = XFASTINT (w->width) - 1
- (XFASTINT (w->width) + XFASTINT (w->left) != screen_width);
struct position val;
--- 1215,1230 ----
int taboffset;
{
register int pos = start;
! register char_t c;
! register glyf_t *p1;
int end;
register int pause;
! register char_t *p;
! glyf_t *endp;
! register glyf_t *startp;
! register glyf_t *p1prev;
register struct display_line *line;
int tab_width = XINT (bf_cur->tab_width);
int width = XFASTINT (w->width) - 1
- (XFASTINT (w->width) + XFASTINT (w->left) != screen_width);
struct position val;
***************
*** 1218,1224 ****
= XTYPE (bf_cur->selective_display) == Lisp_Int
? XINT (bf_cur->selective_display)
: !NULL (bf_cur->selective_display) ? -1 : 0;
! int selective_e = selective && !NULL (bf_cur->selective_display_ellipses);
hpos += XFASTINT (w->left);
line = get_display_line (vpos, XFASTINT (w->left));
--- 1239,1246 ----
= XTYPE (bf_cur->selective_display) == Lisp_Int
? XINT (bf_cur->selective_display)
: !NULL (bf_cur->selective_display) ? -1 : 0;
! register struct Lisp_Chartab *cp = WINDOW_CHAR_TABLE (w);
! int selective_rlen = selective ? cp->ct_invisr.r_len : 0;
hpos += XFASTINT (w->left);
line = get_display_line (vpos, XFASTINT (w->left));
***************
*** 1229,1235 ****
{
if (minibuf_prompt)
hpos = display_string (w, line, minibuf_prompt, hpos,
! !truncate ? '\\' : '$', -1, -1);
minibuf_prompt_width = hpos;
}
--- 1251,1258 ----
{
if (minibuf_prompt)
hpos = display_string (w, line, minibuf_prompt, hpos,
! truncate ? cp->ct_truncg : cp->ct_wrapg,
! -1, -1);
minibuf_prompt_width = hpos;
}
***************
*** 1267,1279 ****
p = &CharAt (pos);
}
c = *p++;
! if (c >= 040 && c < 0177)
! {
! if (p1 >= startp)
! *p1 = c;
! p1++;
! }
! else if (c == '\n')
{
invis = 0;
while (pos < end
--- 1290,1296 ----
p = &CharAt (pos);
}
c = *p++;
! if (c == NEWLINE)
{
invis = 0;
while (pos < end
***************
*** 1282,1348 ****
{
invis = 1;
pos = find_next_newline (pos + 1, 1);
! if (CharAt (pos - 1) == '\n')
pos--;
}
! if (invis && selective_e)
{
! p1 += 4;
if (p1 - startp > width)
p1 = endp;
! strncpy (p1prev, " ...", p1 - p1prev);
}
break;
}
! else if (c == '\t')
{
do
{
if (p1 >= startp)
! *p1 = ' ';
p1++;
}
while ((p1 - startp + taboffset + hscroll - (hscroll > 0))
% tab_width);
}
! else if (c == Ctl('M') && selective == -1)
{
pos = find_next_newline (pos, 1);
! if (CharAt (pos - 1) == '\n')
pos--;
! if (selective_e)
{
! p1 += 4;
if (p1 - startp > width)
p1 = endp;
! strncpy (p1prev, " ...", p1 - p1prev);
}
break;
}
! else if (c < 0200 && ctl_arrow)
! {
! if (p1 >= startp)
! *p1 = '^';
! p1++;
! if (p1 >= startp)
! *p1 = c ^ 0100;
! p1++;
! }
! else
! {
! if (p1 >= startp)
! *p1 = '\\';
! p1++;
! if (p1 >= startp)
! *p1 = (c >> 6) + '0';
! p1++;
! if (p1 >= startp)
! *p1 = (7 & (c >> 3)) + '0';
! p1++;
! if (p1 >= startp)
! *p1 = (7 & c) + '0';
! p1++;
! }
pos++;
}
--- 1299,1345 ----
{
invis = 1;
pos = find_next_newline (pos + 1, 1);
! if (CharAt (pos - 1) == NEWLINE)
pos--;
}
! if (invis && selective_rlen)
{
! p1 += selective_rlen;
if (p1 - startp > width)
p1 = endp;
! bcopy (cp->ct_invisr.r_glyfs, p1prev,
! (p1 - p1prev) * sizeof (glyf_t));
}
break;
}
! else if (c == HTAB)
{
do
{
if (p1 >= startp)
! *p1 = SPACEGLYF;
p1++;
}
while ((p1 - startp + taboffset + hscroll - (hscroll > 0))
% tab_width);
}
! else if (c == cp->ct_invisc && selective == -1)
{
pos = find_next_newline (pos, 1);
! if (CharAt (pos - 1) == NEWLINE)
pos--;
! if (selective_rlen)
{
! p1 += selective_rlen;
if (p1 - startp > width)
p1 = endp;
! bcopy (cp->ct_invisr.r_glyfs, p1prev,
! (p1 - p1prev) * sizeof (glyf_t));
}
break;
}
! else
! p1 = copy_rope (p1, startp, &cp->ct_dispr[c]);
pos++;
}
***************
*** 1373,1379 ****
if (pos < NumCharacters + 1)
{
! if (CharAt (pos) == '\n')
/* If stopped due to a newline, start next line after it */
pos++;
else
--- 1370,1376 ----
if (pos < NumCharacters + 1)
{
! if (CharAt (pos) == NEWLINE)
/* If stopped due to a newline, start next line after it */
pos++;
else
***************
*** 1381,1387 ****
{
if (truncate)
{
! *p1++ = '$';
/* Truncating => start next line after next newline,
and point is on this line if it is before the newline,
and skip none of first char of next line */
--- 1378,1384 ----
{
if (truncate)
{
! *p1++ = cp->ct_truncg;
/* Truncating => start next line after next newline,
and point is on this line if it is before the newline,
and skip none of first char of next line */
***************
*** 1388,1398 ****
pos = find_next_newline (pos, 1);
val.hpos = XINT (w->hscroll) ? 1 - XINT (w->hscroll) : 0;
! lastpos = pos - (CharAt (pos - 1) == '\n');
}
else
{
! *p1++ = '\\';
val.vpos = 0;
lastpos--;
}
--- 1385,1395 ----
pos = find_next_newline (pos, 1);
val.hpos = XINT (w->hscroll) ? 1 - XINT (w->hscroll) : 0;
! lastpos = pos - (CharAt (pos - 1) == NEWLINE);
}
else
{
! *p1++ = cp->ct_wrapg;
val.vpos = 0;
lastpos--;
}
***************
*** 1436,1442 ****
/* If hscroll and line not empty, insert truncation-at-left marker */
if (hscroll && lastpos != start)
{
! *startp = '$';
if (p1 <= startp)
p1 = startp + 1;
}
--- 1433,1439 ----
/* If hscroll and line not empty, insert truncation-at-left marker */
if (hscroll && lastpos != start)
{
! *startp = cp->ct_truncg;
if (p1 <= startp)
p1 = startp + 1;
}
***************
*** 1445,1452 ****
{
endp++;
if (p1 < startp) p1 = startp;
! while (p1 < endp) *p1++ = ' ';
! *p1++ = '|';
}
line->length = max (line->length, p1 - line->body);
line->body[line->length] = 0;
--- 1442,1449 ----
{
endp++;
if (p1 < startp) p1 = startp;
! while (p1 < endp) *p1++ = SPACEGLYF;
! *p1++ = cp->ct_frameg;
}
line->length = max (line->length, p1 - line->body);
line->body[line->length] = 0;
***************
*** 1717,1723 ****
{
register char *bp = buf;
register long len;
!
len = strlen (str);
if (width && width < len)
{
--- 1714,1720 ----
{
register char *bp = buf;
register long len;
!
len = strlen (str);
if (width && width < len)
{
***************
*** 1856,1862 ****
been obtained by get_display_line (vpos, hpos)
or in some suitable manner.
! TRUNCATE is character to display at end if truncated. Zero for none.
MINCOL is the first column ok to end at. (Pad with spaces to this col.)
MAXCOL is the last column ok to end at. Truncate here.
--- 1853,1859 ----
been obtained by get_display_line (vpos, hpos)
or in some suitable manner.
! TRUNCATE is glyf to display at end if truncated. Zero for none.
MINCOL is the first column ok to end at. (Pad with spaces to this col.)
MAXCOL is the last column ok to end at. Truncate here.
***************
*** 1872,1900 ****
register struct display_line *line;
unsigned char *string;
int hpos;
! char truncate;
int mincol, maxcol;
{
! register int c;
! register unsigned char *p1;
int hscroll = XINT (w->hscroll);
int tab_width = XINT (bf_cur->tab_width);
! register unsigned char *start;
! register unsigned char *end;
! unsigned char *p1start = (unsigned char *) line->body + hpos;
int window_width = XFASTINT (w->width);
if (tab_width <= 0 || tab_width > 20) tab_width = 8;
p1 = p1start;
! start = (unsigned char *) line->body + XFASTINT (w->left);
end = start + window_width - (truncate != 0);
if ((window_width + XFASTINT (w->left)) != screen_width)
! *end-- = '|';
! if (maxcol >= 0 && end - (unsigned char *) line->body > maxcol)
! end = (unsigned char *) line->body + maxcol;
if (maxcol >= 0 && mincol > maxcol)
mincol = maxcol;
--- 1869,1898 ----
register struct display_line *line;
unsigned char *string;
int hpos;
! glyf_t truncate;
int mincol, maxcol;
{
! register char_t c;
! register glyf_t *p1;
int hscroll = XINT (w->hscroll);
int tab_width = XINT (bf_cur->tab_width);
! register glyf_t *start;
! register glyf_t *end;
! glyf_t *p1start = line->body + hpos;
int window_width = XFASTINT (w->width);
+ register struct Lisp_Chartab *cp = WINDOW_CHAR_TABLE (w);
if (tab_width <= 0 || tab_width > 20) tab_width = 8;
p1 = p1start;
! start = line->body + XFASTINT (w->left);
end = start + window_width - (truncate != 0);
if ((window_width + XFASTINT (w->left)) != screen_width)
! *end-- = cp->ct_frameg;
! if (maxcol >= 0 && end - line->body > maxcol)
! end = line->body + maxcol;
if (maxcol >= 0 && mincol > maxcol)
mincol = maxcol;
***************
*** 1902,1947 ****
{
c = *string++;
if (!c) break;
! if (c >= 040 && c < 0177)
! {
! if (p1 >= start)
! *p1 = c;
! p1++;
! }
! else if (c == '\t')
{
do
{
if (p1 >= start)
! *p1 = ' ';
p1++;
}
while ((p1 - start + hscroll - (hscroll > 0)) % tab_width);
}
! else if (c < 0200 && buffer_defaults.ctl_arrow)
! {
! if (p1 >= start)
! *p1 = '^';
! p1++;
! if (p1 >= start)
! *p1 = c ^ 0100;
! p1++;
! }
! else
! {
! if (p1 >= start)
! *p1 = '\\';
! p1++;
! if (p1 >= start)
! *p1 = (c >> 6) + '0';
! p1++;
! if (p1 >= start)
! *p1 = (7 & (c >> 3)) + '0';
! p1++;
! if (p1 >= start)
! *p1 = (7 & c) + '0';
! p1++;
! }
}
if (c)
--- 1900,1917 ----
{
c = *string++;
if (!c) break;
! if (c == HTAB)
{
do
{
if (p1 >= start)
! *p1 = SPACEGLYF;
p1++;
}
while ((p1 - start + hscroll - (hscroll > 0)) % tab_width);
}
! else
! p1 = copy_rope (p1, start, &cp->ct_dispr[c]);
}
if (c)
***************
*** 1951,1963 ****
}
else if (mincol >= 0)
{
! end = (unsigned char *) line->body + mincol;
while (p1 < end)
! *p1++ = ' ';
}
{
! register int len = p1 - (unsigned char *) line->body;
if (len > line->length)
line->length = len;
line->body[line->length] = 0;
--- 1921,1933 ----
}
else if (mincol >= 0)
{
! end = line->body + mincol;
while (p1 < end)
! *p1++ = SPACEGLYF;
}
{
! register int len = p1 - line->body;
if (len > line->length)
line->length = len;
line->body[line->length] = 0;
*** ../18.55/src/x11term.c Thu Aug 3 04:56:42 1989
--- src/x11term.c Thu Apr 5 09:18:47 1990
***************
*** 1,5 ****
/* X Communication module for terminals which understand the X protocol.
! Copyright (C) 1988 Free Software Foundation, Inc.
This file is part of GNU Emacs.
--- 1,5 ----
/* X Communication module for terminals which understand the X protocol.
! Copyright (C) 1988, 1990 Free Software Foundation, Inc.
This file is part of GNU Emacs.
***************
*** 29,34 ****
--- 29,38 ----
* $Header: x11term.c,v 1.12 88/02/29 14:11:07 rfrench Exp $
*/
+
+ /* Modified 1990 for 8-bit character support by Howard Gayle.
+ * See chartab.c for details. */
+
#ifndef lint
static char *rcsid_xterm_c = "$Header: x11term.c,v 1.12 88/02/29 14:11:07 rfrench Exp $";
#endif lint
***************
*** 49,54 ****
--- 53,59 ----
#ifdef HAVE_X_WINDOWS
#include "lisp.h"
+ #include "chartab.h"
#undef NULL
/* Allow m- file to inhibit use of interrupt-driven input. */
***************
*** 457,467 ****
UNBLOCK_INPUT ();
}
/* used by dumprectangle which is usually invoked upon Expose
* events which come from bit blt's or moving an obscuring opaque window
*/
! dumpchars (ActiveScreen, numcols, tempX, tempY, tempHL)
register struct display_line **ActiveScreen;
register int numcols;
register int tempX, tempY, tempHL;
--- 462,490 ----
UNBLOCK_INPUT ();
}
+ /* Display a sequence of glyfs. */
+ static void drawglyfs (gc, x, y, gp, n)
+ GC gc; /* Graphic context.*/
+ int x; /* Horizontal glyf position. */
+ int y; /* Vertical glyf position. */
+ register glyf_t *gp; /* Points to first glyf. */
+ int n; /* Number of glyfs to display. */
+ {
+ register char *cp; /* Steps through buf[]. */
+ register int i; /* Counts glyfs.*/
+ char buf[MScreenWidth]; /* Holds characters to be displayed. */
+
+ cp = buf;
+ for (i = n; 0 != i; --i)
+ *cp++ = 0377 & *gp++;
+ XDrawImageString (XXdisplay, XXwindow, gc, x, y, buf, n);
+ }
+
/* used by dumprectangle which is usually invoked upon Expose
* events which come from bit blt's or moving an obscuring opaque window
*/
! dumpglyfs (ActiveScreen, numcols, tempX, tempY, tempHL)
register struct display_line **ActiveScreen;
register int numcols;
register int tempX, tempY, tempHL;
***************
*** 476,492 ****
tempY < 0 || tempY >= screen_height)
return;
! XDrawImageString(XXdisplay, XXwindow, tempHL ? XXgc_rev : XXgc_norm,
! tempX*XXfontw+XXInternalBorder,
! tempY*XXfonth+XXInternalBorder+XXbase,
! &ActiveScreen[tempY+1]->body[tempX],
! numcols);
}
/* When a line has been changed this function is called. Due to various
* bits of braindamage on the parts of both X11 and Emacs, the new
* version of the line is simply output if this function is invoked while
! * in UpDate. Sometimes writechars can be invoked when not in update if
* text is to be output at the end of the line. In this case the whole
* line is not output. Simply the new text at the current cursor
* position given by VisibleX,Y. The cursor is moved to the end of the
--- 499,515 ----
tempY < 0 || tempY >= screen_height)
return;
! drawglyfs(tempHL ? XXgc_rev : XXgc_norm,
! tempX*XXfontw+XXInternalBorder,
! tempY*XXfonth+XXInternalBorder+XXbase,
! &ActiveScreen[tempY+1]->body[tempX],
! numcols);
}
/* When a line has been changed this function is called. Due to various
* bits of braindamage on the parts of both X11 and Emacs, the new
* version of the line is simply output if this function is invoked while
! * in UpDate. Sometimes writeglyfs can be invoked when not in update if
* text is to be output at the end of the line. In this case the whole
* line is not output. Simply the new text at the current cursor
* position given by VisibleX,Y. The cursor is moved to the end of the
***************
*** 518,529 ****
else
temp_length = 0;
if (temp_length > 0) {
! XDrawImageString (XXdisplay, XXwindow,
! CurHL ? XXgc_rev : XXgc_norm,
! first*XXfontw+XXInternalBorder,
! cursY*XXfonth+XXInternalBorder+XXbase,
! &DesiredScreen[cursY + 1]->body[first],
! temp_length);
if (temp_length < screen_width)
x_clear_end_of_line (temp_length);
XTtopos (cursY, temp_length);
--- 541,551 ----
else
temp_length = 0;
if (temp_length > 0) {
! drawglyfs (CurHL ? XXgc_rev : XXgc_norm,
! first*XXfontw+XXInternalBorder,
! cursY*XXfonth+XXInternalBorder+XXbase,
! &DesiredScreen[cursY + 1]->body[first],
! temp_length);
if (temp_length < screen_width)
x_clear_end_of_line (temp_length);
XTtopos (cursY, temp_length);
***************
*** 535,547 ****
UNBLOCK_INPUT ();
}
! writechars (start, end)
! register char *start, *end;
{
BLOCK_INPUT_DECLARE ();
#ifdef XDEBUG
! fprintf(stderr, "writechars (cursX %d temp_len %d InUpd %d)\n",
cursX, end-start+1, InUpdate);
#endif XDEBUG
--- 557,569 ----
UNBLOCK_INPUT ();
}
! writeglyfs (start, end)
! register glyf_t *start, *end;
{
BLOCK_INPUT_DECLARE ();
#ifdef XDEBUG
! fprintf(stderr, "writeglyfs (cursX %d temp_len %d InUpd %d)\n",
cursX, end-start+1, InUpdate);
#endif XDEBUG
***************
*** 559,570 ****
if (InUpdate)
{
! XDrawImageString (XXdisplay, XXwindow,
! CurHL ? XXgc_rev : XXgc_norm,
! cursX*XXfontw+XXInternalBorder,
! cursY*XXfonth+XXInternalBorder+XXbase,
! start,
! (end - start) + 1);
XTtopos (cursY, (end - start) + 1);
UNBLOCK_INPUT ();
--- 581,591 ----
if (InUpdate)
{
! drawglyfs (CurHL ? XXgc_rev : XXgc_norm,
! cursX*XXfontw+XXInternalBorder,
! cursY*XXfonth+XXInternalBorder+XXbase,
! start,
! (end - start) + 1);
XTtopos (cursY, (end - start) + 1);
UNBLOCK_INPUT ();
***************
*** 582,593 ****
if (((end - start) + VisibleX) >= screen_width)
end = start + (screen_width - (VisibleX + 1));
if (end >= start) {
! XDrawImageString (XXdisplay, XXwindow,
! CurHL ? XXgc_rev : XXgc_norm,
! (VisibleX * XXfontw+XXInternalBorder),
! VisibleY * XXfonth+XXInternalBorder+XXbase,
! start,
! ((end - start) + 1));
VisibleX = VisibleX + (end - start) + 1;
}
if (!CursorExists)
--- 603,613 ----
if (((end - start) + VisibleX) >= screen_width)
end = start + (screen_width - (VisibleX + 1));
if (end >= start) {
! drawglyfs (CurHL ? XXgc_rev : XXgc_norm,
! VisibleX * XXfontw+XXInternalBorder,
! VisibleY * XXfonth+XXInternalBorder+XXbase,
! start,
! ((end - start) + 1));
VisibleX = VisibleX + (end - start) + 1;
}
if (!CursorExists)
***************
*** 596,610 ****
}
static
! XTwrite_chars (start, len)
! register char *start;
register int len;
{
#ifdef XDEBUG
! fprintf (stderr, "XTwrite_chars (len %d)\n",len);
#endif
! writechars (start, start+len-1);
}
XTflash ()
--- 616,630 ----
}
static
! XTwrite_glyfs (start, len)
! register glyf_t *start;
register int len;
{
#ifdef XDEBUG
! fprintf (stderr, "XTwrite_glyfs (len %d)\n",len);
#endif
! writeglyfs (start, start+len-1);
}
XTflash ()
***************
*** 669,674 ****
--- 689,695 ----
CursorToggle ()
{
register struct display_line **ActiveScreen;
+ static glyf_t sg = SPACEGLYF;
if (!WindowMapped) {
CursorExists = 0;
***************
*** 692,718 ****
if (ActiveScreen && ActiveScreen[VisibleY+1] &&
VisibleX < ActiveScreen[VisibleY+1]->length) {
if (CursorExists)
! XDrawImageString(XXdisplay, XXwindow, XXgc_norm,
! VisibleX*XXfontw+XXInternalBorder,
! VisibleY*XXfonth+XXInternalBorder+XXbase,
! &ActiveScreen[VisibleY+1]->body[VisibleX],
! 1);
else if (CursorOutline) {
! XDrawImageString(XXdisplay, XXwindow, XXgc_norm,
! VisibleX*XXfontw+XXInternalBorder,
! VisibleY*XXfonth+XXInternalBorder+XXbase,
! &ActiveScreen[VisibleY+1]->body[VisibleX],
! 1);
XDrawRectangle (XXdisplay, XXwindow, XXgc_norm,
VisibleX*XXfontw+XXInternalBorder,
VisibleY*XXfonth+XXInternalBorder,
XXfontw - 1, XXfonth - 1);
} else
! XDrawImageString(XXdisplay, XXwindow, XXgc_curs,
! VisibleX*XXfontw+XXInternalBorder,
! VisibleY*XXfonth+XXInternalBorder+XXbase,
! &ActiveScreen[VisibleY+1]->body[VisibleX],
! 1);
}
else {
if (CursorExists)
--- 713,739 ----
if (ActiveScreen && ActiveScreen[VisibleY+1] &&
VisibleX < ActiveScreen[VisibleY+1]->length) {
if (CursorExists)
! drawglyfs(XXgc_norm,
! VisibleX*XXfontw+XXInternalBorder,
! VisibleY*XXfonth+XXInternalBorder+XXbase,
! &ActiveScreen[VisibleY+1]->body[VisibleX],
! 1);
else if (CursorOutline) {
! drawglyfs(XXgc_norm,
! VisibleX*XXfontw+XXInternalBorder,
! VisibleY*XXfonth+XXInternalBorder+XXbase,
! &ActiveScreen[VisibleY+1]->body[VisibleX],
! 1);
XDrawRectangle (XXdisplay, XXwindow, XXgc_norm,
VisibleX*XXfontw+XXInternalBorder,
VisibleY*XXfonth+XXInternalBorder,
XXfontw - 1, XXfonth - 1);
} else
! drawglyfs(XXgc_curs,
! VisibleX*XXfontw+XXInternalBorder,
! VisibleY*XXfonth+XXInternalBorder+XXbase,
! &ActiveScreen[VisibleY+1]->body[VisibleX],
! 1);
}
else {
if (CursorExists)
***************
*** 726,735 ****
VisibleY*XXfonth+XXInternalBorder,
XXfontw - 1, XXfonth - 1);
else
! XDrawImageString(XXdisplay, XXwindow, XXgc_curs,
! VisibleX*XXfontw+XXInternalBorder,
! VisibleY*XXfonth+XXInternalBorder+XXbase,
! " ", 1);
}
CursorExists = !CursorExists;
--- 747,756 ----
VisibleY*XXfonth+XXInternalBorder,
XXfontw - 1, XXfonth - 1);
else
! drawglyfs(XXgc_curs,
! VisibleX*XXfontw+XXInternalBorder,
! VisibleY*XXfonth+XXInternalBorder+XXbase,
! &sg, 1);
}
CursorExists = !CursorExists;
***************
*** 892,898 ****
continue;
localX = left;
localHL = ActiveScreen[localY+1]->highlighted;
! dumpchars (ActiveScreen,
min (cols,
ActiveScreen[localY+1]->length-localX),
localX, localY, localHL);
--- 913,919 ----
continue;
localX = left;
localHL = ActiveScreen[localY+1]->highlighted;
! dumpglyfs (ActiveScreen,
min (cols,
ActiveScreen[localY+1]->length-localX),
localX, localY, localHL);
***************
*** 937,948 ****
}
static
! XTinsert_chars (start, len)
! register char *start;
register int len;
{
#ifdef XDEBUG
! fprintf (stderr, "XTinsert_chars\n");
#endif
updateline (0);
--- 958,969 ----
}
static
! XTinsert_glyfs (start, len)
! register glyf_t *start;
register int len;
{
#ifdef XDEBUG
! fprintf (stderr, "XTinsert_glyfs\n");
#endif
updateline (0);
***************
*** 949,961 ****
}
static
! XTdelete_chars (n)
register int n;
{
char *msg = "Major foobars! This shouldn't show up!";
#ifdef XDEBUG
! fprintf (stderr, "XTdelete_chars (num %d cursX %d)\n",n,cursX);
#endif
updateline (0);
--- 970,982 ----
}
static
! XTdelete_glyfs (n)
register int n;
{
char *msg = "Major foobars! This shouldn't show up!";
#ifdef XDEBUG
! fprintf (stderr, "XTdelete_glyfs (num %d cursX %d)\n",n,cursX);
#endif
updateline (0);
***************
*** 1067,1147 ****
{
switch (keycode) {
case XK_L1:
! return("192");
case XK_L2:
! return("193");
case XK_L3:
! return("194");
case XK_L4:
! return("195");
case XK_L5:
! return("196");
case XK_L6:
! return("197");
case XK_L7:
! return("198");
case XK_L8:
! return("199");
case XK_L9:
! return("200");
case XK_L10:
! return("201");
case XK_R1:
! return("208");
case XK_R2:
! return("209");
case XK_R3:
! return("210");
case XK_R4:
! return("211");
case XK_R5:
! return("212");
case XK_R6:
! return("213");
case XK_R7:
! return("214");
case XK_R8:
! return("215");
case XK_R9:
! return("216");
case XK_R10:
! return("217");
case XK_R11:
! return("218");
case XK_R12:
! return("219");
case XK_R13:
! return("220");
case XK_R14:
! return("221");
case XK_R15:
! return("222");
case XK_Break: /* Sun3 "Alternate" key */
! return("223");
case XK_F1:
! return("224");
case XK_F2:
! return("225");
case XK_F3:
! return("226");
case XK_F4:
! return("227");
case XK_F5:
! return("228");
case XK_F6:
! return("229");
case XK_F7:
! return("230");
case XK_F8:
! return("231");
case XK_F9:
! return("232");
default:
! return("-1");
}
}
#else
--- 1088,1168 ----
{
switch (keycode) {
case XK_L1:
! return("\033[192z");
case XK_L2:
! return("\033[193z");
case XK_L3:
! return("\033[194z");
case XK_L4:
! return("\033[195z");
case XK_L5:
! return("\033[196z");
case XK_L6:
! return("\033[197z");
case XK_L7:
! return("\033[198z");
case XK_L8:
! return("\033[199z");
case XK_L9:
! return("\033[200z");
case XK_L10:
! return("\033[201z");
case XK_R1:
! return("\021305");
case XK_R2:
! return("\021304");
case XK_R3:
! return("\021326");
case XK_R4:
! return("\021345");
case XK_R5:
! return("\021344");
case XK_R6:
! return("\021366");
case XK_R7:
! return("\033[214z");
case XK_R8:
! return("\033[215z");
case XK_R9:
! return("\033[216z");
case XK_R10:
! return("\033[217z");
case XK_R11:
! return("\033[218z");
case XK_R12:
! return("\033[219z");
case XK_R13:
! return("\033[220z");
case XK_R14:
! return("\033[221z");
case XK_R15:
! return("\033[222z");
case XK_Break: /* Sun3 "Alternate" key */
! return("\033[223z");
case XK_F1:
! return("\033[224z");
case XK_F2:
! return("\033[225z");
case XK_F3:
! return("\033[226z");
case XK_F4:
! return("\033[227z");
case XK_F5:
! return("\033[228z");
case XK_F6:
! return("\033[229z");
case XK_F7:
! return("\033[230z");
case XK_F8:
! return("\033[231z");
case XK_F9:
! return("\033[232z");
default:
! return("\033[-1z");
}
}
#else
***************
*** 1335,1345 ****
will have already given us the string we want. */
if (IsFunctionKey(keysym) ||
IsMiscFunctionKey(keysym)) {
- strcpy(mapping_buf,"[");
- strcat(mapping_buf,stringFuncVal(keysym));
#ifdef sun
! strcat(mapping_buf,"z");
#else
strcat(mapping_buf,"~");
#endif /* sun */
nbytes = strlen(mapping_buf);
--- 1356,1366 ----
will have already given us the string we want. */
if (IsFunctionKey(keysym) ||
IsMiscFunctionKey(keysym)) {
#ifdef sun
! strcpy(mapping_buf,stringFuncVal(keysym));
#else
+ strcpy(mapping_buf,"[");
+ strcat(mapping_buf,stringFuncVal(keysym));
strcat(mapping_buf,"~");
#endif /* sun */
nbytes = strlen(mapping_buf);
***************
*** 1559,1567 ****
clear_end_of_line_hook = XTclear_end_of_line;
ins_del_lines_hook = XTins_del_lines;
change_line_highlight_hook = XTchange_line_highlight;
! insert_chars_hook = XTinsert_chars;
! write_chars_hook = XTwrite_chars;
! delete_chars_hook = XTdelete_chars;
ring_bell_hook = XTfeep;
reset_terminal_modes_hook = XTreset_terminal_modes;
set_terminal_modes_hook = XTset_terminal_modes;
--- 1580,1588 ----
clear_end_of_line_hook = XTclear_end_of_line;
ins_del_lines_hook = XTins_del_lines;
change_line_highlight_hook = XTchange_line_highlight;
! insert_glyfs_hook = XTinsert_glyfs;
! write_glyfs_hook = XTwrite_glyfs;
! delete_glyfs_hook = XTdelete_glyfs;
ring_bell_hook = XTfeep;
reset_terminal_modes_hook = XTreset_terminal_modes;
set_terminal_modes_hook = XTset_terminal_modes;
***************
*** 1884,1890 ****
--- 1905,1914 ----
#ifndef CANNOT_DUMP
if (initialized)
#endif /* CANNOT_DUMP */
+ {
Vxterm = Qt;
+ init_char_table_x();
+ }
Fset (intern ("window-system-version"), make_number (11));