Roxen.git / server / base_server / module.pike

version» Context lines:

Roxen.git/server/base_server/module.pike:1: - /* $Id: module.pike,v 1.73 2000/02/03 17:12:54 jhs Exp $ */ + /* $Id: module.pike,v 1.74 2000/02/04 01:58:10 per Exp $ */   #include <module.h>   #include <request_trace.h>      mapping (string:mixed *) variables=([]);   RoxenModule this = this_object();   mapping(string:array(int)) error_log=([]);      constant is_module = 1;   constant module_type = MODULE_ZERO;   constant module_name = "Unnamed module";
Roxen.git/server/base_server/module.pike:134: Inside #if defined(MODULE_DEBUG)
   report_error("The variable "+var+"has no name.\n");       if((search(name, "\"") != -1))    report_error("Please do not use \" in variable names");       if (!stringp(doc_str))    doc_str = "No documentation";       switch (type & VAR_TYPE_MASK)    { -  case TYPE_NODE: -  if(!arrayp(value)) -  report_error("TYPE_NODE variables should contain a list of variables " -  "to use as subnodes.\n"); -  break; +     case TYPE_CUSTOM:    if(!misc    && arrayp(misc)    && (sizeof(misc)>=3)    && functionp(misc[0])    && functionp(misc[1])    && functionp(misc[2]))    report_error("When defining a TYPE_CUSTOM variable, the MISC "    "field must be an array of functionpointers: \n"    "({describe,describe_form,set_from_form})\n");
Roxen.git/server/base_server/module.pike:177: Inside #if defined(MODULE_DEBUG)
   "decimal number variable.\n",    roxen->filename(this), value, value);    break;    case TYPE_INT:    if(!intp(value))    report_error("%s:\nPassing illegal value (%t:%O) "    "(not int) to integer number variable.\n",    roxen->filename(this), value, value);    break;    -  case TYPE_MODULE_LIST: -  value = ({}); -  break; -  +     case TYPE_MODULE:    /* No default possible */    value = 0;    break;       case TYPE_DIR_LIST:    int i;    if(!arrayp(value)) {    report_error("%s:\nIllegal type %t to TYPE_DIR_LIST, "    "must be array.\n",
Roxen.git/server/base_server/module.pike:239: Inside #if defined(MODULE_DEBUG)
   "in the misc array.\n",    roxen->filename(this), value, value);    }    }    break;       case TYPE_FLAG:    value=!!value;    break;    -  case TYPE_ERROR: -  break; + // case TYPE_COLOR: + // if (!intp(value)) + // report_error("%s:\nPassing illegal value (%t:%O) (not int) " + // "to color variable.\n", + // roxen->filename(this), value, value); + // break;    -  case TYPE_COLOR: -  if (!intp(value)) -  report_error("%s:\nPassing illegal value (%t:%O) (not int) " -  "to color variable.\n", -  roxen->filename(this), value, value); -  break; -  +     case TYPE_FILE_LIST: -  case TYPE_PORTS: +     case TYPE_FONT:    // FIXME: Add checks for these.    break;       default:    report_error("%s:\nIllegal type (%s) in defvar.\n",    roxen->filename(this), type);    break;    }   #endif