diff options
| author | Karoly Lorentey | 2006-12-03 12:15:03 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2006-12-03 12:15:03 +0000 |
| commit | 14bcc1e098410087a837313e2fc822319ff2e8ca (patch) | |
| tree | e468aebbb8d84438d81eb08bf6b77bfeaf664ea7 /src/gtkutil.c | |
| parent | 5665a02fd1d009506f246d5f77896e3995127954 (diff) | |
| parent | 704ec54b3f2a40026ea7835b76e040c7335a56c1 (diff) | |
| download | emacs-14bcc1e098410087a837313e2fc822319ff2e8ca.tar.gz emacs-14bcc1e098410087a837313e2fc822319ff2e8ca.zip | |
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/gtkutil.c')
| -rw-r--r-- | src/gtkutil.c | 18 |
1 files changed, 10 insertions, 8 deletions
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) | |||
| 523 | char *cp, *up; | 523 | char *cp, *up; |
| 524 | GError *error = NULL; | 524 | GError *error = NULL; |
| 525 | 525 | ||
| 526 | while (! (cp = g_locale_to_utf8 (p, -1, &bytes_read, | 526 | while (! (cp = g_locale_to_utf8 ((char *)p, -1, &bytes_read, |
| 527 | &bytes_written, &error)) | 527 | &bytes_written, &error)) |
| 528 | && error->code == G_CONVERT_ERROR_ILLEGAL_SEQUENCE) | 528 | && error->code == G_CONVERT_ERROR_ILLEGAL_SEQUENCE) |
| 529 | { | 529 | { |
| 530 | ++nr_bad; | 530 | ++nr_bad; |
| @@ -541,13 +541,13 @@ get_utf8_string (str) | |||
| 541 | if (cp) g_free (cp); | 541 | if (cp) g_free (cp); |
| 542 | 542 | ||
| 543 | up = utf8_str = xmalloc (strlen (str) + nr_bad * 4 + 1); | 543 | up = utf8_str = xmalloc (strlen (str) + nr_bad * 4 + 1); |
| 544 | p = str; | 544 | p = (unsigned char *)str; |
| 545 | 545 | ||
| 546 | while (! (cp = g_locale_to_utf8 (p, -1, &bytes_read, | 546 | while (! (cp = g_locale_to_utf8 ((char *)p, -1, &bytes_read, |
| 547 | &bytes_written, &error)) | 547 | &bytes_written, &error)) |
| 548 | && error->code == G_CONVERT_ERROR_ILLEGAL_SEQUENCE) | 548 | && error->code == G_CONVERT_ERROR_ILLEGAL_SEQUENCE) |
| 549 | { | 549 | { |
| 550 | strncpy (up, p, bytes_written); | 550 | strncpy (up, (char *)p, bytes_written); |
| 551 | sprintf (up + bytes_written, "\\%03o", p[bytes_written]); | 551 | sprintf (up + bytes_written, "\\%03o", p[bytes_written]); |
| 552 | up[bytes_written+4] = '\0'; | 552 | up[bytes_written+4] = '\0'; |
| 553 | up += bytes_written+4; | 553 | up += bytes_written+4; |
| @@ -3362,8 +3362,9 @@ xg_tool_bar_button_cb (widget, event, user_data) | |||
| 3362 | GdkEventButton *event; | 3362 | GdkEventButton *event; |
| 3363 | gpointer user_data; | 3363 | gpointer user_data; |
| 3364 | { | 3364 | { |
| 3365 | g_object_set_data (G_OBJECT (user_data), XG_TOOL_BAR_LAST_MODIFIER, | 3365 | /* Casts to avoid warnings when gpointer is 64 bits and int is 32 bits */ |
| 3366 | (gpointer) event->state); | 3366 | gpointer ptr = (gpointer) (EMACS_INT) event->state; |
| 3367 | g_object_set_data (G_OBJECT (user_data), XG_TOOL_BAR_LAST_MODIFIER, ptr); | ||
| 3367 | return FALSE; | 3368 | return FALSE; |
| 3368 | } | 3369 | } |
| 3369 | 3370 | ||
| @@ -3375,7 +3376,8 @@ xg_tool_bar_callback (w, client_data) | |||
| 3375 | { | 3376 | { |
| 3376 | /* The EMACS_INT cast avoids a warning. */ | 3377 | /* The EMACS_INT cast avoids a warning. */ |
| 3377 | int idx = (int) (EMACS_INT) client_data; | 3378 | int idx = (int) (EMACS_INT) client_data; |
| 3378 | int mod = (int) g_object_get_data (G_OBJECT (w), XG_TOOL_BAR_LAST_MODIFIER); | 3379 | int mod = (int) (EMACS_INT) g_object_get_data (G_OBJECT (w), |
| 3380 | XG_TOOL_BAR_LAST_MODIFIER); | ||
| 3379 | 3381 | ||
| 3380 | FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); | 3382 | FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); |
| 3381 | Lisp_Object key, frame; | 3383 | Lisp_Object key, frame; |