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