Chris@40
|
1 /*
|
Chris@40
|
2 ** Copyright (C) 1999-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
|
Chris@40
|
3 **
|
Chris@40
|
4 ** This program is free software; you can redistribute it and/or modify
|
Chris@40
|
5 ** it under the terms of the GNU General Public License as published by
|
Chris@40
|
6 ** the Free Software Foundation; either version 2 of the License, or
|
Chris@40
|
7 ** (at your option) any later version.
|
Chris@40
|
8 **
|
Chris@40
|
9 ** This program is distributed in the hope that it will be useful,
|
Chris@40
|
10 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
Chris@40
|
11 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
Chris@40
|
12 ** GNU General Public License for more details.
|
Chris@40
|
13 **
|
Chris@40
|
14 ** You should have received a copy of the GNU General Public License
|
Chris@40
|
15 ** along with this program; if not, write to the Free Software
|
Chris@40
|
16 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Chris@40
|
17 */
|
Chris@40
|
18
|
Chris@40
|
19 #include <stdio.h>
|
Chris@40
|
20 #include <stdlib.h>
|
Chris@40
|
21 #include <string.h>
|
Chris@40
|
22 #include <stdint.h>
|
Chris@40
|
23
|
Chris@40
|
24 #include <sndfile.h>
|
Chris@40
|
25
|
Chris@40
|
26 #define BUFFER_SIZE (256)
|
Chris@40
|
27
|
Chris@40
|
28
|
Chris@40
|
29 int
|
Chris@40
|
30 main (void)
|
Chris@40
|
31 { static char strbuffer [BUFFER_SIZE] ;
|
Chris@40
|
32 const char * ver ;
|
Chris@40
|
33
|
Chris@40
|
34 sf_command (NULL, SFC_GET_LIB_VERSION, strbuffer, sizeof (strbuffer)) ;
|
Chris@40
|
35 ver = sf_version_string () ;
|
Chris@40
|
36
|
Chris@40
|
37 if (strcmp (ver, strbuffer) != 0)
|
Chris@40
|
38 { printf ("Version mismatch : '%s' != '%s'\n\n", ver, strbuffer) ;
|
Chris@40
|
39 exit (1) ;
|
Chris@40
|
40 } ;
|
Chris@40
|
41
|
Chris@40
|
42 printf ("%s", strbuffer) ;
|
Chris@40
|
43
|
Chris@40
|
44 return 0 ;
|
Chris@40
|
45 } /* main */
|
Chris@40
|
46
|