X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=support%2FUtil%2FMySystem.c;h=089b6b55d6095c7ef50f311898778798560e93a2;hb=d60dda202f1d848e447f70c4a3935280b38f9431;hp=307149bd267c26ca27b716f30111c3ebff0e8bce;hpb=5690e81c86090516e508b99fdafe05b24790d79f;p=fw%2Fsdcc diff --git a/support/Util/MySystem.c b/support/Util/MySystem.c index 307149bd..089b6b55 100644 --- a/support/Util/MySystem.c +++ b/support/Util/MySystem.c @@ -238,26 +238,18 @@ merge_command(const char *command, const char *params) /* allocate extra space for 2x'"', ' ' and '\0' */ char *cmd_line = (char *)Safe_alloc(strlen(command) + strlen(params) + 4); sprintf(cmd_line, "\"%s\" %s", command, params); - return cmd_line; } /*! - * check if the path is absolute + * check if the path is relative or absolute (if contains the dir separator) */ static int has_path(const char *path) { - if (strrchr(path, DIR_SEPARATOR_CHAR) == NULL) -#ifdef _WIN32 - /* try *nix dir separator on WIN32 */ - if (strrchr(path, UNIX_DIR_SEPARATOR_CHAR) == NULL) -#endif - return 0; - - return 1; + return dbuf_splitPath(path, NULL, NULL); }