const unsigned char *src = coding->source;
const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte;
- int consumed_chars = 0;
+ EMACS_INT consumed_chars = 0;
int found = 0;
...;
unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes;
unsigned char *adjusted_dst_end = dst_end - _MAX_BYTES_PRODUCED_IN_LOOP_;
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
for (; charbuf < charbuf_end && dst < adjusted_dst_end; charbuf++)
{
do { \
if (dst + (bytes) >= dst_end) \
{ \
- int more_bytes = charbuf_end - charbuf + (bytes); \
+ EMACS_INT more_bytes = charbuf_end - charbuf + (bytes); \
\
dst = alloc_destination (coding, more_bytes, dst); \
dst_end = coding->destination + coding->dst_bytes; \
const unsigned char *src = coding->source, *src_base;
const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte;
- int consumed_chars = 0;
+ EMACS_INT consumed_chars = 0;
int bom_found = 0;
int found = 0;
const unsigned char *src_base;
int *charbuf = coding->charbuf + coding->charbuf_used;
int *charbuf_end = coding->charbuf + coding->charbuf_size;
- int consumed_chars = 0, consumed_chars_base = 0;
+ EMACS_INT consumed_chars = 0, consumed_chars_base = 0;
int multibytep = coding->src_multibyte;
enum utf_bom_type bom = CODING_UTF_8_BOM (coding);
int eol_dos =
int *charbuf_end = charbuf + coding->charbuf_used;
unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes;
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
int c;
if (CODING_UTF_8_BOM (coding) == utf_with_bom)
int *charbuf = coding->charbuf + coding->charbuf_used;
/* We may produces at most 3 chars in one loop. */
int *charbuf_end = coding->charbuf + coding->charbuf_size - 2;
- int consumed_chars = 0, consumed_chars_base = 0;
+ EMACS_INT consumed_chars = 0, consumed_chars_base = 0;
int multibytep = coding->src_multibyte;
enum utf_bom_type bom = CODING_UTF_16_BOM (coding);
enum utf_16_endian_type endian = CODING_UTF_16_ENDIAN (coding);
int safe_room = 8;
enum utf_bom_type bom = CODING_UTF_16_BOM (coding);
int big_endian = CODING_UTF_16_ENDIAN (coding) == utf_16_big_endian;
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
int c;
if (bom != utf_without_bom)
const unsigned char *src = coding->source, *src_base;
const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte;
- int consumed_chars = 0;
+ EMACS_INT consumed_chars = 0;
int c;
int found = 0;
loop and one more charset annotation at the end. */
int *charbuf_end
= coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3);
- int consumed_chars = 0, consumed_chars_base;
+ EMACS_INT consumed_chars = 0, consumed_chars_base;
int multibytep = coding->src_multibyte;
- int char_offset = coding->produced_char;
- int last_offset = char_offset;
+ EMACS_INT char_offset = coding->produced_char;
+ EMACS_INT last_offset = char_offset;
int last_id = charset_ascii;
int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes;
int safe_room = 8;
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
Lisp_Object attrs, charset_list;
int c;
int preferred_charset_id = -1;
int single_shifting = 0;
int id;
int c, c1;
- int consumed_chars = 0;
+ EMACS_INT consumed_chars = 0;
int i;
int rejected = 0;
int found = 0;
loop and one more charset annotation at the end. */
int *charbuf_end
= coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3);
- int consumed_chars = 0, consumed_chars_base;
+ EMACS_INT consumed_chars = 0, consumed_chars_base;
int multibytep = coding->src_multibyte;
/* Charsets invoked to graphic plane 0 and 1 respectively. */
int charset_id_0 = CODING_ISO_INVOKED_CHARSET (coding, 0);
int c;
struct composition_status *cmp_status = CODING_ISO_CMP_STATUS (coding);
Lisp_Object attrs = CODING_ID_ATTRS (coding->id);
- int char_offset = coding->produced_char;
- int last_offset = char_offset;
+ EMACS_INT char_offset = coding->produced_char;
+ EMACS_INT last_offset = char_offset;
int last_id = charset_ascii;
int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
static unsigned char *
encode_invocation_designation (struct charset *charset,
struct coding_system *coding,
- unsigned char *dst, int *p_nchars)
+ unsigned char *dst, EMACS_INT *p_nchars)
{
int multibytep = coding->dst_multibyte;
- int produced_chars = *p_nchars;
+ EMACS_INT produced_chars = *p_nchars;
int reg; /* graphic register number */
int id = CHARSET_ID (charset);
/* Table of charsets to be designated to each graphic register. */
int r[4];
int c, found = 0, reg;
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
int multibytep = coding->dst_multibyte;
Lisp_Object attrs;
Lisp_Object charset_list;
int bol_designation
= (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_DESIGNATE_AT_BOL
&& CODING_ISO_BOL (coding));
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
Lisp_Object attrs, eol_type, charset_list;
int ascii_compatible;
int c;
const unsigned char *src = coding->source, *src_base;
const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte;
- int consumed_chars = 0;
+ EMACS_INT consumed_chars = 0;
int found = 0;
int c;
Lisp_Object attrs, charset_list;
const unsigned char *src = coding->source, *src_base;
const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte;
- int consumed_chars = 0;
+ EMACS_INT consumed_chars = 0;
int found = 0;
int c;
the end. */
int *charbuf_end
= coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2);
- int consumed_chars = 0, consumed_chars_base;
+ EMACS_INT consumed_chars = 0, consumed_chars_base;
int multibytep = coding->src_multibyte;
struct charset *charset_roman, *charset_kanji, *charset_kana;
struct charset *charset_kanji2;
Lisp_Object attrs, charset_list, val;
- int char_offset = coding->produced_char;
- int last_offset = char_offset;
+ EMACS_INT char_offset = coding->produced_char;
+ EMACS_INT last_offset = char_offset;
int last_id = charset_ascii;
int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
the end. */
int *charbuf_end
= coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2);
- int consumed_chars = 0, consumed_chars_base;
+ EMACS_INT consumed_chars = 0, consumed_chars_base;
int multibytep = coding->src_multibyte;
struct charset *charset_roman, *charset_big5;
Lisp_Object attrs, charset_list, val;
- int char_offset = coding->produced_char;
- int last_offset = char_offset;
+ EMACS_INT char_offset = coding->produced_char;
+ EMACS_INT last_offset = char_offset;
int last_id = charset_ascii;
int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes;
int safe_room = 4;
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
Lisp_Object attrs, charset_list, val;
int ascii_compatible;
struct charset *charset_kanji, *charset_kana;
unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes;
int safe_room = 4;
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
Lisp_Object attrs, charset_list, val;
int ascii_compatible;
struct charset *charset_big5;
const unsigned char *src = coding->source, *src_base;
const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte;
- int consumed_chars = 0;
+ EMACS_INT consumed_chars = 0;
int found = 0;
unsigned char *valids;
- int head_ascii = coding->head_ascii;
+ EMACS_INT head_ascii = coding->head_ascii;
Lisp_Object attrs;
detect_info->checked |= CATEGORY_MASK_CCL;
const unsigned char *src_end = coding->source + coding->src_bytes;
int *charbuf = coding->charbuf + coding->charbuf_used;
int *charbuf_end = coding->charbuf + coding->charbuf_size;
- int consumed_chars = 0;
+ EMACS_INT consumed_chars = 0;
int multibytep = coding->src_multibyte;
struct ccl_program *ccl = &coding->spec.ccl->ccl;
int source_charbuf[1024];
unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes;
int destination_charbuf[1024];
- int i, produced_chars = 0;
+ EMACS_INT produced_chars = 0;
+ int i;
Lisp_Object attrs, charset_list;
CODING_GET_INFO (coding, attrs, charset_list);
int *charbuf_end = coding->charbuf + coding->charbuf_used;
unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes;
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
int c;
if (multibytep)
const unsigned char *src = coding->source, *src_base;
const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte;
- int consumed_chars = 0;
+ EMACS_INT consumed_chars = 0;
Lisp_Object attrs, valids, name;
int found = 0;
- int head_ascii = coding->head_ascii;
+ EMACS_INT head_ascii = coding->head_ascii;
int check_latin_extra = 0;
detect_info->checked |= CATEGORY_MASK_CHARSET;
the end. */
int *charbuf_end
= coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2);
- int consumed_chars = 0, consumed_chars_base;
+ EMACS_INT consumed_chars = 0, consumed_chars_base;
int multibytep = coding->src_multibyte;
Lisp_Object attrs = CODING_ID_ATTRS (coding->id);
Lisp_Object valids;
- int char_offset = coding->produced_char;
- int last_offset = char_offset;
+ EMACS_INT char_offset = coding->produced_char;
+ EMACS_INT last_offset = char_offset;
int last_id = charset_ascii;
int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes;
int safe_room = MAX_MULTIBYTE_LENGTH;
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
Lisp_Object attrs, charset_list;
int ascii_compatible;
int c;
}
else if (EQ (eol_type, Qdos))
{
- int n = 0;
+ EMACS_INT n = 0;
if (NILP (coding->dst_object))
{
}
else
{
- int pos_byte = coding->dst_pos_byte;
- int pos = coding->dst_pos;
- int pos_end = pos + coding->produced_char - 1;
+ EMACS_INT pos_byte = coding->dst_pos_byte;
+ EMACS_INT pos = coding->dst_pos;
+ EMACS_INT pos_end = pos + coding->produced_char - 1;
while (pos < pos_end)
{
if (c >= 0)
{
- int from_nchars = 1, to_nchars = 1;
+ EMACS_INT from_nchars = 1, to_nchars = 1;
Lisp_Object trans = Qnil;
LOOKUP_TRANSLATION_TABLE (translation_table, c, trans);
static Lisp_Object
string_match_1 (Lisp_Object regexp, Lisp_Object string, Lisp_Object start, int posix)
{
- int val;
+ EMACS_INT val;
struct re_pattern_buffer *bufp;
EMACS_INT pos, pos_byte;
int i;
and return the index of the match, or negative on failure.
This does not clobber the match data. */
-int
+EMACS_INT
fast_string_match (Lisp_Object regexp, Lisp_Object string)
{
- int val;
+ EMACS_INT val;
struct re_pattern_buffer *bufp;
bufp = compile_pattern (regexp, 0, Qnil,
This does not clobber the match data.
We assume that STRING contains single-byte characters. */
-int
+EMACS_INT
fast_c_string_match_ignore_case (Lisp_Object regexp, const char *string)
{
- int val;
+ EMACS_INT val;
struct re_pattern_buffer *bufp;
size_t len = strlen (string);
/* Like fast_string_match but ignore case. */
-int
+EMACS_INT
fast_string_match_ignore_case (Lisp_Object regexp, Lisp_Object string)
{
- int val;
+ EMACS_INT val;
struct re_pattern_buffer *bufp;
bufp = compile_pattern (regexp, 0, Vascii_canon_table,
EMACS_INT
scan_buffer (register int target, EMACS_INT start, EMACS_INT end,
- EMACS_INT count, int *shortage, int allow_quit)
+ EMACS_INT count, EMACS_INT *shortage, int allow_quit)
{
struct region_cache *newline_cache;
int direction;
EMACS_INT
find_next_newline_no_quit (EMACS_INT from, EMACS_INT cnt)
{
- return scan_buffer ('\n', from, 0, cnt, (int *) 0, 0);
+ return scan_buffer ('\n', from, 0, cnt, (EMACS_INT *) 0, 0);
}
/* Like find_next_newline, but returns position before the newline,
EMACS_INT
find_before_next_newline (EMACS_INT from, EMACS_INT to, EMACS_INT cnt)
{
- int shortage;
+ EMACS_INT shortage;
EMACS_INT pos = scan_buffer ('\n', from, to, cnt, &shortage, 1);
if (shortage == 0)
search_command (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror,
Lisp_Object count, int direction, int RE, int posix)
{
- register int np;
+ register EMACS_INT np;
EMACS_INT lim, lim_byte;
- int n = direction;
+ EMACS_INT n = direction;
if (!NILP (count))
{
/* We build up the substituted string in ACCUM. */
Lisp_Object accum;
Lisp_Object middle;
- int length = SBYTES (newtext);
+ EMACS_INT length = SBYTES (newtext);
accum = Qnil;
len = 0;
for (i = 0; i < search_regs.num_regs; i++)
{
- int start = search_regs.start[i];
+ EMACS_INT start = search_regs.start[i];
if (start >= 0)
{
if (EQ (last_thing_searched, Qt)
static void handle_line_prefix (struct it *);
static void pint2str (char *, int, EMACS_INT);
-static void pint2hrstr (char *, int, int);
+static void pint2hrstr (char *, int, EMACS_INT);
static struct text_pos run_window_scroll_functions (Lisp_Object,
struct text_pos);
static void reconsider_clip_changes (struct window *, struct buffer *);
static int store_mode_line_string (const char *, Lisp_Object, int, int, int, Lisp_Object);
static const char *decode_mode_spec (struct window *, int, int, Lisp_Object *);
static void display_menu_bar (struct window *);
-static int display_count_lines (EMACS_INT, EMACS_INT, int, EMACS_INT *);
+static EMACS_INT display_count_lines (EMACS_INT, EMACS_INT, EMACS_INT,
+ EMACS_INT *);
static int display_string (const char *, Lisp_Object, Lisp_Object,
EMACS_INT, EMACS_INT, struct it *, int, int, int, int);
static void compute_line_metrics (struct it *);
};
static void
-pint2hrstr (char *buf, int width, int d)
+pint2hrstr (char *buf, int width, EMACS_INT d)
{
/* We aim to represent the nonnegative integer D as
QUOTIENT.TENTHS * 10 ^ (3 * EXPONENT). */
- int quotient = d;
+ EMACS_INT quotient = d;
int remainder = 0;
/* -1 means: do not use TENTHS. */
int tenths = -1;
case 'l':
{
EMACS_INT startpos, startpos_byte, line, linepos, linepos_byte;
- int topline, nlines, height;
+ EMACS_INT topline, nlines, height;
EMACS_INT junk;
/* %c and %l are ignored in `frame-title-format'. */
EMACS_INT limit = BUF_BEGV (b);
EMACS_INT limit_byte = BUF_BEGV_BYTE (b);
EMACS_INT position;
- int distance = (height * 2 + 30) * line_number_display_limit_width;
+ EMACS_INT distance =
+ (height * 2 + 30) * line_number_display_limit_width;
if (startpos - distance > limit)
{
Set *BYTE_POS_PTR to 1 if we found COUNT lines, 0 if we hit LIMIT. */
-static int
+static EMACS_INT
display_count_lines (EMACS_INT start_byte,
- EMACS_INT limit_byte, int count,
+ EMACS_INT limit_byte, EMACS_INT count,
EMACS_INT *byte_pos_ptr)
{
register unsigned char *cursor;
unsigned char *base;
- register int ceiling;
+ register EMACS_INT ceiling;
register unsigned char *ceiling_addr;
- int orig_count = count;
+ EMACS_INT orig_count = count;
/* If we are not in selective display mode,
check only for newlines. */