[beast] BSE: compile bsemath as C++ source



commit 1b9f27e411b3509c211ceb29026226055d8c1cc1
Author: Stefan Westerfeld <stefan space twc de>
Date:   Fri Aug 5 15:32:43 2011 +0200

    BSE: compile bsemath as C++ source

 bse/Makefile.am               |    2 +-
 bse/{bsemath.c => bsemath.cc} |   20 ++++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/bse/Makefile.am b/bse/Makefile.am
index 3dd7d4b..5d9fefc 100644
--- a/bse/Makefile.am
+++ b/bse/Makefile.am
@@ -72,7 +72,7 @@ bse_sources = $(strip \
 	bseconstant.cc		bseconstvalues.cc	bsecontainer.cc			bsecontextmerger.cc \
 	bsedatapocket.cc	bseeditablesample.cc	bseenums.cc			bsegconfig.cc \
 	bseglobals.cc		bseglue.cc		bseitem.cc			bsejanitor.cc \
-	bsemain.cc		bsemath.c		bsemathsignal.c			bseladspa.cc \
+	bsemain.cc		bsemath.cc		bsemathsignal.c			bseladspa.cc \
 	bsemidicontroller.c	bsemididevice.c 	bsedevice.cc 			\
 	bsemididevice-null.c	bsemididevice-oss.c	bsemidievent.c			bsemidinotifier.c \
 	bsemidireceiver.cc	bsemidisynth.c		bseobject.c			bsepart.c \
diff --git a/bse/bsemath.c b/bse/bsemath.cc
similarity index 96%
rename from bse/bsemath.c
rename to bse/bsemath.cc
index 5e471aa..3142dad 100644
--- a/bse/bsemath.c
+++ b/bse/bsemath.cc
@@ -198,10 +198,10 @@ bse_float_gnuplot (const char    *file_name,
                    const float   *ypoints)
 {
   FILE *fout = fopen (file_name, "w");
-  guint i;
+  uint i;
   for (i = 0; i < n_ypoints; i++)
     {
-      gchar xstr[FLOAT_STRING_SIZE], ystr[FLOAT_STRING_SIZE];
+      char xstr[FLOAT_STRING_SIZE], ystr[FLOAT_STRING_SIZE];
       pretty_print_double (xstr, xstart + i * xstep);
       pretty_print_double (ystr, ypoints[i]);
       fprintf (fout, "%s %s\n", xstr, ystr);
@@ -268,13 +268,13 @@ bse_cpoly_from_roots (uint         degree,
 }
 
 gboolean
-bse_poly2_droots (gdouble roots[2],
-		  gdouble a,
-		  gdouble b,
-		  gdouble c)
+bse_poly2_droots (double roots[2],
+		  double a,
+		  double b,
+		  double c)
 {
-  gdouble square = b * b - 4.0 * a * c;
-  gdouble tmp;
+  double square = b * b - 4.0 * a * c;
+  double tmp;
   
   if (square < 0)
     return FALSE;
@@ -291,7 +291,7 @@ bse_poly2_droots (gdouble roots[2],
 }
 
 double
-bse_bit_depth_epsilon (guint n_bits)
+bse_bit_depth_epsilon (uint n_bits)
 {
   /* epsilon for various bit depths, based on significance of one bit,
    * minus fudge. created with:
@@ -335,7 +335,7 @@ bse_bit_depth_epsilon (guint n_bits)
   return bit_epsilons[CLAMP (n_bits, 1, 32) - 1];
 }
 
-gint
+int
 bse_rand_bool (void)
 {
   return rand () & 1;	// FIXME



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