/[svn]/linuxsampler/trunk/src/db/InstrumentsDb.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/db/InstrumentsDb.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1881 by iliev, Mon Mar 30 16:56:41 2009 UTC revision 1908 by persson, Mon Jun 1 18:50:06 2009 UTC
# Line 28  Line 28 
28  #include <sstream>  #include <sstream>
29  #include <vector>  #include <vector>
30  #include <errno.h>  #include <errno.h>
31    #ifndef WIN32
32  #include <fnmatch.h>  #include <fnmatch.h>
33    #endif
34    
35  #include "../common/Exception.h"  #include "../common/Exception.h"
36    
# Line 131  namespace LinuxSampler { Line 133  namespace LinuxSampler {
133              db = NULL;              db = NULL;
134              throw Exception("Cannot open instruments database: " + DbFile);              throw Exception("Cannot open instruments database: " + DbFile);
135          }          }
136    #ifndef WIN32
137          rc = sqlite3_create_function(db, "regexp", 2, SQLITE_UTF8, NULL, Regexp, NULL, NULL);          rc = sqlite3_create_function(db, "regexp", 2, SQLITE_UTF8, NULL, Regexp, NULL, NULL);
138          if (rc) { throw Exception("Failed to add user function for handling regular expressions."); }          if (rc) { throw Exception("Failed to add user function for handling regular expressions."); }
139    #endif
140    
141          // TODO: remove this in the next version          // TODO: remove this in the next version
142          try {          try {
# Line 1658  namespace LinuxSampler { Line 1662  namespace LinuxSampler {
1662          }          }
1663      }      }
1664    
1665    #ifndef WIN32
1666      void InstrumentsDb::Regexp(sqlite3_context* pContext, int argc, sqlite3_value** ppValue) {      void InstrumentsDb::Regexp(sqlite3_context* pContext, int argc, sqlite3_value** ppValue) {
1667          if (argc != 2) return;          if (argc != 2) return;
1668    
# Line 1668  namespace LinuxSampler { Line 1673  namespace LinuxSampler {
1673              sqlite3_result_int(pContext, 1);              sqlite3_result_int(pContext, 1);
1674          }          }
1675      }      }
1676    #endif
1677    
1678      String InstrumentsDb::GetDirectoryPath(String File) {      String InstrumentsDb::GetDirectoryPath(String File) {
1679          if (File.empty()) return String("");          if (File.empty()) return String("");

Legend:
Removed from v.1881  
changed lines
  Added in v.1908

  ViewVC Help
Powered by ViewVC