--- parser3/src/main/pa_uue.C 2002/06/24 11:59:33 1.1 +++ parser3/src/main/pa_uue.C 2003/03/27 14:51:29 1.4.2.5.2.4 @@ -1,15 +1,14 @@ /** @file Parser: uuencoding impl. - Copyright(c) 2000,2001, 2002 ArtLebedev Group(http://www.artlebedev.com) + Copyright(c) 2000,2001-2003 ArtLebedev Group(http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) - $Id: pa_uue.C,v 1.1 2002/06/24 11:59:33 paf Exp $ - - @todo setrlimit */ +static const char* IDENT_UUE_C="$Date: 2003/03/27 14:51:29 $"; + #include "pa_config_includes.h" #include "pa_uue.h" @@ -24,10 +23,10 @@ static unsigned char uue_table[64] = { 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\',']', '^', '_' }; -void pa_uuencode(String& result, const char *file_name_cstr, const VFile& vfile) { +void pa_uuencode(String& result, const String& file_name, const VFile& vfile) { //header result << "content-transfer-encoding: x-uuencode\n" << "\n"; - result << "begin 644 " << file_name_cstr << "\n"; + result << "begin 644 " << file_name << "\n"; //body const unsigned char *in=(const unsigned char *)vfile.value_ptr(); @@ -40,7 +39,7 @@ void pa_uuencode(String& result, const c if((itemp+count)>(in+in_length)) count=in_length-(itemp-in); - char *buf=(char *)result.pool().malloc(MAX_STRING); + char *buf=new(PointerFreeGC) char[MAX_STRING]; char *optr=buf; /* @@ -82,6 +81,6 @@ void pa_uuencode(String& result, const c } //footer - result.APPEND_AS_IS((const char *)uue_table, 1/* one char */, 0, 0) << "\n" + result.append_help_length((const char* )uue_table, 1/* one char */, String::L_AS_IS) << "\n" "end\n"; }