diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2006-12-03 12:15:03 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2006-12-03 12:15:03 +0000 |
commit | 14bcc1e098410087a837313e2fc822319ff2e8ca (patch) | |
tree | e468aebbb8d84438d81eb08bf6b77bfeaf664ea7 /src | |
parent | 5665a02fd1d009506f246d5f77896e3995127954 (diff) | |
parent | 704ec54b3f2a40026ea7835b76e040c7335a56c1 (diff) | |
download | emacs-14bcc1e098410087a837313e2fc822319ff2e8ca.tar.gz |
Merged from emacs@sv.gnu.org.
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-474
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-475
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-476
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-477
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-478
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-150
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-151
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-152
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-584
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 23 | ||||
-rw-r--r-- | src/dispnew.c | 29 | ||||
-rw-r--r-- | src/gtkutil.c | 18 | ||||
-rw-r--r-- | src/mac.c | 10 | ||||
-rw-r--r-- | src/macterm.c | 10 | ||||
-rw-r--r-- | src/sysdep.c | 10 |
6 files changed, 58 insertions, 42 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f86c4c6a21c..ce3c7d1435b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,26 @@ +2006-10-16 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * gtkutil.c (get_utf8_string): Remove warnings with casts. + (xg_tool_bar_button_cb): Ditto + (xg_tool_bar_callback): Ditto. + +2006-10-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * dispnew.c (adjust_frame_glyphs_for_frame_redisplay): Remove unused + variable ch_dim. + (adjust_frame_glyphs_for_window_redisplay): Likewise. Don't allocate + menu bar window matrices on non-X systems. + + * mac.c (Fmac_get_preference, Fmac_code_convert_string): Add GCPROs. + + * macterm.c (mac_query_char_extents): Don't return glyph ID if layout + adjustment is needed. + (mac_load_query_font): Check if width and height are positive. + +2006-10-14 Richard Stallman <rms@gnu.org> + + * sysdep.c (init_sys_modes): Delete DEFVAR_LISP in the wrong place. + 2006-10-13 Chong Yidong <cyd@stupidchicken.com> * xdisp.c (decode_mode_spec): Ignore %c and %l constructs in frame diff --git a/src/dispnew.c b/src/dispnew.c index 394c550fa73..5ace8ac2985 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -1786,11 +1786,9 @@ check_matrix_invariants (w) X and Y are column/row within the frame glyph matrix where sub-matrices for the window tree rooted at WINDOW must be - allocated. CH_DIM contains the dimensions of the smallest - character that could be used during display. DIM_ONLY_P non-zero - means that the caller of this function is only interested in the - result matrix dimension, and matrix adjustments should not be - performed. + allocated. DIM_ONLY_P non-zero means that the caller of this + function is only interested in the result matrix dimension, and + matrix adjustments should not be performed. The function returns the total width/height of the sub-matrices of the window tree. If called on a frame root window, the computation @@ -2038,8 +2036,7 @@ required_matrix_width (w) /* Allocate window matrices for window-based redisplay. W is the - window whose matrices must be allocated/reallocated. CH_DIM is the - size of the smallest character that could potentially be used on W. */ + window whose matrices must be allocated/reallocated. */ static void allocate_matrices_for_window_redisplay (w) @@ -2272,7 +2269,6 @@ static void adjust_frame_glyphs_for_frame_redisplay (f) struct frame *f; { - struct dim ch_dim; struct dim matrix_dim; int pool_changed_p; int window_change_flags; @@ -2281,10 +2277,6 @@ adjust_frame_glyphs_for_frame_redisplay (f) if (!FRAME_LIVE_P (f)) return; - /* Determine the smallest character in any font for F. On - console windows, all characters have dimension (1, 1). */ - ch_dim.width = ch_dim.height = 1; - top_window_y = FRAME_TOP_MARGIN (f); /* Allocate glyph pool structures if not already done. */ @@ -2373,22 +2365,14 @@ static void adjust_frame_glyphs_for_window_redisplay (f) struct frame *f; { - struct dim ch_dim; struct window *w; xassert (FRAME_WINDOW_P (f) && FRAME_LIVE_P (f)); - /* Get minimum sizes. */ -#ifdef HAVE_WINDOW_SYSTEM - ch_dim.width = FRAME_SMALLEST_CHAR_WIDTH (f); - ch_dim.height = FRAME_SMALLEST_FONT_HEIGHT (f); -#else - ch_dim.width = ch_dim.height = 1; -#endif - /* Allocate/reallocate window matrices. */ allocate_matrices_for_window_redisplay (XWINDOW (FRAME_ROOT_WINDOW (f))); +#ifdef HAVE_X_WINDOWS /* Allocate/ reallocate matrices of the dummy window used to display the menu bar under X when no X toolkit support is available. */ #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) @@ -2412,7 +2396,8 @@ adjust_frame_glyphs_for_window_redisplay (f) XSETFASTINT (w->total_cols, FRAME_TOTAL_COLS (f)); allocate_matrices_for_window_redisplay (w); } -#endif /* not USE_X_TOOLKIT */ +#endif /* not USE_X_TOOLKIT && not USE_GTK */ +#endif /* HAVE_X_WINDOWS */ #ifndef USE_GTK /* Allocate/ reallocate matrices of the tool bar window. If we diff --git a/src/gtkutil.c b/src/gtkutil.c index 18b3607fc6f..2370855248a 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -523,8 +523,8 @@ get_utf8_string (str) char *cp, *up; GError *error = NULL; - while (! (cp = g_locale_to_utf8 (p, -1, &bytes_read, - &bytes_written, &error)) + while (! (cp = g_locale_to_utf8 ((char *)p, -1, &bytes_read, + &bytes_written, &error)) && error->code == G_CONVERT_ERROR_ILLEGAL_SEQUENCE) { ++nr_bad; @@ -541,13 +541,13 @@ get_utf8_string (str) if (cp) g_free (cp); up = utf8_str = xmalloc (strlen (str) + nr_bad * 4 + 1); - p = str; + p = (unsigned char *)str; - while (! (cp = g_locale_to_utf8 (p, -1, &bytes_read, + while (! (cp = g_locale_to_utf8 ((char *)p, -1, &bytes_read, &bytes_written, &error)) && error->code == G_CONVERT_ERROR_ILLEGAL_SEQUENCE) { - strncpy (up, p, bytes_written); + strncpy (up, (char *)p, bytes_written); sprintf (up + bytes_written, "\\%03o", p[bytes_written]); up[bytes_written+4] = '\0'; up += bytes_written+4; @@ -3362,8 +3362,9 @@ xg_tool_bar_button_cb (widget, event, user_data) GdkEventButton *event; gpointer user_data; { - g_object_set_data (G_OBJECT (user_data), XG_TOOL_BAR_LAST_MODIFIER, - (gpointer) event->state); + /* Casts to avoid warnings when gpointer is 64 bits and int is 32 bits */ + gpointer ptr = (gpointer) (EMACS_INT) event->state; + g_object_set_data (G_OBJECT (user_data), XG_TOOL_BAR_LAST_MODIFIER, ptr); return FALSE; } @@ -3375,7 +3376,8 @@ xg_tool_bar_callback (w, client_data) { /* The EMACS_INT cast avoids a warning. */ int idx = (int) (EMACS_INT) client_data; - int mod = (int) g_object_get_data (G_OBJECT (w), XG_TOOL_BAR_LAST_MODIFIER); + int mod = (int) (EMACS_INT) g_object_get_data (G_OBJECT (w), + XG_TOOL_BAR_LAST_MODIFIER); FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); Lisp_Object key, frame; diff --git a/src/mac.c b/src/mac.c index be6953a0d55..d127422ccde 100644 --- a/src/mac.c +++ b/src/mac.c @@ -4611,6 +4611,7 @@ otherwise. */) CFStringRef app_id, key_str; CFPropertyListRef app_plist = NULL, plist; Lisp_Object result = Qnil, tmp; + struct gcpro gcpro1, gcpro2; if (STRINGP (key)) key = Fcons (key, Qnil); @@ -4627,6 +4628,8 @@ otherwise. */) if (!NILP (hash_bound)) CHECK_NUMBER (hash_bound); + GCPRO2 (key, format); + BLOCK_INPUT; app_id = kCFPreferencesCurrentApplication; @@ -4681,6 +4684,8 @@ otherwise. */) UNBLOCK_INPUT; + UNGCPRO; + return result; } @@ -4846,6 +4851,7 @@ On successful conversion, return the result string, else return nil. */) Lisp_Object string, source, target, normalization_form; { Lisp_Object result = Qnil; + struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; CFStringEncoding src_encoding, tgt_encoding; CFStringRef str = NULL; @@ -4856,6 +4862,8 @@ On successful conversion, return the result string, else return nil. */) CHECK_SYMBOL (target); CHECK_SYMBOL (normalization_form); + GCPRO4 (string, source, target, normalization_form); + BLOCK_INPUT; src_encoding = get_cfstring_encoding_from_lisp (source); @@ -4896,6 +4904,8 @@ On successful conversion, return the result string, else return nil. */) UNBLOCK_INPUT; + UNGCPRO; + return result; } diff --git a/src/macterm.c b/src/macterm.c index 6902ac72304..d4ce2a1b298 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -1198,7 +1198,12 @@ mac_query_char_extents (style, c, err1 = ATSUGetGlyphInfo (text_layout, kATSUFromTextBeginning, kATSUToTextEnd, &count, &glyph_info_array); - if (err1 == noErr) + if (err1 == noErr + /* Make sure that we don't have to make layout + adjustments. */ + && glyph_info_array.glyphs[0].deltaY == 0.0f + && glyph_info_array.glyphs[0].idealX == 0.0f + && glyph_info_array.glyphs[0].screenX == 0) { xassert (glyph_info_array.glyphs[0].glyphID); *cg_glyph = glyph_info_array.glyphs[0].glyphID; @@ -7963,7 +7968,8 @@ mac_load_query_font (f, fontname) NULL #endif ); - if (err != noErr) + if (err != noErr + || space_bounds->width <= 0 || FONT_HEIGHT (font) <= 0) { mac_unload_font (&one_mac_display_info, font); return NULL; diff --git a/src/sysdep.c b/src/sysdep.c index 6d630c4832f..07f5f2e8a30 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -1421,16 +1421,6 @@ init_sys_modes (tty_out) { struct emacs_tty tty; -#ifdef MAC_OS8 -/* cus-start.el complains if delete-exited-processes is not defined */ -#ifndef subprocesses - DEFVAR_BOOL ("delete-exited-processes", &delete_exited_processes, - doc: /* *Non-nil means delete processes immediately when they exit. -nil means don't delete them until `list-processes' is run. */); - delete_exited_processes = 0; -#endif -#endif /* MAC_OS8 */ - #ifdef VMS #if 0 static int oob_chars[2] = {0, 1 << 7}; /* catch C-g's */ |