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.3 1999/03/17 23:26:03 marcus Exp $ + // $Id: Terminfo.pmod,v 1.4 1999/03/23 20:48:01 marcus Exp $         #if constant(thread_create)   #define LOCK object m_key = mutex->lock()   #define UNLOCK destruct(m_key)   #define MUTEX static private object mutex = Thread.Mutex();   #else   #define LOCK   #define UNLOCK   #define MUTEX
pike.git/lib/modules/Stdio.pmod/Terminfo.pmod:711:    }      }      static private object defterm, deftermcap, defterminfo;      object defaultTermcapDB()   {    object tcdb;    LOCK; -  tcdb = deftermcap || (deftermcap = TermcapDB()); +  catch { tcdb = deftermcap || (deftermcap = TermcapDB()); };    UNLOCK;    return tcdb;   }      object defaultTerminfoDB()   {    object tidb;    LOCK; -  tidb = defterminfo || (defterminfo = TerminfoDB()); +  catch { tidb = defterminfo || (defterminfo = TerminfoDB()); };    UNLOCK;    return tidb;   }      object getTermcap(string term)   {    object tcdb = defaultTermcapDB();    return tcdb && tcdb[term];   }