diff options
author | Jan D <jan.h.d@swipnet.se> | 2010-08-06 12:12:41 +0200 |
---|---|---|
committer | Jan D <jan.h.d@swipnet.se> | 2010-08-06 12:12:41 +0200 |
commit | 3d608a86503ae057e0d2e721a9d9718eae22bf89 (patch) | |
tree | 01ae2c34b91e9357f41bda331a8ed4e3422683bf /src/nsfns.m | |
parent | 0613f5d515c2f7fe7930ad5f7d3e177e1fd3b44c (diff) | |
download | emacs-3d608a86503ae057e0d2e721a9d9718eae22bf89.tar.gz |
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/nsfns.m')
-rw-r--r-- | src/nsfns.m | 36 |
1 files changed, 17 insertions, 19 deletions
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) /* Nonzero if we can use mouse menus. */ int -have_menus_p () +have_menus_p (void) { return NSApp != nil; } @@ -240,8 +240,7 @@ ns_get_screen (Lisp_Object screen) /* Return the X display structure for the display named NAME. Open a new connection if necessary. */ struct ns_display_info * -ns_display_info_for_name (name) - Lisp_Object name; +ns_display_info_for_name (Lisp_Object name) { Lisp_Object names; struct ns_display_info *dpyinfo; @@ -925,9 +924,7 @@ ns_cursor_type_to_lisp (int arg) /* This is the same as the xfns.c definition. */ void -x_set_cursor_type (f, arg, oldval) - FRAME_PTR f; - Lisp_Object arg, oldval; +x_set_cursor_type (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) { set_frame_cursor_types (f, arg); @@ -949,7 +946,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) #define Xstr(x) Str(x) static Lisp_Object -ns_appkit_version_str () +ns_appkit_version_str (void) { char tmp[80]; @@ -968,7 +965,7 @@ ns_appkit_version_str () have into a single int. For a better picture of the implementation running, use ns_appkit_version_str.*/ static int -ns_appkit_version_int () +ns_appkit_version_int (void) { #ifdef NS_IMPL_GNUSTEP 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, string or a number containing the resulting script value. Otherwise, 1 is returned. */ static int -ns_do_applescript (script, result) - Lisp_Object script, *result; +ns_do_applescript (Lisp_Object script, Lisp_Object *result) { NSAppleEventDescriptor *desc; NSDictionary* errorDict; @@ -2108,8 +2104,7 @@ check_x_display_info (Lisp_Object frame) void -x_set_scroll_bar_default_width (f) - struct frame *f; +x_set_scroll_bar_default_width (struct frame *f) { int wid = FRAME_COLUMN_WIDTH (f); FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = NS_SCROLL_BAR_WIDTH_DEFAULT; @@ -2189,7 +2184,7 @@ x_screen_planes (struct frame *f) void -x_sync (Lisp_Object frame) +x_sync (struct frame *f) { /* XXX Not implemented XXX */ return; @@ -2367,11 +2362,14 @@ Lisp_Object tip_frame; /* TODO: move to xdisp or similar */ static void -compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y) - struct frame *f; - Lisp_Object parms, dx, dy; - int width, height; - int *root_x, *root_y; +compute_tip_xy (struct frame *f, + Lisp_Object parms, + Lisp_Object dx, + Lisp_Object dy, + int width, + int height, + int *root_x, + int *root_y) { Lisp_Object left, top; EmacsView *view = FRAME_NS_VIEW (f); @@ -2595,7 +2593,7 @@ Value is t if tooltip was open, nil otherwise. */) void -syms_of_nsfns () +syms_of_nsfns (void) { int i; |