Merge from mainline.

This commit is contained in:
Paul Eggert 2011-01-17 11:24:36 -08:00
commit 15ef875582
8 changed files with 51 additions and 37 deletions

View file

@ -33,6 +33,34 @@
($(lib)/libgnu.a): New rule.
(temacs$(EXEEXT)): Also link $(lib)/libgnu.a.
* xfns.c (x_real_positions): Fix signedness of local var 'ign'.
XGetGeometry wants unsigned int *, not int *, for its last 4 args,
so change the type of 'ign' to unsigned int from int.
* regex.c (analyse_first): Remove unreachable 'continue' statement.
* xterm.h (struct x_display_info): Remove stray semicolon.
The extra semicolon didn't conform to the C standard.
Problem reported by Sun cc.
* lisp.h: Redo flags and XSET slightly to avoid overflow diagnostics.
These changes make compilation easier to follow with Sun cc.
(ARRAY_MARK_FLAG): Make it signed, so that it can be assigned to
EMACS_INT values without provoking overflow diagnostics.
(PSEUDOVECTOR_FLAG): Likewise, for consistency.
(XSET) [! USE_LSB_TAG]: Use unsigned left shift to avoid overflow
diagnostic with signed left shift.
* fileio.c (make_temp_name): Remove unreachable code.
* fontset.c (free_realized_fontset): Mark unreachable code with if (0).
Previously it was marked by preceding it with "return;", but
Sun cc complains about this.
* coding.c (decode_coding_emacs_mule): Remove unreachable code.
This is a typo left over from 2009-03-06T07:51:52Z!handa@m17n.org,
which fixed Bug#2370. Caught by Sun cc.
2011-01-15 Martin Rudalics <rudalics@gmx.at>
* window.c (inhibit_point_swap): New variable.

View file

@ -2631,10 +2631,6 @@ decode_coding_emacs_mule (struct coding_system *coding)
}
continue;
src = src_base;
consumed_chars = consumed_chars_base;
continue;
invalid_code:
EMACS_MULE_MAYBE_FINISH_COMPOSITION ();
src = src_base;
@ -10901,4 +10897,3 @@ emacs_strerror (int error_number)
}
#endif /* emacs */

View file

