[beast: 4/5] BSE: bseprocedure.proc: remove unused procedures



commit 49648c7fd96e23684df184faa7275c24cc41b22c
Author: Tim Janik <timj gnu org>
Date:   Tue Nov 10 23:16:33 2015 +0100

    BSE: bseprocedure.proc: remove unused procedures
    
    Signed-off-by: Tim Janik <timj gnu org>

 bse/bseapi.idl        |    7 --
 bse/bseprocedure.proc |  190 -------------------------------------------------
 2 files changed, 0 insertions(+), 197 deletions(-)
---
diff --git a/bse/bseapi.idl b/bse/bseapi.idl
index fb9be73..2a11f90 100644
--- a/bse/bseapi.idl
+++ b/bse/bseapi.idl
@@ -807,13 +807,6 @@ interface Server : Object {
   /// Retrieve the frequency of a certain note.
   // float64 note_to_freq (MusicalTuningType musical_tuning, int32 note, int32 fine_tune);
 
-  /// Retrieve numbers from a string.
-  // float64 string_extract_number (String string, String format, float64 aux_base, float64 dflt);
-  // String type_authors (String type); ///< Retrieve the authors who implemented a specific type.
-  // String type_blurb (String type);   ///< Retrieve the description of a specific type.
-  // String type_license (String type); ///< Retrieve the license of a type impementation.
-  // String type_options (String type); ///< Retrieve the options of a specific type.
-
   // *** Old Janitor ***
   // void   trigger_action   (String action); ///< Trigger an installed user action of this janitor.
   // String get_script_name  (); ///< Retrieve the script name of this janitor.
diff --git a/bse/bseprocedure.proc b/bse/bseprocedure.proc
index 691410d..95be6d3 100644
--- a/bse/bseprocedure.proc
+++ b/bse/bseprocedure.proc
@@ -175,193 +175,3 @@ BODY (BseProcedureClass *proc,
 
   return Bse::ERROR_NONE;
 }
-
-PROCEDURE (bse-type-options, "Type Options") {
-  HELP  = "Retrieve the options of a specific type.";
-  IN    = sfi_pspec_string ("type", NULL, NULL, NULL, SFI_PARAM_STANDARD);
-  OUT   = sfi_pspec_string ("string", NULL, NULL, NULL, SFI_PARAM_STANDARD);
-} BODY (BseProcedureClass *proc,
-        const GValue      *in_values,
-        GValue            *out_values)
-{
-  /* extract parameter values */
-  const char *stype = sfi_value_get_string (in_values++);
-  GType type;
-
-  /* check parameters */
-  if (!stype)
-    return Bse::ERROR_PROC_PARAM_INVAL;
-
-  type = g_type_from_name (stype);
-
-  /* set out params */
-  sfi_value_set_string (out_values++, type ? bse_type_get_options (type) : NULL);
-
-  return Bse::ERROR_NONE;
-}
-
-PROCEDURE (bse-type-blurb, "Type Blurb") {
-  HELP  = "Retrieve the description of a specific type.";
-  IN    = sfi_pspec_string ("type", NULL, NULL, NULL, SFI_PARAM_STANDARD);
-  OUT   = sfi_pspec_string ("string", NULL, NULL, NULL, SFI_PARAM_STANDARD);
-} BODY (BseProcedureClass *proc,
-        const GValue      *in_values,
-        GValue            *out_values)
-{
-  /* extract parameter values */
-  const char *stype = sfi_value_get_string (in_values++);
-  GType type;
-
-  /* check parameters */
-  if (!stype)
-    return Bse::ERROR_PROC_PARAM_INVAL;
-
-  type = g_type_from_name (stype);
-
-  /* set out params */
-  sfi_value_set_string (out_values++, type ? bse_type_get_blurb (type) : NULL);
-
-  return Bse::ERROR_NONE;
-}
-
-PROCEDURE (bse-type-authors, "Type Authors") {
-  HELP  = "Retrieve the authors who implemented a specific type.";
-  IN    = sfi_pspec_string ("type", NULL, NULL, NULL, SFI_PARAM_STANDARD);
-  OUT   = sfi_pspec_string ("string", NULL, NULL, NULL, SFI_PARAM_STANDARD);
-} BODY (BseProcedureClass *proc,
-        const GValue      *in_values,
-        GValue            *out_values)
-{
-  /* extract parameter values */
-  const char *stype = sfi_value_get_string (in_values++);
-  GType type;
-
-  /* check parameters */
-  if (!stype)
-    return Bse::ERROR_PROC_PARAM_INVAL;
-
-  type = g_type_from_name (stype);
-
-  /* set out params */
-  sfi_value_set_string (out_values++, type ? bse_type_get_authors (type) : NULL);
-
-  return Bse::ERROR_NONE;
-}
-
-PROCEDURE (bse-type-license, "Type License") {
-  HELP  = "Retrieve the license of a type impementation.";
-  IN    = sfi_pspec_string ("type", NULL, NULL, NULL, SFI_PARAM_STANDARD);
-  OUT   = sfi_pspec_string ("string", NULL, NULL, NULL, SFI_PARAM_STANDARD);
-} BODY (BseProcedureClass *proc,
-        const GValue      *in_values,
-        GValue            *out_values)
-{
-  /* extract parameter values */
-  const char *stype = sfi_value_get_string (in_values++);
-  GType type;
-
-  /* check parameters */
-  if (!stype)
-    return Bse::ERROR_PROC_PARAM_INVAL;
-
-  type = g_type_from_name (stype);
-
-  /* set out params */
-  sfi_value_set_string (out_values++, type ? bse_type_get_license (type) : NULL);
-
-  return Bse::ERROR_NONE;
-}
-
-static gdouble
-str2num (const gchar *str,
-         guint        nth)
-{
-  const char *num_any = ".0123456789", *num_first = num_any + 1;
-  while (nth--)
-    {
-      /* skip number */
-      if (*str && strchr (num_first, *str))
-        do
-          str++;
-        while (*str && strchr (num_any, *str));
-      /* and trailing non-number stuff */
-      while (*str && !strchr (num_first, *str))
-        str++;
-      if (!*str)
-        return 0;       /* no number */
-    }
-  if (strchr (num_first, *str))
-    return g_strtod (str, NULL);
-  return 0; /* no number */
-}
-
-PROCEDURE (bse-string-extract-number, "String Extract Number") {
-  HELP  = "Retrieve numbers from a string.";
-  IN    = sfi_pspec_string ("string", NULL, NULL, NULL, SFI_PARAM_STANDARD);
-  IN    = sfi_pspec_string ("format", NULL, NULL, NULL, SFI_PARAM_STANDARD);
-  IN    = sfi_pspec_real ("aux_base", NULL, NULL, 0, -SFI_MAXNUM, SFI_MAXNUM, 0, SFI_PARAM_STANDARD);
-  IN    = sfi_pspec_real ("dflt", NULL, NULL, 0, -SFI_MAXNUM, SFI_MAXNUM, 0, SFI_PARAM_STANDARD);
-  OUT   = sfi_pspec_real ("number", NULL, NULL, 0, -SFI_MAXNUM, SFI_MAXNUM, 0, SFI_PARAM_STANDARD);
-} BODY (BseProcedureClass *proc,
-        const GValue      *in_values,
-        GValue            *out_values)
-{
-  /* extract parameter values */
-  const char *string   = sfi_value_get_string (in_values++);
-  const char *format   = sfi_value_get_string (in_values++);
-  SfiReal aux_base = sfi_value_get_real (in_values++);
-  SfiReal dflt     = sfi_value_get_real (in_values++);
-  SfiReal number = dflt;
-
-  if (string)
-    {
-      if (format)
-        {
-          gchar *base, *ep = NULL;
-          switch (*format)
-            {
-              glong l;
-            case '#':
-              number = str2num (++format, 0);
-              break;
-            case 'n':
-              l = strtol (++format, &ep, 10);
-              number = str2num (string, l);
-              break;
-            case 'b':
-              l = strtol (++format, &ep, 10);
-              base = g_path_get_basename (string);
-              number = str2num  (base ? base : string, l);
-              g_free (base);
-              break;
-            case 'c':
-              format++;
-              number = aux_base;
-              if (*format == '*')
-                {
-                  gdouble factor = g_strtod (++format, &ep);
-                  number *= factor;
-                }
-              else
-                ep = (char*) format;
-              break;
-            default:
-              /* ("Invalid chunk format given: modifier `%c'", *format) */
-              number = 0;
-              break;
-            }
-          if (ep && *ep)
-            {
-              if (*ep == 'm')       /* interpret d as midi note and return freq */
-                number = bse_temp_freq (BSE_CONFIG (kammer_freq),
-                                        number - BSE_CONFIG (midi_kammer_note));
-              else /* ("Invalid chunk format given: postmodifier `%c'", *ep) */
-                number = 0;
-            }
-        }
-      else
-        number = str2num (string, 0);
-    }
-  sfi_value_set_real (out_values++, number);
-  return Bse::ERROR_NONE;
-}


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