diff options
| author | Eli Zaretskii | 2010-09-24 15:30:13 -0400 |
|---|---|---|
| committer | Eli Zaretskii | 2010-09-24 15:30:13 -0400 |
| commit | 5816888b23238706d35d9d6e094c24866dedf2c6 (patch) | |
| tree | 3f2a3ad6fa165c8e8aeb7675cda07d5ab15b490b /src | |
| parent | 07914cd0078f3d8dc720644fd899ce8e3f0b1913 (diff) | |
| download | emacs-5816888b23238706d35d9d6e094c24866dedf2c6.tar.gz emacs-5816888b23238706d35d9d6e094c24866dedf2c6.zip | |
Fix int/EMACS_INT in eval.c and indent.c, correct previous changes.
indent.c (Fcurrent_indentation, indented_beyond_p)
(compute_motion): Use EMACS_INT for buffer position variables.
lisp.h (indented_beyond_p): Adjust prototype.
buffer.c (overlay_strings): Return EMACS_INT.
buffer.h (overlay_strings): Adjust prototype.
region-cache.c (pp_cache): Adjust format to arguments.
eval.c <specpdl_size, lisp_eval_depth>: Declare EMACS_INT.
(call_debugger): Use EMACS_INT for specpdl_size related variables.
(verror): Use EMACS_INT for size of allocated buffer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 15 | ||||
| -rw-r--r-- | src/buffer.c | 2 | ||||
| -rw-r--r-- | src/buffer.h | 2 | ||||
| -rw-r--r-- | src/eval.c | 8 | ||||
| -rw-r--r-- | src/indent.c | 10 | ||||
| -rw-r--r-- | src/lisp.h | 4 | ||||
| -rw-r--r-- | src/region-cache.c | 8 |
7 files changed, 32 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e34f41f3edb..94ae1496921 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,20 @@ | |||
| 1 | 2010-09-24 Eli Zaretskii <eliz@gnu.org> | 1 | 2010-09-24 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * indent.c (Fcurrent_indentation, indented_beyond_p) | ||
| 4 | (compute_motion): Use EMACS_INT for buffer position variables. | ||
| 5 | |||
| 6 | * lisp.h (indented_beyond_p): Adjust prototype. | ||
| 7 | |||
| 8 | * buffer.c (overlay_strings): Return EMACS_INT. | ||
| 9 | |||
| 10 | * buffer.h (overlay_strings): Adjust prototype. | ||
| 11 | |||
| 12 | * region-cache.c (pp_cache): Adjust format to arguments. | ||
| 13 | |||
| 14 | * eval.c <specpdl_size, lisp_eval_depth>: Declare EMACS_INT. | ||
| 15 | (call_debugger): Use EMACS_INT for specpdl_size related variables. | ||
| 16 | (verror): Use EMACS_INT for size of allocated buffer. | ||
| 17 | |||
| 3 | * keyboard.c (make_lispy_position): Use EMACS_INT for buffer | 18 | * keyboard.c (make_lispy_position): Use EMACS_INT for buffer |
| 4 | positions. | 19 | positions. |
| 5 | 20 | ||
diff --git a/src/buffer.c b/src/buffer.c index 7ac00aa25b4..3f087d62a5f 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -3134,7 +3134,7 @@ record_overlay_string (struct sortstrlist *ssl, Lisp_Object str, Lisp_Object str | |||
| 3134 | PSTR, if that variable is non-null. The string may be overwritten by | 3134 | PSTR, if that variable is non-null. The string may be overwritten by |
| 3135 | subsequent calls. */ | 3135 | subsequent calls. */ |
| 3136 | 3136 | ||
| 3137 | int | 3137 | EMACS_INT |
| 3138 | overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr) | 3138 | overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr) |
| 3139 | { | 3139 | { |
| 3140 | Lisp_Object overlay, window, str; | 3140 | Lisp_Object overlay, window, str; |
diff --git a/src/buffer.h b/src/buffer.h index 339e7d9bb6d..3a4dd106360 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -865,7 +865,7 @@ extern int overlays_at (EMACS_INT pos, int extend, Lisp_Object **vec_ptr, | |||
| 865 | EMACS_INT *prev_ptr, int change_req); | 865 | EMACS_INT *prev_ptr, int change_req); |
| 866 | extern int sort_overlays (Lisp_Object *, int, struct window *); | 866 | extern int sort_overlays (Lisp_Object *, int, struct window *); |
| 867 | extern void recenter_overlay_lists (struct buffer *, EMACS_INT); | 867 | extern void recenter_overlay_lists (struct buffer *, EMACS_INT); |
| 868 | extern int overlay_strings (EMACS_INT, struct window *, unsigned char **); | 868 | extern EMACS_INT overlay_strings (EMACS_INT, struct window *, unsigned char **); |
| 869 | extern void validate_region (Lisp_Object *, Lisp_Object *); | 869 | extern void validate_region (Lisp_Object *, Lisp_Object *); |
| 870 | extern void set_buffer_internal (struct buffer *); | 870 | extern void set_buffer_internal (struct buffer *); |
| 871 | extern void set_buffer_internal_1 (struct buffer *); | 871 | extern void set_buffer_internal_1 (struct buffer *); |
diff --git a/src/eval.c b/src/eval.c index 555d728b91f..d64d15040df 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -79,7 +79,7 @@ Lisp_Object Vautoload_queue; | |||
| 79 | 79 | ||
| 80 | /* Current number of specbindings allocated in specpdl. */ | 80 | /* Current number of specbindings allocated in specpdl. */ |
| 81 | 81 | ||
| 82 | int specpdl_size; | 82 | EMACS_INT specpdl_size; |
| 83 | 83 | ||
| 84 | /* Pointer to beginning of specpdl. */ | 84 | /* Pointer to beginning of specpdl. */ |
| 85 | 85 | ||
| @@ -95,7 +95,7 @@ EMACS_INT max_specpdl_size; | |||
| 95 | 95 | ||
| 96 | /* Depth in Lisp evaluations and function calls. */ | 96 | /* Depth in Lisp evaluations and function calls. */ |
| 97 | 97 | ||
| 98 | int lisp_eval_depth; | 98 | EMACS_INT lisp_eval_depth; |
| 99 | 99 | ||
| 100 | /* Maximum allowed depth in Lisp evaluations and function calls. */ | 100 | /* Maximum allowed depth in Lisp evaluations and function calls. */ |
| 101 | 101 | ||
| @@ -216,7 +216,7 @@ call_debugger (Lisp_Object arg) | |||
| 216 | int debug_while_redisplaying; | 216 | int debug_while_redisplaying; |
| 217 | int count = SPECPDL_INDEX (); | 217 | int count = SPECPDL_INDEX (); |
| 218 | Lisp_Object val; | 218 | Lisp_Object val; |
| 219 | int old_max = max_specpdl_size; | 219 | EMACS_INT old_max = max_specpdl_size; |
| 220 | 220 | ||
| 221 | /* Temporarily bump up the stack limits, | 221 | /* Temporarily bump up the stack limits, |
| 222 | so the debugger won't run out of stack. */ | 222 | so the debugger won't run out of stack. */ |
| @@ -1992,7 +1992,7 @@ void | |||
| 1992 | verror (const char *m, va_list ap) | 1992 | verror (const char *m, va_list ap) |
| 1993 | { | 1993 | { |
| 1994 | char buf[200]; | 1994 | char buf[200]; |
| 1995 | int size = 200; | 1995 | EMACS_INT size = 200; |
| 1996 | int mlen; | 1996 | int mlen; |
| 1997 | char *buffer = buf; | 1997 | char *buffer = buf; |
| 1998 | char *args[3]; | 1998 | char *args[3]; |
diff --git a/src/indent.c b/src/indent.c index 76163e24905..affcc222f0b 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -865,7 +865,7 @@ following any initial whitespace. */) | |||
| 865 | (void) | 865 | (void) |
| 866 | { | 866 | { |
| 867 | Lisp_Object val; | 867 | Lisp_Object val; |
| 868 | int opoint = PT, opoint_byte = PT_BYTE; | 868 | EMACS_INT opoint = PT, opoint_byte = PT_BYTE; |
| 869 | 869 | ||
| 870 | scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, 1); | 870 | scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, 1); |
| 871 | 871 | ||
| @@ -964,10 +964,10 @@ position_indentation (register int pos_byte) | |||
| 964 | preceding line. */ | 964 | preceding line. */ |
| 965 | 965 | ||
| 966 | int | 966 | int |
| 967 | indented_beyond_p (int pos, int pos_byte, double column) | 967 | indented_beyond_p (EMACS_INT pos, EMACS_INT pos_byte, double column) |
| 968 | { | 968 | { |
| 969 | double val; | 969 | double val; |
| 970 | int opoint = PT, opoint_byte = PT_BYTE; | 970 | EMACS_INT opoint = PT, opoint_byte = PT_BYTE; |
| 971 | 971 | ||
| 972 | SET_PT_BOTH (pos, pos_byte); | 972 | SET_PT_BOTH (pos, pos_byte); |
| 973 | while (PT > BEGV && FETCH_BYTE (PT_BYTE) == '\n') | 973 | while (PT > BEGV && FETCH_BYTE (PT_BYTE) == '\n') |
| @@ -1254,7 +1254,7 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_ | |||
| 1254 | to be changed here. */ | 1254 | to be changed here. */ |
| 1255 | { | 1255 | { |
| 1256 | unsigned char *ovstr; | 1256 | unsigned char *ovstr; |
| 1257 | int ovlen = overlay_strings (pos, win, &ovstr); | 1257 | EMACS_INT ovlen = overlay_strings (pos, win, &ovstr); |
| 1258 | hpos += ((multibyte && ovlen > 0) | 1258 | hpos += ((multibyte && ovlen > 0) |
| 1259 | ? strwidth (ovstr, ovlen) : ovlen); | 1259 | ? strwidth (ovstr, ovlen) : ovlen); |
| 1260 | } | 1260 | } |
| @@ -1459,7 +1459,7 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_ | |||
| 1459 | want to skip over it for some other reason. */ | 1459 | want to skip over it for some other reason. */ |
| 1460 | if (common_width != 0) | 1460 | if (common_width != 0) |
| 1461 | { | 1461 | { |
| 1462 | int run_end_hpos; | 1462 | EMACS_INT run_end_hpos; |
| 1463 | 1463 | ||
| 1464 | /* Don't go past the final buffer posn the user | 1464 | /* Don't go past the final buffer posn the user |
| 1465 | requested. */ | 1465 | requested. */ |
diff --git a/src/lisp.h b/src/lisp.h index 14f8617ce9e..1d499e88cf4 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1877,7 +1877,7 @@ struct specbinding | |||
| 1877 | 1877 | ||
| 1878 | extern struct specbinding *specpdl; | 1878 | extern struct specbinding *specpdl; |
| 1879 | extern struct specbinding *specpdl_ptr; | 1879 | extern struct specbinding *specpdl_ptr; |
| 1880 | extern int specpdl_size; | 1880 | extern EMACS_INT specpdl_size; |
| 1881 | 1881 | ||
| 1882 | extern EMACS_INT max_specpdl_size; | 1882 | extern EMACS_INT max_specpdl_size; |
| 1883 | 1883 | ||
| @@ -3241,7 +3241,7 @@ EXFUN (Fcurrent_column, 0); | |||
| 3241 | EXFUN (Fmove_to_column, 2); | 3241 | EXFUN (Fmove_to_column, 2); |
| 3242 | extern double current_column (void); | 3242 | extern double current_column (void); |
| 3243 | extern void invalidate_current_column (void); | 3243 | extern void invalidate_current_column (void); |
| 3244 | extern int indented_beyond_p (int, int, double); | 3244 | extern int indented_beyond_p (EMACS_INT, EMACS_INT, double); |
| 3245 | extern void syms_of_indent (void); | 3245 | extern void syms_of_indent (void); |
| 3246 | 3246 | ||
| 3247 | /* Defined in frame.c */ | 3247 | /* Defined in frame.c */ |
diff --git a/src/region-cache.c b/src/region-cache.c index b6c43359b1b..9037b5df4b4 100644 --- a/src/region-cache.c +++ b/src/region-cache.c | |||
| @@ -788,9 +788,9 @@ pp_cache (struct region_cache *c) | |||
| 788 | EMACS_INT end_u = c->buffer_end - c->end_unchanged; | 788 | EMACS_INT end_u = c->buffer_end - c->end_unchanged; |
| 789 | 789 | ||
| 790 | fprintf (stderr, | 790 | fprintf (stderr, |
| 791 | "basis: %d..%d modified: %d..%d\n", | 791 | "basis: %ld..%ld modified: %ld..%ld\n", |
| 792 | c->buffer_beg, c->buffer_end, | 792 | (long)c->buffer_beg, (long)c->buffer_end, |
| 793 | beg_u, end_u); | 793 | (long)beg_u, (long)end_u); |
| 794 | 794 | ||
| 795 | for (i = 0; i < c->cache_len; i++) | 795 | for (i = 0; i < c->cache_len; i++) |
| 796 | { | 796 | { |
| @@ -804,7 +804,7 @@ pp_cache (struct region_cache *c) | |||
| 804 | : (pos == end_u) ? '-' | 804 | : (pos == end_u) ? '-' |
| 805 | : ' '), | 805 | : ' '), |
| 806 | stderr); | 806 | stderr); |
| 807 | fprintf (stderr, "%d : %d\n", pos, BOUNDARY_VALUE (c, i)); | 807 | fprintf (stderr, "%ld : %d\n", (long)pos, BOUNDARY_VALUE (c, i)); |
| 808 | } | 808 | } |
| 809 | } | 809 | } |
| 810 | 810 | ||