MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / winpath_dirdup

Function winpath_dirdup

bsp/simulator/drivers/dfs_win32.c:113–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113static char *winpath_dirdup(char *des, const char *src)
114{
115 char *path;
116 int i = 0;
117
118 path = rt_malloc(FILE_PATH_MAX);
119 if (path == RT_NULL)
120 return RT_NULL;
121
122 strcpy(path, des);
123 strcat(path, src);
124
125 while (1)
126 {
127 if (path[i] == 0)
128 break;
129
130 if (path[i] == '/')
131 path[i] = '\\';
132
133 i++;
134 }
135
136 return path;
137}
138
139/* This function can convert the path in rt-thread/dfs to the path in windows */
140char * dfs_win32_dirdup(char * path)

Callers 5

dfs_win32_dirdupFunction · 0.85
dfs_win32_openFunction · 0.85
dfs_win32_unlinkFunction · 0.85
dfs_win32_renameFunction · 0.85
dfs_win32_statFunction · 0.85

Calls 1

rt_mallocFunction · 0.85

Tested by

no test coverage detected