/*! -*- c++ -*- * \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 #include "mg_tools.h" #include "mg_setup.h" #include "mg_db.h" using namespace std; int SysLogLevel = 9; 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() { } bool path_within_tld() { const char* path = mugglepath(); int tldlen = strlen(the_setup.ToplevelDir); int pathlen = strlen(path); if (pathlenSync(argv+optind); delete sync; }