GNU shell utilities SHELLUTILS-1_10c
authorJim Meyering <jim@meyering.net>
Sun, 19 Jun 1994 04:48:15 +0000 (04:48 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 19 Jun 1994 04:48:15 +0000 (04:48 +0000)
lib/alloca.c

index bd4932a..d1f4d1a 100644 (file)
 #endif
 #endif
 
+#ifdef emacs
+#include "blockinput.h"
+#endif
+
 /* If compiling with GCC 2, this file's not needed.  */
 #if !defined (__GNUC__) || __GNUC__ < 2
 
@@ -176,6 +180,10 @@ alloca (size)
   {
     register header *hp;       /* Traverses linked list.  */
 
+#ifdef emacs
+    BLOCK_INPUT;
+#endif
+
     for (hp = last_alloca_header; hp != NULL;)
       if ((STACK_DIR > 0 && hp->h.deep > depth)
          || (STACK_DIR < 0 && hp->h.deep < depth))
@@ -190,6 +198,10 @@ alloca (size)
        break;                  /* Rest are not deeper.  */
 
     last_alloca_header = hp;   /* -> last valid storage.  */
+
+#ifdef emacs
+    UNBLOCK_INPUT;
+#endif
   }
 
   if (size == 0)