From cbd29ad93827f2494864668ae6759416f74ba3cc Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 7 Jun 2014 11:47:26 +0200 Subject: Add missing defines. --- src/path.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src') diff --git a/src/path.cc b/src/path.cc index 8be2f26..959d364 100644 --- a/src/path.cc +++ b/src/path.cc @@ -28,8 +28,29 @@ #ifndef WIN32 #include + +#ifndef _MAX_DIR +#define _MAX_DIR 256 +#endif + +#ifndef _MAX_DRIVE +#define _MAX_DRIVE 3 +#endif + +#ifndef _MAX_EXT +#define _MAX_EXT 256 #endif +#ifndef _MAX_FNAME +#define _MAX_FNAME 256 +#endif + +#ifndef _MAX_PATH +#define _MAX_PATH 260 +#endif + +#endif/*WIN32*/ + #include #include -- cgit v1.2.3 From 3f61f5d1b061ca22ee8cccdc19df8ecddd23c8b2 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 7 Jun 2014 11:56:25 +0200 Subject: Add missing defines. --- src/path.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/path.cc b/src/path.cc index 959d364..08565fd 100644 --- a/src/path.cc +++ b/src/path.cc @@ -27,8 +27,11 @@ #include "path.h" #ifndef WIN32 + #include +#else/*WIN32*/ + #ifndef _MAX_DIR #define _MAX_DIR 256 #endif -- cgit v1.2.3 From ad63d0c777b344cccc6f5f4e9dbeda2c96e1a87a Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 7 Jun 2014 12:02:31 +0200 Subject: Add missing defines. --- src/path.cc | 52 +++------------------------------------------------- 1 file changed, 3 insertions(+), 49 deletions(-) (limited to 'src') diff --git a/src/path.cc b/src/path.cc index 08565fd..1b4ede3 100644 --- a/src/path.cc +++ b/src/path.cc @@ -26,33 +26,9 @@ */ #include "path.h" -#ifndef WIN32 - +#ifndef __MINGW32__ #include - -#else/*WIN32*/ - -#ifndef _MAX_DIR -#define _MAX_DIR 256 -#endif - -#ifndef _MAX_DRIVE -#define _MAX_DRIVE 3 -#endif - -#ifndef _MAX_EXT -#define _MAX_EXT 256 -#endif - -#ifndef _MAX_FNAME -#define _MAX_FNAME 256 -#endif - -#ifndef _MAX_PATH -#define _MAX_PATH 260 -#endif - -#endif/*WIN32*/ +#endif/*__MINGW32__*/ #include #include @@ -60,7 +36,7 @@ std::string getPath(std::string file) { std::string p; -#ifndef WIN32 +#ifndef __MINGW32__ char *b = strdup(file.c_str()); p = dirname(b); free(b); @@ -73,25 +49,3 @@ std::string getPath(std::string file) return p; } - -#ifdef TEST_PATH -//Additional dependency files -//deps: -//Required cflags (autoconf vars may be used) -//cflags: -//Required link options (autoconf vars may be used) -//libs: -#include "test.h" - -TEST_BEGIN; - -std::string a = "../dir/file"; -TEST_EQUAL_STR(getPath(a), "../dir", "relative path"); - -std::string b = "/abs/path/file"; -TEST_EQUAL_STR(getPath(b), "/abs/path", "absolute path"); - - -TEST_END; - -#endif/*TEST_PATH*/ -- cgit v1.2.3 From fd5d04653e17db9003b0539eeac9b4610f56b084 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 25 Jul 2014 12:10:55 +0200 Subject: Accept loading of the same drumkit twice in a row. --- src/drumgizmo.cc | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc index 5d67c86..1abbb10 100644 --- a/src/drumgizmo.cc +++ b/src/drumgizmo.cc @@ -53,7 +53,6 @@ DrumGizmo::~DrumGizmo() bool DrumGizmo::loadkit(std::string file) { - if(file == kit.file()) return 1; if(file == "") return 1; DEBUG(drumgizmo, "loadkit(%s)\n", file.c_str()); -- cgit v1.2.3