pike.git / lib / modules / Stdio.pmod / Terminfo.pmod

version» Context lines:

pike.git/lib/modules/Stdio.pmod/Terminfo.pmod:1: - // $Id: Terminfo.pmod,v 1.19 2003/12/10 14:36:14 grubba Exp $ + // $Id: Terminfo.pmod,v 1.20 2005/01/07 10:37:46 grubba Exp $   #pike __REAL_VERSION__         #if constant(thread_create)   #define LOCK object m_key = mutex->lock()   #define UNLOCK destruct(m_key)   #define MUTEX static private object(Thread.Mutex) mutex = Thread.Mutex();   #else   #define LOCK   #define UNLOCK
pike.git/lib/modules/Stdio.pmod/Terminfo.pmod:416:    static private string buf="";    static private mapping(string:int|Termcap) cache=([]);    static private int complete_index=0;       void create(string|void filename)    {    if (!filename) {    string tce = [string]getenv("TERMCAP");    if (tce && sizeof(tce) && tce[0]=='/')    filename = tce; +  else if ((getenv("OSTYPE") == "msys") && +  (filename = getenv("SHELL"))) { +  // MinGW +  // Usually something like "C:/msys/1.0/bin/sh" +  // Termcap is in "C:/msys/1.0/etc/termcap" +  filename = combine_path(filename, "../../etc/termcap"); +  }    else    filename = "/etc/termcap";    } -  if (!::open(filename, "r")) +  if (!::open(filename, "r")) {    error("failed to open termcap file %O\n", filename);    } -  +  }       static private void rewind(int|void pos)    {    ::seek(pos);    buf="";    }       static private int more_data()    {    string q;