Roxen.git / server / modules / tags / writefile.pike

version» Context lines:

Roxen.git/server/modules/tags/writefile.pike:6:   // modify it under the terms of the GNU General Public License as published   // by the Free Software Foundation; either version 2, or (at your option) any   // later version.   //      //<locale-token project="mod_writefile">_</locale-token>   #define _(X,Y) _DEF_LOCALE("mod_writefile",X,Y)   #define _ok id->misc->defines[" _ok"]      constant cvs_version = -  "$Id: writefile.pike,v 1.19 2005/02/25 17:38:31 grubba Exp $"; +  "$Id: writefile.pike,v 1.20 2008/08/15 12:33:55 mast Exp $";   constant thread_safe = 1;      #include <module.h>   #include <config.h>      inherit "module";         // ---------------- Module registration stuff ----------------   
Roxen.git/server/modules/tags/writefile.pike:40:    set_module_creator("Stephen R. van den Berg <srb@cuci.nl>");    defvar ("onlysubdirs", 1,    _(3,"Within tree only"), TYPE_FLAG,    _(4,"Setting this will force all specified chroots and filenames "    "to be relative to the directory this tag is located in. "    "It functions as an enforced dynamic chroot to constrain users in "    "e.g. a user filesystem.")    );   }    - static string lastfile; + protected string lastfile;      string status() {    return sprintf(_(5,"Last file written: %s"),lastfile||"NONE");   }      #define IS(arg) ((arg) && sizeof(arg))      // ------------------- Containers ----------------      class TagWritefile {
Roxen.git/server/modules/tags/writefile.pike:173:    if (charset == "utf8")    towrite = string_to_utf8 (towrite);    else if (charset == "iso106461")    towrite = string_to_unicode (towrite);    else if (charset == "iso88591" && String.width (towrite) == 8) {    // Nothing to do.    }       else {    string charset = args->charset || "iso-8859-1"; -  Locale.Charset._encoder enc; +  Locale.Charset.Encoder enc;    if (mixed err = catch (enc = Locale.Charset.encoder (charset)))    if (has_prefix (describe_error (err), "Unknown character encoding"))    parse_error ("Unknown charset %O.\n", charset);    else    throw (err);    enc->set_replacement_callback (    args["encode-with-entities"] ?    lambda (string chr) {    return sprintf ("&#x%x;", chr[0]);    } :