]> code.delx.au - gnu-emacs/blobdiff - src/frame.c
* term.c (get_named_tty, create_tty_output, tty_free_frame_resources)
[gnu-emacs] / src / frame.c
index 14fc15c471750f5b4f103fd50e7ea5b78ec9842b..bb44f3cc987d435ffaec89fb3c0d22194728792e 100644 (file)
@@ -185,7 +185,6 @@ set_menu_bar_lines_1 (Lisp_Object window, int n)
 {
   struct window *w = XWINDOW (window);
 
-  w->last_modified = 0;
   w->top_line += n;
   w->total_lines -= n;
 
@@ -693,24 +692,16 @@ affects all frames on the same terminal device.  */)
                        ? FRAME_TTY (XFRAME (selected_frame))->name
                        : NULL));
       if (!NILP (tty))
-        {
-          name = alloca (SBYTES (tty) + 1);
-          memcpy (name, SSDATA (tty), SBYTES (tty));
-          name[SBYTES (tty)] = 0;
-        }
+       name = xlispstrdupa (tty);
 
       tty_type = get_future_frame_param
         (Qtty_type, parms, (FRAME_TERMCAP_P (XFRAME (selected_frame))
                             ? FRAME_TTY (XFRAME (selected_frame))->type
                             : NULL));
       if (!NILP (tty_type))
-        {
-          type = alloca (SBYTES (tty_type) + 1);
-          memcpy (type, SSDATA (tty_type), SBYTES (tty_type));
-          type[SBYTES (tty_type)] = 0;
-        }
+       type = xlispstrdupa (tty_type);
 
-      t = init_tty (name, type, 0); /* Errors are not fatal. */
+      t = init_tty (name, type, 0); /* Errors are not fatal.  */
     }
 
   f = make_terminal_frame (t);
@@ -726,7 +717,7 @@ affects all frames on the same terminal device.  */)
   XSETFRAME (frame, f);
 
   store_in_alist (&parms, Qtty_type, build_string (t->display_info.tty->type));
-  store_in_alist (&parms, Qtty, 
+  store_in_alist (&parms, Qtty,
                  (t->display_info.tty->name
                   ? build_string (t->display_info.tty->name)
                   : Qnil));
@@ -3545,7 +3536,7 @@ xrdb_get_resource (XrmDatabase rdb, Lisp_Object attribute, Lisp_Object class, Li
 
   value = x_get_string_resource (rdb, name_key, class_key);
 
-  if (value != (char *) 0 && *value)
+  if (value && *value)
     return build_string (value);
   else
     return Qnil;
@@ -4204,8 +4195,7 @@ make_monitor_attribute_list (struct MonitorInfo *monitors,
                         mi->work.width, mi->work.height);
       geometry = list4i (mi->geom.x, mi->geom.y,
                         mi->geom.width, mi->geom.height);
-      attributes = Fcons (Fcons (Qsource,
-                                 make_string (source, strlen (source))),
+      attributes = Fcons (Fcons (Qsource, build_string (source)),
                           attributes);
       attributes = Fcons (Fcons (Qframes, AREF (monitor_frames, i)),
                          attributes);