pike.git / lib / modules / _Image_XPM.pmod

version» Context lines:

pike.git/lib/modules/_Image_XPM.pmod:11:    old_time = gethrtime(); \   } while(0);   #else   # define TI(X)   # define TD(X)   # define TE(X)   #endif      mapping _decode( string what, void|mapping opts )   { -  array e; +     array data;    mapping retopts = ([ ]);    if(!opts)    opts = ([]);    TI("Scan for header");    if(sscanf(what, "%*s/*%*[ \t]XPM%*[ \t]*/%*s{%s", what) != 5)    error("This is not a XPM image (1)\n");       if(sizeof(what)<100000)    {
pike.git/lib/modules/_Image_XPM.pmod:39:    what = reverse(what);    if(sscanf(what, "%*s}%s", what) != 2)    error("This is not a XPM image (3)\n");    what = reverse(what);    }       TD("Explode");    data = what/"\n";    what = 0;    int len = sizeof(data); -  int r, sp; +        TD("Trim");    _xpm_trim_rows( data );       array values = (array(int))(replace(data[0], "\t", " ")/" "-({""}));    int width = values[0];    int height = values[1];    if(!width || !height)    error("Width or height == 0\n");   
pike.git/lib/modules/_Image_XPM.pmod:101:    "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A",    "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N",    "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", " ",   });      array cmap_t;      string encode( object what, mapping|void options )   {    int x,y,q; -  array lcmapt; +     TI("Encode init");    if(!options) options = ([]);    if(!cmap_t)    {    cmap_t = allocate( 8100 );    for(x=0; x<90; x++)    for(y=0; y<90; y++)    cmap_t[q++] = ok[x]+ok[y];    }    TD("Encode CT");