Mercurial > emacs
comparison src/msdos.c @ 19295:812986c77ae2
(init_environment): Set Emacs root directory properly when
the executable is in its `src' subdirectory, as under a debugger.
(IT_set_face): If termscript is in use, print the number of the
face as well.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 11 Aug 1997 21:44:08 +0000 |
parents | af78882332ed |
children | c7cec07cb0e0 |
comparison
equal
deleted
inserted
replaced
19294:1f8ca0c4836f | 19295:812986c77ae2 |
---|---|
589 else if (face <= 0 || face >= FRAME_N_COMPUTED_FACES (foo)) | 589 else if (face <= 0 || face >= FRAME_N_COMPUTED_FACES (foo)) |
590 fp = FRAME_DEFAULT_FACE (foo); | 590 fp = FRAME_DEFAULT_FACE (foo); |
591 else | 591 else |
592 fp = intern_face (selected_frame, FRAME_COMPUTED_FACES (foo)[face]); | 592 fp = intern_face (selected_frame, FRAME_COMPUTED_FACES (foo)[face]); |
593 if (termscript) | 593 if (termscript) |
594 fprintf (termscript, "<FACE:%d:%d>", FACE_FOREGROUND (fp), FACE_BACKGROUND (fp)); | 594 fprintf (termscript, "<FACE %d: %d/%d>", |
595 face, FACE_FOREGROUND (fp), FACE_BACKGROUND (fp)); | |
595 screen_face = face; | 596 screen_face = face; |
596 ScreenAttrib = (FACE_BACKGROUND (fp) << 4) | FACE_FOREGROUND (fp); | 597 ScreenAttrib = (FACE_BACKGROUND (fp) << 4) | FACE_FOREGROUND (fp); |
597 } | 598 } |
598 | 599 |
599 static | 600 static |
2706 msdos_downcase_filename (root); | 2707 msdos_downcase_filename (root); |
2707 len = strlen (root); | 2708 len = strlen (root); |
2708 while (len > 0 && root[len] != '/' && root[len] != ':') | 2709 while (len > 0 && root[len] != '/' && root[len] != ':') |
2709 len--; | 2710 len--; |
2710 root[len] = '\0'; | 2711 root[len] = '\0'; |
2711 if (len > 4 && strcmp (root + len - 4, "/bin") == 0) | 2712 if (len > 4 |
2713 && (strcmp (root + len - 4, "/bin") == 0 | |
2714 || strcmp (root + len - 4, "/src") == 0)) /* under a debugger */ | |
2712 root[len - 4] = '\0'; | 2715 root[len - 4] = '\0'; |
2713 else | 2716 else |
2714 strcpy (root, "c:/emacs"); /* Only under debuggers, I think. */ | 2717 strcpy (root, "c:/emacs"); /* let's be defensive */ |
2715 len = strlen (root); | 2718 len = strlen (root); |
2716 strcpy (emacsroot, root); | 2719 strcpy (emacsroot, root); |
2717 | 2720 |
2718 /* We default HOME to our root. */ | 2721 /* We default HOME to our root. */ |
2719 setenv ("HOME", root, 0); | 2722 setenv ("HOME", root, 0); |