* src/pic/pcode.c: changed inverted ops for DECFSZ/DECFSZW and
[fw/sdcc] / src / SDCCutil.c
index d100aa463d54e407c00ad1f9a1504dc66524d440..da0223f6f6b67c36715ac3f119ed2a4fefffd4d0 100644 (file)
@@ -22,6 +22,8 @@
    what you give them.   Help stamp out software-hoarding!
 -------------------------------------------------------------------------*/
 
+#include <math.h>
+
 #ifdef _WIN32
 #include <ctype.h>
 #include <windows.h>
@@ -36,6 +38,8 @@
 #include "findme.h"
 #endif
 
+#include "version.h"
+
 /** Given an array of name, value string pairs creates a new hash
     containing all of the pairs.
 */
@@ -134,7 +138,7 @@ getBinPath(const char *prel)
     return path;
   }
   /* not enough info in prel; do it with module name */
-  else if (0 != GetModuleFileName(NULL, path, sizeof path) != 0 &&
+  else if (0 != GetModuleFileName(NULL, path, sizeof path) &&
     NULL != (p = strrchr(path, DIR_SEPARATOR_CHAR))) {
     *p = '\0';
     return path;
@@ -286,6 +290,14 @@ char *strncatz(char *dest, const char *src, size_t n)
 }
 
 
+/*-----------------------------------------------------------------*/
+/* getBuildNumber - return build number                            */
+/*-----------------------------------------------------------------*/
+const char *getBuildNumber(void)
+{
+  return (SDCC_BUILD_NUMBER);
+}
+
 #if defined(HAVE_VSNPRINTF) || defined(HAVE_VSPRINTF)
 size_t SDCCsnprintf(char *dst, size_t n, const char *fmt, ...)
 {