Commit 9889c728 authored by Jim Blandy's avatar Jim Blandy

Initial revision

parent 265a9e55
/* Cursor motion calculation definitions for GNU Emacs
Copyright (C) 1985, 1989 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Emacs; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Holds the minimum and maximum costs for the parametrized capabilities. */
struct parmcap
{
int mincost, maxcost;
};
/* This structure holds everything needed to do cursor motion except the pad
character (PC) and the output speed of the terminal (ospeed), which
termcap wants in global variables. */
struct cm
{
/* Cursor position. -1 in *both* variables means the cursor
position is unknown, in order to force absolute cursor motion. */
int cm_curY; /* Current row */
int cm_curX; /* Current column */
/* Capabilities from termcap */
char *cm_up; /* up (up) */
char *cm_down; /* down (do) */
char *cm_left; /* left (le) */
char *cm_right; /* right (nd) */
char *cm_home; /* home (ho) */
char *cm_cr; /* carriage return (cr) */
char *cm_ll; /* last line (ll) */
char *cm_tab; /* tab (ta) */
char *cm_backtab; /* backtab (bt) */
char *cm_abs; /* absolute (cm) */
char *cm_habs; /* horizontal absolute (ch) */
char *cm_vabs; /* vertical absolute (cv) */
#if 0
char *cm_ds; /* "don't send" string (ds) */
#endif
char *cm_multiup; /* multiple up (UP) */
char *cm_multidown; /* multiple down (DO) */
char *cm_multileft; /* multiple left (LE) */
char *cm_multiright; /* multiple right (RI) */
int cm_cols; /* number of cols on screen (co) */
int cm_rows; /* number of rows on screen (li) */
int cm_tabwidth; /* tab width (it) */
unsigned int cm_autowrap:1; /* autowrap flag (am) */
unsigned int cm_magicwrap:1; /* VT-100: cursor stays in last col but
will cm_wrap if next char is
printing (xn) */
unsigned int cm_usetabs:1; /* if set, use tabs */
unsigned int cm_losewrap:1; /* if reach right margin, forget cursor
location */
unsigned int cm_autolf:1; /* \r performs a \r\n (rn) */
/* Parametrized capabilities. This needs to be a struct since
the costs are accessed through pointers. */
#if 0
struct parmcap cc_abs; /* absolute (cm) */
struct parmcap cc_habs; /* horizontal absolute (ch) */
struct parmcap cc_vabs; /* vertical absolute (cv) */
struct parmcap cc_multiup; /* multiple up (UP) */
struct parmcap cc_multidown; /* multiple down (DO) */
struct parmcap cc_multileft; /* multiple left (LE) */
struct parmcap cc_multiright; /* multiple right (RI) */
#endif
/* Costs for the non-parametrized capabilities */
int cc_up; /* cost for up */
int cc_down; /* etc. */
int cc_left;
int cc_right;
int cc_home;
int cc_cr;
int cc_ll;
int cc_tab;
int cc_backtab;
/* These are temporary, until the code is installed to use the
struct parmcap fields above. */
int cc_abs;
int cc_habs;
int cc_vabs;
};
extern struct cm Wcm; /* Terminal capabilities */
extern char PC; /* Pad character */
extern short ospeed; /* Output speed (from sg_ospeed) */
/* Shorthand */
#ifndef NoCMShortHand
#define curY Wcm.cm_curY
#define curX Wcm.cm_curX
#define Up Wcm.cm_up
#define Down Wcm.cm_down
#define Left Wcm.cm_left
#define Right Wcm.cm_right
#define Tab Wcm.cm_tab
#define BackTab Wcm.cm_backtab
#define TabWidth Wcm.cm_tabwidth
#define CR Wcm.cm_cr
#define Home Wcm.cm_home
#define LastLine Wcm.cm_ll
#define AbsPosition Wcm.cm_abs
#define ColPosition Wcm.cm_habs
#define RowPosition Wcm.cm_vabs
#define MultiUp Wcm.cm_multiup
#define MultiDown Wcm.cm_multidown
#define MultiLeft Wcm.cm_multileft
#define MultiRight Wcm.cm_multiright
#define AutoWrap Wcm.cm_autowrap
#define MagicWrap Wcm.cm_magicwrap
#define UseTabs Wcm.cm_usetabs
#define ScreenRows Wcm.cm_rows
#define ScreenCols Wcm.cm_cols
#define UpCost Wcm.cc_up
#define DownCost Wcm.cc_down
#define LeftCost Wcm.cc_left
#define RightCost Wcm.cc_right
#define HomeCost Wcm.cc_home
#define CRCost Wcm.cc_cr
#define LastLineCost Wcm.cc_ll
#define TabCost Wcm.cc_tab
#define BackTabCost Wcm.cc_backtab
#define AbsPositionCost Wcm.cc_abs
#define ColPositionCost Wcm.cc_habs
#define RowPositionCost Wcm.cc_vabs
#define MultiUpCost Wcm.cc_multiup
#define MultiDownCost Wcm.cc_multidown
#define MultiLeftCost Wcm.cc_multileft
#define MultiRightCost Wcm.cc_multiright
#endif
#define cmat(row,col) (curY = (row), curX = (col))
#define cmplus(n) \
{ \
if ((curX += (n)) >= ScreenCols && !MagicWrap) \
{ \
if (Wcm.cm_losewrap) losecursor (); \
else if (AutoWrap) curX = 0, curY++; \
else curX--; \
} \
}
#define losecursor() (curX = -1, curY = -1)
extern int cost;
extern int evalcost ();
extern void cmputc ();
extern int cmcostinit ();
extern int cmgoto ();
extern int Wcm_clear ();
extern int Wcm_init ();
#ifdef HAVE_X11
#define gnu_width 50
#define gnu_height 50
static char gnu_bits[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff,
0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xf1,
0xff, 0xff, 0xf3, 0xff, 0x8f, 0xff, 0xe1, 0xff, 0xff, 0xf9, 0x3f, 0x22,
0xfe, 0xcb, 0xff, 0xff, 0xf8, 0xc3, 0xf8, 0xfc, 0xcb, 0xff, 0x7f, 0xfc,
0xe0, 0xf9, 0xf9, 0xdb, 0xff, 0x7f, 0xfc, 0xf0, 0xfb, 0xf3, 0xd9, 0xff,
0x3f, 0x7e, 0xf8, 0xff, 0xf7, 0xcc, 0xff, 0x9f, 0x3e, 0x1c, 0x7f, 0x44,
0xce, 0xff, 0xcf, 0x1e, 0xcc, 0x01, 0x00, 0xe7, 0xff, 0xef, 0x0e, 0xce,
0x38, 0x1c, 0xe0, 0xff, 0xef, 0x0e, 0x27, 0xfe, 0xfa, 0xc3, 0xff, 0xef,
0x7c, 0x93, 0xff, 0xe5, 0xbf, 0xff, 0xef, 0x99, 0xc9, 0xab, 0x2a, 0x00,
0xff, 0xcf, 0xc3, 0x24, 0x54, 0xc5, 0xd5, 0xff, 0x9f, 0x7f, 0x16, 0xab,
0xca, 0xff, 0xff, 0x1f, 0x1f, 0x93, 0x46, 0x95, 0xff, 0xff, 0x7f, 0xc8,
0x49, 0x99, 0x8a, 0xff, 0xff, 0xff, 0xf0, 0x49, 0x4b, 0x95, 0xff, 0xff,
0xff, 0xf9, 0x4c, 0x88, 0x8a, 0xff, 0xff, 0xff, 0x1e, 0xe6, 0x58, 0x95,
0xff, 0xff, 0x3f, 0x00, 0xe6, 0xb7, 0x0a, 0xff, 0xff, 0xbf, 0x8a, 0xea,
0x50, 0x15, 0xff, 0xff, 0xff, 0x8f, 0xca, 0x99, 0x2a, 0xff, 0xff, 0xff,
0xa7, 0x95, 0x7f, 0x15, 0xff, 0xff, 0xff, 0x23, 0x55, 0x7f, 0x2a, 0xfe,
0xff, 0xff, 0x63, 0xd8, 0xfc, 0x14, 0xfe, 0xff, 0xff, 0x43, 0x9a, 0xfb,
0x2b, 0xfe, 0xff, 0xff, 0xc3, 0xaa, 0x12, 0x94, 0xfc, 0xff, 0xff, 0xc1,
0x32, 0xd5, 0xc1, 0xfd, 0xff, 0xff, 0x81, 0x46, 0xd5, 0x47, 0xfc, 0xff,
0xff, 0x83, 0x6c, 0xc2, 0x6e, 0xfc, 0xff, 0xff, 0x83, 0x89, 0x88, 0x69,
0xfe, 0xff, 0xff, 0x07, 0x92, 0x09, 0x3b, 0xfe, 0xff, 0xff, 0x07, 0x22,
0x01, 0x3c, 0xfe, 0xff, 0xff, 0x0f, 0x4e, 0x02, 0x03, 0xfe, 0xff, 0xff,
0x2f, 0xd0, 0x18, 0x3e, 0xff, 0xff, 0xff, 0x3f, 0xb0, 0x19, 0x9e, 0xff,
0xff, 0xff, 0x7f, 0x00, 0x09, 0x80, 0xff, 0xff, 0xff, 0x7f, 0x01, 0xe3,
0xc1, 0xff, 0xff, 0xff, 0xff, 0x05, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff,
0x07, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5f, 0xfd, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff};
#else /* X10 */
#define sink_width 48
#define sink_height 48
#define sink_mask_width 48
#define sink_mask_height 48
short sink_bits[] = {
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0x9f80, 0xffff, 0xffff,
0x9f9f, 0xffff, 0xffff, 0x8000,
0xffff, 0x7fff, 0xbffe, 0xffff,
0x7fff, 0xa003, 0xffff, 0x7fff,
0xaffd, 0xffff, 0x3fff, 0xaff9,
0xffff, 0xffff, 0xafff, 0xffff,
0xffff, 0xaffc, 0xffff, 0x7fff,
0xaff8, 0xffff, 0xffff, 0xaffc,
0xffff, 0xffff, 0xafff, 0xffff,
0xbfff, 0xaff7, 0xffff, 0x3fff,
0xaff3, 0xffff, 0xffff, 0xaffc,
0x003f, 0x0000, 0x2000, 0x007f,
0x0000, 0xe000, 0xf8df, 0xffff,
0x07ff, 0xf9cf, 0xff0f, 0xe7ff,
0xf9cf, 0xfff7, 0xe7ff, 0xf9ff,
0x63f7, 0xe7fb, 0xf9ff, 0x5a37,
0xe7fb, 0xf9cf, 0x5af7, 0xe7fb,
0xf9cf, 0x5af7, 0xe7f9, 0xf9ef,
0xdb0f, 0xe7fa, 0xf9ff, 0xffff,
0xe7ff, 0xf9df, 0xffff, 0xe7ff,
0x19cf, 0xfffc, 0xe7ff, 0xd9cf,
0xffff, 0xe7ff, 0xd9ff, 0xce47,
0xe673, 0x19ff, 0xb5b6, 0xe7ad,
0xd9cf, 0xb5b7, 0xe67d, 0xd9c7,
0xb5b7, 0xe5ed, 0x19ef, 0x4db4,
0xe673, 0xf1ff, 0xffff, 0xe3ff,
0x03ff, 0x0380, 0xf000, 0x07ef,
0x0100, 0xf800, 0xffc7, 0xf93f,
0xffff, 0xffe7, 0xfd7f, 0xffe0,
0xffff, 0x7d7f, 0xffdf, 0xffff,
0xbd7f, 0xffb1, 0xffff, 0xbb7f,
0xffae, 0xffef, 0xdaff, 0xffae,
0xffc7, 0x66ff, 0xffaf, 0xffe7,
0xbdff, 0xffaf, 0xffff, 0xc3ff,
0xffaf, 0xffff, 0xffff, 0xffaf};
short sink_mask_bits[] = {
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff};
#endif /* X10 */
/* Includes for memory limit warnings.
Copyright (C) 1990 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Emacs; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef BSD4_2
#ifndef USG
#include <sys/vlimit.h>
#endif /* not USG */
#else /* if BSD4_2 */
#include <sys/time.h>
#include <sys/resource.h>
#endif /* BSD4_2 */
#ifdef __STDC__
typedef void *POINTER;
#else
typedef char *POINTER;
#endif
typedef unsigned long SIZE;
#ifdef NULL
#undef NULL
#endif
#define NULL ((POINTER) 0)
#ifdef emacs
extern POINTER start_of_data ();
#ifdef BSD
#ifndef DATA_SEG_BITS
#define start_of_data() &etext
#endif
#endif
#else /* Not emacs */
#define start_of_data() &etext
#endif /* Not emacs */
/* start of data space; can be changed by calling malloc_init */
static POINTER data_space_start;
/* Number of bytes of writable memory we can expect to be able to get */
static unsigned int lim_data;
#ifdef USG
get_lim_data ()
{
extern long ulimit ();
#ifdef ULIMIT_BREAK_VALUE
lim_data = ULIMIT_BREAK_VALUE;
#else
lim_data = ulimit (3, 0);
#endif
lim_data -= (long) data_space_start;
}
#else /* not USG */
#ifndef BSD4_2
get_lim_data ()
{
lim_data = vlimit (LIM_DATA, -1);
}
#else /* BSD4_2 */
get_lim_data ()
{
struct rlimit XXrlimit;
getrlimit (RLIMIT_DATA, &XXrlimit);
#ifdef RLIM_INFINITY
lim_data = XXrlimit.rlim_cur & RLIM_INFINITY; /* soft limit */
#else
lim_data = XXrlimit.rlim_cur; /* soft limit */
#endif
}
#endif /* BSD4_2 */
#endif /* not USG */
#define sink_mask_width 48
#define sink_mask_height 48
#ifdef HAVE_X11
static char sink_mask_bits[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#else
short sink_mask_bits[] = {
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff};
#endif /* HAVE_X11 */
/* Declarations having to do with GNU Emacs syntax tables.
Copyright (C) 1985 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Emacs; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
extern Lisp_Object Qsyntax_table_p;
extern Lisp_Object Fsyntax_table_p (), Fsyntax_table (), Fset_syntax_table ();
/* The standard syntax table is stored where it will automatically
be used in all new buffers. */
#define Vstandard_syntax_table buffer_defaults.syntax_table
/* A syntax table is a Lisp vector of length 0400, whose elements are integers.
The low 8 bits of the integer is a code, as follows:
*/
enum syntaxcode
{
Swhitespace, /* for a whitespace character */
Spunct, /* for random punctuation characters */
Sword, /* for a word constituent */
Ssymbol, /* symbol constituent but not word constituent */
Sopen, /* for a beginning delimiter */
Sclose, /* for an ending delimiter */
Squote, /* for a prefix character like Lisp ' */
Sstring, /* for a string-grouping character like Lisp " */
Smath, /* for delimiters like $ in Tex. */
Sescape, /* for a character that begins a C-style escape */
Scharquote, /* for a character that quotes the following character */
Scomment, /* for a comment-starting character */
Sendcomment, /* for a comment-ending character */
Smax /* Upper bound on codes that are meaningful */
};
#define SYNTAX(c) \
((enum syntaxcode) (XINT (XVECTOR (current_buffer->syntax_table)->contents[c]) & 0377))
/* The next 8 bits of the number is a character,
the matching delimiter in the case of Sopen or Sclose. */
#define SYNTAX_MATCH(c) \
((XINT (XVECTOR (current_buffer->syntax_table)->contents[c]) >> 8) & 0377)
/* Then there are five single-bit flags that have the following meanings:
1. This character is the first of a two-character comment-start sequence.
2. This character is the second of a two-character comment-start sequence.
3. This character is the first of a two-character comment-end sequence.
4. This character is the second of a two-character comment-end sequence.
5. This character is a prefix, for backward-prefix-chars.
Note that any two-character sequence whose first character has flag 1
and whose second character has flag 2 will be interpreted as a comment start. */
#define SYNTAX_COMSTART_FIRST(c) \
((XINT (XVECTOR (current_buffer->syntax_table)->contents[c]) >> 16) & 1)
#define SYNTAX_COMSTART_SECOND(c) \
((XINT (XVECTOR (current_buffer->syntax_table)->contents[c]) >> 17) & 1)
#define SYNTAX_COMEND_FIRST(c) \
((XINT (XVECTOR (current_buffer->syntax_table)->contents[c]) >> 18) & 1)
#define SYNTAX_COMEND_SECOND(c) \
((XINT (XVECTOR (current_buffer->syntax_table)->contents[c]) >> 19) & 1)
#define SYNTAX_PREFIX(c) \
((XINT (XVECTOR (current_buffer->syntax_table)->contents[c]) >> 20) & 1)
/* This array, indexed by a character, contains the syntax code which that
character signifies (as a char). For example,
(enum syntaxcode) syntax_spec_code['w'] is Sword. */
extern unsigned char syntax_spec_code[0400];
/* Indexed by syntax code, give the letter that describes it. */
extern char syntax_code_spec[13];
/* Flags and parameters describing terminal's characteristics.
Copyright (C) 1985, 1986 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Emacs; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
extern int baud_rate; /* Output speed in baud */
extern int screen_width; /* Number of usable columns */
extern int screen_height; /* Number of lines */
extern int must_write_spaces; /* Nonzero means spaces in the text
must actually be output; can't just skip
over some columns to leave them blank. */
extern int min_padding_speed; /* Speed below which no padding necessary */
extern int fast_clear_end_of_line; /* Nonzero means terminal has
command for this */
extern int line_ins_del_ok; /* Terminal can insert and delete lines */
extern int char_ins_del_ok; /* Terminal can insert and delete chars */
extern int scroll_region_ok; /* Terminal supports setting the scroll
window */
extern int memory_below_screen; /* Terminal remembers lines scrolled
off bottom */
extern int fast_clear_end_of_line; /* Terminal has a `ce' string */
extern int dont_calculate_costs; /* Nonzero means don't bother computing
various cost tables; we won't use them. */
/* Nonzero means no need to redraw the entire screen on resuming
a suspended Emacs. This is useful on terminals with multiple pages,
where one page is used for Emacs and another for all else. */
extern int no_redraw_on_reenter;
/* Flags and paramaters describing user options for handling the terminal.
Copyright (C) 1985, 1986, 1990 Free Software Foundation, Inc.