[vlc-devel] commit: Move non-deprecated version functions out of the deprecated file ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat May 31 21:08:58 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat May 31 21:36:40 2008 +0300| [a20c35e9023c2ac3e413451224e9cb8370da9d9b]

Move non-deprecated version functions out of the deprecated file

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a20c35e9023c2ac3e413451224e9cb8370da9d9b
---

 src/Makefile.am |    1 +
 src/libvlc.c    |   31 ---------------------------
 src/version.c   |   62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 63 insertions(+), 31 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index fc95a0d..51e3230 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -267,6 +267,7 @@ SOURCES_libvlc_common = \
 	libvlc-common.c \
 	libvlc.h \
 	libvlc-module.c \
+	version.c \
 	interface/interface.h \
 	interface/interface.c \
 	interface/intf_eject.c \
diff --git a/src/libvlc.c b/src/libvlc.c
index 5cbf80e..2289add 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -49,37 +49,6 @@
 #include <vlc_aout.h>
 #include <vlc_vout.h>
 
-/*****************************************************************************
- * VLC_Version: return the libvlc version.
- *****************************************************************************
- * This function returns full version string (numeric version and codename).
- *****************************************************************************/
-char const * VLC_Version( void )
-{
-    return VERSION_MESSAGE;
-}
-
-/*****************************************************************************
- * VLC_CompileBy, VLC_CompileHost, VLC_CompileDomain,
- * VLC_Compiler, VLC_Changeset
- *****************************************************************************/
-#define DECLARE_VLC_VERSION( func, var )                                    \
-char const * VLC_##func ( void )                                            \
-{                                                                           \
-    return VLC_##var ;                                                      \
-}
-
-DECLARE_VLC_VERSION( CompileBy, COMPILE_BY );
-DECLARE_VLC_VERSION( CompileHost, COMPILE_HOST );
-DECLARE_VLC_VERSION( CompileDomain, COMPILE_DOMAIN );
-DECLARE_VLC_VERSION( Compiler, COMPILER );
-
-extern const char psz_vlc_changeset[];
-const char* VLC_Changeset( void )
-{
-    return psz_vlc_changeset;
-}
-
 #define LIBVLC_FUNC \
     libvlc_int_t * p_libvlc = vlc_current_object( i_object ); \
     if( !p_libvlc ) return VLC_ENOOBJ;
diff --git a/src/version.c b/src/version.c
new file mode 100644
index 0000000..bc0cbe9
--- /dev/null
+++ b/src/version.c
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * version.c: LibVLC version infos
+ *****************************************************************************
+ * Copyright (C) 1998-2008 the VideoLAN team
+ *
+ * Authors: Vincent Seguin <seguin at via.ecp.fr>
+ *          Samuel Hocevar <sam at zoy.org>
+ *          Gildas Bazin <gbazin at videolan.org>
+ *          Derk-Jan Hartman <hartman at videolan dot org>
+ *          Rémi Denis-Courmont <rem # videolan : org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc/vlc.h>
+
+/*****************************************************************************
+ * VLC_Version: return the libvlc version.
+ *****************************************************************************
+ * This function returns full version string (numeric version and codename).
+ *****************************************************************************/
+char const * VLC_Version( void )
+{
+    return VERSION_MESSAGE;
+}
+
+/*****************************************************************************
+ * VLC_CompileBy, VLC_CompileHost, VLC_CompileDomain,
+ * VLC_Compiler, VLC_Changeset
+ *****************************************************************************/
+#define DECLARE_VLC_VERSION( func, var )                                    \
+char const * VLC_##func ( void )                                            \
+{                                                                           \
+    return VLC_##var ;                                                      \
+}
+
+DECLARE_VLC_VERSION( CompileBy, COMPILE_BY );
+DECLARE_VLC_VERSION( CompileHost, COMPILE_HOST );
+DECLARE_VLC_VERSION( CompileDomain, COMPILE_DOMAIN );
+DECLARE_VLC_VERSION( Compiler, COMPILER );
+
+extern const char psz_vlc_changeset[];
+const char* VLC_Changeset( void )
+{
+    return psz_vlc_changeset;
+}




More information about the vlc-devel mailing list