diff options
author | Ron Yorston <rmy@pobox.com> | 2019-03-15 10:27:19 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2019-03-15 10:27:19 +0000 |
commit | 996f93243dda87de3140c497624312722f47ffa1 (patch) | |
tree | 8c894b5b7414cbd72f02bd309d54ffa62283915a /shell | |
parent | 79c85ec59075b5ead415a4713bd72445546dcf8e (diff) | |
download | busybox-w32-996f93243dda87de3140c497624312722f47ffa1.tar.gz busybox-w32-996f93243dda87de3140c497624312722f47ffa1.tar.bz2 busybox-w32-996f93243dda87de3140c497624312722f47ffa1.zip |
win32: add function to convert slashes to backslashes
There are now two places where slashes are converted to backslashes
throughout a string so it makes sense to create a function to do
this.
To avoid confusion rename convert_slashes() to bs_to_slash() and
call the new function slash_to_bs().
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c index 8daf263dc..4adad65aa 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -14696,7 +14696,7 @@ init(void) | |||
14696 | * cause problems */ | 14696 | * cause problems */ |
14697 | if ( !winxp && strncmp(*envp, "SYSTEMROOT=", 11) != 0 && | 14697 | if ( !winxp && strncmp(*envp, "SYSTEMROOT=", 11) != 0 && |
14698 | strncmp(*envp, "COMSPEC=", 8) != 0 ) { | 14698 | strncmp(*envp, "COMSPEC=", 8) != 0 ) { |
14699 | convert_slashes(end+1); | 14699 | bs_to_slash(end+1); |
14700 | } | 14700 | } |
14701 | 14701 | ||
14702 | /* check for invalid characters in name */ | 14702 | /* check for invalid characters in name */ |
@@ -14838,7 +14838,7 @@ procargs(char **argv) | |||
14838 | } else if (!sflag) { | 14838 | } else if (!sflag) { |
14839 | setinputfile(*xargv, 0); | 14839 | setinputfile(*xargv, 0); |
14840 | #if ENABLE_PLATFORM_MINGW32 | 14840 | #if ENABLE_PLATFORM_MINGW32 |
14841 | convert_slashes(*xargv); | 14841 | bs_to_slash(*xargv); |
14842 | #endif | 14842 | #endif |
14843 | setarg0: | 14843 | setarg0: |
14844 | arg0 = *xargv++; | 14844 | arg0 = *xargv++; |