main.c 1.25 KB
Newer Older
Josh Coalson's avatar
Josh Coalson committed
1
/* metaflac - Command-line FLAC metadata editor
Josh Coalson's avatar
Josh Coalson committed
2
 * Copyright (C) 2001,2002,2003,2004,2005,2006  Josh Coalson
Josh Coalson's avatar
Josh Coalson committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

19
20
21
#if HAVE_CONFIG_H
#  include <config.h>
#endif
Josh Coalson's avatar
Josh Coalson committed
22

Josh Coalson's avatar
Josh Coalson committed
23
24
#include "operations.h"
#include "options.h"
25
#include <locale.h>
Josh Coalson's avatar
Josh Coalson committed
26
27
28

int main(int argc, char *argv[])
{
Josh Coalson's avatar
Josh Coalson committed
29
	CommandLineOptions options;
30
	int ret = 0;
Josh Coalson's avatar
Josh Coalson committed
31

32
33
34
35
36
#ifdef __EMX__
	_response(&argc, &argv);
	_wildcard(&argc, &argv);
#endif

37
	setlocale(LC_ALL, "");
Josh Coalson's avatar
Josh Coalson committed
38
39
	init_options(&options);

40
41
	if(parse_options(argc, argv, &options))
		ret = !do_operations(&options);
42
43
	else
		ret = 1;
Josh Coalson's avatar
Josh Coalson committed
44
45
46
47

	free_options(&options);

	return ret;
48
}