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.14 2003/12/10 14:34:18 grubba Exp $ + // $Id: Terminfo.pmod,v 1.15 2006/06/20 17:13: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:372:    if(strlen(strbuf)==sstr-1 && !bug_compat && (nbool&1)) {    // Ugh. Someone didn't pad their bool array properly (one suspects).    f->seek(0);    return load_cap(f, 1);    }    if(strlen(strbuf)!=sstr)    return 0;    array(string) strarr = Array.map(array_sscanf(stroffs, "%2c"*nstr),    lambda(int offs, string buf) {    return offs<0xfffe && +  offs<sizeof(buf) &&    buf[offs..    search(buf, "\0", offs)-1];    }, strbuf+"\0");    if (sizeof(strarr)>sizeof(strnames))    strarr = strarr[..sizeof(strnames)-1];    mapping(string:string) tmp = mkmapping(strnames[..sizeof(strarr)-1],    strarr);    foreach (strnames[..sizeof(strarr)-1], string name)    if (!tmp[name])    m_delete(tmp, name);