| 129 | } |
| 130 | |
| 131 | static bool convert_path(const char *winpath) |
| 132 | { |
| 133 | ssize_t size; |
| 134 | ssize_t ret; |
| 135 | bool quoted; |
| 136 | |
| 137 | quoted = dequote_path(winpath); |
| 138 | |
| 139 | size = cygwin_conv_path(CCP_WIN_A_TO_POSIX | CCP_RELATIVE, |
| 140 | g_dequoted, NULL, 0); |
| 141 | if (size > MAX_PATH) |
| 142 | { |
| 143 | fprintf(stderr, "%lu: POSIX path too long: %lu\n", |
| 144 | g_lineno, (unsigned long)size); |
| 145 | exit(EXIT_FAILURE); |
| 146 | } |
| 147 | |
| 148 | ret = cygwin_conv_path(CCP_WIN_A_TO_POSIX | CCP_RELATIVE, |
| 149 | g_dequoted, g_posix, MAX_PATH); |
| 150 | if (ret < 0) |
| 151 | { |
| 152 | fprintf(stderr, "%lu: cygwin_conv_path '%s' failed: %s\n", |
| 153 | g_lineno, g_dequoted, strerror(errno)); |
| 154 | exit(EXIT_FAILURE); |
| 155 | } |
| 156 | |
| 157 | return quoted; |
| 158 | } |
| 159 | |
| 160 | static void show_usage(const char *progname) |
| 161 | { |
no test coverage detected