[beast: 10/39] SFI: use bse_installpath() and bse_version(), get rid of topconfig.h



commit 3c55b0f0b4cfd61ffe8f70a0cbd22310064bc5f9
Author: Tim Janik <timj gnu org>
Date:   Fri Sep 11 23:57:25 2015 +0200

    SFI: use bse_installpath() and bse_version(), get rid of topconfig.h

 sfi/sfidl-options.cc |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/sfi/sfidl-options.cc b/sfi/sfidl-options.cc
index d2a9c9f..7187d48 100644
--- a/sfi/sfidl-options.cc
+++ b/sfi/sfidl-options.cc
@@ -2,7 +2,6 @@
 #include "sfidl-options.hh"
 #include "sfidl-factory.hh"
 #include "sfidl-generator.hh"
-#include "topconfig.h"  // BST_VERSION
 #include <sfi/glib-extra.hh>
 #include <stdio.h>
 #include <string.h>
@@ -169,14 +168,13 @@ bool Options::parse (int *argc_p, char **argv_p[], const Parser& parser)
   /* add std include path */
   if (!noStdInc)
     {
-      char *x = g_strdup (SFIDL_PATH_STDINC);
-      char *dir = strtok (x, G_SEARCHPATH_SEPARATOR_S);
+      const std::string stdinc_path = bse_installpath (BSE_INSTALLPATH_INCLUDES);
+      char *dir = strtok (const_cast<char*> (stdinc_path.c_str()), G_SEARCHPATH_SEPARATOR_S);
       while (dir && dir[0])
        {
          includePath.push_back (dir);
          dir = strtok (NULL, G_SEARCHPATH_SEPARATOR_S);
        }
-      g_free (x);
     }
 
   /* option validation */
@@ -201,7 +199,7 @@ bool Options::parse (int *argc_p, char **argv_p[], const Parser& parser)
 
   if (printVersion)
     {
-      printf ("%s %s\n", SFIDL_PRG_NAME, SFIDL_VERSION);
+      printf ("%s %s\n", SFIDL_PRG_NAME, bse_version().c_str());
       return true;
     }
 


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