about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-02-03 18:34:32 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-02-03 18:34:32 +0000
commit8ac97f3308ed8b33738b16f4464876f886b9237b (patch)
tree4c633166fe2ac54bf9c672ff2a2337e6bff1cc95 /Src
parent7e9952e0163a7148c1acd81c311c4f681e33aa5f (diff)
downloadzsh-8ac97f3308ed8b33738b16f4464876f886b9237b.tar.gz
zsh-8ac97f3308ed8b33738b16f4464876f886b9237b.tar.xz
zsh-8ac97f3308ed8b33738b16f4464876f886b9237b.zip
27648, 267650/1, unposted README change:
Turn off repeat and turn on ulimit in emulation modes
Diffstat (limited to 'Src')
-rw-r--r--Src/Builtins/rlimits.mdd1
-rw-r--r--Src/builtin.c11
-rw-r--r--Src/init.c1
-rw-r--r--Src/mkbltnmlst.sh40
4 files changed, 43 insertions, 10 deletions
diff --git a/Src/Builtins/rlimits.mdd b/Src/Builtins/rlimits.mdd
index 63ca7f9f3..ca9fa8b84 100644
--- a/Src/Builtins/rlimits.mdd
+++ b/Src/Builtins/rlimits.mdd
@@ -3,6 +3,7 @@ link=either
 load=yes
 
 autofeatures="b:limit b:ulimit b:unlimit"
+autofeatures_emu="b:ulimit"
 
 objects="rlimits.o"
 
diff --git a/Src/builtin.c b/Src/builtin.c
index 0ce3aef56..1eca82099 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -206,6 +206,17 @@ freebuiltinnode(HashNode hn)
     }
 }
 
+/**/
+void
+init_builtins(void)
+{
+    if (!EMULATION(EMULATE_ZSH)) {
+	HashNode hn = reswdtab->getnode2(reswdtab, "repeat");
+	if (hn)
+	    reswdtab->disablenode(hn, 0);
+    }
+}
+
 /* Make sure we have space for a new option and increment. */
 
 #define OPT_ALLOC_CHUNK 16
diff --git a/Src/init.c b/Src/init.c
index 812cd8409..02129ddbb 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -1443,6 +1443,7 @@ zsh_main(UNUSED(int argc), char **argv)
     setupvals();
     init_signals();
     init_bltinmods();
+    init_builtins();
     run_init_scripts();
     init_misc();
 
diff --git a/Src/mkbltnmlst.sh b/Src/mkbltnmlst.sh
index d9c5b13e9..c4611d8b3 100644
--- a/Src/mkbltnmlst.sh
+++ b/Src/mkbltnmlst.sh
@@ -37,18 +37,38 @@ for x_mod in $x_mods; do
         echo "/* non-linked-in known module \`$x_mod' */"
 	linked=no
     esac
-    unset moddeps autofeatures
+    unset moddeps autofeatures autofeatures_emu
     . $srcdir/../$modfile
     if test "x$autofeatures" != x; then
-	echo "  if (EMULATION(EMULATE_ZSH)) {"
-	echo "    char *features[] = { "
-	for feature in $autofeatures; do
-	    echo "      \"$feature\","
-	done
-	echo "      NULL"
-	echo "    }; "
-	echo "    autofeatures(\"zsh\", \"$x_mod\", features, 0, 1);"
-	echo "  }"
+        if test "x$autofeatures_emu" != x; then
+            echo "  {"
+	    echo "    char *zsh_features[] = { "
+	    for feature in $autofeatures; do
+		echo "      \"$feature\","
+	    done
+	    echo "      NULL"
+	    echo "    }; "
+	    echo "    char *emu_features[] = { "
+	    for feature in $autofeatures_emu; do
+		echo "      \"$feature\","
+	    done
+	    echo "      NULL"
+	    echo "    }; "
+	    echo "    autofeatures(\"zsh\", \"$x_mod\","
+	    echo "       EMULATION(EMULATE_ZSH) ? zsh_features : emu_features,"
+	    echo "       0, 1);"
+	    echo "  }"
+        else
+	    echo "  if (EMULATION(EMULATE_ZSH)) {"
+	    echo "    char *features[] = { "
+	    for feature in $autofeatures; do
+		echo "      \"$feature\","
+	    done
+	    echo "      NULL"
+	    echo "    }; "
+	    echo "    autofeatures(\"zsh\", \"$x_mod\", features, 0, 1);"
+	    echo "  }"
+	fi
     fi
     for dep in $moddeps; do
 	echo "  add_dep(\"$x_mod\", \"$dep\");"