| 1918 | * without ".exe", which an exact spawn or copy of that path cannot open. */ |
| 1919 | const char *tf_runner_image(int argc, char **argv); |
| 1920 | const char *tf_runner_image(int argc, char **argv) { |
| 1921 | #ifdef _WIN32 |
| 1922 | static char image[4096]; |
| 1923 | if (!image[0]) { |
| 1924 | char *module = cbm_module_path_utf8(); |
| 1925 | if (module && strlen(module) < sizeof(image)) { |
| 1926 | memcpy(image, module, strlen(module) + 1); |
| 1927 | } |
| 1928 | free(module); |
| 1929 | } |
| 1930 | if (image[0]) { |
| 1931 | return image; |
| 1932 | } |
| 1933 | #endif |
| 1934 | return argc > 0 && argv ? argv[0] : NULL; |
| 1935 | } |
| 1936 | |
| 1937 | const char *cbm_test_program_path; |
| 1938 |
no test coverage detected