Vframe_list = Fcons (frame, Vframe_list);
tty_frame_count = 1;
- f->name = make_pure_c_string ("F1");
+ f->name = build_pure_c_string ("F1");
f->visible = 1;
f->async_visible = 1;
XSETFRAME (frame, f);
Vframe_list = Fcons (frame, Vframe_list);
- tty_frame_count++;
- sprintf (name, "F%"pMd, tty_frame_count);
- f->name = build_string (name);
+ f->name = make_formatted_string (name, "F%"pMd, ++tty_frame_count);
f->visible = 1; /* FRAME_SET_VISIBLE wd set frame_garbaged. */
f->async_visible = 1; /* Don't let visible be cleared later. */
if (!NILP (tty))
{
name = alloca (SBYTES (tty) + 1);
- strncpy (name, SSDATA (tty), SBYTES (tty));
+ memcpy (name, SSDATA (tty), SBYTES (tty));
name[SBYTES (tty)] = 0;
}
if (!NILP (tty_type))
{
type = alloca (SBYTES (tty_type) + 1);
- strncpy (type, SSDATA (tty_type), SBYTES (tty_type));
+ memcpy (type, SSDATA (tty_type), SBYTES (tty_type));
type[SBYTES (tty_type)] = 0;
}
request a switch to FOCUS-FRAME, and `last-event-frame' will be
FOCUS-FRAME after reading an event typed at FRAME.
-If FOCUS-FRAME is omitted or nil, any existing redirection is
-canceled, and the frame again receives its own keystrokes.
+If FOCUS-FRAME is nil, any existing redirection is canceled, and the
+frame again receives its own keystrokes.
Focus redirection is useful for temporarily redirecting keystrokes to
a surrogate minibuffer frame when a frame doesn't have its own
\f
/* Return the value of frame parameter PROP in frame FRAME. */
+#ifdef HAVE_WINDOW_SYSTEM
#if !HAVE_NS
static
#endif
return tem;
return Fcdr (tem);
}
+#endif
/* Return the buffer-predicate of the selected frame. */
SBYTES (f->name)))
return;
- tty_frame_count++;
- sprintf (namebuf, "F%"pMd, tty_frame_count);
- name = build_string (namebuf);
+ name = make_formatted_string (namebuf, "F%"pMd, ++tty_frame_count);
}
else
{
struct gcpro gcpro1, gcpro2;
i = 0;
- for (tail = alist; CONSP (tail); tail = Fcdr (tail))
+ for (tail = alist; CONSP (tail); tail = XCDR (tail))
i++;
parms = alloca (i * sizeof *parms);
}
/* Don't die if just one of these was set. */
- if (! TYPE_RANGED_INTEGERP (int, left))
+ if (EQ (left, Qunbound))
{
left_no_change = 1;
if (f->left_pos < 0)
else
XSETINT (left, f->left_pos);
}
- if (! TYPE_RANGED_INTEGERP (int, top))
+ if (EQ (top, Qunbound))
{
top_no_change = 1;
if (f->top_pos < 0)
actually a pointer. Explicit casting avoids compiler
warnings. */
w = (unsigned long) FRAME_X_WINDOW (f);
- sprintf (buf, "%lu", w);
store_in_alist (alistptr, Qwindow_id,
- build_string (buf));
+ make_formatted_string (buf, "%lu", w));
#ifdef HAVE_X_WINDOWS
#ifdef USE_X_TOOLKIT
/* Tooltip frame may not have this widget. */
if (FRAME_X_OUTPUT (f)->widget)
#endif
- {
- w = (unsigned long) FRAME_OUTER_WINDOW (f);
- sprintf (buf, "%lu", w);
- }
+ w = (unsigned long) FRAME_OUTER_WINDOW (f);
store_in_alist (alistptr, Qouter_window_id,
- build_string (buf));
+ make_formatted_string (buf, "%lu", w));
#endif
store_in_alist (alistptr, Qicon_name, f->icon_name);
FRAME_SAMPLE_VISIBILITY (f);
fontset = fs_query_fontset (arg, 0);
if (fontset < 0)
{
- font_object = font_open_by_name (f, SSDATA (arg));
+ font_object = font_open_by_name (f, arg);
if (NILP (font_object))
error ("Font `%s' is not defined", SSDATA (arg));
arg = AREF (font_object, FONT_NAME_INDEX);
}
else if (fontset > 0)
{
- Lisp_Object ascii_font = fontset_ascii (fontset);
-
- font_object = font_open_by_name (f, SSDATA (ascii_font));
+ font_object = font_open_by_name (f, fontset_ascii (fontset));
if (NILP (font_object))
error ("Font `%s' is not defined", SDATA (arg));
arg = AREF (font_object, FONT_NAME_INDEX);