aboutsummaryrefslogtreecommitdiff
path: root/debianutils
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2019-03-15 10:27:19 +0000
committerRon Yorston <rmy@pobox.com>2019-03-15 10:27:19 +0000
commit996f93243dda87de3140c497624312722f47ffa1 (patch)
tree8c894b5b7414cbd72f02bd309d54ffa62283915a /debianutils
parent79c85ec59075b5ead415a4713bd72445546dcf8e (diff)
downloadbusybox-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 'debianutils')
-rw-r--r--debianutils/which.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/debianutils/which.c b/debianutils/which.c
index b26f2f0f5..61f5770c5 100644
--- a/debianutils/which.c
+++ b/debianutils/which.c
@@ -69,7 +69,7 @@ int which_main(int argc UNUSED_PARAM, char **argv)
69#if ENABLE_PLATFORM_MINGW32 69#if ENABLE_PLATFORM_MINGW32
70 if ((p=auto_win32_extension(*argv)) != NULL) { 70 if ((p=auto_win32_extension(*argv)) != NULL) {
71 missing = 0; 71 missing = 0;
72 convert_slashes(p); 72 bs_to_slash(p);
73 puts(p); 73 puts(p);
74 } 74 }
75 else 75 else
@@ -78,7 +78,7 @@ int which_main(int argc UNUSED_PARAM, char **argv)
78 missing = 0; 78 missing = 0;
79#if ENABLE_PLATFORM_MINGW32 79#if ENABLE_PLATFORM_MINGW32
80 p = auto_string(xstrdup(*argv)); 80 p = auto_string(xstrdup(*argv));
81 convert_slashes(p); 81 bs_to_slash(p);
82 puts(p); 82 puts(p);
83#else 83#else
84 puts(*argv); 84 puts(*argv);
@@ -92,7 +92,7 @@ int which_main(int argc UNUSED_PARAM, char **argv)
92 while ((p = find_executable(*argv, &path)) != NULL) { 92 while ((p = find_executable(*argv, &path)) != NULL) {
93 missing = 0; 93 missing = 0;
94#if ENABLE_PLATFORM_MINGW32 94#if ENABLE_PLATFORM_MINGW32
95 convert_slashes(p); 95 bs_to_slash(p);
96#endif 96#endif
97 puts(p); 97 puts(p);
98 free(p); 98 free(p);