home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / gnu / libg++-2.6-fsf.lha / libg++-2.6 / libg++ / etc / trie-gen / main.cc < prev    next >
C/C++ Source or Header  |  1993-10-25  |  1KB  |  40 lines

  1. /* Driver routine for the minimal-prefix trie generator.
  2.  
  3.    Copyright (C) 1989 Free Software Foundation, Inc.
  4.    written by Douglas C. Schmidt (schmidt@ics.uci.edu)
  5.    
  6.    This file is part of GNU TRIE-GEN.
  7.    
  8.    GNU TRIE-GEN is free software; you can redistribute it and/or modify
  9.    it under the terms of the GNU General Public License as published by
  10.    the Free Software Foundation; either version 1, or (at your option)
  11.    any later version.
  12.    
  13.    GNU TRIE-GEN is distributed in the hope that it will be useful,
  14.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.    GNU General Public License for more details.
  17.    
  18.    You should have received a copy of the GNU General Public License
  19.    along with GNU trie-gen; see the file COPYING.  If not, write to
  20.    the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
  21.  
  22. #include <_G_config.h>
  23. #include <iostream.h>
  24. #include "options.h"
  25. #include "trie.h"
  26.  
  27. int
  28. main (int argc, char **argv)
  29. {
  30.   option (argc, argv);
  31.  
  32.   Trie  trie;
  33.   char *buf;
  34.  
  35.   for (int i = 0; cin.gets (&buf); i++)
  36.     trie.insert (buf, cin.gcount ());
  37.  
  38.   trie.output ();
  39. }
  40.