Changeset 13592


Ignore:
Timestamp:
Apr 11, 2010, 12:57:37 AM (10 years ago)
Author:
rme
Message:

The function default_image_name() now simply returns the lisp kernel
name plus a ".image" suffix.

Delete now-unused function case_inverted_path().

We formerly would case-invert the lisp kernel's name and use that as
the name of the default image. For example, for lx86cl64, the default
image name was LX86CL64.

This was probably always stylistically questionable, but it became a
problem on ports to systems with case-insensitive file systems (e.g.,
HFS on the Macintosh). On those systems, we used the lisp kernel name
plus a ".image" suffix as the default image name.

A couple of releases ago, we started using the ".image" suffix on all
systems, but would look for the case-inverted name as a fallback.
We no longer look for the case-inverted name at all.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/pmcl-kernel.c

    r13376 r13592  
    933933#endif
    934934
    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 */
    962935#ifdef WINDOWS
    963936wchar_t *
     
    972945default_image_name(char *orig)
    973946{
    974 #ifdef WINDOWS
    975   char *path = chop_exe_suffix(orig);
    976 #else
    977947  char *path = orig;
    978 #endif
    979948  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 #endif
    988949  return image_name;
    989950}
Note: See TracChangeset for help on using the changeset viewer.