summaryrefslogtreecommitdiff
path: root/src/syntax.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2006-07-19 00:42:56 +0000
committerMiles Bader <miles@gnu.org>2006-07-19 00:42:56 +0000
commit63db3c1b3ffa669435b10aa362115ef664990ab2 (patch)
treea62f68b147d4265ce993136af897d4f348570594 /src/syntax.c
parent2988d6b36d310ba98ea1fed570142f436804fc18 (diff)
parent83676aa2e399363120942ef5ea19f8af6b75e8e8 (diff)
downloademacs-63db3c1b3ffa669435b10aa362115ef664990ab2.tar.gz
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 343-356) - Update from CVS - Update for ERC 5.1.3. - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 113-115) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-90
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c69
1 files changed, 33 insertions, 36 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 4f5481ca111..b0b4bdc0032 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -97,11 +97,12 @@ static int find_start_modiff;
static int find_defun_start P_ ((int, int));
-static int back_comment P_ ((int, int, int, int, int, int *, int *));
+static int back_comment P_ ((EMACS_INT, EMACS_INT, EMACS_INT, int, int,
+ EMACS_INT *, EMACS_INT *));
static int char_quoted P_ ((int, int));
static Lisp_Object skip_chars P_ ((int, Lisp_Object, Lisp_Object, int));
static Lisp_Object skip_syntaxes P_ ((int, Lisp_Object, Lisp_Object));
-static Lisp_Object scan_lists P_ ((int, int, int, int));
+static Lisp_Object scan_lists P_ ((EMACS_INT, EMACS_INT, EMACS_INT, int));
static void scan_sexps_forward P_ ((struct lisp_parse_state *,
int, int, int, int,
int, Lisp_Object, int));
@@ -472,9 +473,9 @@ prev_char_comend_first (pos, pos_byte)
static int
back_comment (from, from_byte, stop, comnested, comstyle, charpos_ptr, bytepos_ptr)
- int from, from_byte, stop;
+ EMACS_INT from, from_byte, stop;
int comnested, comstyle;
- int *charpos_ptr, *bytepos_ptr;
+ EMACS_INT *charpos_ptr, *bytepos_ptr;
{
/* Look back, counting the parity of string-quotes,
and recording the comment-starters seen.
@@ -749,9 +750,8 @@ static void
check_syntax_table (obj)
Lisp_Object obj;
{
- if (!(CHAR_TABLE_P (obj)
- && EQ (XCHAR_TABLE (obj)->purpose, Qsyntax_table)))
- wrong_type_argument (Qsyntax_table_p, obj);
+ CHECK_TYPE (CHAR_TABLE_P (obj) && EQ (XCHAR_TABLE (obj)->purpose, Qsyntax_table),
+ Qsyntax_table_p, obj);
}
DEFUN ("syntax-table", Fsyntax_table, Ssyntax_table, 0, 0, 0,
@@ -2111,9 +2111,10 @@ in_classes (c, iso_classes)
static int
forw_comment (from, from_byte, stop, nesting, style, prev_syntax,
charpos_ptr, bytepos_ptr, incomment_ptr)
- int from, from_byte, stop;
+ EMACS_INT from, from_byte, stop;
int nesting, style, prev_syntax;
- int *charpos_ptr, *bytepos_ptr, *incomment_ptr;
+ EMACS_INT *charpos_ptr, *bytepos_ptr;
+ int *incomment_ptr;
{
register int c, c1;
register enum syntaxcode code;
@@ -2213,16 +2214,16 @@ between them, return t; otherwise return nil. */)
(count)
Lisp_Object count;
{
- register int from;
- int from_byte;
- register int stop;
+ register EMACS_INT from;
+ EMACS_INT from_byte;
+ register EMACS_INT stop;
register int c, c1;
register enum syntaxcode code;
int comstyle = 0; /* style of comment encountered */
int comnested = 0; /* whether the comment is nestable or not */
int found;
- int count1;
- int out_charpos, out_bytepos;
+ EMACS_INT count1;
+ EMACS_INT out_charpos, out_bytepos;
int dummy;
CHECK_NUMBER (count);
@@ -2420,11 +2421,12 @@ between them, return t; otherwise return nil. */)
static Lisp_Object
scan_lists (from, count, depth, sexpflag)
- register int from;
- int count, depth, sexpflag;
+ register EMACS_INT from;
+ EMACS_INT count, depth;
+ int sexpflag;
{
Lisp_Object val;
- register int stop = count > 0 ? ZV : BEGV;
+ register EMACS_INT stop = count > 0 ? ZV : BEGV;
register int c, c1;
int stringterm;
int quoted;
@@ -2433,11 +2435,11 @@ scan_lists (from, count, depth, sexpflag)
int min_depth = depth; /* Err out if depth gets less than this. */
int comstyle = 0; /* style of comment encountered */
int comnested = 0; /* whether the comment is nestable or not */
- int temp_pos;
- int last_good = from;
+ EMACS_INT temp_pos;
+ EMACS_INT last_good = from;
int found;
- int from_byte;
- int out_bytepos, out_charpos;
+ EMACS_INT from_byte;
+ EMACS_INT out_bytepos, out_charpos;
int temp, dummy;
int multibyte_symbol_p = sexpflag && multibyte_syntax_as_symbol;
@@ -2567,10 +2569,9 @@ scan_lists (from, count, depth, sexpflag)
close1:
if (!--depth) goto done;
if (depth < min_depth)
- Fsignal (Qscan_error,
- Fcons (build_string ("Containing expression ends prematurely"),
- Fcons (make_number (last_good),
- Fcons (make_number (from), Qnil))));
+ xsignal3 (Qscan_error,
+ build_string ("Containing expression ends prematurely"),
+ make_number (last_good), make_number (from));
break;
case Sstring:
@@ -2719,10 +2720,9 @@ scan_lists (from, count, depth, sexpflag)
open2:
if (!--depth) goto done2;
if (depth < min_depth)
- Fsignal (Qscan_error,
- Fcons (build_string ("Containing expression ends prematurely"),
- Fcons (make_number (last_good),
- Fcons (make_number (from), Qnil))));
+ xsignal3 (Qscan_error,
+ build_string ("Containing expression ends prematurely"),
+ make_number (last_good), make_number (from));
break;
case Sendcomment:
@@ -2792,12 +2792,9 @@ scan_lists (from, count, depth, sexpflag)
return val;
lose:
- Fsignal (Qscan_error,
- Fcons (build_string ("Unbalanced parentheses"),
- Fcons (make_number (last_good),
- Fcons (make_number (from), Qnil))));
- abort ();
- /* NOTREACHED */
+ xsignal3 (Qscan_error,
+ build_string ("Unbalanced parentheses"),
+ make_number (last_good), make_number (from));
}
DEFUN ("scan-lists", Fscan_lists, Sscan_lists, 3, 3, 0,
@@ -2924,7 +2921,7 @@ scan_sexps_forward (stateptr, from, from_byte, end, targetdepth,
int boundary_stop = commentstop == -1;
int nofence;
int found;
- int out_bytepos, out_charpos;
+ EMACS_INT out_bytepos, out_charpos;
int temp;
prev_from = from;