[beast: 3/8] BSE: remove unused builtin synthesizer listing



commit 2c28c225c3e4abf25aef9bd26de91c598bddf3c5
Author: Tim Janik <timj gnu org>
Date:   Fri Jan 30 05:39:53 2015 +0100

    BSE: remove unused builtin synthesizer listing

 bse/bsequery.cc          |   14 +-------------
 bse/bsestandardsynths.cc |   25 +------------------------
 bse/bsestandardsynths.hh |    1 -
 bse/zintern/Makefile.am  |   13 +++----------
 4 files changed, 5 insertions(+), 48 deletions(-)
---
diff --git a/bse/bsequery.cc b/bse/bsequery.cc
index 5b6fa7d..2326ede 100644
--- a/bse/bsequery.cc
+++ b/bse/bsequery.cc
@@ -181,7 +181,6 @@ help (gchar *arg)
   fprintf (stderr, "       tree       print BSE type tree\n");
   fprintf (stderr, "       cats       print categories\n");
   fprintf (stderr, "       procdoc    print procedure documentation\n");
-  fprintf (stderr, "       synthlist  list standard synths\n");
   fprintf (stderr, "       synth <x>  dump standard synth <x> definition\n");
 
   return arg != NULL;
@@ -195,7 +194,6 @@ main (gint   argc,
   gboolean gen_tree = 0;
   gboolean gen_cats = 0;
   gboolean gen_procdoc = 0;
-  gboolean list_synths = 0;
   gchar *show_synth = NULL;
   gchar *root_name = NULL;
   const char *iindent = "";
@@ -262,10 +260,6 @@ main (gint   argc,
        {
          gen_froots = 1;
        }
-      else if (strcmp ("synthlist", argv[i]) == 0)
-       {
-         list_synths = 1;
-       }
       else if (strcmp ("synth", argv[i]) == 0 && i + 1 < argc)
        {
          show_synth = argv[++i];
@@ -305,7 +299,7 @@ main (gint   argc,
     root = g_type_from_name (root_name);
   else
     root = BSE_TYPE_OBJECT;
-  if (!gen_froots && !gen_tree && !gen_cats && !gen_procdoc && !list_synths && !show_synth)
+  if (!gen_froots && !gen_tree && !gen_cats && !gen_procdoc && !show_synth)
     return help (argv[i-1]);
   if (!indent_inc)
     {
@@ -332,12 +326,6 @@ main (gint   argc,
     show_cats ();
   if (gen_procdoc)
     show_procdoc ();
-  if (list_synths)
-    {
-      GSList *node = bse_standard_synth_get_list ();
-      for (; node; node = node->next)
-       g_print ("  %s\n", (gchar*) node->data);
-    }
   if (show_synth)
     {
       gchar *text = bse_standard_synth_inflate (show_synth, NULL);
diff --git a/bse/bsestandardsynths.cc b/bse/bsestandardsynths.cc
index 8b2f106..7dc0a0e 100644
--- a/bse/bsestandardsynths.cc
+++ b/bse/bsestandardsynths.cc
@@ -4,20 +4,7 @@
 #include "bsesnet.hh"
 #include "bsestandardosc.hh"
 #include <string.h>
-
-/* --- typedef & structures --- */
-typedef struct {
-  const gchar  *name;
-  guint         text_size;
-  const guint8 *cdata;
-  guint         clength;
-} BseZFile;
-
-/* --- generated ZFiles --- */
-#include "bse/zintern/bse-resources.cc"
-
-/* --- variables --- */
-static GSList  *zfile_names = NULL;
+#include "bse/zintern/bse-resources.cc" // compile standard synth resources
 
 /* --- functions --- */
 gchar*
@@ -38,13 +25,3 @@ bse_standard_synth_inflate (const gchar *synth_name,
   g_warning ("unknown standard synth: %s", synth_name);
   return NULL;
 }
-
-GSList*
-bse_standard_synth_get_list (void)
-{
-  guint i;
-  if (!zfile_names)
-    for (i = 0; i < G_N_ELEMENTS (bse_zfiles); i++)
-      zfile_names = g_slist_prepend (zfile_names, (gchar*) bse_zfiles[i].name);
-  return zfile_names;
-}
diff --git a/bse/bsestandardsynths.hh b/bse/bsestandardsynths.hh
index ee599aa..a7016be 100644
--- a/bse/bsestandardsynths.hh
+++ b/bse/bsestandardsynths.hh
@@ -7,7 +7,6 @@
 G_BEGIN_DECLS
 
 
-GSList*        bse_standard_synth_get_list     (void);
 gchar* bse_standard_synth_inflate      (const gchar    *synth_name,
                                         guint          *text_len);
 
diff --git a/bse/zintern/Makefile.am b/bse/zintern/Makefile.am
index 8aaa878..efb1f10 100644
--- a/bse/zintern/Makefile.am
+++ b/bse/zintern/Makefile.am
@@ -5,7 +5,7 @@ AM_CPPFLAGS += -I$(top_srcdir) -I$(top_builddir)
 AM_CXXFLAGS += $(BSE_CFLAGS) -DG_DISABLE_DEPRECATED -DG_DISABLE_CONST_RETURNS
 RAPIDRES     = rapidres
 
-ZFILE_DEFS = $(strip \
+RESOURCES = $(strip \
        $(srcdir)/gus-patch.bse         \
        $(srcdir)/adsr-wave-1.bse       \
        $(srcdir)/adsr-wave-2.bse       \
@@ -16,17 +16,10 @@ ZFILE_DEFS = $(strip \
 gen_sources = xgen-bzc xgen-bzh
 CLEANFILES += $(gen_sources) bse-resources.cc
 noinst_DATA = bse-resources.cc
-EXTRA_DIST += $(filter %.bse, $(ZFILE_DEFS))
+EXTRA_DIST += $(filter %.bse, $(RESOURCES))
 
 bse-resources.cc: $(srcdir)/*.bse
-       $(RAPIDRES) $(ZFILE_DEFS) > xgen-bzc                                            \
-       && echo "static const BseZFile bse_zfiles[] = {" >> xgen-bzc                    \
-       && for i in $(filter-out %.bse, $(ZFILE_DEFS)) ; do                             \
-               uname=$$(echo $$i | tr a-z- A-Z_);                                      \
-               echo "  { \"$$i\", $$uname""_SIZE, "    >>xgen-bzc;                     \
-               echo "    $$uname""_DATA, G_N_ELEMENTS ($$uname""_DATA) }," >>xgen-bzc; \
-       done                                                                            \
-       && echo "};" >> xgen-bzc                                                        \
+       $(RAPIDRES) $(RESOURCES) > xgen-bzc                                             \
        && cp xgen-bzc $@                                                               \
        && rm -f xgen-bzc
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]