From b7df1bcc936625bef5af9c46291fbd585a7d92b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Mon, 27 Mar 2000 12:29:45 -0800 Subject: [PATCH] some bugfixes.. Rev: bin/export.pike:1.31 Rev: bin/install.pike:1.50 Rev: bin/test_pike.pike:1.40 --- bin/export.pike | 4 ++-- bin/install.pike | 16 +++++++++++++--- bin/test_pike.pike | 14 ++++++++++++-- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/bin/export.pike b/bin/export.pike index 0f309382ff..83b5096cc9 100755 --- a/bin/export.pike +++ b/bin/export.pike @@ -1,6 +1,6 @@ #!/usr/local/bin/pike -/* $Id: export.pike,v 1.30 2000/03/27 00:45:25 hubbe Exp $ */ +/* $Id: export.pike,v 1.31 2000/03/27 20:29:45 hubbe Exp $ */ #include <simulate.h> import Stdio; @@ -205,7 +205,7 @@ int main(int argc, string *argv) object o=Stdio.File(); int first=1; - foreach(files/50,files) + foreach(files/50.0,files) { if(Process.create_process(({"tar", first?"cvf":"rvf", diff --git a/bin/install.pike b/bin/install.pike index b36e42e8d8..176654e8fa 100644 --- a/bin/install.pike +++ b/bin/install.pike @@ -24,7 +24,17 @@ int istty() if(!istty_cache) { istty_cache=!!Stdio.stdin->tcgetattr(); - if(!istty_cache) istty_cache=-1; + if(!istty_cache) + { + istty_cache=-1; + }else{ + switch(getenv("TERM")) + { + case "dumb": + case "emacs": + istty_cache=-1; + } + } } return istty_cache>0; #endif @@ -514,7 +524,7 @@ done string tmpmsg="."; string tararg="cf"; - foreach(to_export/50, array files_to_tar) + foreach(to_export/50.0, array files_to_tar) { status("Creating",tmpname+".tar",tmpmsg); tmpmsg+="."; @@ -1127,7 +1137,7 @@ void do_install() foreach(to_dump, string mod) rm(mod+".o"); /* Dump 50 modules at a time */ write("\n"); - foreach(to_dump/50,to_dump) + foreach(to_dump/50.0,to_dump) { write(" "); Process.create_process( ({pike, diff --git a/bin/test_pike.pike b/bin/test_pike.pike index 3d838c39f0..1156ad05ba 100755 --- a/bin/test_pike.pike +++ b/bin/test_pike.pike @@ -1,6 +1,6 @@ #!/usr/local/bin/pike -/* $Id: test_pike.pike,v 1.39 2000/03/25 22:45:59 hubbe Exp $ */ +/* $Id: test_pike.pike,v 1.40 2000/03/27 20:29:45 hubbe Exp $ */ import Stdio; @@ -27,7 +27,17 @@ int istty() if(!istty_cache) { istty_cache=!!Stdio.stdin->tcgetattr(); - if(!istty_cache) istty_cache=-1; + if(!istty_cache) + { + istty_cache=-1; + }else{ + switch(getenv("TERM")) + { + case "dumb": + case "emacs": + istty_cache=-1; + } + } } return istty_cache>0; #endif -- GitLab