#include #include "rfc822.h" using namespace std; static bool is_special_char(char ch, const string &extra_specials) { switch(ch) { case '(': case ')': case '<': case '>': case '@': case ',': case ';': case ':': case '\\': case '"': case '.': case '[': case ']': return TRUE; } if(extra_specials.find(ch)!=string::npos) return TRUE; return FALSE; } static void getatom(const string &text, unsigned &i, rfc822symbolt &symbol, const string &extra_specials) { symbol.type=rfc822symbolt::ATOM; for(; i &symbols, const string &extra_specials) { unsigned i=0; while(i symbols; // example from rfc822 #if 0 parserfc822symbols( "\":sysmail\"@ Some-Group. Some-Org, " "Muhammed.(I am the greatest) Ali @(the)Vegas.WBA", symbols); #else //parserfc822symbols("Hans Mueller ", symbols); parserfc822symbols("hans@ (Ha\"ns ?Mü\\)ller) mueller. de", symbols); //parserfc822symbols("text/plain; charset=\"us-ascii\" " // "(Plain text)", symbols, ";/="); #endif cout << "Parsing done.\n"; for(unsigned i=0; i