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.22 2006/01/07 17:05:41 nilsson Exp $ + // $Id: Terminfo.pmod,v 1.23 2007/04/06 14:49:12 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:63:    {    switch (fmt[0][0])    {    case 'd': res+=sprintf("%d%s",POP,fmt[0][1..]); break;    case 'x': res+=sprintf("%x%s",POP,fmt[0][1..]); break;    case '0': case '2': case '3':    sscanf(fmt[0],"%[0-9]%s",tmp,fmt[0]);    res+=sprintf("%"+tmp+fmt[0][..0]+"%s",POP,fmt[0][1..]);    break;    case 'c': res+=sprintf("%c%s",POP,fmt[0][1..]); break; -  case 's': res+=sprintf("%s%s",POP,fmt[0][1..]); break; +  case 's': res+=sprintf("%s%s",[string](mixed)POP,fmt[0][1..]); break;       case '\'':    sscanf(fmt[0],"'%s'%s",tmp,fmt[0]);    if (tmp=="") tmp="\0";    if (tmp[0]=='\\') tmp=sprintf("%c",(int)("0"+tmp[1..]));    PUSH(tmp[0]);    res+=fmt[0];    break;    case '{':    sscanf(fmt[0],"{%d}%s",z,fmt[0]);
pike.git/lib/modules/Stdio.pmod/Terminfo.pmod:566:    res += ({ o }) * sizeof(names);    resi += names;    }    sort(resi, res);    complete_index = 1;    }    UNLOCK;    return [array(Termcap)]    predef::map(res,    lambda(int|Termcap x, mapping(int:Termcap) y) { -  return objectp(x)? x : y[x]; +  return objectp(x)? [object(Termcap)]x : y[x];    },    mkmapping(indices(extra),    predef::map(values(extra),    Termcap, this)));    }       static private string read_next(string find) // quick search    {    for (;;)    {