--- gigedit/trunk/src/gigedit/global.h 2014/05/13 12:17:43 2548 +++ gigedit/trunk/src/gigedit/global.h 2016/07/18 11:22:38 2967 @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (C) 2007-2013 Andreas Persson + * Copyright (C) 2007-2015 Andreas Persson * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -24,6 +24,11 @@ # include #endif +#if !defined(WIN32) +# include +# include +#endif + #include //FIXME: for some reason AC GETTEXT check fails on the Mac cross compiler? @@ -40,6 +45,9 @@ # define VERSION VER_STRING // VER_STRING defined in libgig_private.h #endif // WIN32 +#define UNICODE_RIGHT_ARROW Glib::ustring(1, gunichar(0x2192)) +#define UNICODE_LEFT_ARROW Glib::ustring(1, gunichar(0x2190)) + template inline std::string ToString(T o) { std::stringstream ss; ss << o; @@ -48,6 +56,7 @@ /// Find the number of bits required to hold the specified amount of zones. inline int zoneCountToBits(int nZones) { + if (!nZones) return 0; int iFinalBits = 0; int zoneBits = nZones - 1; for (; zoneBits > 1; iFinalBits += 2, zoneBits >>= 2);