not unsigned long, as we prefer signed integers. All callers changed.
Detect integer overflow in repeat count.
(message_dolog): Don't assume print length fits in 39 bytes.
+ (display_mode_element): Don't assume strlen fits in int.
* termcap.c: Don't assume sizes fit in int and never overflow.
(struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
break;
case MODE_LINE_STRING:
{
- int len = strlen (spec);
- Lisp_Object tem = make_string (spec, len);
+ Lisp_Object tem = build_string (spec);
props = Ftext_properties_at (make_number (charpos), elt);
/* Should only keep face property in props */
n += store_mode_line_string (NULL, tem, 0, field, prec, props);