Roxen.git / server / base_server / configuration.pike

version» Context lines:

Roxen.git/server/base_server/configuration.pike:1:   // A vitual server's main configuration   // Copyright © 1996 - 2000, Roxen IS.    - constant cvs_version = "$Id: configuration.pike,v 1.376 2000/09/19 13:17:25 per Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.377 2000/09/19 14:25:36 per Exp $";   constant is_configuration = 1;   #include <module.h>   #include <module_constants.h>   #include <roxen.h>   #include <request_trace.h>      inherit "basic_defvar";      mapping enabled_modules = ([]);   mapping(string:array(int)) error_log=([]);
Roxen.git/server/base_server/configuration.pike:783:    for(int i=0;i<128;i++)    {    int j = i*2;    bar->line(0,j,29,j,@hsv_to_rgb(hue,255-j,brightness));    bar->line(0,j+1,29,j+1,@hsv_to_rgb(hue,255-j,brightness));    }       where = 255-where;    bar->line(0,where,29,where, 255,255,255);    - #if constant(Image.GIF) && constant(Image.GIF.encode) -  return ({ Image.GIF.encode(bar), "image/gif" }); - #else + #if constant(Image.JPEG) && constant(Image.JPEG.encode)    return ({ Image.JPEG.encode(bar), "image/jpeg" }); -  + #else +  return ({ Image.PNG.encode(bar), "image/png" });   #endif   }         // Inspired by the internal-gopher-... thingie, this is the images   // from the administration interface. :-) - private mapping internal_roxen_image(string from) + private mapping internal_roxen_image( string from, RequestID id )   {    sscanf(from, "%s.gif", from);    sscanf(from, "%s.jpg", from);    sscanf(from, "%s.xcf", from);    sscanf(from, "%s.png", from);       // Automatically generated colorbar. Used by wizard code...    int hue,bright,w;    if(sscanf(from, "%*s:%d,%d,%d", hue, bright,w)==4) {    array bar = draw_saturation_bar(hue, bright, w);
Roxen.git/server/base_server/configuration.pike:990: Inside #if undefined(NO_INTERNAL_HACK) and #if defined(OLD_RXML_COMPAT)
  #ifdef OLD_RXML_COMPAT    (file[0] == '/') &&    sscanf(file, "%*s/internal-%s-%[^/]", type, loc) == 3   #else    sscanf(file, "/internal-%s-%[^/]", type, loc) == 2   #endif    ) {    switch(type) {    case "roxen":    TRACE_LEAVE("Magic internal gopher image"); -  return internal_roxen_image(loc); +  return internal_roxen_image(loc, id);       case "gopher":    TRACE_LEAVE("Magic internal roxen image");    return internal_gopher_image(loc);    }    }   #endif       // Locate internal location resources.    if(!search(file, QUERY(InternalLoc)))