changeset 2365:cfc8431aceb5 trunk

[svn] cleanups in many regards
author mf0102
date Fri, 19 Jan 2007 14:12:34 -0800
parents 85ddfad4f55e
children 0358eb5783e6
files ChangeLog src/audacious/Makefile src/audacious/dnd.c src/audacious/dnd.h src/audacious/effect.c src/audacious/effect.h src/audacious/fft.h src/audacious/util.c
diffstat 8 files changed, 91 insertions(+), 79 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Jan 18 13:45:05 2007 -0800
+++ b/ChangeLog	Fri Jan 19 14:12:34 2007 -0800
@@ -1,3 +1,10 @@
+2007-01-18 21:45:05 +0000  Michael Farber <01mf02@gmail.com>
+  revision [3738]
+  beautify and comment main.c
+  trunk/src/audacious/main.c |  250 ++++++++++++++++++++++-----------------------
+  1 file changed, 127 insertions(+), 123 deletions(-)
+
+
 2007-01-18 21:21:57 +0000  Michael Farber <01mf02@gmail.com>
   revision [3736]
   reformatting and g_return_if_fail()
--- a/src/audacious/Makefile	Thu Jan 18 13:45:05 2007 -0800
+++ b/src/audacious/Makefile	Fri Jan 19 14:12:34 2007 -0800
@@ -4,8 +4,6 @@
 
 SUBDIRS = widgets glade images ui
 
-beepincludedir = $(includedir)/audacious
-
 OBJECTIVE_BINS = audacious
 
 LDFLAGS += $(AUDLDFLAGS)
@@ -29,61 +27,51 @@
 	-I.. -I../..   \
 	-I../intl
 
-HEADERS = \
-	input.h \
-	main.h \
-	output.h \
-	playlist.h \
-	playlist_container.h \
-	plugin.h \
-	ui_fileinfopopup.h \
-	ui_preferences.h \
-	util.h \
-	vfs.h \
-	vfs_buffer.h
-
 SOURCES = \
 	build_stamp.c \
-	vfs.c \
-	vfs_buffer.c \
-	vfs_buffered_file.c \
-	vfs_common.c \
+	controlsocket.c \
+	dnd.c \
+	dock.c \
+	effect.c \
+	fft.c \
+	general.c \
 	genevent.c \
-	util.c \
+	getopt1.c \
+	getopt.c \
+	glade.c \
+	hints.c \
+	iir.c \
+	iir_cfs.c \
+	iir_fpu.c \
+	input.c \
+	logger.c \
+	main.c \
+	memorypool.c \
 	output.c \
-	fft.c \
-	input.c \
-	effect.c \
-	general.c \
-	visualization.c \
-	pluginenum.c \
+	pixbuf_effects.c \
+	playback.c \
 	playlist.c \
 	playlist_container.c \
 	playlist_manager.c \
-	controlsocket.c \
-	dock.c \
-	playback.c \
-	main.c \
-	logger.c \
-	ui_skinselector.c \
-	ui_preferences.c \
+	pluginenum.c \
+	signals.c \
+	strings.c \
+	ui_about.c \
+	ui_credits.c \
+	ui_equalizer.c \
 	ui_fileinfo.c \
 	ui_fileinfopopup.c \
-	ui_playlist.c \
+	ui_main.c \
 	ui_manager.c \
