/[debian]/mimetic/trunk/examples/structure.cxx
ViewVC logotype

Diff of /mimetic/trunk/examples/structure.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 510 by gregoa, Sat Feb 25 16:49:22 2006 UTC revision 511 by gregoa, Sun Jan 21 20:13:31 2007 UTC
# Line 2  Line 2 
2      copyright            : (C) 2002-2005 by Stefano Barbato      copyright            : (C) 2002-2005 by Stefano Barbato
3      email                : stefano@codesink.org      email                : stefano@codesink.org
4    
5      $Id: structure.cxx,v 1.2 2005/02/23 10:26:14 tat Exp $      $Id: structure.cxx,v 1.5 2007/01/21 14:55:33 tat Exp $
6   ***************************************************************************/   ***************************************************************************/
7    
8  /***************************************************************************  /***************************************************************************
# Line 19  Line 19 
19   * Reads in_file (or standard input) and writes its MIME structure to out_file   * Reads in_file (or standard input) and writes its MIME structure to out_file
20   * (or standard output)   * (or standard output)
21   */   */
 #ifdef HAVE_CONFIG_H  
 #include <config.h>  
 #endif  
22    
23  #include <iostream>  #include <iostream>
24  #include <fstream>  #include <fstream>
# Line 51  void printMimeStructure(MimeEntity* pMe, Line 48  void printMimeStructure(MimeEntity* pMe,
48      {      {
49          Header& h = pMe->header();          Header& h = pMe->header();
50          ContentType ct = h.contentType();          ContentType ct = h.contentType();
51            cout << g_entityCount << " ";
52          printTabs(tabcount);          printTabs(tabcount);
53          cout << ct.type() << "/" << ct.subtype() << endl;          cout << ct.type() << "/" << ct.subtype() << endl;
54          if(g_verbose)          if(g_verbose)
# Line 132  void usage() Line 130  void usage()
130      exit(1);      exit(1);
131  }  }
132    
   
133  int main(int argc, char** argv)  int main(int argc, char** argv)
134  {  {
135      std::ios_base::sync_with_stdio(false);      std::ios_base::sync_with_stdio(false);
136      int fidx = 1;      int fidx = 1;
137      int iMask = imBody | imPreamble | imEpilogue;      int iMask = imBody | imPreamble | imEpilogue;
138    
139      if(argc > 1)      if(argc > 1)
140      {          {    
141          g_verbose = 0;          g_verbose = 0;

Legend:
Removed from v.510  
changed lines
  Added in v.511

  ViewVC Help
Powered by ViewVC 1.1.26