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.8 2000/03/30 21:21:10 grubba Exp $ + // $Id: Terminfo.pmod,v 1.9 2000/08/27 18:29:27 mirar Exp $         #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   #define MUTEX
pike.git/lib/modules/Stdio.pmod/Terminfo.pmod:643:    static private mapping(string:object(Terminfo)) cache = ([]);    static private int complete_index=0;       void create(string|void dirname)    {    if (!dirname)    {    foreach (({"/usr/share/lib/terminfo", "/usr/share/termcap",    "/usr/lib/terminfo", "/usr/share/misc/terminfo"}), string dn)    { -  array(int) s = file_stat(dn); -  if (arrayp(s) && sizeof(s)>1 && s[1]==-2) +  .Stat s = file_stat(dn); +  if (s && s->type=="dir")    {    dirname = dn;    break;    }    }    if (!dirname) {    destruct(this_object());    return;    }    }