ptr = buffer + offset;
}
- bcopy (text, ptr, len);
+ memcpy (ptr, text, len);
ptr += len;
}
static void
save_getcjmp (jmp_buf temp)
{
- bcopy (getcjmp, temp, sizeof getcjmp);
+ memcpy (temp, getcjmp, sizeof getcjmp);
}
static void
restore_getcjmp (jmp_buf temp)
{
- bcopy (temp, getcjmp, sizeof getcjmp);
+ memcpy (getcjmp, temp, sizeof getcjmp);
}
\f
/* Low level keyboard/mouse input.
if (hold_quit)
{
- bcopy (event, (char *) hold_quit, sizeof (*event));
+ memcpy (hold_quit, event, sizeof (*event));
return;
}
new_name = make_uninit_multibyte_string (mod_len + base_len,
mod_len + base_len_byte);
- bcopy (new_mods, SDATA (new_name), mod_len);
- bcopy (base, SDATA (new_name) + mod_len, base_len_byte);
+ memcpy (SDATA (new_name), new_mods, mod_len);
+ memcpy (SDATA (new_name) + mod_len, base, base_len_byte);
return Fintern (new_name, Qnil);
}
if (nstored == 0)
{
- bzero (&buf, sizeof buf);
+ memset (&buf, 0, sizeof buf);
buf.kind = USER_SIGNAL_EVENT;
buf.frame_or_window = selected_frame;
}
nmaps = 0;
if (tem = get_local_map (PT, current_buffer, Qkeymap), !NILP (tem))
maps[nmaps++] = tem;
- bcopy (tmaps, (void *) (maps + nmaps), nminor * sizeof (maps[0]));
+ memcpy (maps + nmaps, tmaps, nminor * sizeof (maps[0]));
nmaps += nminor;
maps[nmaps++] = get_local_map (PT, current_buffer, Qlocal_map);
}
tem2 = XVECTOR (menu_bar_items_vector)->contents[i + 2];
tem3 = XVECTOR (menu_bar_items_vector)->contents[i + 3];
if (end > i + 4)
- bcopy (&XVECTOR (menu_bar_items_vector)->contents[i + 4],
- &XVECTOR (menu_bar_items_vector)->contents[i],
- (end - i - 4) * sizeof (Lisp_Object));
+ memmove (&XVECTOR (menu_bar_items_vector)->contents[i],
+ &XVECTOR (menu_bar_items_vector)->contents[i + 4],
+ (end - i - 4) * sizeof (Lisp_Object));
XVECTOR (menu_bar_items_vector)->contents[end - 4] = tem0;
XVECTOR (menu_bar_items_vector)->contents[end - 3] = tem1;
XVECTOR (menu_bar_items_vector)->contents[end - 2] = tem2;
if (EQ (key, XVECTOR (menu_bar_items_vector)->contents[i]))
{
if (menu_bar_items_index > i + 4)
- bcopy (&XVECTOR (menu_bar_items_vector)->contents[i + 4],
- &XVECTOR (menu_bar_items_vector)->contents[i],
- (menu_bar_items_index - i - 4) * sizeof (Lisp_Object));
+ memmove (&XVECTOR (menu_bar_items_vector)->contents[i],
+ &XVECTOR (menu_bar_items_vector)->contents[i + 4],
+ (menu_bar_items_index - i - 4) * sizeof (Lisp_Object));
menu_bar_items_index -= 4;
}
}
nmaps = 0;
if (tem = get_local_map (PT, current_buffer, Qkeymap), !NILP (tem))
maps[nmaps++] = tem;
- bcopy (tmaps, (void *) (maps + nmaps), nminor * sizeof (maps[0]));
+ memcpy (maps + nmaps, tmaps, nminor * sizeof (maps[0]));
nmaps += nminor;
maps[nmaps++] = get_local_map (PT, current_buffer, Qlocal_map);
}
if (EQ (key, v[TOOL_BAR_ITEM_KEY]))
{
if (ntool_bar_items > i + TOOL_BAR_ITEM_NSLOTS)
- bcopy (v + TOOL_BAR_ITEM_NSLOTS, v,
- ((ntool_bar_items - i - TOOL_BAR_ITEM_NSLOTS)
- * sizeof (Lisp_Object)));
+ memmove (v, v + TOOL_BAR_ITEM_NSLOTS,
+ ((ntool_bar_items - i - TOOL_BAR_ITEM_NSLOTS)
+ * sizeof (Lisp_Object)));
ntool_bar_items -= TOOL_BAR_ITEM_NSLOTS;
break;
}
tool_bar_items_vector. */
to = XVECTOR (tool_bar_items_vector)->contents + ntool_bar_items;
from = XVECTOR (tool_bar_item_properties)->contents;
- bcopy (from, to, TOOL_BAR_ITEM_NSLOTS * sizeof *to);
+ memcpy (to, from, TOOL_BAR_ITEM_NSLOTS * sizeof *to);
ntool_bar_items += TOOL_BAR_ITEM_NSLOTS;
}
thiswidth = SCHARS (desc);
if (thiswidth + i > width)
thiswidth = width - i;
- bcopy (SDATA (desc), menu + i, thiswidth);
+ memcpy (menu + i, SDATA (desc), thiswidth);
i += thiswidth;
strcpy (menu + i, " = ");
i += 3;
thiswidth = SCHARS (s);
if (thiswidth + i > width)
thiswidth = width - i;
- bcopy (SDATA (s), menu + i, thiswidth);
+ memcpy (menu + i, SDATA (s), thiswidth);
i += thiswidth;
menu[i] = 0;
}
if (!NILP (orig_keymap))
submaps[nmaps++] = orig_keymap;
- bcopy (maps, (void *) (submaps + nmaps),
- nminor * sizeof (submaps[0]));
+ memcpy (submaps + nmaps, maps, nminor * sizeof (submaps[0]));
nmaps += nminor;
specbind (Qinput_method_use_echo_area,
(NILP (command_loop) ? Qt : Qnil));
- bzero (keybuf, sizeof keybuf);
+ memset (keybuf, 0, sizeof keybuf);
GCPRO1 (keybuf[0]);
gcpro1.nvars = (sizeof keybuf/sizeof (keybuf[0]));
specbind (Qinput_method_use_echo_area,
(NILP (command_loop) ? Qt : Qnil));
- bzero (keybuf, sizeof keybuf);
+ memset (keybuf, 0, sizeof keybuf);
GCPRO1 (keybuf[0]);
gcpro1.nvars = (sizeof keybuf/sizeof (keybuf[0]));
else
{
val = Fvector (NUM_RECENT_KEYS, keys);
- bcopy (keys + recent_keys_index,
- XVECTOR (val)->contents,
- (NUM_RECENT_KEYS - recent_keys_index) * sizeof (Lisp_Object));
- bcopy (keys,
- XVECTOR (val)->contents + NUM_RECENT_KEYS - recent_keys_index,
- recent_keys_index * sizeof (Lisp_Object));
+ memcpy (XVECTOR (val)->contents, keys + recent_keys_index,
+ (NUM_RECENT_KEYS - recent_keys_index) * sizeof (Lisp_Object));
+ memcpy (XVECTOR (val)->contents + NUM_RECENT_KEYS - recent_keys_index,
+ keys, recent_keys_index * sizeof (Lisp_Object));
return val;
}
}