pike.git / bin / test_pike.pike

version» Context lines:

pike.git/bin/test_pike.pike:1:   #!/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;      #if !constant(_verify_internals)   #define _verify_internals()   #endif      #if !constant(_dmalloc_set_name)   void _dmalloc_set_name(mixed ... args) {}   #endif
pike.git/bin/test_pike.pike:20:      int istty_cache;   int istty()   {   #ifdef __NT__    return 1;   #else    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   }      mapping(string:int) cond_cache=([]);      #if constant(thread_create)   #define HAVE_DEBUG   #endif