diff src/editfns.c @ 4990:8f0cf4fd3d2c

Automatic merge
author Ben Wing <ben@xemacs.org>
date Sat, 06 Feb 2010 04:01:46 -0600
parents 3c3c1d139863
children 1537701f08a1
line wrap: on
line diff
--- a/src/editfns.c	Sat Feb 06 03:59:18 2010 -0600
+++ b/src/editfns.c	Sat Feb 06 04:01:46 2010 -0600
@@ -95,7 +95,7 @@
   if ((p = egetenv ("NAME")))
     /* I don't think it's the right thing to do the ampersand
        modification on NAME.  Not that it matters anymore...  -hniksic */
-    Vuser_full_name = build_intstring (p);
+    Vuser_full_name = build_istring (p);
   else
     Vuser_full_name = Fuser_full_name (Qnil);
 }
@@ -649,7 +649,7 @@
     }
 #endif
 
-  return build_intstring (tmpdir);
+  return build_istring (tmpdir);
 }
 
 DEFUN ("user-login-name", Fuser_login_name, 0, 1, 0, /*
@@ -678,7 +678,7 @@
   /* #### - I believe this should return nil instead of "unknown" when pw==0
      pw=0 is indicated by a null return from user_login_name
   */
-  return returned_name ? build_intstring (returned_name) : Qnil;
+  return returned_name ? build_istring (returned_name) : Qnil;
 }
 
 /* This function may be called from other C routines when a
@@ -744,7 +744,7 @@
   struct passwd *pw = qxe_getpwuid (getuid ());
   /* #### - I believe this should return nil instead of "unknown" when pw==0 */
 
-  return build_string (pw ? pw->pw_name : "unknown");
+  return build_extstring (pw ? pw->pw_name : "unknown", Quser_name_encoding);
 }
 
 DEFUN ("user-uid", Fuser_uid, 0, 0, 0, /*
@@ -831,7 +831,7 @@
 uncache_home_directory (void)
 {
   if (cached_home_directory)
-    xfree (cached_home_directory, Ibyte *);
+    xfree (cached_home_directory);
   cached_home_directory = NULL;
 }
 
@@ -869,7 +869,7 @@
                  We probably should try to extract pw_dir from /etc/passwd,
                  before falling back to this. */
 	      cached_home_directory
-                = qxestrdup ((const Ibyte *)DEFAULT_DIRECTORY_FALLBACK);
+                = qxestrdup ((const Ibyte *) DEFAULT_DIRECTORY_FALLBACK);
 	      output_home_warning = 1;
 	    }
 	}
@@ -895,7 +895,7 @@
   Ibyte *path = get_home_directory ();
 
   return !path ? Qnil :
-    Fexpand_file_name (Fsubstitute_in_file_name (build_intstring (path)),
+    Fexpand_file_name (Fsubstitute_in_file_name (build_istring (path)),
 		       Qnil);
 }
 
@@ -1068,17 +1068,17 @@
       Extbyte *buf = alloca_extbytes (size);
       Extbyte *formext;
       /* make a copy of the static buffer returned by localtime() */
-      struct tm tm = * localtime(&value); 
+      struct tm tm = *localtime (&value); 
       
       *buf = 1;
 
       /* !!#### this use of external here is not totally safe, and
 	 potentially data lossy. */
-      LISP_STRING_TO_EXTERNAL (format_string, formext,
-			       Qtime_function_encoding);
+      formext = LISP_STRING_TO_EXTERNAL (format_string,
+					 Qtime_function_encoding);
       if (emacs_strftime (buf, size, formext, &tm)
 	  || !*buf)
-	return build_ext_string (buf, Qtime_function_encoding);
+	return build_extstring (buf, Qtime_function_encoding);
       /* If buffer was too small, make it bigger.  */
       size *= 2;
     }
@@ -1188,7 +1188,7 @@
       Extbyte **oldenv = environ, **newenv;
 
       if (STRINGP (zone))
-	LISP_STRING_TO_EXTERNAL (zone, tzstring, Qtime_zone_encoding);
+	tzstring = LISP_STRING_TO_EXTERNAL (zone, Qtime_zone_encoding);
       else if (INTP (zone))
 	{
 	  int abszone = abs (XINT (zone));
@@ -1237,7 +1237,7 @@
 {
   time_t value;
   Ibyte *the_ctime;
-  EMACS_INT len; /* this is what make_ext_string() accepts; ####
+  EMACS_INT len; /* this is what make_extstring() accepts; ####
 		    should it be an Bytecount? */
 
   if (! lisp_to_time (specified_time, &value))
@@ -1320,7 +1320,7 @@
 #endif
 #endif /* not HAVE_TM_ZONE */
       if (s)
-	tem = build_ext_string (s, Qtime_zone_encoding);
+	tem = build_extstring (s, Qtime_zone_encoding);
       else
 	{
 	  Ibyte buf[6];
@@ -1329,7 +1329,7 @@
 	  int am = (offset < 0 ? -offset : offset) / 60;
 	  qxesprintf (buf, "%c%02d%02d", (offset < 0 ? '-' : '+'), am/60,
 		      am%60);
-	  tem = build_intstring (buf);
+	  tem = build_istring (buf);
 	}
       return list2 (make_int (offset), tem);
     }
@@ -1434,12 +1434,12 @@
   else
     {
       CHECK_STRING (tz);
-      LISP_STRING_TO_EXTERNAL (tz, tzstring, Qtime_zone_encoding);
+      tzstring = LISP_STRING_TO_EXTERNAL (tz, Qtime_zone_encoding);
     }
 
   set_time_zone_rule (tzstring);
   if (environbuf)
-    xfree (environbuf, Extbyte **);
+    xfree (environbuf);
   environbuf = environ;
 
   return Qnil;