changeset 12026:505a894d943e

(syms_of_editfns): user-login-name renamed from user-name. user-real-login-name renamed from user-real-name. C names changed to Vuser_real_login_name, Vuser_login_name as well.
author Karl Heuer <kwzh@gnu.org>
date Tue, 30 May 1995 21:56:32 +0000
parents e804b43418f6
children d5a2fb3235ef
files src/editfns.c
diffstat 1 files changed, 17 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/editfns.c	Tue May 30 21:50:07 1995 +0000
+++ b/src/editfns.c	Tue May 30 21:56:32 1995 +0000
@@ -44,9 +44,9 @@
 /* Some static data, and a function to initialize it for each run */
 
 Lisp_Object Vsystem_name;
-Lisp_Object Vuser_real_name;	/* login name of current user ID */
-Lisp_Object Vuser_full_name;	/* full name of current user */
-Lisp_Object Vuser_name;		/* user name from LOGNAME or USER */
+Lisp_Object Vuser_real_login_name;	/* login name of current user ID */
+Lisp_Object Vuser_full_name;		/* full name of current user */
+Lisp_Object Vuser_login_name;		/* user name from LOGNAME or USER */
 
 void
 init_editfns ()
@@ -71,9 +71,9 @@
   /* We let the real user name default to "root" because that's quite
      accurate on MSDOG and because it lets Emacs find the init file.
      (The DVX libraries override the Djgpp libraries here.)  */
-  Vuser_real_name = build_string (pw ? pw->pw_name : "root");
+  Vuser_real_login_name = build_string (pw ? pw->pw_name : "root");
 #else
-  Vuser_real_name = build_string (pw ? pw->pw_name : "unknown");
+  Vuser_real_login_name = build_string (pw ? pw->pw_name : "unknown");
 #endif
 
   /* Get the effective user name, by consulting environment variables,
@@ -90,13 +90,13 @@
       pw = (struct passwd *) getpwuid (geteuid ());
       user_name = (char *) (pw ? pw->pw_name : "unknown");
     }
-  Vuser_name = build_string (user_name);
+  Vuser_login_name = build_string (user_name);
 
   /* If the user name claimed in the environment vars differs from
      the real uid, use the claimed name to find the full name.  */
-  tem = Fstring_equal (Vuser_name, Vuser_real_name);
+  tem = Fstring_equal (Vuser_login_name, Vuser_real_login_name);
   if (NILP (tem))
-    pw = (struct passwd *) getpwnam (XSTRING (Vuser_name)->data);
+    pw = (struct passwd *) getpwnam (XSTRING (Vuser_login_name)->data);
   
   p = (unsigned char *) (pw ? USER_FULL_NAME : "unknown");
   q = (unsigned char *) index (p, ',');
@@ -108,10 +108,11 @@
   /* Substitute the login name for the &, upcasing the first character.  */
   if (q)
     {
-      r = (unsigned char *) alloca (strlen (p) + XSTRING (Vuser_name)->size + 1);
+      r = (unsigned char *) alloca (strlen (p)
+				    + XSTRING (Vuser_login_name)->size + 1);
       bcopy (p, r, q - p);
       r[q - p] = 0;
-      strcat (r, XSTRING (Vuser_name)->data);
+      strcat (r, XSTRING (Vuser_login_name)->data);
       r[q - p] = UPCASE (r[q - p]);
       strcat (r, q + 1);
       Vuser_full_name = build_string (r);
@@ -516,11 +517,11 @@
   /* Set up the user name info if we didn't do it before.
      (That can happen if Emacs is dumpable
      but you decide to run `temacs -l loadup' and not dump.  */
-  if (INTEGERP (Vuser_name))
+  if (INTEGERP (Vuser_login_name))
     init_editfns ();
 
   if (NILP (uid))
-    return Vuser_name;
+    return Vuser_login_name;
 
   CHECK_NUMBER (uid, 0);
   pw = (struct passwd *) getpwuid (XINT (uid));
@@ -537,9 +538,9 @@
   /* Set up the user name info if we didn't do it before.
      (That can happen if Emacs is dumpable
      but you decide to run `temacs -l loadup' and not dump.  */
-  if (INTEGERP (Vuser_name))
+  if (INTEGERP (Vuser_login_name))
     init_editfns ();
-  return Vuser_real_name;
+  return Vuser_real_login_name;
 }
 
 DEFUN ("user-uid", Fuser_uid, Suser_uid, 0, 0, 0,
@@ -2283,10 +2284,10 @@
   DEFVAR_LISP ("user-full-name", &Vuser_full_name,
 	       "The full name of the user logged in.");
 
-  DEFVAR_LISP ("user-name", &Vuser_name,
+  DEFVAR_LISP ("user-login-name", &Vuser_login_name,
 	       "The user's name, taken from environment variables if possible.");
 
-  DEFVAR_LISP ("user-real-name", &Vuser_real_name,
+  DEFVAR_LISP ("user-real-login-name", &Vuser_real_login_name,
 	       "The user's name, based upon the real uid only.");
 
   defsubr (&Schar_equal);