-	ui_equalizer.c \
-	ui_main.c \
-	ui_about.c ui_credits.c \
-	glade.c \
-	hints.c \
-	getopt.c getopt1.c \
-	iir.c \
-	iir_cfs.c \
-	iir_fpu.c \
-	signals.c \
-	strings.c \
-	pixbuf_effects.c \
-	memorypool.c
+	ui_playlist.c \
+	ui_preferences.c \
+	ui_skinselector.c \
+	util.c \
+	vfs_buffer.c \
+	vfs_buffered_file.c \
+	vfs.c \
+	vfs_common.c \
+	visualization.c
 
 OBJECTS = ${SOURCES:.c=.o}
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/audacious/dnd.c	Fri Jan 19 14:12:34 2007 -0800
@@ -0,0 +1,32 @@
+/*  Audacious
+ *  Copyright (C) 2005-2007  Audacious development team.
+ *
+ *  Based on BMP:
+ *  Copyright (C) 2003-2004  BMP development team.
+ *
+ *  Based on XMMS:
+ *  Copyright (C) 1998-2003  XMMS development team.
+ *
+ *  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; under version 2 of the License.
+ *
+ *  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.
+ */
+
+#include "dnd.h"
+
+void
+bmp_drag_dest_set(GtkWidget *widget)
+{
+    gtk_drag_dest_set(widget, GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP,
+					  bmp_drop_types, 5,
+                      GDK_ACTION_COPY | GDK_ACTION_MOVE);
+}
--- a/src/audacious/dnd.h	Thu Jan 18 13:45:05 2007 -0800
+++ b/src/audacious/dnd.h	Fri Jan 19 14:12:34 2007 -0800
@@ -21,6 +21,9 @@
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
+#ifndef DND_H
+#define DND_H
+
 #include <gtk/gtk.h>
 
 /* Designate dropped data types that we know and care about */
@@ -41,8 +44,6 @@
     {"application/x-font-ttf", 0, BMP_DROP_FONT},
 };
 
-#define bmp_drag_dest_set(widget) \
-    gtk_drag_dest_set(widget, \
-		      GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP, \
-		      bmp_drop_types, 5, \
-                      GDK_ACTION_COPY | GDK_ACTION_MOVE)
+void bmp_drag_dest_set(GtkWidget*);
+
+#endif
--- a/src/audacious/effect.c	Thu Jan 18 13:45:05 2007 -0800
+++ b/src/audacious/effect.c	Fri Jan 19 14:12:34 2007 -0800
@@ -30,9 +30,7 @@
 
 EffectPluginData ep_data = {
     NULL,
-    NULL,
-    FALSE,
-    FALSE
+    NULL
 };
 
 static gint
--- a/src/audacious/effect.h	Thu Jan 18 13:45:05 2007 -0800
+++ b/src/audacious/effect.h	Fri Jan 19 14:12:34 2007 -0800
@@ -31,9 +31,6 @@
 struct _EffectPluginData {
     GList *effect_list;
     GList *enabled_list;
-    /* FIXME: Needed? */
-    gboolean playing;
-    gboolean paused;
 };
 
 GList *get_effect_list(void);
--- a/src/audacious/fft.h	Thu Jan 18 13:45:05 2007 -0800
+++ b/src/audacious/fft.h	Fri Jan 19 14:12:34 2007 -0800
@@ -19,30 +19,20 @@
 
 /* fft.h: header for iterative implementation of a FFT */
 
-#ifndef _FFT_H_
-#define _FFT_H_
+#ifndef FFT_H
+#define FFT_H
+
+#include <glib.h>
 
 #define FFT_BUFFER_SIZE_LOG 9
-
 #define FFT_BUFFER_SIZE (1 << FFT_BUFFER_SIZE_LOG)
 
-/* sound sample - should be an signed 16 bit value */
-typedef short int sound_sample;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
+/* sound sample - should be a signed 16 bit value */
+typedef gint16 sound_sample;
 
-/* FFT library */
-    typedef struct _struct_fft_state fft_state;
-    fft_state *fft_init(void);
-    void fft_perform(const sound_sample * input, float *output,
-                     fft_state * state);
-    void fft_close(fft_state * state);
+typedef struct _struct_fft_state fft_state;
+fft_state *fft_init(void);
+void fft_perform(const sound_sample * input, float *output, fft_state * state);
+void fft_close(fft_state * state);
 
-
-
-#ifdef __cplusplus
-}
 #endif
-#endif                          /* _FFT_H_ */
--- a/src/audacious/util.c	Thu Jan 18 13:45:05 2007 -0800
+++ b/src/audacious/util.c	Fri Jan 19 14:12:34 2007 -0800
@@ -58,7 +58,6 @@
 #include "ui_playlist.h"
 
 #ifdef USE_CHARDET
-    #include "../libguess/libguess.h"
     #include "../librcd/librcd.h"
 #ifdef HAVE_UDET
     #include <libudet_c.h>