X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/a10c82694e253f891cdfa220ba75b59f5ed50ab3..9c25330708e49ddaeb71f16a65cdc1b51be2a27d:/src/frame.c diff --git a/src/frame.c b/src/frame.c index 14fc15c471..bb44f3cc98 100644 --- a/src/frame.c +++ b/src/frame.c @@ -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);