src/: Use PACKAGE_NAME and PACKAGE_VERSION macros

Instead of the older `PACKAGE` and `VERSION` macros.
This commit is contained in:
Erik de Castro Lopo 2016-02-08 18:20:17 +11:00
parent e2a737247a
commit c1355f0c19
4 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
/*
** Copyright (C) 2006-2013 Erik de Castro Lopo <erikd@mega-nerd.com>
** Copyright (C) 2006-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
** Copyright (C) 2006 Paul Davis <paul@linuxaudiosystems.com>
**
** This program is free software; you can redistribute it and/or modify
@ -181,7 +181,7 @@ gen_coding_history (char * added_history, int added_history_max, const SF_INFO *
count = snprintf (added_history, added_history_max,
"A=PCM,F=%u,W=%d,M=%s,T=%s-%s\r\n",
psfinfo->samplerate, width, chnstr, PACKAGE, VERSION) ;
psfinfo->samplerate, width, chnstr, PACKAGE_NAME, PACKAGE_VERSION) ;
if (count >= added_history_max)
return 0 ;

View File

@ -1,5 +1,5 @@
/*
** Copyright (C) 2002-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** Copyright (C) 2002-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by
@ -154,7 +154,7 @@ mat5_close (SF_PRIVATE *psf)
static int
mat5_write_header (SF_PRIVATE *psf, int calc_length)
{ static const char *filename = "MATLAB 5.0 MAT-file, written by " PACKAGE "-" VERSION ", " ;
{ static const char *filename = "MATLAB 5.0 MAT-file, written by " PACKAGE_NAME "-" PACKAGE_VERSION ", " ;
static const char *sr_name = "samplerate\0\0\0\0\0\0\0\0\0\0\0" ;
static const char *wd_name = "wavedata\0" ;
char buffer [256] ;

View File

@ -89,15 +89,15 @@ psf_store_string (SF_PRIVATE *psf, int str_type, const char *str)
{ case SF_STR_SOFTWARE :
/* In write mode, want to append libsndfile-version to string. */
if (psf->file.mode == SFM_WRITE || psf->file.mode == SFM_RDWR)
{ if (strstr (str, PACKAGE) == NULL)
{ if (strstr (str, PACKAGE_NAME) == NULL)
{ /*
** If the supplied string does not already contain a
** libsndfile-X.Y.Z component, then add it.
*/
if (strlen (str) == 0)
snprintf (new_str, sizeof (new_str), "%s-%s", PACKAGE, VERSION) ;
snprintf (new_str, sizeof (new_str), "%s-%s", PACKAGE_NAME, PACKAGE_VERSION) ;
else
snprintf (new_str, sizeof (new_str), "%s (%s-%s)", str, PACKAGE, VERSION) ;
snprintf (new_str, sizeof (new_str), "%s (%s-%s)", str, PACKAGE_NAME, PACKAGE_VERSION) ;
}
else
snprintf (new_str, sizeof (new_str), "%s", str) ;

View File

@ -1,5 +1,5 @@
/*
** Copyright (C) 2003-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
** Copyright (C) 2003-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by
@ -92,7 +92,7 @@ xi_open (SF_PRIVATE *psf)
/* Set up default instrument and software name. */
memcpy (pxi->filename, "Default Name ", sizeof (pxi->filename)) ;
memcpy (pxi->software, PACKAGE "-" VERSION " ", sizeof (pxi->software)) ;
memcpy (pxi->software, PACKAGE_NAME "-" PACKAGE_VERSION " ", sizeof (pxi->software)) ;
memset (pxi->sample_name, 0, sizeof (pxi->sample_name)) ;
snprintf (pxi->sample_name, sizeof (pxi->sample_name), "%s", "Sample #1") ;