diff options
| author | Jan D | 2010-08-06 12:12:41 +0200 |
|---|---|---|
| committer | Jan D | 2010-08-06 12:12:41 +0200 |
| commit | 3d608a86503ae057e0d2e721a9d9718eae22bf89 (patch) | |
| tree | 01ae2c34b91e9357f41bda331a8ed4e3422683bf /src | |
| parent | 0613f5d515c2f7fe7930ad5f7d3e177e1fd3b44c (diff) | |
| download | emacs-3d608a86503ae057e0d2e721a9d9718eae22bf89.tar.gz emacs-3d608a86503ae057e0d2e721a9d9718eae22bf89.zip | |
Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
* configure.in: Check for util.h.
* src/bidi.c (bidi_dump_cached_states): Fix fprintf warning.
* src/emacs.c: Include src/nsterm.h if HAVE_NS.
* src/image.c (xpm_scan, xpm_make_color_table_v)
(xpm_put_color_table_v, xpm_get_color_table_v)
(xpm_make_color_table_h, xpm_put_color_table_h)
(xpm_get_color_table_h, xpm_str_to_color_key, xpm_load_image)
(xpm_load): Convert to ANSI C prototypes.
* src/lisp.h (fmod_float): Declare.
* src/menu.h (x_set_menu_bar_line): Declare.
(free_menubar_widget_value_tree et.al): Add HAVE_NS for these functions.
* src/window.c: Include menu.h.
* src/nsfns.m (have_menus_p, ns_display_info_for_name)
(x_set_cursor_type, ns_appkit_version_str)
(ns_appkit_version_int, ns_do_applescript)
(x_set_scroll_bar_default_width, x_sync, compute_tip_xy)
(syms_of_nsfns): Convert to ANSI C prototypes.
* src/nsfont.m (ns_fallback_entity, syms_of_nsfont): Convert to ANSI C
prototypes.
* src/nsimage.m (ns_load_image): Move NSTRACE after declarations.
* src/nsmenu.m (popup_activated, name_is_separator)
(syms_of_nsmenu): Convert to ANSI C prototypes.
(runMenuAt): Prototypes and move declarations before code.
* src/nsterm.h : Include sysselect.h.
(x_sync, x_get_focus_frame, x_set_mouse_position)
(x_set_mouse_pixel_position, x_make_frame_visible)
(x_make_frame_invisible, x_iconify_frame, x_char_width, x_char_height)
(x_pixel_width, x_pixel_height, x_set_frame_alpha, x_set_tool_bar_lines)
(x_activate_menubar, free_frame_menubar, ns_init_paths, ns_select)
(syms_of_nsterm, syms_of_nsfns, syms_of_nsmenu, syms_of_nsselect):
Declare
* src/process.c: Check HAVE_UTIL_H. Include src/nsterm.h if HAVE_NS.
* src/nsterm.m (ns_init_paths, ns_alloc_autorelease_pool)
(ns_ring_bell, ns_defined_color, hide_hourglass)
(x_display_pixel_height, x_display_pixel_width, syms_of_nsterm):
Convert to ANSI C prototypes.
(x_set_window_size, ns_draw_fringe_bitmap, judge): Move declarations
before code.
* src/sysdep.c: Check HAVE_TERM_H
* src/term.c: Check HAVE_SYS_IOCTL_H.
* src/unexmacosx.c (print_region_list, print_regions)
(build_region_list, find_emacs_zone_regions)
(unexec_regions_merge, read_load_commands, dump_it)
(unexec_init_emacs_zone): Convert to ANSI C prototypes.
* src/xfaces.c (x_create_gc, x_free_gc): Convert to ANSI C prototypes.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 63 | ||||
| -rw-r--r-- | src/bidi.c | 2 | ||||
| -rw-r--r-- | src/config.in | 3 | ||||
| -rw-r--r-- | src/emacs.c | 4 | ||||
| -rw-r--r-- | src/image.c | 75 | ||||
| -rw-r--r-- | src/lisp.h | 1 | ||||
| -rw-r--r-- | src/menu.h | 7 | ||||
| -rw-r--r-- | src/nsfns.m | 36 | ||||
| -rw-r--r-- | src/nsfont.m | 4 | ||||
| -rw-r--r-- | src/nsimage.m | 4 | ||||
| -rw-r--r-- | src/nsmenu.m | 31 | ||||
| -rw-r--r-- | src/nsterm.h | 32 | ||||
| -rw-r--r-- | src/nsterm.m | 43 | ||||
| -rw-r--r-- | src/process.c | 8 | ||||
| -rw-r--r-- | src/sysdep.c | 3 | ||||
| -rw-r--r-- | src/term.c | 3 | ||||
| -rw-r--r-- | src/unexmacosx.c | 20 | ||||
| -rw-r--r-- | src/window.c | 1 | ||||
| -rw-r--r-- | src/xfaces.c | 11 |
19 files changed, 235 insertions, 116 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index feda54defd8..c0f618630a8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,66 @@ | |||
| 1 | 2010-08-06 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * xfaces.c (x_create_gc, x_free_gc): Convert to ANSI C prototypes. | ||
| 4 | |||
| 5 | * window.c: Include menu.h. | ||
| 6 | |||
| 7 | * unexmacosx.c (print_region_list, print_regions) | ||
| 8 | (build_region_list, find_emacs_zone_regions) | ||
| 9 | (unexec_regions_merge, read_load_commands, dump_it) | ||
| 10 | (unexec_init_emacs_zone): Convert to ANSI C prototypes. | ||
| 11 | |||
| 12 | * term.c: Check HAVE_SYS_IOCTL_H. | ||
| 13 | |||
| 14 | * sysdep.c: Check HAVE_TERM_H | ||
| 15 | |||
| 16 | * process.c: Check HAVE_UTIL_H. Include nsterm.h if HAVE_NS. | ||
| 17 | |||
| 18 | * nsterm.m (ns_init_paths, ns_alloc_autorelease_pool) | ||
| 19 | (ns_ring_bell, ns_defined_color, hide_hourglass) | ||
| 20 | (x_display_pixel_height, x_display_pixel_width, syms_of_nsterm): | ||
| 21 | Convert to ANSI C prototypes. | ||
| 22 | (x_set_window_size, ns_draw_fringe_bitmap, judge): Move declarations | ||
| 23 | before code. | ||
| 24 | |||
| 25 | * nsterm.h : Include sysselect.h. | ||
| 26 | (x_sync, x_get_focus_frame, x_set_mouse_position) | ||
| 27 | (x_set_mouse_pixel_position, x_make_frame_visible) | ||
| 28 | (x_make_frame_invisible, x_iconify_frame, x_char_width, x_char_height) | ||
| 29 | (x_pixel_width, x_pixel_height, x_set_frame_alpha, x_set_tool_bar_lines) | ||
| 30 | (x_activate_menubar, free_frame_menubar, ns_init_paths, ns_select) | ||
| 31 | (syms_of_nsterm, syms_of_nsfns, syms_of_nsmenu, syms_of_nsselect): | ||
| 32 | Declare | ||
| 33 | |||
| 34 | * nsmenu.m (popup_activated, name_is_separator) | ||
| 35 | (syms_of_nsmenu): Convert to ANSI C prototypes. | ||
| 36 | (runMenuAt): Prototypes and move declarations before code. | ||
| 37 | |||
| 38 | * nsimage.m (ns_load_image): Move NSTRACE after declarations. | ||
| 39 | |||
| 40 | * nsfont.m (ns_fallback_entity, syms_of_nsfont): Convert to ANSI C | ||
| 41 | prototypes. | ||
| 42 | |||
| 43 | * nsfns.m (have_menus_p, ns_display_info_for_name) | ||
| 44 | (x_set_cursor_type, ns_appkit_version_str) | ||
| 45 | (ns_appkit_version_int, ns_do_applescript) | ||
| 46 | (x_set_scroll_bar_default_width, x_sync, compute_tip_xy) | ||
| 47 | (syms_of_nsfns): Convert to ANSI C prototypes. | ||
| 48 | |||
| 49 | * menu.h (x_set_menu_bar_line): Declare. | ||
| 50 | (free_menubar_widget_value_tree et.al): Add HAVE_NS for these functions. | ||
| 51 | |||
| 52 | * lisp.h (fmod_float): Declare. | ||
| 53 | |||
| 54 | * image.c (xpm_scan, xpm_make_color_table_v) | ||
| 55 | (xpm_put_color_table_v, xpm_get_color_table_v) | ||
| 56 | (xpm_make_color_table_h, xpm_put_color_table_h) | ||
| 57 | (xpm_get_color_table_h, xpm_str_to_color_key, xpm_load_image) | ||
| 58 | (xpm_load): Convert to ANSI C prototypes. | ||
| 59 | |||
| 60 | * emacs.c: Include nsterm.h if HAVE_NS. | ||
| 61 | |||
| 62 | * bidi.c (bidi_dump_cached_states): Fix fprintf warning. | ||
| 63 | |||
| 1 | 2010-08-06 Dan Nicolaescu <dann@ics.uci.edu> | 64 | 2010-08-06 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 65 | ||
| 3 | * process.c: Remove HAVE_SOCKETS #ifdefs inside #ifdef | 66 | * process.c: Remove HAVE_SOCKETS #ifdefs inside #ifdef |
diff --git a/src/bidi.c b/src/bidi.c index e17676ea6d7..b31de597688 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -1774,6 +1774,6 @@ bidi_dump_cached_states (void) | |||
| 1774 | fputs ("\n", stderr); | 1774 | fputs ("\n", stderr); |
| 1775 | fputs ("pos ", stderr); | 1775 | fputs ("pos ", stderr); |
| 1776 | for (i = 0; i < bidi_cache_idx; i++) | 1776 | for (i = 0; i < bidi_cache_idx; i++) |
| 1777 | fprintf (stderr, "%*d", ndigits, bidi_cache[i].charpos); | 1777 | fprintf (stderr, "%*ld", ndigits, (long)bidi_cache[i].charpos); |
| 1778 | fputs ("\n", stderr); | 1778 | fputs ("\n", stderr); |
| 1779 | } | 1779 | } |
diff --git a/src/config.in b/src/config.in index e6e67319bdd..19ed94376c1 100644 --- a/src/config.in +++ b/src/config.in | |||
| @@ -731,6 +731,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 731 | /* Define to 1 if you have the <unistd.h> header file. */ | 731 | /* Define to 1 if you have the <unistd.h> header file. */ |
| 732 | #undef HAVE_UNISTD_H | 732 | #undef HAVE_UNISTD_H |
| 733 | 733 | ||
| 734 | /* Define to 1 if you have the <util.h> header file. */ | ||
| 735 | #undef HAVE_UTIL_H | ||
| 736 | |||
| 734 | /* Define to 1 if you have the `utimes' function. */ | 737 | /* Define to 1 if you have the `utimes' function. */ |
| 735 | #undef HAVE_UTIMES | 738 | #undef HAVE_UTIMES |
| 736 | 739 | ||
diff --git a/src/emacs.c b/src/emacs.c index c9a4ae5d0db..216ab884aa1 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -63,6 +63,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 63 | #include "keyboard.h" | 63 | #include "keyboard.h" |
| 64 | #include "keymap.h" | 64 | #include "keymap.h" |
| 65 | 65 | ||
| 66 | #ifdef HAVE_NS | ||
| 67 | #include "nsterm.h" | ||
| 68 | #endif | ||
| 69 | |||
| 66 | #ifdef HAVE_SETLOCALE | 70 | #ifdef HAVE_SETLOCALE |
| 67 | #include <locale.h> | 71 | #include <locale.h> |
| 68 | #endif | 72 | #endif |
diff --git a/src/image.c b/src/image.c index f6282f6619b..2b8eb1830bc 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -3658,9 +3658,10 @@ enum xpm_token | |||
| 3658 | length of the corresponding token, respectively. */ | 3658 | length of the corresponding token, respectively. */ |
| 3659 | 3659 | ||
| 3660 | static int | 3660 | static int |
| 3661 | xpm_scan (s, end, beg, len) | 3661 | xpm_scan (const unsigned char **s, |
| 3662 | const unsigned char **s, *end, **beg; | 3662 | const unsigned char *end, |
| 3663 | int *len; | 3663 | const unsigned char **beg, |
| 3664 | int *len) | ||
| 3664 | { | 3665 | { |
| 3665 | int c; | 3666 | int c; |
| 3666 | 3667 | ||
| @@ -3724,9 +3725,13 @@ xpm_scan (s, end, beg, len) | |||
| 3724 | hash table is used. */ | 3725 | hash table is used. */ |
| 3725 | 3726 | ||
| 3726 | static Lisp_Object | 3727 | static Lisp_Object |
| 3727 | xpm_make_color_table_v (put_func, get_func) | 3728 | xpm_make_color_table_v (void (**put_func) (Lisp_Object, |
| 3728 | void (**put_func) (Lisp_Object, const unsigned char *, int, Lisp_Object); | 3729 | const unsigned char *, |
| 3729 | Lisp_Object (**get_func) (Lisp_Object, const unsigned char *, int); | 3730 | int, |
| 3731 | Lisp_Object), | ||
| 3732 | Lisp_Object (**get_func) (Lisp_Object, | ||
| 3733 | const unsigned char *, | ||
| 3734 | int)) | ||
| 3730 | { | 3735 | { |
| 3731 | *put_func = xpm_put_color_table_v; | 3736 | *put_func = xpm_put_color_table_v; |
| 3732 | *get_func = xpm_get_color_table_v; | 3737 | *get_func = xpm_get_color_table_v; |
| @@ -3734,28 +3739,30 @@ xpm_make_color_table_v (put_func, get_func) | |||
| 3734 | } | 3739 | } |
| 3735 | 3740 | ||
| 3736 | static void | 3741 | static void |
| 3737 | xpm_put_color_table_v (color_table, chars_start, chars_len, color) | 3742 | xpm_put_color_table_v (Lisp_Object color_table, |
| 3738 | Lisp_Object color_table; | 3743 | const unsigned char *chars_start, |
| 3739 | const unsigned char *chars_start; | 3744 | int chars_len, |
| 3740 | int chars_len; | 3745 | Lisp_Object color) |
| 3741 | Lisp_Object color; | ||
| 3742 | { | 3746 | { |
| 3743 | XVECTOR (color_table)->contents[*chars_start] = color; | 3747 | XVECTOR (color_table)->contents[*chars_start] = color; |
| 3744 | } | 3748 | } |
| 3745 | 3749 | ||
| 3746 | static Lisp_Object | 3750 | static Lisp_Object |
| 3747 | xpm_get_color_table_v (color_table, chars_start, chars_len) | 3751 | xpm_get_color_table_v (Lisp_Object color_table, |
| 3748 | Lisp_Object color_table; | 3752 | const unsigned char *chars_start, |
| 3749 | const unsigned char *chars_start; | 3753 | int chars_len) |
| 3750 | int chars_len; | ||
| 3751 | { | 3754 | { |
| 3752 | return XVECTOR (color_table)->contents[*chars_start]; | 3755 | return XVECTOR (color_table)->contents[*chars_start]; |
| 3753 | } | 3756 | } |
| 3754 | 3757 | ||
| 3755 | static Lisp_Object | 3758 | static Lisp_Object |
| 3756 | xpm_make_color_table_h (put_func, get_func) | 3759 | xpm_make_color_table_h (void (**put_func) (Lisp_Object, |
| 3757 | void (**put_func) (Lisp_Object, const unsigned char *, int, Lisp_Object); | 3760 | const unsigned char *, |
| 3758 | Lisp_Object (**get_func) (Lisp_Object, const unsigned char *, int); | 3761 | int, |
| 3762 | Lisp_Object), | ||
| 3763 | Lisp_Object (**get_func) (Lisp_Object, | ||
| 3764 | const unsigned char *, | ||
| 3765 | int)) | ||
| 3759 | { | 3766 | { |
| 3760 | *put_func = xpm_put_color_table_h; | 3767 | *put_func = xpm_put_color_table_h; |
| 3761 | *get_func = xpm_get_color_table_h; | 3768 | *get_func = xpm_get_color_table_h; |
| @@ -3766,11 +3773,10 @@ xpm_make_color_table_h (put_func, get_func) | |||
| 3766 | } | 3773 | } |
| 3767 | 3774 | ||
| 3768 | static void | 3775 | static void |
| 3769 | xpm_put_color_table_h (color_table, chars_start, chars_len, color) | 3776 | xpm_put_color_table_h (Lisp_Object color_table, |
| 3770 | Lisp_Object color_table; | 3777 | const unsigned char *chars_start, |
| 3771 | const unsigned char *chars_start; | 3778 | int chars_len, |
| 3772 | int chars_len; | 3779 | Lisp_Object color) |
| 3773 | Lisp_Object color; | ||
| 3774 | { | 3780 | { |
| 3775 | struct Lisp_Hash_Table *table = XHASH_TABLE (color_table); | 3781 | struct Lisp_Hash_Table *table = XHASH_TABLE (color_table); |
| 3776 | unsigned hash_code; | 3782 | unsigned hash_code; |
| @@ -3781,10 +3787,9 @@ xpm_put_color_table_h (color_table, chars_start, chars_len, color) | |||
| 3781 | } | 3787 | } |
| 3782 | 3788 | ||
| 3783 | static Lisp_Object | 3789 | static Lisp_Object |
| 3784 | xpm_get_color_table_h (color_table, chars_start, chars_len) | 3790 | xpm_get_color_table_h (Lisp_Object color_table, |
| 3785 | Lisp_Object color_table; | 3791 | const unsigned char *chars_start, |
| 3786 | const unsigned char *chars_start; | 3792 | int chars_len) |
| 3787 | int chars_len; | ||
| 3788 | { | 3793 | { |
| 3789 | struct Lisp_Hash_Table *table = XHASH_TABLE (color_table); | 3794 | struct Lisp_Hash_Table *table = XHASH_TABLE (color_table); |
| 3790 | int i = hash_lookup (table, make_unibyte_string (chars_start, chars_len), | 3795 | int i = hash_lookup (table, make_unibyte_string (chars_start, chars_len), |
| @@ -3804,8 +3809,7 @@ enum xpm_color_key { | |||
| 3804 | static const char xpm_color_key_strings[][4] = {"s", "m", "g4", "g", "c"}; | 3809 | static const char xpm_color_key_strings[][4] = {"s", "m", "g4", "g", "c"}; |
| 3805 | 3810 | ||
| 3806 | static int | 3811 | static int |
| 3807 | xpm_str_to_color_key (s) | 3812 | xpm_str_to_color_key (const char *s) |
| 3808 | const char *s; | ||
| 3809 | { | 3813 | { |
| 3810 | int i; | 3814 | int i; |
| 3811 | 3815 | ||
| @@ -3818,10 +3822,10 @@ xpm_str_to_color_key (s) | |||
| 3818 | } | 3822 | } |
| 3819 | 3823 | ||
| 3820 | static int | 3824 | static int |
| 3821 | xpm_load_image (f, img, contents, end) | 3825 | xpm_load_image (struct frame *f, |
| 3822 | struct frame *f; | 3826 | struct image *img, |
| 3823 | struct image *img; | 3827 | const unsigned char *contents, |
| 3824 | const unsigned char *contents, *end; | 3828 | const unsigned char *end) |
| 3825 | { | 3829 | { |
| 3826 | const unsigned char *s = contents, *beg, *str; | 3830 | const unsigned char *s = contents, *beg, *str; |
| 3827 | unsigned char buffer[BUFSIZ]; | 3831 | unsigned char buffer[BUFSIZ]; |
| @@ -4053,9 +4057,8 @@ xpm_load_image (f, img, contents, end) | |||
| 4053 | } | 4057 | } |
| 4054 | 4058 | ||
| 4055 | static int | 4059 | static int |
| 4056 | xpm_load (f, img) | 4060 | xpm_load (struct frame *f, |
| 4057 | struct frame *f; | 4061 | struct image *img) |
| 4058 | struct image *img; | ||
| 4059 | { | 4062 | { |
| 4060 | int success_p = 0; | 4063 | int success_p = 0; |
| 4061 | Lisp_Object file_name; | 4064 | Lisp_Object file_name; |
diff --git a/src/lisp.h b/src/lisp.h index abed671bce0..ef6b2fa8c2d 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -2548,6 +2548,7 @@ EXFUN (Ffloat, 1); | |||
| 2548 | EXFUN (Ftruncate, 2); | 2548 | EXFUN (Ftruncate, 2); |
| 2549 | extern void init_floatfns (void); | 2549 | extern void init_floatfns (void); |
| 2550 | extern void syms_of_floatfns (void); | 2550 | extern void syms_of_floatfns (void); |
| 2551 | extern Lisp_Object fmod_float (Lisp_Object x, Lisp_Object y); | ||
| 2551 | 2552 | ||
| 2552 | /* Defined in fringe.c */ | 2553 | /* Defined in fringe.c */ |
| 2553 | extern void syms_of_fringe (void); | 2554 | extern void syms_of_fringe (void); |
diff --git a/src/menu.h b/src/menu.h index 99ae43fe452..c8691169ccb 100644 --- a/src/menu.h +++ b/src/menu.h | |||
| @@ -21,13 +21,18 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | 21 | ||
| 22 | extern Lisp_Object Vmenu_updating_frame; | 22 | extern Lisp_Object Vmenu_updating_frame; |
| 23 | 23 | ||
| 24 | extern void x_set_menu_bar_lines (struct frame *f, | ||
| 25 | Lisp_Object value, | ||
| 26 | Lisp_Object oldval); | ||
| 27 | |||
| 24 | extern void init_menu_items (void); | 28 | extern void init_menu_items (void); |
| 25 | extern void finish_menu_items (void); | 29 | extern void finish_menu_items (void); |
| 26 | extern void discard_menu_items (void); | 30 | extern void discard_menu_items (void); |
| 27 | extern void save_menu_items (void); | 31 | extern void save_menu_items (void); |
| 28 | extern int parse_single_submenu (Lisp_Object, Lisp_Object, Lisp_Object); | 32 | extern int parse_single_submenu (Lisp_Object, Lisp_Object, Lisp_Object); |
| 29 | extern void list_of_panes (Lisp_Object); | 33 | extern void list_of_panes (Lisp_Object); |
| 30 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NTGUI) | 34 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NTGUI) \ |
| 35 | || defined (HAVE_NS) | ||
| 31 | extern void free_menubar_widget_value_tree (widget_value *); | 36 | extern void free_menubar_widget_value_tree (widget_value *); |
| 32 | extern void update_submenu_strings (widget_value *); | 37 | extern void update_submenu_strings (widget_value *); |
| 33 | extern void find_and_call_menu_selection (FRAME_PTR, int, | 38 | extern void find_and_call_menu_selection (FRAME_PTR, int, |
diff --git a/src/nsfns.m b/src/nsfns.m index fd0ec1a965c..aac2ef0ed3a 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -125,7 +125,7 @@ check_ns (void) | |||
| 125 | 125 | ||
| 126 | /* Nonzero if we can use mouse menus. */ | 126 | /* Nonzero if we can use mouse menus. */ |
| 127 | int | 127 | int |
| 128 | have_menus_p () | 128 | have_menus_p (void) |
| 129 | { | 129 | { |
| 130 | return NSApp != nil; | 130 | return NSApp != nil; |
| 131 | } | 131 | } |
| @@ -240,8 +240,7 @@ ns_get_screen (Lisp_Object screen) | |||
| 240 | /* Return the X display structure for the display named NAME. | 240 | /* Return the X display structure for the display named NAME. |
| 241 | Open a new connection if necessary. */ | 241 | Open a new connection if necessary. */ |
| 242 | struct ns_display_info * | 242 | struct ns_display_info * |
| 243 | ns_display_info_for_name (name) | 243 | ns_display_info_for_name (Lisp_Object name) |
| 244 | Lisp_Object name; | ||
| 245 | { | 244 | { |
| 246 | Lisp_Object names; | 245 | Lisp_Object names; |
| 247 | struct ns_display_info *dpyinfo; | 246 | struct ns_display_info *dpyinfo; |
| @@ -925,9 +924,7 @@ ns_cursor_type_to_lisp (int arg) | |||
| 925 | 924 | ||
| 926 | /* This is the same as the xfns.c definition. */ | 925 | /* This is the same as the xfns.c definition. */ |
| 927 | void | 926 | void |
| 928 | x_set_cursor_type (f, arg, oldval) | 927 | x_set_cursor_type (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) |
| 929 | FRAME_PTR f; | ||
| 930 | Lisp_Object arg, oldval; | ||
| 931 | { | 928 | { |
| 932 | set_frame_cursor_types (f, arg); | 929 | set_frame_cursor_types (f, arg); |
| 933 | 930 | ||
| @@ -949,7 +946,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | |||
| 949 | #define Xstr(x) Str(x) | 946 | #define Xstr(x) Str(x) |
| 950 | 947 | ||
| 951 | static Lisp_Object | 948 | static Lisp_Object |
| 952 | ns_appkit_version_str () | 949 | ns_appkit_version_str (void) |
| 953 | { | 950 | { |
| 954 | char tmp[80]; | 951 | char tmp[80]; |
| 955 | 952 | ||
| @@ -968,7 +965,7 @@ ns_appkit_version_str () | |||
| 968 | have into a single int. For a better picture of the implementation | 965 | have into a single int. For a better picture of the implementation |
| 969 | running, use ns_appkit_version_str.*/ | 966 | running, use ns_appkit_version_str.*/ |
| 970 | static int | 967 | static int |
| 971 | ns_appkit_version_int () | 968 | ns_appkit_version_int (void) |
| 972 | { | 969 | { |
| 973 | #ifdef NS_IMPL_GNUSTEP | 970 | #ifdef NS_IMPL_GNUSTEP |
| 974 | return GNUSTEP_GUI_MAJOR_VERSION * 100 + GNUSTEP_GUI_MINOR_VERSION; | 971 | return GNUSTEP_GUI_MAJOR_VERSION * 100 + GNUSTEP_GUI_MINOR_VERSION; |
| @@ -2004,8 +2001,7 @@ DEFUN ("ns-convert-utf8-nfd-to-nfc", Fns_convert_utf8_nfd_to_nfc, | |||
| 2004 | string or a number containing the resulting script value. Otherwise, | 2001 | string or a number containing the resulting script value. Otherwise, |
| 2005 | 1 is returned. */ | 2002 | 1 is returned. */ |
| 2006 | static int | 2003 | static int |
| 2007 | ns_do_applescript (script, result) | 2004 | ns_do_applescript (Lisp_Object script, Lisp_Object *result) |
| 2008 | Lisp_Object script, *result; | ||
| 2009 | { | 2005 | { |
| 2010 | NSAppleEventDescriptor *desc; | 2006 | NSAppleEventDescriptor *desc; |
| 2011 | NSDictionary* errorDict; | 2007 | NSDictionary* errorDict; |
| @@ -2108,8 +2104,7 @@ check_x_display_info (Lisp_Object frame) | |||
| 2108 | 2104 | ||
| 2109 | 2105 | ||
| 2110 | void | 2106 | void |
| 2111 | x_set_scroll_bar_default_width (f) | 2107 | x_set_scroll_bar_default_width (struct frame *f) |
| 2112 | struct frame *f; | ||
| 2113 | { | 2108 | { |
| 2114 | int wid = FRAME_COLUMN_WIDTH (f); | 2109 | int wid = FRAME_COLUMN_WIDTH (f); |
| 2115 | FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = NS_SCROLL_BAR_WIDTH_DEFAULT; | 2110 | FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = NS_SCROLL_BAR_WIDTH_DEFAULT; |
| @@ -2189,7 +2184,7 @@ x_screen_planes (struct frame *f) | |||
| 2189 | 2184 | ||
| 2190 | 2185 | ||
| 2191 | void | 2186 | void |
| 2192 | x_sync (Lisp_Object frame) | 2187 | x_sync (struct frame *f) |
| 2193 | { | 2188 | { |
| 2194 | /* XXX Not implemented XXX */ | 2189 | /* XXX Not implemented XXX */ |
| 2195 | return; | 2190 | return; |
| @@ -2367,11 +2362,14 @@ Lisp_Object tip_frame; | |||
| 2367 | 2362 | ||
| 2368 | /* TODO: move to xdisp or similar */ | 2363 | /* TODO: move to xdisp or similar */ |
| 2369 | static void | 2364 | static void |
| 2370 | compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y) | 2365 | compute_tip_xy (struct frame *f, |
| 2371 | struct frame *f; | 2366 | Lisp_Object parms, |
| 2372 | Lisp_Object parms, dx, dy; | 2367 | Lisp_Object dx, |
| 2373 | int width, height; | 2368 | Lisp_Object dy, |
| 2374 | int *root_x, *root_y; | 2369 | int width, |
| 2370 | int height, | ||
| 2371 | int *root_x, | ||
| 2372 | int *root_y) | ||
| 2375 | { | 2373 | { |
| 2376 | Lisp_Object left, top; | 2374 | Lisp_Object left, top; |
| 2377 | EmacsView *view = FRAME_NS_VIEW (f); | 2375 | EmacsView *view = FRAME_NS_VIEW (f); |
| @@ -2595,7 +2593,7 @@ Value is t if tooltip was open, nil otherwise. */) | |||
| 2595 | 2593 | ||
| 2596 | 2594 | ||
| 2597 | void | 2595 | void |
| 2598 | syms_of_nsfns () | 2596 | syms_of_nsfns (void) |
| 2599 | { | 2597 | { |
| 2600 | int i; | 2598 | int i; |
| 2601 | 2599 | ||
diff --git a/src/nsfont.m b/src/nsfont.m index 3cc1f7fb076..aaa5999e048 100644 --- a/src/nsfont.m +++ b/src/nsfont.m | |||
| @@ -223,7 +223,7 @@ ns_descriptor_to_entity (NSFontDescriptor *desc, Lisp_Object extra, char *style) | |||
| 223 | 223 | ||
| 224 | /* Default font entity. */ | 224 | /* Default font entity. */ |
| 225 | static Lisp_Object | 225 | static Lisp_Object |
| 226 | ns_fallback_entity () | 226 | ns_fallback_entity (void) |
| 227 | { | 227 | { |
| 228 | return ns_descriptor_to_entity ([[NSFont userFixedPitchFontOfSize: 0] | 228 | return ns_descriptor_to_entity ([[NSFont userFixedPitchFontOfSize: 0] |
| 229 | fontDescriptor], Qnil, NULL); | 229 | fontDescriptor], Qnil, NULL); |
| @@ -1510,7 +1510,7 @@ ns_dump_glyphstring (struct glyph_string *s) | |||
| 1510 | 1510 | ||
| 1511 | 1511 | ||
| 1512 | void | 1512 | void |
| 1513 | syms_of_nsfont () | 1513 | syms_of_nsfont (void) |
| 1514 | { | 1514 | { |
| 1515 | nsfont_driver.type = Qns; | 1515 | nsfont_driver.type = Qns; |
| 1516 | register_font_driver (&nsfont_driver, NULL); | 1516 | register_font_driver (&nsfont_driver, NULL); |
diff --git a/src/nsimage.m b/src/nsimage.m index 6912156eb99..13761ba5f71 100644 --- a/src/nsimage.m +++ b/src/nsimage.m | |||
| @@ -83,11 +83,11 @@ int | |||
| 83 | ns_load_image (struct frame *f, struct image *img, | 83 | ns_load_image (struct frame *f, struct image *img, |
| 84 | Lisp_Object spec_file, Lisp_Object spec_data) | 84 | Lisp_Object spec_file, Lisp_Object spec_data) |
| 85 | { | 85 | { |
| 86 | NSTRACE (ns_load_image); | ||
| 87 | |||
| 88 | EmacsImage *eImg; | 86 | EmacsImage *eImg; |
| 89 | NSSize size; | 87 | NSSize size; |
| 90 | 88 | ||
| 89 | NSTRACE (ns_load_image); | ||
| 90 | |||
| 91 | if (NILP (spec_data)) | 91 | if (NILP (spec_data)) |
| 92 | { | 92 | { |
| 93 | eImg = [EmacsImage allocInitFromFile: spec_file]; | 93 | eImg = [EmacsImage allocInitFromFile: spec_file]; |
diff --git a/src/nsmenu.m b/src/nsmenu.m index e5b9379258f..c7ea6bb90fd 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m | |||
| @@ -105,7 +105,7 @@ free_frame_menubar (struct frame *f) | |||
| 105 | 105 | ||
| 106 | 106 | ||
| 107 | int | 107 | int |
| 108 | popup_activated () | 108 | popup_activated (void) |
| 109 | { | 109 | { |
| 110 | return popup_activated_flag; | 110 | return popup_activated_flag; |
| 111 | } | 111 | } |
| @@ -509,8 +509,7 @@ set_frame_menubar (struct frame *f, int first_time, int deep_p) | |||
| 509 | 509 | ||
| 510 | /* Utility (from macmenu.c): is this item a separator? */ | 510 | /* Utility (from macmenu.c): is this item a separator? */ |
| 511 | static int | 511 | static int |
| 512 | name_is_separator (name) | 512 | name_is_separator ( const char *name) |
| 513 | const char *name; | ||
| 514 | { | 513 | { |
| 515 | const char *start = name; | 514 | const char *start = name; |
| 516 | 515 | ||
| @@ -737,19 +736,21 @@ name_is_separator (name) | |||
| 737 | keymaps: (int)keymaps | 736 | keymaps: (int)keymaps |
| 738 | { | 737 | { |
| 739 | EmacsView *view = FRAME_NS_VIEW (f); | 738 | EmacsView *view = FRAME_NS_VIEW (f); |
| 739 | NSEvent *e, *event; | ||
| 740 | long retVal; | ||
| 741 | |||
| 740 | /* p = [view convertPoint:p fromView: nil]; */ | 742 | /* p = [view convertPoint:p fromView: nil]; */ |
| 741 | p.y = NSHeight ([view frame]) - p.y; | 743 | p.y = NSHeight ([view frame]) - p.y; |
| 742 | NSEvent *e = [[view window] currentEvent]; | 744 | e = [[view window] currentEvent]; |
| 743 | NSEvent *event = [NSEvent mouseEventWithType: NSRightMouseDown | 745 | event = [NSEvent mouseEventWithType: NSRightMouseDown |
| 744 | location: p | 746 | location: p |
| 745 | modifierFlags: 0 | 747 | modifierFlags: 0 |
| 746 | timestamp: [e timestamp] | 748 | timestamp: [e timestamp] |
| 747 | windowNumber: [[view window] windowNumber] | 749 | windowNumber: [[view window] windowNumber] |
| 748 | context: [e context] | 750 | context: [e context] |
| 749 | eventNumber: 0/*[e eventNumber] */ | 751 | eventNumber: 0/*[e eventNumber] */ |
| 750 | clickCount: 1 | 752 | clickCount: 1 |
| 751 | pressure: 0]; | 753 | pressure: 0]; |
| 752 | long retVal; | ||
| 753 | 754 | ||
| 754 | context_menu_value = -1; | 755 | context_menu_value = -1; |
| 755 | [NSMenu popUpContextMenu: self withEvent: event forView: view]; | 756 | [NSMenu popUpContextMenu: self withEvent: event forView: view]; |
| @@ -1801,7 +1802,7 @@ DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_ | |||
| 1801 | ========================================================================== */ | 1802 | ========================================================================== */ |
| 1802 | 1803 | ||
| 1803 | void | 1804 | void |
| 1804 | syms_of_nsmenu () | 1805 | syms_of_nsmenu (void) |
| 1805 | { | 1806 | { |
| 1806 | defsubr (&Sx_popup_dialog); | 1807 | defsubr (&Sx_popup_dialog); |
| 1807 | defsubr (&Sns_reset_menu); | 1808 | defsubr (&Sns_reset_menu); |
diff --git a/src/nsterm.h b/src/nsterm.h index bc0e6e286c2..541b7e13daf 100644 --- a/src/nsterm.h +++ b/src/nsterm.h | |||
| @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | #include "frame.h" | 21 | #include "frame.h" |
| 22 | #include "character.h" | 22 | #include "character.h" |
| 23 | #include "font.h" | 23 | #include "font.h" |
| 24 | #include "sysselect.h" | ||
| 24 | 25 | ||
| 25 | #ifdef HAVE_NS | 26 | #ifdef HAVE_NS |
| 26 | 27 | ||
| @@ -712,7 +713,9 @@ extern void ns_set_name_as_filename (struct frame *f); | |||
| 712 | extern void ns_set_doc_edited (struct frame *f, Lisp_Object arg); | 713 | extern void ns_set_doc_edited (struct frame *f, Lisp_Object arg); |
| 713 | 714 | ||
| 714 | extern int | 715 | extern int |
| 715 | ns_defined_color (struct frame *f, char *name, XColor *color_def, int alloc, | 716 | ns_defined_color (struct frame *f, |
| 717 | const char *name, | ||
| 718 | XColor *color_def, int alloc, | ||
| 716 | char makeIndex); | 719 | char makeIndex); |
| 717 | extern void | 720 | extern void |
| 718 | ns_query_color (void *col, XColor *color_def, int setPixel); | 721 | ns_query_color (void *col, XColor *color_def, int setPixel); |
| @@ -742,10 +745,33 @@ extern Lisp_Object find_and_return_menu_selection (FRAME_PTR f, | |||
| 742 | extern Lisp_Object ns_popup_dialog (Lisp_Object position, Lisp_Object contents, | 745 | extern Lisp_Object ns_popup_dialog (Lisp_Object position, Lisp_Object contents, |
| 743 | Lisp_Object header); | 746 | Lisp_Object header); |
| 744 | 747 | ||
| 745 | /* two more prototypes that should be moved to a more general include file */ | 748 | /* More prototypes that should be moved to a more general include file */ |
| 746 | extern void set_frame_menubar (struct frame *f, int first_time, int deep_p); | 749 | extern void set_frame_menubar (struct frame *f, int first_time, int deep_p); |
| 747 | extern void x_set_window_size (struct frame *f, int change_grav, | 750 | extern void x_set_window_size (struct frame *f, int change_grav, |
| 748 | int cols, int rows); | 751 | int cols, int rows); |
| 752 | extern void x_sync (struct frame *); | ||
| 753 | extern Lisp_Object x_get_focus_frame (struct frame *); | ||
| 754 | extern void x_set_mouse_position (struct frame *f, int h, int v); | ||
| 755 | extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); | ||
| 756 | extern void x_make_frame_visible (struct frame *f); | ||
| 757 | extern void x_make_frame_invisible (struct frame *f); | ||
| 758 | extern void x_iconify_frame (struct frame *f); | ||
| 759 | extern int x_char_width (struct frame *f); | ||
| 760 | extern int x_char_height (struct frame *f); | ||
| 761 | extern int x_pixel_width (struct frame *f); | ||
| 762 | extern int x_pixel_height (struct frame *f); | ||
| 763 | extern void x_set_frame_alpha (struct frame *f); | ||
| 764 | extern void x_set_tool_bar_lines (struct frame *f, | ||
| 765 | Lisp_Object value, | ||
| 766 | Lisp_Object oldval); | ||
| 767 | extern void x_activate_menubar (struct frame *); | ||
| 768 | extern void free_frame_menubar (struct frame *); | ||
| 769 | |||
| 770 | extern void ns_init_paths (void); | ||
| 771 | extern void syms_of_nsterm (void); | ||
| 772 | extern void syms_of_nsfns (void); | ||
| 773 | extern void syms_of_nsmenu (void); | ||
| 774 | extern void syms_of_nsselect (void); | ||
| 749 | 775 | ||
| 750 | /* From nsimage.m, needed in image.c */ | 776 | /* From nsimage.m, needed in image.c */ |
| 751 | struct image; | 777 | struct image; |
| @@ -764,6 +790,8 @@ extern int x_display_pixel_height (struct ns_display_info *); | |||
| 764 | extern int x_display_pixel_width (struct ns_display_info *); | 790 | extern int x_display_pixel_width (struct ns_display_info *); |
| 765 | 791 | ||
| 766 | /* This in nsterm.m */ | 792 | /* This in nsterm.m */ |
| 793 | extern int ns_select (int nfds, fd_set *readfds, fd_set *writefds, | ||
| 794 | fd_set *exceptfds, struct timeval *timeout); | ||
| 767 | extern unsigned long ns_get_rgb_color (struct frame *f, | 795 | extern unsigned long ns_get_rgb_color (struct frame *f, |
| 768 | float r, float g, float b, float a); | 796 | float r, float g, float b, float a); |
| 769 | extern NSPoint last_mouse_motion_position; | 797 | extern NSPoint last_mouse_motion_position; |
diff --git a/src/nsterm.m b/src/nsterm.m index 58245f4aebf..88d47d41972 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -296,7 +296,7 @@ append2 (Lisp_Object list, Lisp_Object item) | |||
| 296 | 296 | ||
| 297 | 297 | ||
| 298 | void | 298 | void |
| 299 | ns_init_paths () | 299 | ns_init_paths (void) |
| 300 | /* -------------------------------------------------------------------------- | 300 | /* -------------------------------------------------------------------------- |
| 301 | Used to allow emacs to find its resources under Emacs.app | 301 | Used to allow emacs to find its resources under Emacs.app |
| 302 | Called from emacs.c at startup. | 302 | Called from emacs.c at startup. |
| @@ -479,7 +479,7 @@ ns_retain_object (void *obj) | |||
| 479 | 479 | ||
| 480 | 480 | ||
| 481 | void * | 481 | void * |
| 482 | ns_alloc_autorelease_pool () | 482 | ns_alloc_autorelease_pool (void) |
| 483 | /* -------------------------------------------------------------------------- | 483 | /* -------------------------------------------------------------------------- |
| 484 | Allocate a pool for temporary objects (callable from C) | 484 | Allocate a pool for temporary objects (callable from C) |
| 485 | -------------------------------------------------------------------------- */ | 485 | -------------------------------------------------------------------------- */ |
| @@ -790,7 +790,7 @@ ns_clip_to_row (struct window *w, struct glyph_row *row, int area, BOOL gc) | |||
| 790 | 790 | ||
| 791 | 791 | ||
| 792 | static void | 792 | static void |
| 793 | ns_ring_bell () | 793 | ns_ring_bell (struct frame *f) |
| 794 | /* -------------------------------------------------------------------------- | 794 | /* -------------------------------------------------------------------------- |
| 795 | "Beep" routine | 795 | "Beep" routine |
| 796 | -------------------------------------------------------------------------- */ | 796 | -------------------------------------------------------------------------- */ |
| @@ -1186,12 +1186,14 @@ x_set_window_size (struct frame *f, int change_grav, int cols, int rows) | |||
| 1186 | difference between the real width and Emacs' imagined one. For | 1186 | difference between the real width and Emacs' imagined one. For |
| 1187 | right-hand bars, don't worry about it since the extra is never used. | 1187 | right-hand bars, don't worry about it since the extra is never used. |
| 1188 | (Obviously doesn't work for vertically split windows tho..) */ | 1188 | (Obviously doesn't work for vertically split windows tho..) */ |
| 1189 | NSPoint origin = FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f) | 1189 | { |
| 1190 | ? NSMakePoint (FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f) | 1190 | NSPoint origin = FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f) |
| 1191 | - NS_SCROLL_BAR_WIDTH (f), 0) | 1191 | ? NSMakePoint (FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f) |
| 1192 | : NSMakePoint (0, 0); | 1192 | - NS_SCROLL_BAR_WIDTH (f), 0) |
| 1193 | [view setFrame: NSMakeRect (0, 0, pixelwidth, pixelheight)]; | 1193 | : NSMakePoint (0, 0); |
| 1194 | [view setBoundsOrigin: origin]; | 1194 | [view setFrame: NSMakeRect (0, 0, pixelwidth, pixelheight)]; |
| 1195 | [view setBoundsOrigin: origin]; | ||
| 1196 | } | ||
| 1195 | 1197 | ||
| 1196 | change_frame_size (f, rows, cols, 0, 1, 0); /* pretend, delay, safe */ | 1198 | change_frame_size (f, rows, cols, 0, 1, 0); /* pretend, delay, safe */ |
| 1197 | FRAME_PIXEL_WIDTH (f) = pixelwidth; | 1199 | FRAME_PIXEL_WIDTH (f) = pixelwidth; |
| @@ -1507,7 +1509,10 @@ ns_query_color(void *col, XColor *color_def, int setPixel) | |||
| 1507 | 1509 | ||
| 1508 | 1510 | ||
| 1509 | int | 1511 | int |
| 1510 | ns_defined_color (struct frame *f, char *name, XColor *color_def, int alloc, | 1512 | ns_defined_color (struct frame *f, |
| 1513 | const char *name, | ||
| 1514 | XColor *color_def, | ||
| 1515 | int alloc, | ||
| 1511 | char makeIndex) | 1516 | char makeIndex) |
| 1512 | /* -------------------------------------------------------------------------- | 1517 | /* -------------------------------------------------------------------------- |
| 1513 | Return 1 if named color found, and set color_def rgb accordingly. | 1518 | Return 1 if named color found, and set color_def rgb accordingly. |
| @@ -2184,9 +2189,8 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row, | |||
| 2184 | int yAdjust = rowY - FRAME_INTERNAL_BORDER_WIDTH (f) < 5 ? | 2189 | int yAdjust = rowY - FRAME_INTERNAL_BORDER_WIDTH (f) < 5 ? |
| 2185 | -FRAME_INTERNAL_BORDER_WIDTH (f) : 0; | 2190 | -FRAME_INTERNAL_BORDER_WIDTH (f) : 0; |
| 2186 | int yIncr = FRAME_PIXEL_HEIGHT (f) - (p->by+yAdjust + p->ny) < 5 ? | 2191 | int yIncr = FRAME_PIXEL_HEIGHT (f) - (p->by+yAdjust + p->ny) < 5 ? |
| 2187 | FRAME_INTERNAL_BORDER_WIDTH (f) : 0; | 2192 | FRAME_INTERNAL_BORDER_WIDTH (f) : 0 |
| 2188 | if (yAdjust) | 2193 | + (yAdjust ? FRAME_INTERNAL_BORDER_WIDTH (f) : 0); |
| 2189 | yIncr += FRAME_INTERNAL_BORDER_WIDTH (f); | ||
| 2190 | NSRect r = NSMakeRect (p->bx+xAdjust, p->by+yAdjust, p->nx, p->ny+yIncr); | 2194 | NSRect r = NSMakeRect (p->bx+xAdjust, p->by+yAdjust, p->nx, p->ny+yIncr); |
| 2191 | NSRectClip (r); | 2195 | NSRectClip (r); |
| 2192 | [ns_lookup_indexed_color(face->background, f) set]; | 2196 | [ns_lookup_indexed_color(face->background, f) set]; |
| @@ -2375,7 +2379,7 @@ show_hourglass (struct atimer *timer) | |||
| 2375 | 2379 | ||
| 2376 | 2380 | ||
| 2377 | void | 2381 | void |
| 2378 | hide_hourglass () | 2382 | hide_hourglass (void) |
| 2379 | { | 2383 | { |
| 2380 | if (!hourglass_shown_p) | 2384 | if (!hourglass_shown_p) |
| 2381 | return; | 2385 | return; |
| @@ -3406,16 +3410,14 @@ x_wm_set_icon_position (struct frame *f, int icon_x, int icon_y) | |||
| 3406 | ========================================================================== */ | 3410 | ========================================================================== */ |
| 3407 | 3411 | ||
| 3408 | int | 3412 | int |
| 3409 | x_display_pixel_height (dpyinfo) | 3413 | x_display_pixel_height (struct ns_display_info *dpyinfo) |
| 3410 | struct ns_display_info *dpyinfo; | ||
| 3411 | { | 3414 | { |
| 3412 | NSScreen *screen = [NSScreen mainScreen]; | 3415 | NSScreen *screen = [NSScreen mainScreen]; |
| 3413 | return [screen frame].size.height; | 3416 | return [screen frame].size.height; |
| 3414 | } | 3417 | } |
| 3415 | 3418 | ||
| 3416 | int | 3419 | int |
| 3417 | x_display_pixel_width (dpyinfo) | 3420 | x_display_pixel_width (struct ns_display_info *dpyinfo) |
| 3418 | struct ns_display_info *dpyinfo; | ||
| 3419 | { | 3421 | { |
| 3420 | NSScreen *screen = [NSScreen mainScreen]; | 3422 | NSScreen *screen = [NSScreen mainScreen]; |
| 3421 | return [screen frame].size.width; | 3423 | return [screen frame].size.width; |
| @@ -5743,9 +5745,10 @@ ns_term_shutdown (int sig) | |||
| 5743 | NSTRACE (judge); | 5745 | NSTRACE (judge); |
| 5744 | if (condemned) | 5746 | if (condemned) |
| 5745 | { | 5747 | { |
| 5748 | EmacsView *view; | ||
| 5746 | BLOCK_INPUT; | 5749 | BLOCK_INPUT; |
| 5747 | /* ensure other scrollbar updates after deletion */ | 5750 | /* ensure other scrollbar updates after deletion */ |
| 5748 | EmacsView *view = (EmacsView *)FRAME_NS_VIEW (frame); | 5751 | view = (EmacsView *)FRAME_NS_VIEW (frame); |
| 5749 | if (view != nil) | 5752 | if (view != nil) |
| 5750 | view->scrollbarsNeedingUpdate++; | 5753 | view->scrollbarsNeedingUpdate++; |
| 5751 | [self removeFromSuperview]; | 5754 | [self removeFromSuperview]; |
| @@ -6122,7 +6125,7 @@ ns_xlfd_to_fontname (const char *xlfd) | |||
| 6122 | 6125 | ||
| 6123 | 6126 | ||
| 6124 | void | 6127 | void |
| 6125 | syms_of_nsterm () | 6128 | syms_of_nsterm (void) |
| 6126 | { | 6129 | { |
| 6127 | NSTRACE (syms_of_nsterm); | 6130 | NSTRACE (syms_of_nsterm); |
| 6128 | 6131 | ||
diff --git a/src/process.c b/src/process.c index cccf7f75fe0..24786d0e777 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -89,6 +89,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 89 | #include <resolv.h> | 89 | #include <resolv.h> |
| 90 | #endif | 90 | #endif |
| 91 | 91 | ||
| 92 | #ifdef HAVE_UTIL_H | ||
| 93 | #include <util.h> | ||
| 94 | #endif | ||
| 95 | |||
| 92 | #endif /* subprocesses */ | 96 | #endif /* subprocesses */ |
| 93 | 97 | ||
| 94 | #include "lisp.h" | 98 | #include "lisp.h" |
| @@ -116,7 +120,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 116 | #if defined (USE_GTK) || defined (HAVE_GCONF) | 120 | #if defined (USE_GTK) || defined (HAVE_GCONF) |
| 117 | #include "xgselect.h" | 121 | #include "xgselect.h" |
| 118 | #endif /* defined (USE_GTK) || defined (HAVE_GCONF) */ | 122 | #endif /* defined (USE_GTK) || defined (HAVE_GCONF) */ |
| 119 | 123 | #ifdef HAVE_NS | |
| 124 | #include "nsterm.h" | ||
| 125 | #endif | ||
| 120 | extern int timers_run; | 126 | extern int timers_run; |
| 121 | 127 | ||
| 122 | Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid; | 128 | Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid; |
diff --git a/src/sysdep.c b/src/sysdep.c index d8ae46f19be..678f4a6faea 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -33,6 +33,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 33 | #ifdef HAVE_UNISTD_H | 33 | #ifdef HAVE_UNISTD_H |
| 34 | #include <unistd.h> | 34 | #include <unistd.h> |
| 35 | #endif | 35 | #endif |
| 36 | #ifdef HAVE_TERM_H | ||
| 37 | #include <term.h> | ||
| 38 | #endif | ||
| 36 | 39 | ||
| 37 | #include "lisp.h" | 40 | #include "lisp.h" |
| 38 | /* Including stdlib.h isn't necessarily enough to get srandom | 41 | /* Including stdlib.h isn't necessarily enough to get srandom |
diff --git a/src/term.c b/src/term.c index 5fdc4caeb2f..6fb26c77851 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -34,6 +34,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 34 | #if HAVE_TERMIOS_H | 34 | #if HAVE_TERMIOS_H |
| 35 | #include <termios.h> /* For TIOCNOTTY. */ | 35 | #include <termios.h> /* For TIOCNOTTY. */ |
| 36 | #endif | 36 | #endif |
| 37 | #ifdef HAVE_SYS_IOCTL_H | ||
| 38 | #include <sys/ioctl.h> | ||
| 39 | #endif | ||
| 37 | 40 | ||
| 38 | #include <signal.h> | 41 | #include <signal.h> |
| 39 | #include <stdarg.h> | 42 | #include <stdarg.h> |
diff --git a/src/unexmacosx.c b/src/unexmacosx.c index 1acc009ba90..ef43e9bef12 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c | |||
| @@ -305,7 +305,7 @@ print_region (vm_address_t address, vm_size_t size, vm_prot_t prot, | |||
| 305 | } | 305 | } |
| 306 | 306 | ||
| 307 | static void | 307 | static void |
| 308 | print_region_list () | 308 | print_region_list (void) |
| 309 | { | 309 | { |
| 310 | struct region_t *r; | 310 | struct region_t *r; |
| 311 | 311 | ||
| @@ -316,7 +316,7 @@ print_region_list () | |||
| 316 | } | 316 | } |
| 317 | 317 | ||
| 318 | static void | 318 | static void |
| 319 | print_regions () | 319 | print_regions (void) |
| 320 | { | 320 | { |
| 321 | task_t target_task = mach_task_self (); | 321 | task_t target_task = mach_task_self (); |
| 322 | vm_address_t address = (vm_address_t) 0; | 322 | vm_address_t address = (vm_address_t) 0; |
| @@ -346,7 +346,7 @@ print_regions () | |||
| 346 | cannot be omitted because they some regions created at run time are | 346 | cannot be omitted because they some regions created at run time are |
| 347 | read-only. */ | 347 | read-only. */ |
| 348 | static void | 348 | static void |
| 349 | build_region_list () | 349 | build_region_list (void) |
| 350 | { | 350 | { |
| 351 | task_t target_task = mach_task_self (); | 351 | task_t target_task = mach_task_self (); |
| 352 | vm_address_t address = (vm_address_t) 0; | 352 | vm_address_t address = (vm_address_t) 0; |
| @@ -465,7 +465,7 @@ unexec_reader (task_t task, vm_address_t address, vm_size_t size, void **ptr) | |||
| 465 | } | 465 | } |
| 466 | 466 | ||
| 467 | static void | 467 | static void |
| 468 | find_emacs_zone_regions () | 468 | find_emacs_zone_regions (void) |
| 469 | { | 469 | { |
| 470 | num_unexec_regions = 0; | 470 | num_unexec_regions = 0; |
| 471 | 471 | ||
| @@ -495,7 +495,7 @@ unexec_regions_sort_compare (const void *a, const void *b) | |||
| 495 | } | 495 | } |
| 496 | 496 | ||
| 497 | static void | 497 | static void |
| 498 | unexec_regions_merge () | 498 | unexec_regions_merge (void) |
| 499 | { | 499 | { |
| 500 | int i, n; | 500 | int i, n; |
| 501 | unexec_region_info r; | 501 | unexec_region_info r; |
| @@ -627,7 +627,7 @@ print_load_command (struct load_command *lc) | |||
| 627 | the global array lca. Store the total number of load commands in | 627 | the global array lca. Store the total number of load commands in |
| 628 | global variable nlc. */ | 628 | global variable nlc. */ |
| 629 | static void | 629 | static void |
| 630 | read_load_commands () | 630 | read_load_commands (void) |
| 631 | { | 631 | { |
| 632 | int i; | 632 | int i; |
| 633 | 633 | ||
| @@ -684,8 +684,8 @@ read_load_commands () | |||
| 684 | } | 684 | } |
| 685 | } | 685 | } |
| 686 | 686 | ||
| 687 | printf ("Highest address of load commands in input file: %#8x\n", | 687 | printf ("Highest address of load commands in input file: %#8lx\n", |
| 688 | infile_lc_highest_addr); | 688 | (unsigned long)infile_lc_highest_addr); |
| 689 | 689 | ||
| 690 | printf ("Lowest offset of all sections in __TEXT segment: %#8lx\n", | 690 | printf ("Lowest offset of all sections in __TEXT segment: %#8lx\n", |
| 691 | text_seg_lowest_offset); | 691 | text_seg_lowest_offset); |
| @@ -1143,7 +1143,7 @@ copy_other (struct load_command *lc) | |||
| 1143 | /* Loop through all load commands and dump them. Then write the Mach | 1143 | /* Loop through all load commands and dump them. Then write the Mach |
| 1144 | header. */ | 1144 | header. */ |
| 1145 | static void | 1145 | static void |
| 1146 | dump_it () | 1146 | dump_it (void) |
| 1147 | { | 1147 | { |
| 1148 | int i; | 1148 | int i; |
| 1149 | long linkedit_delta = 0; | 1149 | long linkedit_delta = 0; |
| @@ -1253,7 +1253,7 @@ unexec (char *outfile, char *infile, void *start_data, void *start_bss, | |||
| 1253 | 1253 | ||
| 1254 | 1254 | ||
| 1255 | void | 1255 | void |
| 1256 | unexec_init_emacs_zone () | 1256 | unexec_init_emacs_zone (void) |
| 1257 | { | 1257 | { |
| 1258 | emacs_zone = malloc_create_zone (0, 0); | 1258 | emacs_zone = malloc_create_zone (0, 0); |
| 1259 | malloc_set_zone_name (emacs_zone, "EmacsZone"); | 1259 | malloc_set_zone_name (emacs_zone, "EmacsZone"); |
diff --git a/src/window.c b/src/window.c index 60da49175e3..29be829005d 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -37,6 +37,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 37 | #include "blockinput.h" | 37 | #include "blockinput.h" |
| 38 | #include "intervals.h" | 38 | #include "intervals.h" |
| 39 | #include "termhooks.h" /* For FRAME_TERMINAL. */ | 39 | #include "termhooks.h" /* For FRAME_TERMINAL. */ |
| 40 | #include "menu.h" | ||
| 40 | 41 | ||
| 41 | #ifdef HAVE_X_WINDOWS | 42 | #ifdef HAVE_X_WINDOWS |
| 42 | #include "xterm.h" | 43 | #include "xterm.h" |
diff --git a/src/xfaces.c b/src/xfaces.c index a7a88f5940d..21adb948c91 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -742,10 +742,9 @@ x_free_gc (struct frame *f, GC gc) | |||
| 742 | /* NS emulation of GCs */ | 742 | /* NS emulation of GCs */ |
| 743 | 743 | ||
| 744 | static INLINE GC | 744 | static INLINE GC |
| 745 | x_create_gc (f, mask, xgcv) | 745 | x_create_gc (struct frame *f, |
| 746 | struct frame *f; | 746 | unsigned long mask, |
| 747 | unsigned long mask; | 747 | XGCValues *xgcv) |
| 748 | XGCValues *xgcv; | ||
| 749 | { | 748 | { |
| 750 | GC gc = xmalloc (sizeof (*gc)); | 749 | GC gc = xmalloc (sizeof (*gc)); |
| 751 | if (gc) | 750 | if (gc) |
| @@ -754,9 +753,7 @@ x_create_gc (f, mask, xgcv) | |||
| 754 | } | 753 | } |
| 755 | 754 | ||
| 756 | static INLINE void | 755 | static INLINE void |
| 757 | x_free_gc (f, gc) | 756 | x_free_gc (struct frame *f, GC gc) |
| 758 | struct frame *f; | ||
| 759 | GC gc; | ||
| 760 | { | 757 | { |
| 761 | xfree (gc); | 758 | xfree (gc); |
| 762 | } | 759 | } |