1 /*
2  * Schism Tracker - a cross-platform Impulse Tracker clone
3  * copyright (c) 2003-2005 Storlek <storlek@rigelseven.com>
4  * copyright (c) 2005-2008 Mrs. Brisby <mrs.brisby@nimh.org>
5  * copyright (c) 2009 Storlek & Mrs. Brisby
6  * copyright (c) 2010-2012 Storlek
7  * URL: http://schismtracker.org/
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22  */
23 
24 #include "headers.h"
25 #include "fmt.h"
26 
27 /* FIXME:
28  * - this is wrong :)
29  * - look for an author name; if it's not "Unregistered" use it */
30 
31 /* --------------------------------------------------------------------- */
32 
fmt_mt2_read_info(dmoz_file_t * file,const uint8_t * data,size_t length)33 int fmt_mt2_read_info(dmoz_file_t *file, const uint8_t *data, size_t length)
34 {
35 	if (!(length > 106 && memcmp(data, "MT20", 4) == 0))
36 		return 0;
37 
38 	file->description = "MadTracker 2 Module";
39 	/*file->extension = str_dup("mt2");*/
40 	file->title = strn_dup((const char *)data + 42, 64);
41 	file->type = TYPE_MODULE_XM;
42 	return 1;
43 }
44