10 extern void parse_file(String s);
14 destill_inname( String &inName);
15 long_option_init theopts[] = {
28 "--help, -h This help\n"
29 "--warranty, -w show warranty & copyright\n"
30 "--output, -o set default output\n"
31 "--debug, -d enable debug output\n"
32 "--include, -I add to file search path.\n"
41 "LilyPond, a music typesetter.\n"
42 "Copyright (C) 1996,97 by\n"
43 " Han-Wen Nienhuys <hanwen@stack.nl>\n"
44 " Jan-Nieuwenhuizen <jan@digicash.com>\n"
46 " This program is free software; you can redistribute it and/or\n"
47 "modify it under the terms of the GNU General Public License version 2\n"
48 "as published by the Free Software Foundation.\n"
50 " This program is distributed in the hope that it will be useful,\n"
51 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
52 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n"
53 "General Public License for more details.\n"
55 " You should have received a copy (refer to the file COPYING) of the\n"
56 "GNU General Public License along with this program; if not, write to\n"
57 "the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,\n"
61 static File_path * path =0;
64 path = new File_path(LIBDIR);
65 path->add(String(LIBDIR)+"init/");
74 main (int argc, char **argv)
76 Getopt_long oparser(argc, argv,theopts);
77 cout << get_version();
79 while (long_option_init * opt = oparser()) {
80 switch ( opt->shortname){
82 set_default_output(oparser.optarg);
89 path->add(oparser.optarg);
106 while ( (arg= oparser.get_next_arg()) ) {
124 return path->find(f);
127 /// make input file name: add default extension. "" is stdin.
129 destill_inname( String &inName)
133 if( inName[ 0 ] != '-' )
136 split_path(inName,a,b,c,d);
138 // add extension if not present.