Branch: Tag:

1999-12-18

1999-12-18 14:30:26 by Martin Nilsson <mani@lysator.liu.se>

Preparing for new tagdocumentation

Rev: server/modules/throttling/throttletags.pike:1.2

3:   inherit "roxenlib";      constant thread_safe=1; - constant cvs_version="$Id: throttletags.pike,v 1.1 1999/09/29 20:30:44 kinkie Exp $"; + constant cvs_version="$Id: throttletags.pike,v 1.2 1999/12/18 14:30:26 nilsson Exp $";      #ifdef THROTTLING_DEBUG   #undef THROTTLING_DEBUG
14:      #define THROW(X) throw( X+"\n" )    - static private int loaded=0; -  - //wouldn't this better be moved to the module.pike file? - static private string doc() - { -  return !loaded?"":replace(Stdio.read_bytes("modules/tags/doc/throttle")||"", -  ({ "{", "}" }), ({ "&lt;", "&gt;" })); - } -  +    array register_module() {    return ({    MODULE_PARSER,    "Throttling control tags",    "This module provides a <tt>&lt;THROTTLE&gt;</tt> tag " -  "that you can use to determine a request's allocated bandwidth"+doc(), +  "that you can use to determine a request's allocated bandwidth",    0,1});   }    - mapping query_tag_callers() { -  return (["throttle":tag_throttle]); - } + TAGDOCUMENTATION; + #ifdef manual + constant tagdoc=(["throttle":"<desc tag></desc>"]); + #endif    - void start() { -  loaded=1; - } -  - mixed tag_throttle(string tag, mapping args, object id) { + string|int tag_throttle(string tag, mapping args, RequestID id) {    mapping t=id->throttle;    string tmp; -  if (args->help) -  return doc(); +     if (t->fixed) {    THROTTLING_DEBUG("Fixed. returning");    return 0;