[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r101539: Fix some uses of int instead
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r101539: Fix some uses of int instead of EMACS_INT. |
Date: |
Wed, 22 Sep 2010 12:03:34 -0400 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 101539
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Wed 2010-09-22 12:03:34 -0400
message:
Fix some uses of int instead of EMACS_INT.
minibuf.c (Fminibuffer_contents)
(Fminibuffer_contents_no_properties)
(Fminibuffer_completion_contents): Use EMACS_INT for minibuffer
positions.
keyboard.c (command_loop_1): Use EMACS_INT to compare point with
mark.
alloc.c (make_uninit_string, make_uninit_multibyte_string)
(allocate_string_data): Accept EMACS_INT for string length.
editfns.c (Ffield_string, Ffield_string_no_properties)
(make_buffer_string, make_buffer_string_both, Fbuffer_substring)
(Fbuffer_substring_no_properties, find_field, Fdelete_field)
(Ffield_string, Ffield_string_no_properties, Ffield_beginning)
(Ffield_end): Use EMACS_INT for buffer positions.
insdel.c (prepare_to_modify_buffer): Use EMACS_INT to compare
point with mark.
lisp.h (allocate_string_data, make_uninit_string)
(make_uninit_multibyte_string, make_buffer_string)
(make_buffer_string_both): Adjust prototypes.
modified:
src/ChangeLog
src/alloc.c
src/editfns.c
src/insdel.c
src/keyboard.c
src/lisp.h
src/minibuf.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2010-09-22 03:10:16 +0000
+++ b/src/ChangeLog 2010-09-22 16:03:34 +0000
@@ -1,3 +1,29 @@
+2010-09-22 Eli Zaretskii <address@hidden>
+
+ * minibuf.c (Fminibuffer_contents)
+ (Fminibuffer_contents_no_properties)
+ (Fminibuffer_completion_contents): Use EMACS_INT for minibuffer
+ positions.
+
+ * keyboard.c (command_loop_1): Use EMACS_INT to compare point with
+ mark.
+
+ * alloc.c (make_uninit_string, make_uninit_multibyte_string)
+ (allocate_string_data): Accept EMACS_INT for string length.
+
+ * editfns.c (Ffield_string, Ffield_string_no_properties)
+ (make_buffer_string, make_buffer_string_both, Fbuffer_substring)
+ (Fbuffer_substring_no_properties, find_field, Fdelete_field)
+ (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
+ (Ffield_end): Use EMACS_INT for buffer positions.
+
+ * insdel.c (prepare_to_modify_buffer): Use EMACS_INT to compare
+ point with mark.
+
+ * lisp.h (allocate_string_data, make_uninit_string)
+ (make_uninit_multibyte_string, make_buffer_string)
+ (make_buffer_string_both): Adjust prototypes.
+
2010-09-22 Chong Yidong <address@hidden>
* xml.c: Switch to GNU indentation.
=== modified file 'src/alloc.c'
--- a/src/alloc.c 2010-08-20 23:02:11 +0000
+++ b/src/alloc.c 2010-09-22 16:03:34 +0000
@@ -1908,7 +1908,8 @@
S->data if it was initially non-null. */
void
-allocate_string_data (struct Lisp_String *s, int nchars, int nbytes)
+allocate_string_data (struct Lisp_String *s,
+ EMACS_INT nchars, EMACS_INT nbytes)
{
struct sdata *data, *old_data;
struct sblock *b;
@@ -2412,7 +2413,7 @@
occupying LENGTH bytes. */
Lisp_Object
-make_uninit_string (int length)
+make_uninit_string (EMACS_INT length)
{
Lisp_Object val;
@@ -2428,7 +2429,7 @@
which occupy NBYTES bytes. */
Lisp_Object
-make_uninit_multibyte_string (int nchars, int nbytes)
+make_uninit_multibyte_string (EMACS_INT nchars, EMACS_INT nbytes)
{
Lisp_Object string;
struct Lisp_String *s;
=== modified file 'src/editfns.c'
--- a/src/editfns.c 2010-09-14 20:32:35 +0000
+++ b/src/editfns.c 2010-09-22 16:03:34 +0000
@@ -94,7 +94,8 @@
#endif
static int tm_diff (struct tm *, struct tm *);
-static void find_field (Lisp_Object, Lisp_Object, Lisp_Object, int *,
Lisp_Object, int *);
+static void find_field (Lisp_Object, Lisp_Object, Lisp_Object,
+ EMACS_INT *, Lisp_Object, EMACS_INT *);
static void update_buffer_properties (int, int);
static Lisp_Object region_limit (int);
static size_t emacs_memftimeu (char *, size_t, const char *,
@@ -515,7 +516,9 @@
is not stored. */
static void
-find_field (Lisp_Object pos, Lisp_Object merge_at_boundary, Lisp_Object
beg_limit, int *beg, Lisp_Object end_limit, int *end)
+find_field (Lisp_Object pos, Lisp_Object merge_at_boundary,
+ Lisp_Object beg_limit,
+ EMACS_INT *beg, Lisp_Object end_limit, EMACS_INT *end)
{
/* Fields right before and after the point. */
Lisp_Object before_field, after_field;
@@ -631,7 +634,7 @@
If POS is nil, the value of point is used for POS. */)
(Lisp_Object pos)
{
- int beg, end;
+ EMACS_INT beg, end;
find_field (pos, Qnil, Qnil, &beg, Qnil, &end);
if (beg != end)
del_range (beg, end);
@@ -644,7 +647,7 @@
If POS is nil, the value of point is used for POS. */)
(Lisp_Object pos)
{
- int beg, end;
+ EMACS_INT beg, end;
find_field (pos, Qnil, Qnil, &beg, Qnil, &end);
return make_buffer_string (beg, end, 1);
}
@@ -655,7 +658,7 @@
If POS is nil, the value of point is used for POS. */)
(Lisp_Object pos)
{
- int beg, end;
+ EMACS_INT beg, end;
find_field (pos, Qnil, Qnil, &beg, Qnil, &end);
return make_buffer_string (beg, end, 0);
}
@@ -670,7 +673,7 @@
is before LIMIT, then LIMIT will be returned instead. */)
(Lisp_Object pos, Lisp_Object escape_from_edge, Lisp_Object limit)
{
- int beg;
+ EMACS_INT beg;
find_field (pos, escape_from_edge, limit, &beg, Qnil, 0);
return make_number (beg);
}
@@ -685,7 +688,7 @@
is after LIMIT, then LIMIT will be returned instead. */)
(Lisp_Object pos, Lisp_Object escape_from_edge, Lisp_Object limit)
{
- int end;
+ EMACS_INT end;
find_field (pos, escape_from_edge, Qnil, 0, limit, &end);
return make_number (end);
}
@@ -2343,10 +2346,10 @@
buffer substrings. */
Lisp_Object
-make_buffer_string (int start, int end, int props)
+make_buffer_string (EMACS_INT start, EMACS_INT end, int props)
{
- int start_byte = CHAR_TO_BYTE (start);
- int end_byte = CHAR_TO_BYTE (end);
+ EMACS_INT start_byte = CHAR_TO_BYTE (start);
+ EMACS_INT end_byte = CHAR_TO_BYTE (end);
return make_buffer_string_both (start, start_byte, end, end_byte, props);
}
@@ -2367,7 +2370,8 @@
buffer substrings. */
Lisp_Object
-make_buffer_string_both (int start, int start_byte, int end, int end_byte, int
props)
+make_buffer_string_both (EMACS_INT start, EMACS_INT start_byte,
+ EMACS_INT end, EMACS_INT end_byte, int props)
{
Lisp_Object result, tem, tem1;
@@ -2439,7 +2443,7 @@
use `buffer-substring-no-properties' instead. */)
(Lisp_Object start, Lisp_Object end)
{
- register int b, e;
+ register EMACS_INT b, e;
validate_region (&start, &end);
b = XINT (start);
@@ -2455,7 +2459,7 @@
they can be in either order. */)
(Lisp_Object start, Lisp_Object end)
{
- register int b, e;
+ register EMACS_INT b, e;
validate_region (&start, &end);
b = XINT (start);
=== modified file 'src/insdel.c'
--- a/src/insdel.c 2010-08-16 02:33:17 +0000
+++ b/src/insdel.c 2010-09-22 16:03:34 +0000
@@ -2057,8 +2057,8 @@
: (!NILP (Vselect_active_regions)
&& !NILP (Vtransient_mark_mode))))
{
- int b = XINT (Fmarker_position (current_buffer->mark));
- int e = XINT (make_number (PT));
+ EMACS_INT b = XINT (Fmarker_position (current_buffer->mark));
+ EMACS_INT e = PT;
if (b < e)
Vsaved_region_selection = make_buffer_string (b, e, 0);
else if (b > e)
=== modified file 'src/keyboard.c'
--- a/src/keyboard.c 2010-09-17 09:54:28 +0000
+++ b/src/keyboard.c 2010-09-22 16:03:34 +0000
@@ -1811,8 +1811,9 @@
&& !NILP (Vtransient_mark_mode)))
&& !EQ (Vthis_command, Qhandle_switch_frame))
{
- int beg = XINT (Fmarker_position (current_buffer->mark));
- int end = XINT (make_number (PT));
+ EMACS_INT beg =
+ XINT (Fmarker_position (current_buffer->mark));
+ EMACS_INT end = PT;
if (beg < end)
call2 (Qx_set_selection, QPRIMARY,
make_buffer_string (beg, end, 0));
=== modified file 'src/lisp.h'
--- a/src/lisp.h 2010-09-12 14:35:37 +0000
+++ b/src/lisp.h 2010-09-22 16:03:34 +0000
@@ -2692,7 +2692,7 @@
/* Defined in alloc.c */
extern void check_pure_size (void);
-extern void allocate_string_data (struct Lisp_String *, int, int);
+extern void allocate_string_data (struct Lisp_String *, EMACS_INT, EMACS_INT);
extern void reset_malloc_hooks (void);
extern void uninterrupt_malloc (void);
extern void malloc_warning (const char *);
@@ -2722,8 +2722,8 @@
extern Lisp_Object make_unibyte_string (const char *, int);
extern Lisp_Object make_multibyte_string (const char *, int, int);
extern Lisp_Object make_event_array (int, Lisp_Object *);
-extern Lisp_Object make_uninit_string (int);
-extern Lisp_Object make_uninit_multibyte_string (int, int);
+extern Lisp_Object make_uninit_string (EMACS_INT);
+extern Lisp_Object make_uninit_multibyte_string (EMACS_INT, EMACS_INT);
extern Lisp_Object make_string_from_bytes (const char *, int, int);
extern Lisp_Object make_specified_string (const char *, int, int, int);
EXFUN (Fpurecopy, 1);
@@ -2991,8 +2991,9 @@
EXFUN (Fsystem_name, 0);
EXFUN (Fcurrent_time, 0);
extern int clip_to_bounds (int, int, int);
-extern Lisp_Object make_buffer_string (int, int, int);
-extern Lisp_Object make_buffer_string_both (int, int, int, int, int);
+extern Lisp_Object make_buffer_string (EMACS_INT, EMACS_INT, int);
+extern Lisp_Object make_buffer_string_both (EMACS_INT, EMACS_INT, EMACS_INT,
+ EMACS_INT, int);
extern void init_editfns (void);
extern void syms_of_editfns (void);
EXFUN (Fconstrain_to_field, 5);
=== modified file 'src/minibuf.c'
--- a/src/minibuf.c 2010-08-08 21:12:29 +0000
+++ b/src/minibuf.c 2010-09-22 16:03:34 +0000
@@ -370,7 +370,7 @@
If the current buffer is not a minibuffer, return its entire contents. */)
(void)
{
- int prompt_end = XINT (Fminibuffer_prompt_end ());
+ EMACS_INT prompt_end = XINT (Fminibuffer_prompt_end ());
return make_buffer_string (prompt_end, ZV, 1);
}
@@ -380,7 +380,7 @@
If the current buffer is not a minibuffer, return its entire contents. */)
(void)
{
- int prompt_end = XINT (Fminibuffer_prompt_end ());
+ EMACS_INT prompt_end = XINT (Fminibuffer_prompt_end ());
return make_buffer_string (prompt_end, ZV, 0);
}
@@ -391,7 +391,7 @@
If the current buffer is not a minibuffer, return its entire contents. */)
(void)
{
- int prompt_end = XINT (Fminibuffer_prompt_end ());
+ EMACS_INT prompt_end = XINT (Fminibuffer_prompt_end ());
if (PT < prompt_end)
error ("Cannot do completion in the prompt");
return make_buffer_string (prompt_end, PT, 1);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r101539: Fix some uses of int instead of EMACS_INT.,
Eli Zaretskii <=