changeset 10391:55428c377c84

Declare all non-returning functions `void'. (insert_1): Make non-static. New arg PREPARE. All callers changed.
author Karl Heuer <kwzh@gnu.org>
date Wed, 11 Jan 1995 01:40:25 +0000
parents a653accbfcbb
children 62291e2d01df
files src/insdel.c
diffstat 1 files changed, 25 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/insdel.c	Wed Jan 11 01:28:22 1995 +0000
+++ b/src/insdel.c	Wed Jan 11 01:40:25 1995 +0000
@@ -25,7 +25,6 @@
 #include "window.h"
 #include "blockinput.h"
 
-static void insert_1 ();
 static void insert_from_string_1 ();
 static void insert_from_buffer_1 ();
 static void gap_left ();
@@ -36,6 +35,7 @@
 /* Move gap to position `pos'.
    Note that this can quit!  */
 
+void
 move_gap (pos)
      int pos;
 {
@@ -259,6 +259,7 @@
 
 /* Make the gap INCREMENT characters longer.  */
 
+void
 make_gap (increment)
      int increment;
 {
@@ -309,33 +310,35 @@
    DO NOT use this for the contents of a Lisp string or a Lisp buffer!
    prepare_to_modify_buffer could relocate the text.  */
 
+void
 insert (string, length)
      register unsigned char *string;
      register length;
 {
   if (length > 0)
     {
-      insert_1 (string, length, 0);
+      insert_1 (string, length, 0, 1);
       signal_after_change (PT-length, 0, length);
     }
 }
 
+void
 insert_and_inherit (string, length)
      register unsigned char *string;
      register length;
 {
   if (length > 0)
     {
-      insert_1 (string, length, 1);
+      insert_1 (string, length, 1, 1);
       signal_after_change (PT-length, 0, length);
     }
 }
 
-static void
-insert_1 (string, length, inherit)
+void
+insert_1 (string, length, inherit, prepare)
      register unsigned char *string;
-     register length;
-     int inherit;
+     register int length;
+     int inherit, prepare;
 {
   register Lisp_Object temp;
 
@@ -344,7 +347,8 @@
   if (length + Z != XINT (temp))
     error ("maximum buffer size exceeded");
 
-  prepare_to_modify_buffer (PT, PT);
+  if (prepare)
+    prepare_to_modify_buffer (PT, PT);
 
   if (PT != GPT)
     move_gap (PT);
@@ -384,6 +388,7 @@
    before we bcopy the stuff into the buffer, and relocate the string
    without insert noticing.  */
 
+void
 insert_from_string (string, pos, length, inherit)
      Lisp_Object string;
      register int pos, length;
@@ -536,6 +541,7 @@
    Don't use this function to insert part of a Lisp string,
    since gc could happen and relocate it.  */
 
+void
 insert_before_markers (string, length)
      unsigned char *string;
      register int length;
@@ -543,12 +549,13 @@
   if (length > 0)
     {
       register int opoint = PT;
-      insert_1 (string, length, 0);
+      insert_1 (string, length, 0, 1);
       adjust_markers (opoint - 1, opoint, length);
       signal_after_change (PT-length, 0, length);
     }
 }
 
+void
 insert_before_markers_and_inherit (string, length)
      unsigned char *string;
      register int length;
@@ -556,7 +563,7 @@
   if (length > 0)
     {
       register int opoint = PT;
-      insert_1 (string, length, 1);
+      insert_1 (string, length, 1, 1);
       adjust_markers (opoint - 1, opoint, length);
       signal_after_change (PT-length, 0, length);
     }
@@ -564,6 +571,7 @@
 
 /* Insert part of a Lisp string, relocating markers after.  */
 
+void
 insert_from_string_before_markers (string, pos, length, inherit)
      Lisp_Object string;
      register int pos, length;
@@ -581,14 +589,16 @@
 /* Delete characters in current buffer
    from FROM up to (but not including) TO.  */
 
+void
 del_range (from, to)
      register int from, to;
 {
-  return del_range_1 (from, to, 1);
+  del_range_1 (from, to, 1);
 }
 
 /* Like del_range; PREPARE says whether to call prepare_to_modify_buffer.  */
 
+void
 del_range_1 (from, to, prepare)
      register int from, to, prepare;
 {
@@ -644,6 +654,7 @@
    to END.  This checks the read-only properties of the region, calls
    the necessary modification hooks, and warns the next redisplay that
    it should pay attention to that area.  */
+void
 modify_region (buffer, start, end)
      struct buffer *buffer;
      int start, end;
@@ -674,6 +685,7 @@
    verify that the text to be modified is not read-only, and call
    any modification properties the text may have. */
 
+void
 prepare_to_modify_buffer (start, end)
      Lisp_Object start, end;
 {
@@ -744,6 +756,7 @@
    START and END are the bounds of the text to be changed,
    as Lisp objects.  */
 
+void
 signal_before_change (start, end)
      Lisp_Object start, end;
 {
@@ -820,6 +833,7 @@
 
    (Hence POS + LENINS - LENDEL is the position after the changed text.)  */
 
+void
 signal_after_change (pos, lendel, lenins)
      int pos, lendel, lenins;
 {