2 * Version numbering for LAME.
4 * Copyright (c) 1999 A.L. Faber
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
24 \brief Version numbering for LAME.
26 Contains functions which describe the version of LAME.
29 \version \$Id: version.c,v 1.2 2006/02/09 16:56:23 kramm Exp $
35 #include "config_static.h"
39 #include "version.h" /* macros of version numbers */
47 //! Stringify \a x, perform macro expansion.
48 #define XSTR(x) STR(x)
50 #if defined(MMX_choose_table)
68 //! Compile time features.
71 //! Get the LAME version string.
74 \return a pointer to a string which describes the version of LAME.
76 const char* get_lame_version ( void ) /* primary to write screen reports */
78 /* Here we can also add informations about compile time configurations */
80 #if LAME_ALPHA_VERSION > 0
81 static /*@observer@*/ const char *const str =
82 XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " " V
83 "(alpha " XSTR(LAME_ALPHA_VERSION) ", " __DATE__ " " __TIME__ ")";
84 #elif LAME_BETA_VERSION > 0
85 static /*@observer@*/ const char *const str =
86 XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " " V
87 "(beta " XSTR(LAME_BETA_VERSION) ", " __DATE__ ")";
89 static /*@observer@*/ const char *const str =
90 XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " " V;
97 //! Get the short LAME version string.
99 It's mainly for inclusion into the MP3 stream.
102 \return a pointer to the short version of the LAME version string.
104 const char* get_lame_short_version ( void )
106 /* adding date and time to version string makes it harder for output
109 #if LAME_ALPHA_VERSION > 0
110 static /*@observer@*/ const char *const str =
111 XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " (alpha)";
112 #elif LAME_BETA_VERSION > 0
113 static /*@observer@*/ const char *const str =
114 XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " (beta)";
116 static /*@observer@*/ const char *const str =
117 XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION);
123 //! Get the _very_ short LAME version string.
125 It's used in the LAME VBR tag only.
128 \return a pointer to the short version of the LAME version string.
130 const char* get_lame_very_short_version ( void )
132 /* adding date and time to version string makes it harder for output
135 #if LAME_ALPHA_VERSION > 0
136 static /*@observer@*/ const char *const str =
137 "LAME" XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) "a";
138 #elif LAME_BETA_VERSION > 0
139 static /*@observer@*/ const char *const str =
140 "LAME" XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) "b";
142 static /*@observer@*/ const char *const str =
143 "LAME" XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " ";
149 //! Get the version string for GPSYCHO.
152 \return a pointer to a string which describes the version of GPSYCHO.
154 const char* get_psy_version ( void )
156 #if PSY_ALPHA_VERSION > 0
157 static /*@observer@*/ const char *const str =
158 XSTR(PSY_MAJOR_VERSION) "." XSTR(PSY_MINOR_VERSION)
159 " (alpha " XSTR(PSY_ALPHA_VERSION) ", " __DATE__ " " __TIME__ ")";
160 #elif PSY_BETA_VERSION > 0
161 static /*@observer@*/ const char *const str =
162 XSTR(PSY_MAJOR_VERSION) "." XSTR(PSY_MINOR_VERSION)
163 " (beta " XSTR(PSY_BETA_VERSION) ", " __DATE__ ")";
165 static /*@observer@*/ const char *const str =
166 XSTR(PSY_MAJOR_VERSION) "." XSTR(PSY_MINOR_VERSION);
173 //! Get the URL for the LAME website.
176 \return a pointer to a string which is a URL for the LAME website.
178 const char* get_lame_url ( void )
180 static /*@observer@*/ const char *const str = LAME_URL;
186 //! Get the numerical representation of the version.
188 Writes the numerical representation of the version of LAME and
193 void get_lame_version_numerical ( lame_version_t *const lvp )
195 static /*@observer@*/ const char *const features = V;
197 /* generic version */
198 lvp->major = LAME_MAJOR_VERSION;
199 lvp->minor = LAME_MINOR_VERSION;
200 lvp->alpha = LAME_ALPHA_VERSION;
201 lvp->beta = LAME_BETA_VERSION;
204 lvp->psy_major = PSY_MAJOR_VERSION;
205 lvp->psy_minor = PSY_MINOR_VERSION;
206 lvp->psy_alpha = PSY_ALPHA_VERSION;
207 lvp->psy_beta = PSY_BETA_VERSION;
209 /* compile time features */
211 lvp->features = features;
215 /* end of version.c */