Branch: Tag:

2000-12-18

2000-12-18 09:41:07 by Martin Nilsson <mani@lysator.liu.se>

Fixed some comments that where in the way when I did some debugging.

Rev: server/etc/modules/Roxen.pmod:1.61

1: - /* -  * $Id: Roxen.pmod,v 1.60 2000/12/11 04:05:46 nilsson Exp $ -  * -  * Various helper functions. -  * -  * Henrik Grubbström 1999-05-03 -  */ + // This is a roxen pike module. Copyright © 1999 - 2000, Roxen IS. + // + // $Id: Roxen.pmod,v 1.61 2000/12/18 09:41:07 nilsson Exp $ +    #include <roxen.h>   #include <config.h>   #include <version.h>
37:   // These five functions are questionable, but rather widely used.   string msectos(int t)   { -  if(t<1000) /* One sec. */ +  if(t<1000) // One sec.    {    return sprintf("0.%02d sec", t/10); -  } else if(t<6000) { /* One minute */ +  } else if(t<6000) { // One minute    return sprintf("%d.%02d sec", t/1000, (t%1000 + 5) / 10); -  } else if(t<3600000) { /* One hour */ +  } else if(t<3600000) { // One hour    return sprintf("%d:%02d m:s", t/60000, (t%60000)/1000);    }    return sprintf("%d:%02d h:m", t/3600000, (t%3600000)/60000);   }    -  -  +    string decode_mode(int m)   {    string s;
227:    return ({delay, ([ "try_again":delay ]) });   }    -  -  +    mapping http_string_answer(string text, string|void type)   //! Generates a result mapping with the given text as the request body   //! with a content type of `type' (or "text/html" if none was given).
251:   static constant days = ({ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" });       -  +    static int chd_lt;   static string chd_lf;   string cern_http_date(int t)
661:    {    string name = replace(tmp," ","_");    if (id->variables[tmp] && (sizeof(id->variables[tmp]) < 8192)) { -  /* Some shells/OS's don't like LARGE environment variables */ +  // Some shells/OS's don't like LARGE environment variables    new["QUERY_"+name] = replace(id->variables[tmp],"\000"," ");    new["VAR_"+name] = replace(id->variables[tmp],"\000","#");    }
1353:    // with Monday as the first day of week 1; 0-prefix    res += sprintf("%02d", ((lt->yday+(5+lt->wday)%7)/7));    break; -  case 'Z': /* FIXME: Time zone name or abbreviation, or no bytes if -  * no time zone information exists -  */ +  case 'Z': // FIXME: Time zone name or abbreviation, or no bytes if +  // no time zone information exists    }    res+=key[1..];    }
1766:   }       -  +    // Low-level C-roxen optimization functions.   #if constant( _Roxen )   inherit _Roxen;