Mercurial > hg > xemacs-beta
comparison src/editfns.c @ 263:727739f917cb r20-5b30
Import from CVS: tag r20-5b30
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:24:41 +0200 |
parents | 65c19d2020f7 |
children | c5d627a313b1 |
comparison
equal
deleted
inserted
replaced
262:9d8607af9e13 | 263:727739f917cb |
---|---|
607 return Qnil; | 607 return Qnil; |
608 return make_char (BUF_FETCH_CHAR (b, n)); | 608 return make_char (BUF_FETCH_CHAR (b, n)); |
609 } | 609 } |
610 | 610 |
611 | 611 |
612 DEFUN ("temp-directory", Ftemp_directory, 0, 0, 0, /* | |
613 Return the pathname to the directory to use for temporary files. | |
614 On NT/MSDOS, this is obtained from the TEMP or TMP environment variables, | |
615 defaulting to / if they are both undefined. | |
616 On Unix it is obtained from TMPDIR, with /tmp as the default | |
617 */ | |
618 ()) | |
619 { | |
620 char *tmpdir; | |
621 | |
622 #if defined(WINDOWSNT) || defined(MSDOS) | |
623 tmpdir = (char *) getenv ("TEMP"); | |
624 if (!tmpdir) | |
625 tmpdir = (char *) getenv ("TMP"); | |
626 if (!tmpdir) | |
627 tmpdir = "/"; /* what should this be on NT/MSDOS ? */ | |
628 #else /* WINDOWSNT || MSDOS */ | |
629 tmpdir = (char *) getenv ("TMPDIR"); | |
630 if (!tmpdir) | |
631 tmpdir = "/tmp"; | |
632 #endif | |
633 | |
634 return build_ext_string (tmpdir, FORMAT_FILENAME); | |
635 } | |
636 | |
612 DEFUN ("user-login-name", Fuser_login_name, 0, 1, 0, /* | 637 DEFUN ("user-login-name", Fuser_login_name, 0, 1, 0, /* |
613 Return the name under which the user logged in, as a string. | 638 Return the name under which the user logged in, as a string. |
614 This is based on the effective uid, not the real uid. | 639 This is based on the effective uid, not the real uid. |
615 Also, if the environment variable LOGNAME or USER is set, | 640 Also, if the environment variable LOGNAME or USER is set, |
616 that determines the value of this function. | 641 that determines the value of this function. |
2135 DEFSUBR (Finsert); | 2160 DEFSUBR (Finsert); |
2136 DEFSUBR (Finsert_string); | 2161 DEFSUBR (Finsert_string); |
2137 DEFSUBR (Finsert_before_markers); | 2162 DEFSUBR (Finsert_before_markers); |
2138 DEFSUBR (Finsert_char); | 2163 DEFSUBR (Finsert_char); |
2139 | 2164 |
2165 DEFSUBR (Ftemp_directory); | |
2140 DEFSUBR (Fuser_login_name); | 2166 DEFSUBR (Fuser_login_name); |
2141 DEFSUBR (Fuser_real_login_name); | 2167 DEFSUBR (Fuser_real_login_name); |
2142 DEFSUBR (Fuser_uid); | 2168 DEFSUBR (Fuser_uid); |
2143 DEFSUBR (Fuser_real_uid); | 2169 DEFSUBR (Fuser_real_uid); |
2144 DEFSUBR (Fuser_full_name); | 2170 DEFSUBR (Fuser_full_name); |