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"
45 " Jan-Nieuwenhuizen <jan@digicash.com>\n"
46 " Mats Bengtsson <matsb@s3.kth.se>\n"
48 " This program is free software; you can redistribute it and/or\n"
49 "modify it under the terms of the GNU General Public License version 2\n"
50 "as published by the Free Software Foundation.\n"
52 " This program is distributed in the hope that it will be useful,\n"
53 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
54 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n"
55 "General Public License for more details.\n"
57 " You should have received a copy (refer to the file COPYING) of the\n"
58 "GNU General Public License along with this program; if not, write to\n"
59 "the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,\n"
63 static File_path
* path
=0;
66 path
= new File_path(LIBDIR
);
67 path
->push(String(LIBDIR
)+"init/");
76 main (int argc
, char **argv
)
78 Getopt_long
oparser(argc
, argv
,theopts
);
79 cout
<< get_version();
81 while (long_option_init
* opt
= oparser()) {
82 switch ( opt
->shortname
){
84 set_default_output(oparser
.optarg
);
91 path
->push(oparser
.optarg
);
108 while ( (arg
= oparser
.get_next_arg()) ) {
126 return path
->find(f
);
129 /// make input file name: add default extension. "" is stdin.
131 destill_inname( String
&inName
)
135 if( inName
[ 0 ] != '-' )
138 split_path(inName
,a
,b
,c
,d
);
140 // add extension if not present.