@ -737,17 +737,13 @@ make_temp_name (Lisp_Object prefix, int base64_p)
as bad as (and in many cases worse than) throwing the
error, or to ignore the error, which will likely result
in looping through 225307 stat's, which is not only
dog-slow, but also useless since it will fallback to
the errow below, anyway. */
dog-slow, but also useless since eventually nil would
have to be returned anyway. */
report_file_error ("Cannot create temporary name for prefix",
Fcons (prefix, Qnil));
/* not reached */
}
}
error ("Cannot create temporary name for prefix `%s'",
SDATA (prefix));
return Qnil;
}
@ -5229,7 +5225,7 @@ auto_save_1 (void)
static Lisp_Object
do_auto_save_unwind (Lisp_Object arg) /* used as unwind-protect function */
{
FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer;
auto_saving = 0;
@ -5244,7 +5240,7 @@ do_auto_save_unwind (Lisp_Object arg) /* used as unwind-protect function */
static Lisp_Object
do_auto_save_unwind_1 (Lisp_Object value) /* used as unwind-protect function */
{
minibuffer_auto_raise = XINT (value);
return Qnil;
@ -5870,4 +5866,3 @@ This includes interactive calls to `delete-file' and
defsubr (&Sunix_sync);
#endif
}

View file

@ -849,12 +849,12 @@ free_realized_fontset (FRAME_PTR f, Lisp_Object fontset)
{
Lisp_Object tail;
return;
for (tail = FONTSET_OBJLIST (fontset); CONSP (tail); tail = XCDR (tail))
{
xassert (FONT_OBJECT_P (XCAR (tail)));
font_close_object (f, XCAR (tail));
}
if (0)
for (tail = FONTSET_OBJLIST (fontset); CONSP (tail); tail = XCDR (tail))
{
xassert (FONT_OBJECT_P (XCAR (tail)));
font_close_object (f, XCAR (tail));
}
}
/* Free fontset of FACE defined on frame F. Called from
@ -2263,4 +2263,3 @@ at the vertical center of lines. */);
defsubr (&Sfontset_list_all);
#endif
}

View file

@ -327,13 +327,14 @@ typedef EMACS_INT Lisp_Object;
#define LISP_MAKE_RVALUE(o) (0+(o))
#endif /* USE_LISP_UNION_TYPE */
/* In the size word of a vector, this bit means the vector has been marked. */
/* In the size word of a vector, this bit means the vector has been marked.
(Shift -1 left, not 1, to avoid provoking overflow diagnostics.) */
#define ARRAY_MARK_FLAG ((EMACS_UINT) 1 << (BITS_PER_EMACS_INT - 1))
#define ARRAY_MARK_FLAG ((EMACS_INT) -1 << (BITS_PER_EMACS_INT - 1))
/* In the size word of a struct Lisp_Vector, this bit means it's really
some other vector-like object. */
#define PSEUDOVECTOR_FLAG ((ARRAY_MARK_FLAG >> 1))
#define PSEUDOVECTOR_FLAG ((EMACS_INT) 1 << (BITS_PER_EMACS_INT - 2))
/* In a pseudovector, the size field actually contains a word with one
PSEUDOVECTOR_FLAG bit set, and exactly one of the following bits to
@ -437,8 +438,9 @@ enum pvec_type
((((EMACS_INT) (N)) & VALMASK) | ((EMACS_INT) Lisp_Int) << VALBITS)
#endif
#define XSET(var, type, ptr) \
((var) = ((EMACS_INT)(type) << VALBITS) + ((EMACS_INT) (ptr) & VALMASK))
#define XSET(var, type, ptr) \
((var) = ((EMACS_INT) ((EMACS_UINT) (type) << VALBITS) \
+ ((EMACS_INT) (ptr) & VALMASK)))
#define XPNTR(a) ((EMACS_UINT) ((a) & VALMASK))
@ -3671,4 +3673,3 @@ extern Lisp_Object safe_alloca_unwind (Lisp_Object);
#endif /* EMACS_LISP_H */

View file

@ -3997,7 +3997,6 @@ analyse_first (const re_char *p, const re_char *pend, char *fastmap, const int m
{
case succeed:
return 1;
continue;
case duplicate:
/* If the first character has to match a backreference, that means
@ -6733,4 +6732,3 @@ regfree (regex_t *preg)
WEAK_ALIAS (__regfree, regfree)
#endif /* not emacs */

View file

@ -626,7 +626,7 @@ x_real_positions (FRAME_PTR f, int *xptr, int *yptr)
if (rc == Success && actual_type == target_type && !x_had_errors_p (dpy)
&& actual_size == 4 && actual_format == 32)
{
int ign;
unsigned int ign;
Window rootw;
long *fe = (long *)tmp_data;
@ -756,7 +756,7 @@ x_set_tool_bar_position (struct frame *f,
if (EQ (new_value, old_value)) return;
#ifdef USE_GTK
if (xg_change_toolbar_position (f, new_value))
if (xg_change_toolbar_position (f, new_value))
f->tool_bar_position = new_value;
#endif
}
@ -3510,7 +3510,7 @@ This function is an internal primitive--use `make-frame' instead. */)
}
BLOCK_INPUT;
/* Set machine name and pid for the purpose of window managers. */
set_machine_and_pid_properties(f);
@ -5065,7 +5065,7 @@ Text larger than the specified size is clipped. */)
#ifdef USE_GTK
if (x_gtk_use_system_tooltips)
{
int ok;
int ok;
/* Hide a previous tip, if any. */
Fx_hide_tip ();
@ -6101,4 +6101,3 @@ When using Gtk+ tooltips, the tooltip face is not used. */);
}
#endif /* HAVE_X_WINDOWS */

View file

@ -270,8 +270,8 @@ struct x_display_info
Atom Xatom_Scrollbar;
/* Atom used in XEmbed client messages. */
Atom Xatom_XEMBED, Xatom_XEMBED_INFO;;
Atom Xatom_XEMBED, Xatom_XEMBED_INFO;
/* The frame (if any) which has the X window that has keyboard focus.
Zero if none. This is examined by Ffocus_frame in xfns.c. Note
that a mere EnterNotify event can set this; if you need to know the
@ -1112,4 +1112,3 @@ extern Lisp_Object Qx_gtk_map_stock;
(nr).y = (ry), \
(nr).width = (rwidth), \
(nr).height = (rheight))