Mercurial > emacs
comparison src/emacs.c @ 18514:38e3a189ed1d
(decode_env_path): Ensure path elements use proper directory separator.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 01 Jul 1997 06:32:13 +0000 |
parents | 4b6ab0b6fd50 |
children | ec9c20bede0c |
comparison
equal
deleted
inserted
replaced
18513:948557b5aa7c | 18514:38e3a189ed1d |
---|---|
1574 path = (char *) getenv (evarname); | 1574 path = (char *) getenv (evarname); |
1575 else | 1575 else |
1576 path = 0; | 1576 path = 0; |
1577 if (!path) | 1577 if (!path) |
1578 path = defalt; | 1578 path = defalt; |
1579 #ifdef DOS_NT | |
1580 /* Ensure values from the environment use the proper directory separator. */ | |
1581 if (path) | |
1582 { | |
1583 p = alloca (strlen (path) + 1); | |
1584 strcpy (p, path); | |
1585 path = p; | |
1586 | |
1587 if ('/' == DIRECTORY_SEP) | |
1588 dostounix_filename (path); | |
1589 else | |
1590 unixtodos_filename (path); | |
1591 } | |
1592 #endif | |
1579 lpath = Qnil; | 1593 lpath = Qnil; |
1580 while (1) | 1594 while (1) |
1581 { | 1595 { |
1582 p = index (path, SEPCHAR); | 1596 p = index (path, SEPCHAR); |
1583 if (!p) p = path + strlen (path); | 1597 if (!p) p = path + strlen (path); |