home *** CD-ROM | disk | FTP | other *** search
- From: howard@hasse.ericsson.se (Howard Gayle)
- Newsgroups: alt.sources
- Subject: GNU Emacs 8-bit mods part 06 of 12
- Message-ID: <1990Apr5.133749.8930@ericsson.se>
- Date: 5 Apr 90 13:37:49 GMT
-
- *** ../18.55/src/editfns.c Fri Jul 21 20:21:32 1989
- --- src/editfns.c Thu Apr 5 09:11:21 1990
- ***************
- *** 1,5 ****
- /* Lisp functions pertaining to editing.
- ! Copyright (C) 1985, 1986, 1987 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- --- 1,5 ----
- /* Lisp functions pertaining to editing.
- ! Copyright (C) 1985, 1986, 1987, 1990 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- ***************
- *** 19,28 ****
- --- 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 <pwd.h>
- #include "lisp.h"
- + #include "chartab.h"
- #include "buffer.h"
- + #include "sorttab.h"
- #include "window.h"
-
- #define min(a, b) ((a) < (b) ? (a) : (b))
- ***************
- *** 375,385 ****
- point>NumCharacters)
- DEFPRED ("bolp", Fbolp, Sbolp,
- "Return T if point is at the beginning of a line.",
- ! point<=FirstCharacter || CharAt(point-1)=='\n')
- DEFPRED ("eolp", Feolp, Seolp,
- "Return T if point is at the end of a line.\n\
- `End of a line' includes point being at the end of the buffer.",
- ! point>NumCharacters || CharAt(point)=='\n')
-
- DEFUN ("char-after", Fchar_after, Schar_after, 1, 1, 0,
- "One arg, POS, a number. Return the character in the current buffer\n\
- --- 381,391 ----
- point>NumCharacters)
- DEFPRED ("bolp", Fbolp, Sbolp,
- "Return T if point is at the beginning of a line.",
- ! point<=FirstCharacter || CharAt(point-1)==NEWLINE)
- DEFPRED ("eolp", Feolp, Seolp,
- "Return T if point is at the end of a line.\n\
- `End of a line' includes point being at the end of the buffer.",
- ! point>NumCharacters || CharAt(point)==NEWLINE)
-
- DEFUN ("char-after", Fchar_after, Schar_after, 1, 1, 0,
- "One arg, POS, a number. Return the character in the current buffer\n\
- ***************
- *** 955,968 ****
- (c1, c2)
- register Lisp_Object c1, c2;
- {
- CHECK_NUMBER (c1, 0);
- CHECK_NUMBER (c2, 1);
-
- ! if (!NULL (bf_cur->case_fold_search)
- ! ? downcase_table[0xff & XFASTINT (c1)] == downcase_table[0xff & XFASTINT (c2)]
- ! : XINT (c1) == XINT (c2))
- ! return Qt;
- ! return Qnil;
- }
-
- #ifndef MAINTAIN_ENVIRONMENT /* it is done in environ.c in that case */
- --- 961,976 ----
- (c1, c2)
- register Lisp_Object c1, c2;
- {
- + register char_t *tt; /* Equivalence class table. */
- CHECK_NUMBER (c1, 0);
- CHECK_NUMBER (c2, 1);
-
- ! tt = current_equiv_class_table ();
- ! if (tt)
- ! return ((tt[0377 & XFASTINT (c1)] == tt[0377 & XFASTINT (c2)]) ? Qt
- ! : Qnil);
- ! else
- ! return ((XINT (c1) == XINT (c2)) ? Qt : Qnil);
- }
-
- #ifndef MAINTAIN_ENVIRONMENT /* it is done in environ.c in that case */
- *** ../18.55/src/emacs.c Mon Mar 13 22:41:29 1989
- --- src/emacs.c Thu Apr 5 09:11:33 1990
- ***************
- *** 1,5 ****
- /* Fully extensible Emacs, running on Unix, intended for GNU.
- ! Copyright (C) 1985, 1986, 1987 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- --- 1,5 ----
- /* Fully extensible Emacs, running on Unix, intended for GNU.
- ! Copyright (C) 1985, 1986, 1987, 1990 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- ***************
- *** 19,24 ****
- --- 19,28 ----
- 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 <signal.h>
- #include <errno.h>
-
- ***************
- *** 329,334 ****
- --- 333,342 ----
- init_obarray ();
- init_eval_once ();
- init_syntax_once (); /* Create standard syntax table. */
- + init_case_table_once (); /* Create standard case table. */
- + init_char_table_once (); /* Create standard char tables. */
- + init_sort_table_once (); /* Create standard sort tables. */
- + init_trans_table_once (); /* Create standard trans tables. */
- /* Must be done before init_buffer */
- init_buffer_once (); /* Create buffer table and some buffers */
- init_minibuf_once (); /* Create list of minibuffers */
- ***************
- *** 387,394 ****
- --- 395,404 ----
- syms_of_buffer ();
- syms_of_bytecode ();
- syms_of_callint ();
- + syms_of_case_table ();
- syms_of_casefiddle ();
- syms_of_callproc ();
- + syms_of_char_table ();
- syms_of_cmds ();
- #ifndef NO_DIR_LIBRARY
- syms_of_dired ();
- ***************
- *** 412,418 ****
- --- 422,430 ----
- syms_of_process ();
- #endif /* subprocesses */
- syms_of_search ();
- + syms_of_sort_table ();
- syms_of_syntax ();
- + syms_of_trans_table ();
- syms_of_undo ();
- syms_of_window ();
- syms_of_xdisp ();
- *** ../18.55/src/fileio.c Wed Jul 5 03:00:25 1989
- --- src/fileio.c Thu Apr 5 09:11:54 1990
- ***************
- *** 1,5 ****
- /* File IO for GNU Emacs.
- ! Copyright (C) 1985, 1986, 1987, 1988 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- --- 1,5 ----
- /* File IO for GNU Emacs.
- ! Copyright (C) 1985, 1986, 1987, 1988, 1990 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- ***************
- *** 19,24 ****
- --- 19,28 ----
- 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 <sys/types.h>
- #include <sys/stat.h>
- #include <pwd.h>
- ***************
- *** 42,47 ****
- --- 46,52 ----
- #include "config.h"
- #include "lisp.h"
- #include "buffer.h"
- + #include "transtab.h"
- #include "window.h"
-
- #ifdef VMS
- *** ../18.55/src/fns.c Fri Apr 7 04:25:38 1989
- --- src/fns.c Thu Apr 5 09:12:06 1990
- ***************
- *** 1,5 ****
- /* Random utility Lisp functions.
- ! Copyright (C) 1985, 1986, 1987 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- --- 1,5 ----
- /* Random utility Lisp functions.
- ! Copyright (C) 1985, 1986, 1987, 1990 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- ***************
- *** 19,24 ****
- --- 19,28 ----
- 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"
-
- #ifdef LOAD_AVE_TYPE
- ***************
- *** 61,71 ****
- #undef NULL
- #endif
- #include "lisp.h"
- - #include "commands.h"
- -
- - #ifdef lint
- #include "buffer.h"
- ! #endif /* lint */
-
- Lisp_Object Qstring_lessp;
-
- --- 65,73 ----
- #undef NULL
- #endif
- #include "lisp.h"
- #include "buffer.h"
- ! #include "commands.h"
- ! #include "transtab.h"
-
- Lisp_Object Qstring_lessp;
-
- ***************
- *** 181,186 ****
- --- 183,189 ----
- }
- return i < XSTRING (s2)->size ? Qt : Qnil;
- }
- +
-
- static Lisp_Object concat ();
-
- *** ../18.55/src/indent.c Tue Aug 16 04:51:14 1988
- --- src/indent.c Thu Apr 5 09:13:35 1990
- ***************
- *** 1,5 ****
- /* Indentation functions.
- ! Copyright (C) 1985, 1986, 1987, 1988 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- --- 1,5 ----
- /* Indentation functions.
- ! Copyright (C) 1985, 1986, 1987, 1988, 1990 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- ***************
- *** 19,34 ****
- and this notice must be preserved on all copies. */
-
-
- #include "config.h"
- #include "lisp.h"
- #include "buffer.h"
- #include "indent.h"
- #include "window.h"
- #include "termchar.h"
- #include "termopts.h"
-
- - #define CR '\015'
- -
- /* Indentation can insert tabs if this is non-zero;
- otherwise always uses spaces */
- int indent_tabs_mode;
- --- 19,37 ----
- 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 "lisp.h"
- #include "buffer.h"
- + #include "chartab.h"
- #include "indent.h"
- #include "window.h"
- #include "termchar.h"
- #include "termopts.h"
-
- /* Indentation can insert tabs if this is non-zero;
- otherwise always uses spaces */
- int indent_tabs_mode;
- ***************
- *** 52,61 ****
- "Return the horizontal position of point. Beginning of line is column 0.\n\
- This is calculated by adding together the widths of all the displayed\n\
- representations of the character between the start of the previous line\n\
- ! and point. (eg control characters will have a width of 2 or 4, tabs\n\
- ! will have a variable width)\n\
- ! Ignores finite width of screen, which means that this function may return\n\
- ! values greater than (screen-width).\n\
- Whether the line is visible (if `selective-display' is t) has no effect.",
- Lisp_Int, XSETINT, current_column ())
-
- --- 55,62 ----
- "Return the horizontal position of point. Beginning of line is column 0.\n\
- This is calculated by adding together the widths of all the displayed\n\
- representations of the character between the start of the previous line\n\
- ! and point. Ignores finite width of screen, which means that\n\
- ! this function may return values greater than (screen-width).\n\
- Whether the line is visible (if `selective-display' is t) has no effect.",
- Lisp_Int, XSETINT, current_column ())
-
- ***************
- *** 63,73 ****
- current_column ()
- {
- register int col;
- ! register unsigned char *ptr, *stop, c;
- register int tab_seen;
- register int post_tab;
- register int tab_width = XINT (bf_cur->tab_width);
- ! int ctl_arrow = !NULL (bf_cur->ctl_arrow);
-
- if (point == last_known_column_point
- && bf_modified == last_known_column_modified)
- --- 64,75 ----
- current_column ()
- {
- register int col;
- ! register unsigned char *ptr, *stop;
- ! register char_t c;
- register int tab_seen;
- register int post_tab;
- register int tab_width = XINT (bf_cur->tab_width);
- ! register struct Lisp_Chartab *cp;
-
- if (point == last_known_column_point
- && bf_modified == last_known_column_modified)
- ***************
- *** 78,83 ****
- --- 80,86 ----
- if (tab_width <= 0 || tab_width > 20) tab_width = 8;
-
- col = 0, tab_seen = 0, post_tab = 0;
- + cp = SELECTED_CHAR_TABLE;
-
- while (1)
- {
- ***************
- *** 91,105 ****
- }
-
- c = *--ptr;
- ! if (c >= 040 && c < 0177)
- ! {
- ! col++;
- ! }
- ! else if (c == '\n')
- break;
- ! else if (c == '\r' && EQ (bf_cur->selective_display, Qt))
- break;
- ! else if (c == '\t')
- {
- if (tab_seen)
- col = ((col + tab_width) / tab_width) * tab_width;
- --- 94,104 ----
- }
-
- c = *--ptr;
- ! if (c == NEWLINE)
- break;
- ! else if (c == cp->ct_invisc && EQ (bf_cur->selective_display, Qt))
- break;
- ! else if (c == HTAB)
- {
- if (tab_seen)
- col = ((col + tab_width) / tab_width) * tab_width;
- ***************
- *** 109,115 ****
- tab_seen = 1;
- }
- else
- ! col += (ctl_arrow && c < 0200) ? 2 : 4;
- }
-
- if (tab_seen)
- --- 108,114 ----
- tab_seen = 1;
- }
- else
- ! col += ROPE_LEN (c, cp);
- }
-
- if (tab_seen)
- ***************
- *** 200,206 ****
- register int pos;
- {
- register int col = 0;
- ! register int c;
- register int end = NumCharacters + 1;
- register int tab_width = XINT (bf_cur->tab_width);
-
- --- 199,205 ----
- register int pos;
- {
- register int col = 0;
- ! register char_t c;
- register int end = NumCharacters + 1;
- register int tab_width = XINT (bf_cur->tab_width);
-
- ***************
- *** 208,215 ****
-
- while (pos < end &&
- (c = CharAt (pos),
- ! c == '\t' ? (col += tab_width - col % tab_width)
- ! : (c == ' ' ? ++col : 0)))
- pos++;
-
- return col;
- --- 207,214 ----
-
- while (pos < end &&
- (c = CharAt (pos),
- ! c == HTAB ? (col += tab_width - col % tab_width)
- ! : (c == SPACE ? ++col : 0)))
- pos++;
-
- return col;
- ***************
- *** 219,228 ****
- "Move point to column COLUMN in the current line.\n\
- COLUMN is calculated by adding together the widths of all the displayed\n\
- representations of the character between the start of the previous line\n\
- ! and point. (eg control characters will have a width of 2 or 4, tabs\n\
- ! will have a variable width)\n\
- ! Ignores finite width of screen, which means that this function may be\n\
- ! passed values greater than (screen-width)")
- (column)
- Lisp_Object column;
- {
- --- 218,225 ----
- "Move point to column COLUMN in the current line.\n\
- COLUMN is calculated by adding together the widths of all the displayed\n\
- representations of the character between the start of the previous line\n\
- ! and point. Ignores finite width of screen, which means that\n\
- ! this function may be passed values greater than (screen-width)")
- (column)
- Lisp_Object column;
- {
- ***************
- *** 231,237 ****
- register int goal;
- register int end = NumCharacters;
- register int tab_width = XINT (bf_cur->tab_width);
- ! register int ctl_arrow = !NULL (bf_cur->ctl_arrow);
-
- Lisp_Object val;
-
- --- 228,234 ----
- register int goal;
- register int end = NumCharacters;
- register int tab_width = XINT (bf_cur->tab_width);
- ! register struct Lisp_Chartab *cp = SELECTED_CHAR_TABLE;
-
- Lisp_Object val;
-
- ***************
- *** 247,267 ****
- while (col < goal && pos <= end)
- {
- int c = CharAt (pos);
- ! if (c == '\n')
- break;
- ! if (c == '\r' && EQ (bf_cur->selective_display, Qt))
- break;
- pos++;
- ! col++;
- ! if (c == '\t')
- {
- ! col += tab_width - 1;
- col = col / tab_width * tab_width;
- }
- ! else if (ctl_arrow && (c < 040 || c == 0177))
- ! col++;
- ! else if (c < 040 || c >= 0177)
- ! col += 3;
- }
-
- SetPoint (pos);
- --- 244,261 ----
- while (col < goal && pos <= end)
- {
- int c = CharAt (pos);
- ! if (c == NEWLINE)
- break;
- ! if (c == cp->ct_invisc && EQ (bf_cur->selective_display, Qt))
- break;
- pos++;
- ! if (c == HTAB)
- {
- ! col += tab_width;
- col = col / tab_width * tab_width;
- }
- ! else
- ! col += ROPE_LEN (c, cp);
- }
-
- SetPoint (pos);
- ***************
- *** 304,312 ****
- int cpos = fromhpos + (fromvpos << SHORTBITS);
- register int target = tohpos + (tovpos << SHORTBITS);
- register int pos;
- ! register int c;
- register int tab_width = XFASTINT (bf_cur->tab_width);
- ! register int ctl_arrow = !NULL (bf_cur->ctl_arrow);
- int selective
- = XTYPE (bf_cur->selective_display) == Lisp_Int
- ? XINT (bf_cur->selective_display)
- --- 298,306 ----
- int cpos = fromhpos + (fromvpos << SHORTBITS);
- register int target = tohpos + (tovpos << SHORTBITS);
- register int pos;
- ! register char_t c;
- register int tab_width = XFASTINT (bf_cur->tab_width);
- ! register struct Lisp_Chartab *cp = SELECTED_CHAR_TABLE;
- int selective
- = XTYPE (bf_cur->selective_display) == Lisp_Int
- ? XINT (bf_cur->selective_display)
- ***************
- *** 318,326 ****
- {
- prevpos = cpos;
- c = CharAt (pos);
- ! if (c >= 040 && c < 0177)
- ! cpos++;
- ! else if (c == '\t')
- {
- cpos += tab_width
- - HPOS (cpos + tab_offset + hscroll - (hscroll > 0)
- --- 312,318 ----
- {
- prevpos = cpos;
- c = CharAt (pos);
- ! if (c == HTAB)
- {
- cpos += tab_width
- - HPOS (cpos + tab_offset + hscroll - (hscroll > 0)
- ***************
- *** 330,336 ****
- + tab_width)
- % tab_width;
- }
- ! else if (c == '\n')
- {
- if (selective > 0 && position_indentation (pos + 1) >= selective)
- {
- --- 322,328 ----
- + tab_width)
- % tab_width;
- }
- ! else if (c == NEWLINE)
- {
- if (selective > 0 && position_indentation (pos + 1) >= selective)
- {
- ***************
- *** 337,353 ****
- /* Skip any number of invisible lines all at once */
- do
- {
- ! while (++pos < to && CharAt(pos) != '\n');
- }
- while (selective > 0 && position_indentation (pos + 1) >= selective);
- pos--;
- ! /* Allow for the " ..." that is displayed for them. */
- ! if (!NULL (bf_cur->selective_display_ellipses))
- ! {
- ! cpos += 4;
- ! if (HPOS (cpos) >= width)
- ! cpos -= HPOS (cpos) - width;
- ! }
- }
- else
- cpos += (1 << SHORTBITS) - HPOS (cpos);
- --- 329,341 ----
- /* Skip any number of invisible lines all at once */
- do
- {
- ! while (++pos < to && CharAt(pos) != NEWLINE);
- }
- while (selective > 0 && position_indentation (pos + 1) >= selective);
- pos--;
- ! cpos += cp->ct_invisr.r_len;
- ! if (HPOS (cpos) >= width)
- ! cpos -= HPOS (cpos) - width;
- }
- else
- cpos += (1 << SHORTBITS) - HPOS (cpos);
- ***************
- *** 355,381 ****
- if (hscroll > 0) cpos++; /* Count the ! on column 0 */
- tab_offset = 0;
- }
- ! else if (c == CR && selective < 0)
- {
- /* In selective display mode,
- everything from a ^M to the end of the line is invisible */
- ! while (pos < to && CharAt(pos) != '\n') pos++;
- pos--;
- ! /* Allow for the " ..." that is displayed for them. */
- ! if (!NULL (bf_cur->selective_display_ellipses))
- ! {
- ! cpos += 4;
- ! if (HPOS (cpos) >= width)
- ! cpos -= HPOS (cpos) - width;
- ! }
- }
- else
- ! cpos += (ctl_arrow && c < 0200) ? 2 : 4;
-
- if (HPOS (cpos) >= width
- && (HPOS (cpos) > width
- || (pos < NumCharacters
- ! && CharAt (pos + 1) != '\n')))
- {
- if (cpos >= target)
- break;
- --- 343,365 ----
- if (hscroll > 0) cpos++; /* Count the ! on column 0 */
- tab_offset = 0;
- }
- ! else if (c == cp->ct_invisc && selective < 0)
- {
- /* In selective display mode,
- everything from a ^M to the end of the line is invisible */
- ! while (pos < to && CharAt(pos) != NEWLINE) pos++;
- pos--;
- ! cpos += cp->ct_invisr.r_len;
- ! if (HPOS (cpos) >= width)
- ! cpos -= HPOS (cpos) - width;
- }
- else
- ! cpos += ROPE_LEN (c, cp);
-
- if (HPOS (cpos) >= width
- && (HPOS (cpos) > width
- || (pos < NumCharacters
- ! && CharAt (pos + 1) != NEWLINE)))
- {
- if (cpos >= target)
- break;
- ***************
- *** 384,390 ****
- && width + 1 < screen_width)
- || !NULL (bf_cur->truncate_lines))
- {
- ! while (pos < to && CharAt(pos) != '\n') pos++;
- pos--;
- }
- else
- --- 368,374 ----
- && width + 1 < screen_width)
- || !NULL (bf_cur->truncate_lines))
- {
- ! while (pos < to && CharAt(pos) != NEWLINE) pos++;
- pos--;
- }
- else
- ***************
- *** 405,411 ****
- val_compute_motion.contin
- = pos != from
- && (val_compute_motion.vpos != VPOS (prevpos))
- ! && c != '\n';
-
- return &val_compute_motion;
- }
- --- 389,395 ----
- val_compute_motion.contin
- = pos != from
- && (val_compute_motion.vpos != VPOS (prevpos))
- ! && c != NEWLINE;
-
- return &val_compute_motion;
- }
- ***************
- *** 420,426 ****
- int opoint = point;
- int col;
-
- ! if (pos == FirstCharacter || CharAt (pos - 1) == '\n')
- return 0;
- SetPoint (pos);
- col = current_column ();
- --- 404,410 ----
- int opoint = point;
- int col;
-
- ! if (pos == FirstCharacter || CharAt (pos - 1) == NEWLINE)
- return 0;
- SetPoint (pos);
- col = current_column ();
- ***************
- *** 457,463 ****
- {
- /* Moving downward is simple, but must calculate from beg of line
- to determine hpos of starting point */
- ! if (from > FirstCharacter && CharAt (from - 1) != '\n')
- {
- prevline = find_next_newline (from, -1);
- while (selective > 0
- --- 441,447 ----
- {
- /* Moving downward is simple, but must calculate from beg of line
- to determine hpos of starting point */
- ! if (from > FirstCharacter && CharAt (from - 1) != NEWLINE)
- {
- prevline = find_next_newline (from, -1);
- while (selective > 0
- *** ../18.55/src/keyboard.c Thu Jul 20 07:32:59 1989
- --- src/keyboard.c Thu Apr 5 09:12:26 1990
- ***************
- *** 1,5 ****
- /* Keyboard input; editor command loop.
- ! Copyright (C) 1985, 1986, 1987, 1988 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- --- 1,5 ----
- /* Keyboard input; editor command loop.
- ! Copyright (C) 1985, 1986, 1987, 1988, 1990 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- ***************
- *** 18,23 ****
- --- 18,27 ----
- file named COPYING. Among other things, the copyright notice
- and this notice must be preserved on all copies. */
-
- +
- + /* Modified 1990 for 8-bit character support by Howard Gayle.
- + * See chartab.c for details. */
- +
- /*** For version 19, can simplify this by making interrupt_input 1 on VMS. */
-
- /* Allow config.h to undefine symbols found here. */
- ***************
- *** 32,39 ****
- --- 36,46 ----
- #include "lisp.h"
- #include "macros.h"
- #include "window.h"
- + #include "casetab.h"
- + #include "chartab.h"
- #include "commands.h"
- #include "buffer.h"
- + #include "transtab.h"
- #include <setjmp.h>
- #include <errno.h>
-
- ***************
- *** 591,599 ****
- {
- if (EQ (cmd, Qforward_char) && point <= NumCharacters)
- {
- lose = CharAt (point);
- SetPoint (point + 1);
- ! if (lose >= ' ' && lose < 0177
- && (XFASTINT (XWINDOW (selected_window)->last_modified)
- >= bf_modified)
- && (XFASTINT (XWINDOW (selected_window)->last_point)
- --- 598,608 ----
- {
- if (EQ (cmd, Qforward_char) && point <= NumCharacters)
- {
- + register struct Lisp_Chartab *cp = SELECTED_CHAR_TABLE;
- +
- lose = CharAt (point);
- SetPoint (point + 1);
- ! if (1 == ROPE_LEN (lose, cp)
- && (XFASTINT (XWINDOW (selected_window)->last_modified)
- >= bf_modified)
- && (XFASTINT (XWINDOW (selected_window)->last_point)
- ***************
- *** 607,615 ****
- }
- else if (EQ (cmd, Qbackward_char) && point > FirstCharacter)
- {
- SetPoint (point - 1);
- lose = CharAt (point);
- ! if (lose >= ' ' && lose < 0177
- && (XFASTINT (XWINDOW (selected_window)->last_modified)
- >= bf_modified)
- && (XFASTINT (XWINDOW (selected_window)->last_point)
- --- 616,626 ----
- }
- else if (EQ (cmd, Qbackward_char) && point > FirstCharacter)
- {
- + register struct Lisp_Chartab *cp = SELECTED_CHAR_TABLE;
- +
- SetPoint (point - 1);
- lose = CharAt (point);
- ! if (1 == ROPE_LEN (lose, cp)
- && (XFASTINT (XWINDOW (selected_window)->last_modified)
- >= bf_modified)
- && (XFASTINT (XWINDOW (selected_window)->last_point)
- ***************
- *** 647,658 ****
- lose = 1;
- nonundocount = 0;
- }
- ! if (!lose
- ! && (point == NumCharacters + 1 || CharAt (point) == '\n')
- ! && last_command_char >= ' '
- ! && last_command_char < 0177)
- ! no_redisplay
- ! = direct_output_for_insert (last_command_char);
- goto directly_done;
- }
- }
- --- 658,674 ----
- lose = 1;
- nonundocount = 0;
- }
- ! if (!lose &&
- ! (point == NumCharacters + 1
- ! || CharAt (point) == NEWLINE))
- ! {
- ! register rope_t *rp =
- ! &SELECTED_CHAR_TABLE->ct_dispr[last_command_char];
- !
- ! if (1 == rp->r_len)
- ! no_redisplay =
- ! direct_output_for_insert (rp->r_glyfs[0]);
- ! }
- goto directly_done;
- }
- }
- *** ../18.55/src/lisp.h Wed Mar 30 08:42:49 1988
- --- src/lisp.h Thu Apr 5 09:13:49 1990
- ***************
- *** 1,5 ****
- /* Fundamental definitions for GNU Emacs Lisp interpreter.
- ! Copyright (C) 1985, 1986, 1987 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- --- 1,5 ----
- /* Fundamental definitions for GNU Emacs Lisp interpreter.
- ! Copyright (C) 1985, 1986, 1987, 1990 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- ***************
- *** 19,24 ****
- --- 19,28 ----
- and this notice must be preserved on all copies. */
-
-
- + /* Modified 1990 for 8-bit character support by Howard Gayle.
- + * See chartab.c for details. */
- +
- +
- /* Define the fundamental Lisp data structures */
-
- /* This is the set of Lisp data types */
- ***************
- *** 45,61 ****
- /* Cons. object.v.cons points to a struct Lisp_Cons. */
- Lisp_Cons,
-
- ! /* >>> No longer used */
- ! Lisp_Object_Unused_1,
- ! #if 0
- ! was...
- ! /* Treated like vector in GC, except do not set its mark bit.
- ! Used for internal data blocks that will be explicitly freed
- ! but which, while active, are reached by GC mark exactly once
- ! and should be marked through like a vector. */
- ! Lisp_Temp_Vector,
- ! #endif 0
- !
- /* Editor buffer. obj.v.buffer points to a struct buffer.
- No buffer is ever truly freed; they can be "killed", but this
- just marks them as dead. */
- --- 49,57 ----
- /* Cons. object.v.cons points to a struct Lisp_Cons. */
- Lisp_Cons,
-
- ! /* A character table. */
- ! Lisp_Chartab,
- !
- /* Editor buffer. obj.v.buffer points to a struct buffer.
- No buffer is ever truly freed; they can be "killed", but this
- just marks them as dead. */
- ***************
- *** 151,157 ****
- Lisp_Window,
-
- /* Used by save,set,restore-window-configuration */
- ! Lisp_Window_Configuration
- };
-
- #ifndef NO_UNION_TYPE
- --- 147,162 ----
- Lisp_Window,
-
- /* Used by save,set,restore-window-configuration */
- ! Lisp_Window_Configuration,
- !
- ! /* A case table. */
- ! Lisp_Casetab,
- !
- ! /* A sort table. */
- ! Lisp_Sorttab,
- !
- ! /* A trans table. */
- ! Lisp_Transtab
- };
-
- #ifndef NO_UNION_TYPE
- ***************
- *** 396,401 ****
- --- 401,411 ----
- #define XINTPTR(a) ((int *) XPNTR(a))
- #define XWINDOW(a) ((struct window *) XPNTR(a))
- #define XPROCESS(a) ((struct Lisp_Process *) XPNTR(a))
- + #define XCASETAB(a) ((struct Lisp_Casetab *) XPNTR(a))
- + #define XCHARTAB(a) ((struct Lisp_Chartab *) XPNTR(a))
- + #define XETCTAB(a) ((struct Lisp_Etctab *) XPNTR(a))
- + #define XSORTTAB(a) ((struct Lisp_Sorttab *) XPNTR(a))
- + #define XTRANSTAB(a) ((struct Lisp_Transtab *) XPNTR(a))
-
- #define XSETCONS(a, b) XSETPNTR(a, (int) (b))
- #define XSETBUFFER(a, b) XSETPNTR(a, (int) (b))
- ***************
- *** 409,414 ****
- --- 419,425 ----
- #define XSETINTPTR(a, b) XSETPNTR(a, (int) (b))
- #define XSETWINDOW(a, b) XSETPNTR(a, (int) (b))
- #define XSETPROCESS(a, b) XSETPNTR(a, (int) (b))
- + #define XSETCHARTAB(a, b) XSETPNTR(a, (int) (b))
-
- /* In a cons, the markbit of the car is the gc mark bit */
-
- ***************
- *** 472,477 ****
- --- 483,581 ----
- int modified;
- };
-
- + /* Characters, glyfs, ropes, case, character, sort and translate tables. */
- +
- + struct Lisp_Etctab /* Header for garbage-collecting various tables. */
- + {
- + int etc_ser; /* Mark and serial number. */
- + struct Lisp_Etctab *etc_next; /* Thread. */
- + };
- +
- + /* For our purposes here, every character
- + is assigned to one of three mutually exclusive classes:
- + 1) caseless,
- + 2) lower case, or
- + 3) upper case.
- + This is represented by the following type: */
- + typedef enum {nocase_e, lowercase_e, uppercase_e} case_t;
- +
- + /* A case table gives case information about the characters in
- + a character set. */
- + struct Lisp_Casetab
- + {
- + int cas_mark; /* Mark bit & serial number. */
- + struct Lisp_Casetab *cas_next; /* Link for garbage collection. */
- + case_t cas_case[256]; /* The data. */
- + };
- +
- + /* A character, declared with the following typedef, is a member
- + of some character set associated with the current buffer. */
- + typedef unsigned char char_t;
- +
- + /* A char_t is displayed on a given terminal by means of a
- + sequence of one or more glyfs. A glyf is something that takes
- + up exactly one display position on the screen: */
- + typedef short unsigned glyf_t;
- +
- + /* Sequences of glyfs are known as ropes, just as sequences of
- + characters are known as strings. A rope has a length and an
- + array of glyfs: */
- + #define MAXROPE 5 /* Max glyfs in a rope. */
- + typedef struct
- + {
- + short unsigned r_len; /* Number of glyfs in rope. */
- + glyf_t r_glyfs[MAXROPE]; /* The glyfs. */
- + } rope_t;
- +
- + /* A character table: */
- + struct Lisp_Chartab
- + {
- + struct Lisp_Etctab ct_etc;
- + glyf_t ct_frameg; /* Window frame mark, default |. */
- + glyf_t ct_truncg; /* Truncation mark, default $. */
- + glyf_t ct_wrapg; /* Wrap-around mark, default \. */
- + char_t ct_invisc; /* Selective display character. */
- + rope_t ct_invisr; /* Selective display rope. */
- + rope_t ct_dispr[256]; /* Display ropes for each character. */
- + };
- +
- + /* A trans[late] table maps each character in a character set
- + into another, possibly different character, such as its
- + lower-case equivalent: */
- + struct Lisp_Transtab
- + {
- + int trt_mark; /* Mark bit & serial number. */
- + struct Lisp_Transtab *trt_next; /* Link for garbage collection. */
- + char_t trt_to[256]; /* The table. */
- + };
- +
- + /* Sort tables are used for searching and sorting. A sort
- + table is two consecutive vectors of 256 bytes each (total 512
- + bytes). Each vector is indexed by character. The first vector
- + maps characters into equivalence class numbers. These are
- + ordered for sorting. The second vector gives the next
- + character in the equivalence class, in a circular,
- + singly-linked list. For example, consider the ISO 8859/1
- + character set, and suppose we want n and n-with-tilde to be in
- + the same equivalence class. Let s[] be the sort table. We need:
- + s['n'] == s['n-with-tilde']
- + and
- + s['n' + 256] == 'n-with-tilde'
- + s['n-with-tilde' + 256] == 'n' */
- + typedef struct
- + {
- + char_t ec_lo;
- + char_t ec_hi;
- + } ec_dope_t;
- +
- + struct Lisp_Sorttab
- + {
- + struct Lisp_Etctab srt_etc;
- + char_t srt_ec [256]; /* Equivalence class of each char. */
- + ec_dope_t srt_dope[256]; /* Next char in equivalence class. */
- + char_t srt_chars[256];
- + };
- +
- /* Data type checking */
-
- #define NULL(x) (XFASTINT (x) == XFASTINT (Qnil))
- ***************
- *** 662,692 ****
-
- #define QUITP (!NULL (Vquit_flag) && NULL (Vinhibit_quit))
-
- - /* 1 if CH is upper case. */
- -
- - #define UPPERCASEP(CH) (downcase_table[CH] != (CH))
- -
- - /* 1 if CH is lower case. */
- -
- - #define LOWERCASEP(CH) \
- - (downcase_table[CH] == (CH) && downcase_table[0400 + (CH)] != (CH))
- -
- - /* 1 if CH is neither upper nor lower case. */
- -
- - #define NOCASEP(CH) (downcase_table[0400 + (CH)] == (CH))
- -
- - /* Upcase a character, or make no change if that cannot be done. */
- -
- - #define UPCASE(CH) (downcase_table[CH] == (CH) ? UPCASE1 (CH) : (CH))
- -
- - /* Upcase a character known to be not upper case. */
- -
- - #define UPCASE1(CH) downcase_table[0400 + (CH)]
- -
- - /* Downcase a character, or make no change if that cannot be done. */
- -
- - #define DOWNCASE(CH) downcase_table[CH]
- -
- /* number of bytes of structure consed since last GC */
-
- extern int consing_since_gc;
- --- 766,771 ----
- ***************
- *** 890,896 ****
- extern Lisp_Object Vfundamental_mode_abbrev_table;
-
- /* defined in search.c */
- - extern unsigned char downcase_table[];
- extern Lisp_Object Fstring_match ();
- extern Lisp_Object Fscan_buffer ();
-
- --- 969,974 ----
- *** ../18.55/src/minibuf.c Sat Apr 1 01:50:26 1989
- --- src/minibuf.c Thu Apr 5 09:14:01 1990
- ***************
- *** 1,5 ****
- /* Minibuffer input and completion.
- ! Copyright (C) 1985, 1986 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- --- 1,5 ----
- /* Minibuffer input and completion.
- ! Copyright (C) 1985, 1986, 1990 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- ***************
- *** 19,28 ****
- --- 19,33 ----
- 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 "lisp.h"
- #include "commands.h"
- #include "buffer.h"
- + #include "transtab.h"
- #include "window.h"
- #include "syntax.h"
- #include "dispextern.h"
- ***************
- *** 491,497 ****
-
- if (completion_ignore_case)
- {
- ! while (l && downcase_table[*s1++] == downcase_table[*s2++])
- l--;
- }
- else
- --- 496,502 ----
-
- if (completion_ignore_case)
- {
- ! while (l && DOWNCASE (*s1++) == DOWNCASE (*s2++))
- l--;
- }
- else
- *** ../18.55/src/process.c Mon Aug 7 00:01:31 1989
- --- src/process.c Thu Apr 5 09:12:42 1990
- ***************
- *** 1,5 ****
- /* Asynchronous subprocess control for GNU Emacs.
- ! Copyright (C) 1985, 1986, 1987, 1988 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- --- 1,5 ----
- /* Asynchronous subprocess control for GNU Emacs.
- ! Copyright (C) 1985, 1986, 1987, 1988, 1990 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- ***************
- *** 19,24 ****
- --- 19,28 ----
- 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 <signal.h>
-
- #include "config.h"
- ***************
- *** 89,94 ****
- --- 93,99 ----
- #include "process.h"
- #include "termhooks.h"
- #include "termopts.h"
- + #include "transtab.h"
- #include "commands.h"
-
- /* a process object is a network connection when its childp field is neither
- *** ../18.55/src/print.c Thu Jul 28 17:12:41 1988
- --- src/print.c Thu Apr 5 09:14:12 1990
- ***************
- *** 1,5 ****
- /* Lisp object printing and output streams.
- ! Copyright (C) 1985, 1986 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- --- 1,5 ----
- /* Lisp object printing and output streams.
- ! Copyright (C) 1985, 1986, 1990 Free Software Foundation, Inc.
-
- This file is part of GNU Emacs.
-
- ***************
- *** 19,24 ****
- --- 19,28 ----
- 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>
- #undef NULL
- ***************
- *** 641,646 ****
- --- 645,671 ----
- strout (" in ", -1, printcharfun);
- strout (XSTRING (XMARKER (obj)->buffer->name)->data, -1, printcharfun);
- }
- + PRINTCHAR ('>');
- + break;
- +
- + case Lisp_Casetab:
- + strout ("#<case-table ", -1, printcharfun);
- + goto etc_table;
- +
- + case Lisp_Chartab:
- + strout ("#<char-table ", -1, printcharfun);
- + goto etc_table;
- +
- + case Lisp_Sorttab:
- + strout ("#<sort-table ", -1, printcharfun);
- + goto etc_table;
- +
- + case Lisp_Transtab:
- + strout ("#<trans-table ", -1, printcharfun);
- +
- + etc_table:
- + sprintf (buf, "%d", XETCTAB (obj)->etc_ser);
- + strout (buf, -1, printcharfun);
- PRINTCHAR ('>');
- break;
- #endif /* standalone */
-