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.16 2003/09/24 09:49:37 anders Exp $"; +  "$Id: writefile.pike,v 1.17 2004/02/24 17:37:52 anders Exp $";   constant thread_safe = 1;      #include <module.h>   #include <config.h>      inherit "module";         // ---------------- Module registration stuff ----------------   
Roxen.git/server/modules/tags/writefile.pike:164:    if(st) {    privs = Privs("Writefile", st->uid, st->gid);    if(domkdir && args->mkdirhier)    Stdio.mkdirhier(dirname(real_filename));    }    }    _ok = 0;    object file=Stdio.File();    if(file->open(lastfile=real_filename, args->append?"wrca":"wrct")) {    _ok = 1; +  if(String.width(towrite)>8) +  towrite = string_to_utf8(towrite);    file->write(towrite);    object dims;    if (IS(args["min-height"])|| IS(args["max-height"])||    IS(args["min-width"]) || IS(args["max-width"])) {    file->seek(0);    dims = Dims.dims();    array xy = dims->get(file);    if(xy &&    (IS(args["min-height"])&& xy[1] < (int)args["min-height"]||    IS(args["max-height"])&& xy[1] > (int)args["max-height"]||