Mercurial > hg > xemacs-beta
comparison src/editfns.c @ 404:2f8bb876ab1d r21-2-32
Import from CVS: tag r21-2-32
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:16:07 +0200 |
parents | a86b2b5e0111 |
children | de805c49cfc1 |
comparison
equal
deleted
inserted
replaced
403:9f011ab08d48 | 404:2f8bb876ab1d |
---|---|
820 { | 820 { |
821 cached_home_directory = NULL; /* in some cases, this may cause the leaking | 821 cached_home_directory = NULL; /* in some cases, this may cause the leaking |
822 of a few bytes */ | 822 of a few bytes */ |
823 } | 823 } |
824 | 824 |
825 /* !!#### not Mule correct. */ | |
826 | |
825 /* Returns the home directory, in external format */ | 827 /* Returns the home directory, in external format */ |
826 Extbyte * | 828 Extbyte * |
827 get_home_directory (void) | 829 get_home_directory (void) |
828 { | 830 { |
831 /* !!#### this is hopelessly bogus. Rule #1: Do not make any assumptions | |
832 about what format an external string is in. Could be Unicode, for all | |
833 we know, and then all the operations below are totally bogus. | |
834 Instead, convert all data to internal format *right* at the juncture | |
835 between XEmacs and the outside world, the very moment we first get | |
836 the data. --ben */ | |
829 int output_home_warning = 0; | 837 int output_home_warning = 0; |
830 | 838 |
831 if (cached_home_directory == NULL) | 839 if (cached_home_directory == NULL) |
832 { | 840 { |
833 if ((cached_home_directory = (Extbyte *) getenv("HOME")) == NULL) | 841 if ((cached_home_directory = (Extbyte *) getenv("HOME")) == NULL) |
845 homedrive, | 853 homedrive, |
846 homepath); | 854 homepath); |
847 } | 855 } |
848 else | 856 else |
849 { | 857 { |
850 # if 1 | 858 # if 0 /* changed by ben. This behavior absolutely stinks, and the |
859 possibility being addressed here occurs quite commonly. | |
860 Using the current directory makes absolutely no sense. */ | |
851 /* | 861 /* |
852 * Use the current directory. | 862 * Use the current directory. |
853 * This preserves the existing XEmacs behavior, but is different | 863 * This preserves the existing XEmacs behavior, but is different |
854 * from NT Emacs. | 864 * from NT Emacs. |
855 */ | 865 */ |