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.1 2002/04/28 17:30:31 kramm Exp $
34 #include "config_static.h"
38 #include "version.h" /* macros of version numbers */
46 //! Stringify \a x, perform macro expansion.
47 #define XSTR(x) STR(x)
49 #if defined(MMX_choose_table)
67 //! Compile time features.
70 //! Get the LAME version string.
73 \return a pointer to a string which describes the version of LAME.
75 const char* get_lame_version ( void ) /* primary to write screen reports */
77 /* Here we can also add informations about compile time configurations */
79 #if LAME_ALPHA_VERSION > 0
80 static /*@observer@*/ const char *const str =
81 XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " " V
82 "(alpha " XSTR(LAME_ALPHA_VERSION) ", " __DATE__ " " __TIME__ ")";
83 #elif LAME_BETA_VERSION > 0
84 static /*@observer@*/ const char *const str =
85 XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " " V
86 "(beta " XSTR(LAME_BETA_VERSION) ", " __DATE__ ")";
88 static /*@observer@*/ const char *const str =
89 XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " " V;
96 //! Get the short LAME version string.
98 It's mainly for inclusion into the MP3 stream.
101 \return a pointer to the short version of the LAME version string.
103 const char* get_lame_short_version ( void )
105 /* adding date and time to version string makes it harder for output
108 #if LAME_ALPHA_VERSION > 0
109 static /*@observer@*/ const char *const str =
110 XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " (alpha)";
111 #elif LAME_BETA_VERSION > 0
112 static /*@observer@*/ const char *const str =
113 XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " (beta)";
115 static /*@observer@*/ const char *const str =
116 XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION);
122 //! Get the _very_ short LAME version string.
124 It's used in the LAME VBR tag only.
127 \return a pointer to the short version of the LAME version string.
129 const char* get_lame_very_short_version ( void )
131 /* adding date and time to version string makes it harder for output
134 #if LAME_ALPHA_VERSION > 0
135 static /*@observer@*/ const char *const str =
136 "LAME" XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) "a";
137 #elif LAME_BETA_VERSION > 0
138 static /*@observer@*/ const char *const str =
139 "LAME" XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) "b";
141 static /*@observer@*/ const char *const str =
142 "LAME" XSTR(LAME_MAJOR_VERSION) "." XSTR(LAME_MINOR_VERSION) " ";
148 //! Get the version string for GPSYCHO.
151 \return a pointer to a string which describes the version of GPSYCHO.
153 const char* get_psy_version ( void )
155 #if PSY_ALPHA_VERSION > 0
156 static /*@observer@*/ const char *const str =
157 XSTR(PSY_MAJOR_VERSION) "." XSTR(PSY_MINOR_VERSION)
158 " (alpha " XSTR(PSY_ALPHA_VERSION) ", " __DATE__ " " __TIME__ ")";
159 #elif PSY_BETA_VERSION > 0
160 static /*@observer@*/ const char *const str =
161 XSTR(PSY_MAJOR_VERSION) "." XSTR(PSY_MINOR_VERSION)
162 " (beta " XSTR(PSY_BETA_VERSION) ", " __DATE__ ")";
164 static /*@observer@*/ const char *const str =
165 XSTR(PSY_MAJOR_VERSION) "." XSTR(PSY_MINOR_VERSION);
172 //! Get the URL for the LAME website.
175 \return a pointer to a string which is a URL for the LAME website.
177 const char* get_lame_url ( void )
179 static /*@observer@*/ const char *const str = LAME_URL;
185 //! Get the numerical representation of the version.
187 Writes the numerical representation of the version of LAME and
192 void get_lame_version_numerical ( lame_version_t *const lvp )
194 static /*@observer@*/ const char *const features = V;
196 /* generic version */
197 lvp->major = LAME_MAJOR_VERSION;
198 lvp->minor = LAME_MINOR_VERSION;
199 lvp->alpha = LAME_ALPHA_VERSION;
200 lvp->beta = LAME_BETA_VERSION;
203 lvp->psy_major = PSY_MAJOR_VERSION;
204 lvp->psy_minor = PSY_MINOR_VERSION;
205 lvp->psy_alpha = PSY_ALPHA_VERSION;
206 lvp->psy_beta = PSY_BETA_VERSION;
208 /* compile time features */
210 lvp->features = features;
214 /* end of version.c */