--- parser3/src/classes/string.C 2001/10/31 14:01:44 1.87 +++ parser3/src/classes/string.C 2001/12/13 13:01:44 1.91 @@ -2,9 +2,9 @@ Parser: @b string parser class. Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://design.ru/paf) + Author: Alexander Petrosyan (http://paf.design.ru) - $Id: string.C,v 1.87 2001/10/31 14:01:44 paf Exp $ + $Id: string.C,v 1.91 2001/12/13 13:01:44 paf Exp $ */ #include "classes.h" @@ -84,7 +84,7 @@ static void _double(Request& r, const St Temp_lang temp_lang(r, String::UL_PASS_APPENDED); char *buf=format(pool, r.self->as_double(), - r.process(fmt).as_string().cstr(String::UL_UNSPECIFIED)); + r.process(fmt).as_string().cstr(String::UL_UNSPECIFIED, r.connection)); String result(pool); result.APPEND_CLEAN(buf, 0, @@ -258,7 +258,7 @@ static void _match(Request& r, const Str else result=new(pool) VBool(pool, matched); } else { // replace - Value& replacement_code=params->as_junction(2, "replacement code must be code"); + Value& replacement_code=params->as_junction(2, "replacement param must be code"); String& dest=*new(pool) String(pool); Replace_action_info replace_action_info={ @@ -444,8 +444,9 @@ static void _save(Request& r, const Stri } // write + const char *buf=src.cstr(String::UL_UNSPECIFIED); file_write(pool, r.absolute(file_name), - src.cstr(), src.size(), true, do_append); + buf, strlen(buf), true, do_append); } // constructor