#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);
-int lisp_time_argument (Lisp_Object, time_t *, int *);
static size_t emacs_memftimeu (char *, size_t, const char *,
size_t, const struct tm *, int);
static void general_insert_function (void (*) (const unsigned char *, EMACS_INT),
static Lisp_Object
region_limit (int beginningp)
{
- extern Lisp_Object Vmark_even_if_inactive; /* Defined in callint.c. */
Lisp_Object m;
if (!NILP (Vtransient_mark_mode)
}
DEFUN ("region-beginning", Fregion_beginning, Sregion_beginning, 0, 0, 0,
- doc: /* Return position of beginning of region, as an integer. */)
+ doc: /* Return the integer value of point or mark, whichever is smaller. */)
(void)
{
return region_limit (1);
}
DEFUN ("region-end", Fregion_end, Sregion_end, 0, 0, 0,
- doc: /* Return position of end of region, as an integer. */)
+ doc: /* Return the integer value of point or mark, whichever is larger. */)
(void)
{
return region_limit (0);
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;
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);
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);
}
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);
}
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);
}
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);
}
With argument N not nil or 1, move forward N - 1 lines first.
If scan reaches end of buffer, return that position.
+The returned position is of the first character in the logical order,
+i.e. the one that has the smallest character position.
+
This function constrains the returned position to the current field
unless that would be on a different line than the original,
unconstrained result. If N is nil or 1, and a front-sticky field
With argument N not nil or 1, move forward N - 1 lines first.
If scan reaches end of buffer, return that position.
+The returned position is of the last character in the logical order,
+i.e. the character whose buffer position is the largest one.
+
This function constrains the returned position to the current field
unless that would be on a different line than the original,
unconstrained result. If N is nil or 1, and a rear-sticky field ends
/* For the benefit of callers who don't want to include lisp.h */
-char *
+const char *
get_system_name (void)
{
if (STRINGP (Vsystem_name))
- return (char *) SDATA (Vsystem_name);
+ return (const char *) SDATA (Vsystem_name);
else
return "";
}
-char *
+const char *
get_operating_system_release (void)
{
if (STRINGP (Voperating_system_release))
else
{
char tzbuf[100];
- char *tzstring;
+ const char *tzstring;
char **oldenv = environ, **newenv;
if (EQ (zone, Qt))
If TZ is t, use Universal Time. */)
(Lisp_Object tz)
{
- char *tzstring;
+ const char *tzstring;
/* When called for the first time, save the original TZ. */
if (!environbuf)
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);
}
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;
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);
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);
return val;
}
}
-#ifdef HAVE_MENUS
-extern Lisp_Object last_nonmenu_event;
-#endif
DEFUN ("message-or-box", Fmessage_or_box, Smessage_or_box, 1, MANY, 0,
doc: /* Display a message in a dialog box or in the echo area.
int multibyte = 0;
/* When we make a multibyte string, we must pay attention to the
byte combining problem, i.e., a byte may be combined with a
- multibyte charcter of the previous string. This flag tells if we
+ multibyte character of the previous string. This flag tells if we
must consider such a situation or not. */
int maybe_combine_byte;
unsigned char *this_format;
{
Lisp_Object obuf;
- extern Lisp_Object Vprin1_to_string_buffer;
obuf = Fcurrent_buffer ();
/* Do this here, because init_buffer_once is too early--it won't work. */
Fset_buffer (Vprin1_to_string_buffer);