From 8c968322f6641f08a12415d282525f210faa2ea1 Mon Sep 17 00:00:00 2001 From: Renaud Fivet Date: Wed, 23 Mar 2016 20:25:16 +0800 Subject: [PATCH] Remove Spell buffer mode as it is not connected to any implemented functionality. --- buffer.c | 8 ++++---- buffer.h | 19 +++++++++---------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/buffer.c b/buffer.c index ffe1bcb..f3b3471 100644 --- a/buffer.c +++ b/buffer.c @@ -29,7 +29,7 @@ struct buffer *bheadp ; /* Head of list of buffers */ struct buffer *blistp ; /* Buffer for C-X C-B */ const char *modename[] = { /* name of modes */ - "Wrap", "Cmode", "Spell", "Exact", "View", "Over", + "Wrap", "Cmode", "Exact", "View", "Over", "Magic", #if CRYPT "Crypt", @@ -41,7 +41,7 @@ const char *modename[] = { /* name of modes */ int gmode = 0 ; /* global editor mode */ -static const char modecode[] = "WCSEVOMYAUD" ; /* letters to represent modes */ +static const char modecode[] = "WCEVOMYAUD" ; /* letters to represent modes */ static int makelist( int iflag) ; @@ -333,7 +333,7 @@ static int makelist( int iflag) int i; long nbytes; /* # of bytes in current buffer */ long nlines ; /* # of lines in current buffer */ - char b[ 8 + 1] ; + char b[ 9 + 1] ; char line[MAXLINE]; blistp->b_flag &= ~BFCHG; /* Don't complain! */ @@ -358,7 +358,7 @@ static int makelist( int iflag) *cp1++ = modecode[i]; else *cp1++ = '.'; - strcpy(cp1, " Global Modes"); + strcpy(cp1, " Global Modes"); if (addline(line) == FALSE) return FALSE; diff --git a/buffer.h b/buffer.h index 5917ffd..6562d1f 100644 --- a/buffer.h +++ b/buffer.h @@ -50,21 +50,20 @@ extern struct buffer *blistp ; /* Buffer for C-X C-B */ #define BFTRUNC 0x04 /* buffer was truncated when read */ /* mode flags */ -#define NUMMODES 11 /* # of defined modes */ +#define NUMMODES 10 /* # of defined modes */ #define MDWRAP 0x0001 /* word wrap */ #define MDCMOD 0x0002 /* C indentation and fence match */ -#define MDSPELL 0x0004 /* spell error parcing */ -#define MDEXACT 0x0008 /* Exact matching for searches */ -#define MDVIEW 0x0010 /* read-only buffer */ -#define MDOVER 0x0020 /* overwrite mode */ -#define MDMAGIC 0x0040 /* regular expresions in search */ +#define MDEXACT 0x0004 /* Exact matching for searches */ +#define MDVIEW 0x0008 /* read-only buffer */ +#define MDOVER 0x0010 /* overwrite mode */ +#define MDMAGIC 0x0020 /* regular expresions in search */ #if CRYPT -#define MDCRYPT 0x0080 /* encrytion mode active */ +#define MDCRYPT 0x0040 /* encrytion mode active */ #endif -#define MDASAVE 0x0100 /* auto-save mode */ -#define MDUTF8 0x0200 /* utf8 mode */ -#define MDDOS 0x0400 /* CRLF eol mode */ +#define MDASAVE 0x0080 /* auto-save mode */ +#define MDUTF8 0x0100 /* utf8 mode */ +#define MDDOS 0x0200 /* CRLF eol mode */ extern const char *modename[] ; /* text names of modes */