* as/z80/z80mch.c: fixed bug #1704376: missing as-z80 errors
[fw/sdcc] / support / Util / MySystem.c
index 004a2f7c38f627358f380365c792e49773f5d0b2..6aec20f98e91b338e1592926bab4441e115cfcec 100644 (file)
@@ -45,9 +45,9 @@ set *binPathSet = NULL; /* set of binary paths */
  */
 
 static void
-split_command(const unsigned char *cmd_line, char **command, char **params)
+split_command(const char *cmd_line, char **command, char **params)
 {
-  const unsigned char *p, *cmd_start;
+  const char *p, *cmd_start;
   char delim;
   char *str;
   unsigned len;
@@ -249,10 +249,7 @@ merge_command(const char *command, const char *params)
 static int
 has_path(const char *path)
 {
-  if (strrchr(path, DIR_SEPARATOR_CHAR) == NULL)
-      return 0;
-
-  return 1;
+  return dbuf_splitPath(path, NULL, NULL);
 }
 
 
@@ -324,6 +321,11 @@ my_system(const char *cmd)
   }
 
   e = system(cmdLine);
+
+  if (options.verboseExec && e) {
+      printf("+ %s returned errorcode %d\n", cmdLine, e);
+  }
+
   Safe_free(cmdLine);
 
   return e;