| 205 | #include <sys/statfs.h> |
| 206 | extern char * dfs_win32_dirdup(char * path); |
| 207 | static char* _module_name(const char *path) |
| 208 | { |
| 209 | const char *first, *end, *ptr; |
| 210 | char *name; |
| 211 | int size; |
| 212 | |
| 213 | ptr = (char *)path; |
| 214 | first = ptr; |
| 215 | end = path + rt_strlen(path); |
| 216 | |
| 217 | while (*ptr != '\0') |
| 218 | { |
| 219 | if (*ptr == '/') |
| 220 | first = ptr + 1; |
| 221 | if (*ptr == '.') |
| 222 | end = ptr - 1; |
| 223 | |
| 224 | ptr ++; |
| 225 | } |
| 226 | |
| 227 | size = end - first + 1; |
| 228 | name = rt_malloc(size); |
| 229 | rt_strncpy(name, first, size); |
| 230 | name[size] = '\0'; |
| 231 | |
| 232 | return name; |
| 233 | } |
| 234 | |
| 235 | typedef int (*appentry_t)(void); |
| 236 | /** |
no test coverage detected