[beast: 5/11] BSE: replace all birnet_* symbols



commit a38155a42559dc6042d5146c79fd011137282f9f
Author: Tim Janik <timj gnu org>
Date:   Wed Oct 19 11:30:11 2016 +0200

    BSE: replace all birnet_* symbols
    
    Signed-off-by: Tim Janik <timj gnu org>

 bse/bsemididevice-oss.cc        |    2 +-
 bse/bsepcmdevice-oss.cc         |    2 +-
 bse/gslcommon.cc                |    5 ++---
 bse/gslcommon.hh                |    3 +--
 bse/ldscript.map                |    1 -
 sfi/sfifilecrawler.cc           |    6 +++---
 sfi/sfiwrapper.cc               |   14 --------------
 sfi/sfiwrapper.hh               |    5 -----
 tests/latency/bselatencytest.cc |    2 +-
 tools/bsewavetool.cc            |    4 ++--
 10 files changed, 11 insertions(+), 33 deletions(-)
---
diff --git a/bse/bsemididevice-oss.cc b/bse/bsemididevice-oss.cc
index 9261918..8485069 100644
--- a/bse/bsemididevice-oss.cc
+++ b/bse/bsemididevice-oss.cc
@@ -74,7 +74,7 @@ bse_midi_device_oss_list_devices (BseDevice *device)
   for (i = 0; i < G_N_ELEMENTS (postfixes); i++)
     {
       char *dname = g_strconcat (BSE_MIDI_DEVICE_OSS (device)->device_name, postfixes[i], NULL);
-      if (!birnet_file_equals (last, dname))
+      if (!Rapicorn::Path::equals (last, dname))
         {
           if (check_device_usage (dname, "crw") == Bse::Error::NONE)
             ring = sfi_ring_append (ring,
diff --git a/bse/bsepcmdevice-oss.cc b/bse/bsepcmdevice-oss.cc
index b70b07e..681fd56 100644
--- a/bse/bsepcmdevice-oss.cc
+++ b/bse/bsepcmdevice-oss.cc
@@ -103,7 +103,7 @@ bse_pcm_device_oss_list_devices (BseDevice    *device)
   for (i = 0; i < G_N_ELEMENTS (postfixes); i++)
     {
       gchar *dname = g_strconcat (BSE_PCM_DEVICE_OSS (device)->device_name, postfixes[i], NULL);
-      if (!birnet_file_equals (last, dname))
+      if (!Rapicorn::Path::equals (last, dname))
         {
           if (check_device_usage (dname, "crw") == Bse::Error::NONE)
             ring = sfi_ring_append (ring,
diff --git a/bse/gslcommon.cc b/bse/gslcommon.cc
index cff159a..db904a5 100644
--- a/bse/gslcommon.cc
+++ b/bse/gslcommon.cc
@@ -195,10 +195,9 @@ gsl_byte_order_from_string (const gchar *string)
 }
 
 Bse::Error
-gsl_file_check (const gchar *file_name,
-               const gchar *mode)
+gsl_file_check (const String &file_name, const String &mode)
 {
-  if (birnet_file_check (file_name, mode))
+  if (Rapicorn::Path::check (file_name, mode))
     return Bse::Error::NONE;
   return gsl_error_from_errno (errno, Bse::Error::FILE_OPEN_FAILED);
 }
diff --git a/bse/gslcommon.hh b/bse/gslcommon.hh
index 913511b..5f7d565 100644
--- a/bse/gslcommon.hh
+++ b/bse/gslcommon.hh
@@ -15,8 +15,7 @@ Bse::Error gsl_error_from_errno       (gint            sys_errno,
 Bse::Error gsl_error_select           (guint           n_errors,
                                          Bse::Error    first_error,
                                          ...);
-Bse::Error gsl_file_check              (const gchar    *file_name,
-                                        const gchar    *mode);
+Bse::Error gsl_file_check              (const String &file_name, const String &mode);
 
 
 /* --- progress notification --- */
diff --git a/bse/ldscript.map b/bse/ldscript.map
index eab5432..3f0f160 100644
--- a/bse/ldscript.map
+++ b/bse/ldscript.map
@@ -5,7 +5,6 @@
       Sfi::*;    vtable*Sfi::*;    typeinfo*Sfi::*;    virtual*Sfi::*; VTT*Sfi::*;
       Rapicorn*::Aida::enum_info*;
     };
-    birnet_*;
     bse_*;
     gsl_*;
     sfi_*;
diff --git a/sfi/sfifilecrawler.cc b/sfi/sfifilecrawler.cc
index 11fcc27..bffa072 100644
--- a/sfi/sfifilecrawler.cc
+++ b/sfi/sfifilecrawler.cc
@@ -556,7 +556,7 @@ sfi_path_get_filename (const gchar  *filename,
  *
  * This is the AND version of g_file_test(). That is, all file tests
  * specified in the @a test bits have to succed for this function to
- * return TRUE. This function is implemented via birnet_file_check(),
+ * return TRUE. This function is implemented via Rapicorn::Path::check(),
  * which allowes for more detailed mode tests and is recommended
  * over use of this function.
  * Here is the list of possible GFileTest flags:
@@ -570,7 +570,7 @@ gboolean
 g_file_test_all (const gchar  *file,
                  GFileTest     test)
 {
-  gchar buffer[65] = "";
+  char buffer[65] = "";
   if (test & G_FILE_TEST_EXISTS)
     strcat (buffer, "e");
   if (test & G_FILE_TEST_IS_EXECUTABLE)
@@ -583,7 +583,7 @@ g_file_test_all (const gchar  *file,
     strcat (buffer, "d");
   if (test & G_FILE_TEST_IS_EXECUTABLE)
     strcat (buffer, "x");
-  return birnet_file_check (file, buffer);
+  return Rapicorn::Path::check (file, buffer);
 }
 
 #include <pwd.h>
diff --git a/sfi/sfiwrapper.cc b/sfi/sfiwrapper.cc
index 3ed537d..0b529fe 100644
--- a/sfi/sfiwrapper.cc
+++ b/sfi/sfiwrapper.cc
@@ -62,20 +62,6 @@ sfi_init (int *argcp, char **argv, const Bse::StringVector &args)
   initialized = true;
 }
 
-/* --- file testing --- */
-bool
-birnet_file_check (const char *file,
-                   const char *mode)
-{
-  return Rapicorn::Path::check (file ? file : "", mode ? mode : "");
-}
-bool
-birnet_file_equals (const char *file1,
-                    const char *file2)
-{
-  return Rapicorn::Path::equals (file1 ? file1 : "", file2 ? file2 : "");
-}
-
 /* --- url handling --- */
 void
 sfi_url_show (const char *url)
diff --git a/sfi/sfiwrapper.hh b/sfi/sfiwrapper.hh
index fd62a9d..b149b56 100644
--- a/sfi/sfiwrapper.hh
+++ b/sfi/sfiwrapper.hh
@@ -50,11 +50,6 @@ typedef struct
 } SfiInitValue;
 void sfi_init (int *argcp, char **argv, const Bse::StringVector &args = Bse::StringVector());
 
-/* --- file tests --- */
-bool   birnet_file_check (const char *file,
-                          const char *mode);
-bool   birnet_file_equals (const char *file1,
-                           const char *file2);
 /* --- messaging --- */
 #define         sfi_error(...)                   RAPICORN_CRITICAL (__VA_ARGS__)
 #define         sfi_warning(...)                 RAPICORN_CRITICAL (__VA_ARGS__)
diff --git a/tests/latency/bselatencytest.cc b/tests/latency/bselatencytest.cc
index 80e8faa..474e675 100644
--- a/tests/latency/bselatencytest.cc
+++ b/tests/latency/bselatencytest.cc
@@ -72,7 +72,7 @@ class LatencyTest : public LatencyTestBase {
     {
       close_devices();
 
-      if (birnet_file_check (midi_output_name.c_str(), "pw")) /* writable pipe */
+      if (Rapicorn::Path::check (midi_output_name, "pw")) /* writable pipe */
         midi_output_file = fopen (midi_output_name.c_str(), "w");
       if (!midi_output_file)
         sfi_error ("failed to open midi output \"%s\": %s\n", midi_output_name.c_str(), g_strerror (errno));
diff --git a/tools/bsewavetool.cc b/tools/bsewavetool.cc
index d1bd76d..a8f6ea3 100644
--- a/tools/bsewavetool.cc
+++ b/tools/bsewavetool.cc
@@ -695,9 +695,9 @@ public:
   bool
   exec (Wave *wave)
   {
-    if (!force_creation && birnet_file_check (output_file.c_str(), "e"))
+    if (!force_creation && Rapicorn::Path::check (output_file, "e"))
       {
-        sfi_error ("not creating \"%s\": %s\n", output_file.c_str(), g_strerror (EEXIST));
+        sfi_error ("not creating \"%s\": %s\n", output_file, g_strerror (EEXIST));
         exit (1);
       }
     return true;


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