changeset 3095:ef7d99920f81

(Fforward_comment): Arg is a Lisp_Object. Convert it to an int.
author Richard M. Stallman <rms@gnu.org>
date Tue, 25 May 1993 20:46:16 +0000
parents 4b3770f84aa7
children 559b392f9526
files src/syntax.c
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/syntax.c	Tue May 25 20:41:49 1993 +0000
+++ b/src/syntax.c	Tue May 25 20:46:16 1993 +0000
@@ -570,7 +570,7 @@
 If N comments are found as expected, with nothing except whitespace\n\
 between them, return t; otherwise return nil.")
   (count)
-     int count;
+     Lisp_Object count;
 {
   register int from;
   register int stop;
@@ -578,6 +578,10 @@
   register enum syntaxcode code;
   int comstyle = 0;	    /* style of comment encountered */
   int found;
+  int count1;
+
+  CHECK_NUMBER (count, 0);
+  count1 = XINT (count);
 
   immediate_quit = 1;
   QUIT;
@@ -585,7 +589,7 @@
   from = PT;
   found = from;
 
-  while (count > 0)
+  while (count1 > 0)
     {
       found = from;
       stop = ZV;
@@ -646,10 +650,10 @@
 	}
 
       /* End of comment reached */
-      count--;
+      count1--;
     }
 
-  while (count < 0)
+  while (count1 < 0)
     {
       found = from;
 
@@ -821,7 +825,7 @@
 	    }
 	}
 
-      count++;
+      count1++;
     }
 
   SET_PT (from);