Changeset 13592
- Timestamp:
- Apr 10, 2010, 5:57:37 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/source/lisp-kernel/pmcl-kernel.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/lisp-kernel/pmcl-kernel.c
r13376 r13592 933 933 #endif 934 934 935 char *936 case_inverted_path(char *path)937 {938 char *copy = strdup(path), *base = copy, *work = copy, c;939 if (copy == NULL) {940 return NULL;941 }942 while(*work) {943 if (*work++ == '/') {944 base = work;945 }946 }947 work = base;948 while ((c = *work) != '\0') {949 if (islower(c)) {950 *work++ = toupper(c);951 } else {952 *work++ = tolower(c);953 }954 }955 return copy;956 }957 /*958 The underlying file system may be case-insensitive (e.g., HFS),959 so we can't just case-invert the kernel's name.960 Tack ".image" onto the end of the kernel's name. Much better ...961 */962 935 #ifdef WINDOWS 963 936 wchar_t * … … 972 945 default_image_name(char *orig) 973 946 { 974 #ifdef WINDOWS975 char *path = chop_exe_suffix(orig);976 #else977 947 char *path = orig; 978 #endif979 948 char *image_name = path_by_appending_image(path); 980 #if !defined(WINDOWS) && !defined(DARWIN)981 if (!probe_file(image_name)) {982 char *legacy = case_inverted_path(path);983 if (probe_file(legacy)) {984 image_name = legacy;985 }986 }987 #endif988 949 return image_name; 989 950 }
Note:
See TracChangeset
for help on using the changeset viewer.
