Roxen.git / server / modules / misc / randomtext.pike

version» Context lines:

Roxen.git/server/modules/misc/randomtext.pike:53:   // called.   //   // ... any yes, this module was a quick hack for amusement and for   // use in some courses to help provide dummy contents for new sites,   // so don't use this as a model for how to write Roxen modules.      inherit "module";      #include <module.h>    - string version = "$Id: randomtext.pike,v 1.8 2004/06/30 16:59:16 mast Exp $"; + string version = "$Id: randomtext.pike,v 1.9 2008/06/24 10:51:29 jonasw Exp $";      constant module_type = MODULE_TAG;   constant module_name = "Random Text";   constant module_doc =    "This module provides a simple way of generating texts on a "    "semi-random basis according to a set of rules. Apart from its "    "amusement value, this can be useful for testing and educational "    "purposes, such as generating small quiz pages or producing "    "many different kinds of input for testing text processing tags.";   
Roxen.git/server/modules/misc/randomtext.pike:401:    if (sections[sec]["assign"])    args[sections[sec]["assign"]] = text;       if (sections[sec]["single-shot"])    sections[sec]["result"] = text;       return text;   }      string rtt_read(string path) - { int lineno = 0; string line, mode = 0, tmp; + { int lineno = 0; string line, mode = 0;    mapping sections = ([ "steps": 0 ]);    string this_section = "***";    int secindex = -1;       if (Stdio.file_size(path) < 0)    return "<b>error: unable to access rule file</b>";       object f = Stdio.FILE(path, "r");    if (!f) return "<b>Error: no rule file found for '" + path + "'</b>";