/*! * \file mugglei.c * \brief implement a small utility for importing files * * \author Lars von Wedel */ // #define VERBOSE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "mg_tools.h" #include "mg_setup.h" #include "mg_db.h" using namespace std; int SysLogLevel = 1; void showmessage(int duration,const char *msg,...) { va_list ap; va_start(ap,msg); vfprintf(stderr,msg,ap); fprintf(stderr,"\n"); va_end(ap); } void syslog_with_tid(int priority, const char *format, ...) { va_list ap; va_start(ap, format); vsyslog(priority, format, ap); va_end(ap); } void showimportcount(unsigned int importcount,bool final=false) { if (final) mgDebug(1,"Imported %d tracks",importcount); } bool create_question() { return the_setup.CreateMode; } void import() { } const char *I18nTranslate(const char *s,const char *Plugin) { return s; } bool path_within_tld() { char path[5000]; if (!getcwd(path,4999)) { std::cout << "Path too long" << std::endl; exit (1); } int tldlen = strlen(the_setup.ToplevelDir); strcat(path,"/"); int pathlen = strlen(path); if (pathlenSync(argv+optind); delete sync; }