Commit 7c85f529 authored by Paul Eggert's avatar Paul Eggert
Browse files

Fix ptrdiff_t/EMACS_INT confusion.

parent 2972b14b
......@@ -2411,6 +2411,6 @@ bidi_dump_cached_states (void)
fputs ("\n", stderr);
fputs ("pos ", stderr);
for (i = 0; i < bidi_cache_idx; i++)
fprintf (stderr, "%*"pI"d", ndigits, bidi_cache[i].charpos);
fprintf (stderr, "%*"pD"d", ndigits, bidi_cache[i].charpos);
fputs ("\n", stderr);
}
......@@ -1108,7 +1108,7 @@ an error is signaled. */)
ptrdiff_t converted = str_to_unibyte (SDATA (string), str, chars, 0);
if (converted < chars)
error ("Can't convert the %"pI"dth character to unibyte", converted);
error ("Can't convert the %"pD"dth character to unibyte", converted);
string = make_unibyte_string ((char *) str, chars);
xfree (str);
}
......
......@@ -26,13 +26,13 @@ struct position
int contin;
};
struct position *compute_motion (ptrdiff_t from, ptrdiff_t fromvpos,
ptrdiff_t fromhpos, int did_motion,
ptrdiff_t to, ptrdiff_t tovpos,
ptrdiff_t tohpos,
ptrdiff_t width, ptrdiff_t hscroll,
struct position *compute_motion (ptrdiff_t from, EMACS_INT fromvpos,
EMACS_INT fromhpos, int did_motion,
ptrdiff_t to, EMACS_INT tovpos,
EMACS_INT tohpos,
EMACS_INT width, ptrdiff_t hscroll,
int tab_offset, struct window *);
struct position *vmotion (ptrdiff_t from, ptrdiff_t vtarget,
struct position *vmotion (ptrdiff_t from, EMACS_INT vtarget,
struct window *);
ptrdiff_t skip_invisible (ptrdiff_t pos, ptrdiff_t *next_boundary_p,
ptrdiff_t to, Lisp_Object window);
......
......@@ -774,7 +774,7 @@ update_interval (register INTERVAL i, ptrdiff_t pos)
i = i->right; /* Move to the right child */
}
else if (NULL_PARENT (i))
error ("Point %"pI"d after end of properties", pos);
error ("Point %"pD"d after end of properties", pos);
else
i = INTERVAL_PARENT (i);
continue;
......
......@@ -6493,7 +6493,7 @@ modify_event_symbol (ptrdiff_t symbol_num, int modifiers, Lisp_Object symbol_kin
if (NILP (value))
{
char buf[sizeof "key-" + INT_STRLEN_BOUND (EMACS_INT)];
sprintf (buf, "key-%"pI"d", symbol_num);
sprintf (buf, "key-%"pD"d", symbol_num);
value = intern (buf);
}
......
......@@ -1807,7 +1807,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
/* Implement a readable output, e.g.:
#s(hash-table size 2 test equal data (k1 v1 k2 v2)) */
/* Always print the size. */
sprintf (buf, "#s(hash-table size %"pI"d", ASIZE (h->next));
sprintf (buf, "#s(hash-table size %"pD"d", ASIZE (h->next));
strout (buf, -1, -1, printcharfun);
if (!NILP (h->test))
......@@ -1982,7 +1982,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
strout ("in no buffer", -1, -1, printcharfun);
else
{
sprintf (buf, "at %"pI"d", marker_position (obj));
sprintf (buf, "at %"pD"d", marker_position (obj));
strout (buf, -1, -1, printcharfun);
strout (" in ", -1, -1, printcharfun);
print_string (BVAR (XMARKER (obj)->buffer, name), printcharfun);
......@@ -1996,7 +1996,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
strout ("in no buffer", -1, -1, printcharfun);
else
{
sprintf (buf, "from %"pI"d to %"pI"d in ",
sprintf (buf, "from %"pD"d to %"pD"d in ",
marker_position (OVERLAY_START (obj)),
marker_position (OVERLAY_END (obj)));
strout (buf, -1, -1, printcharfun);
......@@ -2035,7 +2035,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
if (MISCP (obj))
sprintf (buf, "(MISC 0x%04x)", (int) XMISCTYPE (obj));
else if (VECTORLIKEP (obj))
sprintf (buf, "(PVEC 0x%08"pI"x)", ASIZE (obj));
sprintf (buf, "(PVEC 0x%08"pD"x)", ASIZE (obj));
else
sprintf (buf, "(0x%02x)", (int) XTYPE (obj));
strout (buf, -1, -1, printcharfun);
......
......@@ -2251,7 +2251,7 @@ between them, return t; otherwise return nil. */)
int found;
EMACS_INT count1;
ptrdiff_t out_charpos, out_bytepos;
ptrdiff_t dummy;
EMACS_INT dummy;
CHECK_NUMBER (count);
count1 = XINT (count);
......@@ -2473,7 +2473,7 @@ scan_lists (register EMACS_INT from, EMACS_INT count, EMACS_INT depth, int sexpf
ptrdiff_t from_byte;
ptrdiff_t out_bytepos, out_charpos;
int temp;
ptrdiff_t dummy;
EMACS_INT dummy;
int multibyte_symbol_p = sexpflag && multibyte_syntax_as_symbol;
if (depth > 0) min_depth = 0;
......
......@@ -20793,7 +20793,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
so get us a 2-digit number that is close. */
if (total == 100)
total = 99;
sprintf (decode_mode_spec_buf, "%2"pI"d%%", total);
sprintf (decode_mode_spec_buf, "%2"pD"d%%", total);
return decode_mode_spec_buf;
}
}
......@@ -20824,9 +20824,9 @@ decode_mode_spec (struct window *w, register int c, int field_width,
if (total == 100)
total = 99;
if (toppos <= BUF_BEGV (b))
sprintf (decode_mode_spec_buf, "Top%2"pI"d%%", total);
sprintf (decode_mode_spec_buf, "Top%2"pD"d%%", total);
else
sprintf (decode_mode_spec_buf, "%2"pI"d%%", total);
sprintf (decode_mode_spec_buf, "%2"pD"d%%", total);
return decode_mode_spec_buf;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment