Rev 6862 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6862 | Rev 7802 | ||
---|---|---|---|
Line 39... | Line 39... | ||
39 | dir[i+1] = 0; |
39 | dir[i+1] = 0; |
40 | break; |
40 | break; |
41 | } |
41 | } |
42 | } |
42 | } |
43 | 43 | /// =========================================================== |
|
- | 44 | ||
- | 45 | void get_file_dir_loc(char *filepath, char *dir_path) |
|
- | 46 | { |
|
- | 47 | char *res = strrchr(filepath, '/'); |
|
- | 48 | if (res == 0) |
|
- | 49 | { |
|
- | 50 | dir_path = '\0'; |
|
- | 51 | return; |
|
- | 52 | } |
|
- | 53 | size_t pos = res - filepath; |
|
- | 54 | strncpy(dir_path, filepath, pos); |
|
- | 55 | dir_path[pos] = '\0'; |
|
- | 56 | } |
|
- | 57 | ||
Line 44... | Line 58... | ||
44 | /// =========================================================== |
58 | /// =========================================================== |
Line 45... | Line 59... | ||
45 | 59 | ||
46 | int file_check(char file[]) |
60 | int file_check(char file[]) |
Line 158... | Line 172... | ||
158 | command_execute(); |
172 | command_execute(); |
Line 159... | Line 173... | ||
159 | 173 | ||
160 | for (;;) |
174 | for (;;) |
- | 175 | { |
|
161 | { |
176 | //printf("\033[32;1m"); |
- | 177 | printf ("# "); |
|
162 | printf ("# "); |
178 | //printf("\033[0m"); |
163 | command_get(); |
179 | command_get(); |
164 | command_execute(); |
180 | command_execute(); |
Line 165... | Line 181... | ||
165 | } |
181 | } |