[beast: 127/144] BSE: fix string+macro concatenations which are misparsed by g++-4.7 C++11



commit 71b0e0baa15024d45293ee0d3735dc3b5672ee72
Author: Tim Janik <timj gnu org>
Date:   Sun Jan 13 18:50:58 2013 +0100

    BSE: fix string+macro concatenations which are misparsed by g++-4.7 C++11

 bse/bseinfo.cc         |    8 ++++----
 bse/bsemath.cc         |    2 +-
 bse/tests/misctests.cc |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/bse/bseinfo.cc b/bse/bseinfo.cc
index b8510b3..6509ef4 100644
--- a/bse/bseinfo.cc
+++ b/bse/bseinfo.cc
@@ -16,7 +16,7 @@ print_note (const char *note_name,
 {
   char *string;
   string = bse_note_to_string (note);
-  g_print ("%s =%-4d \tfactor=%"FLF"f [%-5s] (freq=%"FLF"f)\n",
+  g_print ("%s =%-4d \tfactor=%" FLF "f [%-5s] (freq=%" FLF "f)\n",
 	   note_name, note,
 	   bse_transpose_factor (BSE_MUSICAL_TUNING_12_TET, note - BSE_KAMMER_NOTE),
 	   string, bse_note_to_freq (BSE_MUSICAL_TUNING_12_TET, note));
@@ -26,7 +26,7 @@ static void
 print_fine_tune (const char *tune_name,
 		 int         tune)
 {
-  g_print ("%s =%-4d \tfactor=%"FLF"f\n",
+  g_print ("%s =%-4d \tfactor=%" FLF "f\n",
 	   tune_name, tune,
 	   bse_cent_tune_fast (tune));
 }
@@ -60,12 +60,12 @@ main (int   argc,
 	{
 	  double f, freq = bse_note_to_tuned_freq (BSE_MUSICAL_TUNING_12_TET, j, k);
 	  int note, fine_tune;
-	  g_print ("compose  : note=%4d fine_tune=%4d freq=%"FLF"f\n", j, k, freq);
+	  g_print ("compose  : note=%4d fine_tune=%4d freq=%" FLF "f\n", j, k, freq);
 	  f = freq;
 	  note = bse_note_from_freq (BSE_MUSICAL_TUNING_12_TET, freq);
 	  fine_tune = bse_note_fine_tune_from_note_freq (BSE_MUSICAL_TUNING_12_TET, note, freq);
 	  freq = bse_note_to_tuned_freq (BSE_MUSICAL_TUNING_12_TET, note, fine_tune);
-	  g_print ("decompose: note=%4d fine_tune=%4d freq=%"FLF"f   (diff=%g)\n", note, fine_tune, freq, freq - f);
+	  g_print ("decompose: note=%4d fine_tune=%4d freq=%" FLF "f   (diff=%g)\n", note, fine_tune, freq, freq - f);
 	}
   if (0)
     for (j = BSE_MIN_NOTE; j <= BSE_MAX_NOTE; j += 1)
diff --git a/bse/bsemath.cc b/bse/bsemath.cc
index 8097f90..5e83deb 100644
--- a/bse/bsemath.cc
+++ b/bse/bsemath.cc
@@ -12,7 +12,7 @@ pretty_print_double (char  *str,
 		     double d)
 {
   char *s= str;
-  sprintf (s, "%."PRINTF_DIGITS"f", d);
+  sprintf (s, "%." PRINTF_DIGITS "f", d);
   while (*s)
     s++;
   while (s[-1] == '0' && s[-2] != '.')
diff --git a/bse/tests/misctests.cc b/bse/tests/misctests.cc
index e0d478e..942d956 100644
--- a/bse/tests/misctests.cc
+++ b/bse/tests/misctests.cc
@@ -77,7 +77,7 @@ check_freq_vs_notes (BseMusicalTuningType musical_tuning)
           int note, fine_tune;
           int verbose = 0;
           if (verbose)
-            g_print ("compose  : note=%4d fine_tune=%4d freq=%"FLF"f\n", j, k, freq);
+            g_print ("compose  : note=%4d fine_tune=%4d freq=%" FLF "f\n", j, k, freq);
           f = freq;
           note = bse_note_from_freq (musical_tuning, freq);
           TCHECK (note != BSE_NOTE_VOID);
@@ -86,7 +86,7 @@ check_freq_vs_notes (BseMusicalTuningType musical_tuning)
           double freq_error = freq - f;
           double freq_ratio = MAX (freq, f) / MIN (freq, f);
           if (verbose)
-            g_print ("decompose: note=%4d fine_tune=%4d freq=%"FLF"f   (diff=%"FLF"f)\n", note, fine_tune, freq, freq - f);
+            g_print ("decompose: note=%4d fine_tune=%4d freq=%" FLF "f   (diff=%" FLF "f)\n", note, fine_tune, freq, freq - f);
           if (ABS (k) < 11)
             TCHECK (note == j);
           if (musical_tuning == BSE_MUSICAL_TUNING_12_TET)



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