Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

direct/src/dcparse/dcparse.cxx

Go to the documentation of this file.
00001 // Filename: dcparse.cxx
00002 // Created by:  drose (05Oct00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #include <dcbase.h>
00020 #include <dcFile.h>
00021 
00022 int
00023 main(int argc, char *argv[]) {
00024   if (argc < 2) {
00025     cerr <<
00026       "dcparse - a simple program to read one or more .dc files and report their\n"
00027       "contents to standard output.\n\n";
00028     return (1);
00029   }
00030 
00031   DCFile file;
00032   for (int i = 1; i < argc; i++) {
00033     if (!file.read(argv[i])) {
00034       return (1);
00035     }
00036   }
00037 
00038   if (!file.write(cout, "standard output")) {
00039     return (1);
00040   }
00041 
00042   long hash = file.get_hash();
00043   cerr << "File hash is " << hash << "\n";
00044 
00045   return (0);
00046 }

Generated on Fri May 2 01:36:51 2003 for Direct by doxygen1.3