|
|
| version 1.4.2.4, 2003/01/31 12:34:38 | version 1.4.2.5.2.5, 2003/04/08 12:47:31 |
|---|---|
| Line 12 static const char* IDENT_UUE_C="$Date$"; | Line 12 static const char* IDENT_UUE_C="$Date$"; |
| #include "pa_config_includes.h" | #include "pa_config_includes.h" |
| #include "pa_uue.h" | #include "pa_uue.h" |
| #include "pa_value_includes.h" | |
| static unsigned char uue_table[64] = { | static unsigned char uue_table[64] = { |
| '`', '!', '"', '#', '$', '%', '&', '\'', | '`', '!', '"', '#', '$', '%', '&', '\'', |
| Line 24 static unsigned char uue_table[64] = { | Line 23 static unsigned char uue_table[64] = { |
| 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', | 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', |
| 'X', 'Y', 'Z', '[', '\\',']', '^', '_' | 'X', 'Y', 'Z', '[', '\\',']', '^', '_' |
| }; | }; |
| void pa_uuencode(Pool& pool, String& result, StringPtr file_name, const VFile& vfile) { | void pa_uuencode(String& result, const String& file_name, const VFile& vfile) { |
| //header | //header |
| result << "content-transfer-encoding: x-uuencode\n" << "\n"; | result << "content-transfer-encoding: x-uuencode\n" << "\n"; |
| result << "begin 644 " << *file_name << "\n"; | result << "begin 644 " << file_name << "\n"; |
| //body | //body |
| const unsigned char *in=(const unsigned char *)vfile.value_ptr(); | const unsigned char *in=(const unsigned char *)vfile.value_ptr(); |
| Line 40 void pa_uuencode(Pool& pool, String& res | Line 39 void pa_uuencode(Pool& pool, String& res |
| if((itemp+count)>(in+in_length)) | if((itemp+count)>(in+in_length)) |
| count=in_length-(itemp-in); | count=in_length-(itemp-in); |
| char *buf=new(pool) char[MAX_STRING]; | char *buf=new(PointerFreeGC) char[MAX_STRING]; |
| char *optr=buf; | char *optr=buf; |
| /* | /* |
| Line 82 void pa_uuencode(Pool& pool, String& res | Line 81 void pa_uuencode(Pool& pool, String& res |
| } | } |
| //footer | //footer |
| result.APPEND_AS_IS((const char* )uue_table, 1/* one char */, 0, 0) << "\n" | result.append_know_length((const char* )uue_table, 1/* one char */, String::L_AS_IS) << "\n" |
| "end\n"; | "end\n"; |
| } | } |