diff options
| author | Jan Djärv | 2012-07-13 20:03:10 +0200 |
|---|---|---|
| committer | Jan Djärv | 2012-07-13 20:03:10 +0200 |
| commit | 0dc8cf5002ba3f79bf840de5b83c0f4f2e4e6279 (patch) | |
| tree | f30ab901e9631069f4c7b8a62a6b704a2e7c53d1 /src/nsfns.m | |
| parent | b55b9f85db85737b365e32585542046b349c1f2e (diff) | |
| download | emacs-0dc8cf5002ba3f79bf840de5b83c0f4f2e4e6279.tar.gz emacs-0dc8cf5002ba3f79bf840de5b83c0f4f2e4e6279.zip | |
Remove compiler warnings in objective-C files.
* nsfns.m (x_set_icon_name, ns_set_name_internal)
(ns_set_name_as_filename, ns_implicitly_set_icon_type)
(x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
(Fns_get_resource, Fns_set_resource, Fx_open_connection)
(Fns_font_name, Fns_perform_service)
(Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
(Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
(ns_set_name): Remove unused variable view.
(x_set_menu_bar_lines): Remove unused variable olines.
(x_set_tool_bar_lines): Remove unused variable root_window.
(Fns_list_colors): Put () around assignment in while statement.
(Fns_perform_service): Remove unused variable len.
(Fns_display_usable_bounds): Remove unused variable top.
(syms_of_nsfns): Remove unused variable i.
* nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
(ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
where appropriate.
(ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
around assignment in loop statement.
(nsfont_open): Remove unused variable i.
(nsfont_open): Remove unused variable len.
(nsfont_draw): Remove unused variable cs.
* nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
appropriate.
(setXBMColor): Remove unused variable len.
(setPixmapData): Put () around assignment in loop statement.
* nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
(initFromContents): Use SSDATA where appropriate.
(ns_update_menubar): Add braces to ambigous if-else.
(initWithTitle): Put () around assignment in if statement.
(ns_menu_show): Remove unused variables window and keymap.
(update_frame_tool_bar): Remove unused variable selected_p.
(initWithContentRect): Remove unused variable this_cmd_name.
* nsterm.h (menuDown): Add id as type to argument sender.
(ns_display_info_for_name): Add Lisp_Object argument.
(ns_term_init): Add Lisp_Object argument.
(ns_map_event_to_object): Add void argument.
(ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
prototype with arguments and only declare if __OBJC__.
(nxatoms_of_nsselect): Add void argument.
(ns_lisp_to_cursor_type): Add Lisp_Object argument.
(ns_alloc_autorelease_pool): Add void argument.
(ns_release_autorelease_pool): Add void* argument.
(ns_get_defaults_value): Add const char* argument.
* nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
(x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
(ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
(ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
where appropriate.
(ns_exec_path, ns_load_path, changeFont): Put () around assignment used
as boolean expression.
(x_set_window_size): Remove unused variable toolbar.
(ns_get_color_default, ns_mod_to_lisp): Remove.
(ns_mouse_position): Remove unused variables xchar and ychar.
(ns_compute_glyph_string_overhangs): Remove unused variable face.
(ns_set_vertical_scroll_bar): Remove unused variable count.
(ns_delete_terminal): Remove unused variable i.
(ns_term_init): Remove unused variables r, g and b.
(mouseDown): Remove unused variable window.
(windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
(initFrameFromEmacs): Remove unused variable vbextra.
(mouseEntered): Remove unused variables p and dpyinfo.
(mouseExited): Remove unused variables p and r.
(ns_define_frame_cursor, ns_clear_frame_area)
(ns_draw_window_cursor, ns_initialize_display_info): Make static.
(menuDown): Assign [sender tag] to variable and cast the variable.
Diffstat (limited to 'src/nsfns.m')
| -rw-r--r-- | src/nsfns.m | 77 |
1 files changed, 35 insertions, 42 deletions
diff --git a/src/nsfns.m b/src/nsfns.m index 47943e5d98a..7c8f673d9ae 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -471,11 +471,11 @@ x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | |||
| 471 | if ([[view window] miniwindowTitle] && | 471 | if ([[view window] miniwindowTitle] && |
| 472 | ([[[view window] miniwindowTitle] | 472 | ([[[view window] miniwindowTitle] |
| 473 | isEqualToString: [NSString stringWithUTF8String: | 473 | isEqualToString: [NSString stringWithUTF8String: |
| 474 | SDATA (arg)]])) | 474 | SSDATA (arg)]])) |
| 475 | return; | 475 | return; |
| 476 | 476 | ||
| 477 | [[view window] setMiniwindowTitle: | 477 | [[view window] setMiniwindowTitle: |
| 478 | [NSString stringWithUTF8String: SDATA (arg)]]; | 478 | [NSString stringWithUTF8String: SSDATA (arg)]]; |
| 479 | } | 479 | } |
| 480 | 480 | ||
| 481 | static void | 481 | static void |
| @@ -490,7 +490,7 @@ ns_set_name_internal (FRAME_PTR f, Lisp_Object name) | |||
| 490 | encoded_name = ENCODE_UTF_8 (name); | 490 | encoded_name = ENCODE_UTF_8 (name); |
| 491 | UNGCPRO; | 491 | UNGCPRO; |
| 492 | 492 | ||
| 493 | str = [NSString stringWithUTF8String: SDATA (encoded_name)]; | 493 | str = [NSString stringWithUTF8String: SSDATA (encoded_name)]; |
| 494 | 494 | ||
| 495 | /* Don't change the name if it's already NAME. */ | 495 | /* Don't change the name if it's already NAME. */ |
| 496 | if (! [[[view window] title] isEqualToString: str]) | 496 | if (! [[[view window] title] isEqualToString: str]) |
| @@ -501,7 +501,7 @@ ns_set_name_internal (FRAME_PTR f, Lisp_Object name) | |||
| 501 | else | 501 | else |
| 502 | encoded_icon_name = ENCODE_UTF_8 (f->icon_name); | 502 | encoded_icon_name = ENCODE_UTF_8 (f->icon_name); |
| 503 | 503 | ||
| 504 | str = [NSString stringWithUTF8String: SDATA (encoded_icon_name)]; | 504 | str = [NSString stringWithUTF8String: SSDATA (encoded_icon_name)]; |
| 505 | 505 | ||
| 506 | if ([[view window] miniwindowTitle] && | 506 | if ([[view window] miniwindowTitle] && |
| 507 | ! [[[view window] miniwindowTitle] isEqualToString: str]) | 507 | ! [[[view window] miniwindowTitle] isEqualToString: str]) |
| @@ -512,7 +512,6 @@ ns_set_name_internal (FRAME_PTR f, Lisp_Object name) | |||
| 512 | static void | 512 | static void |
| 513 | ns_set_name (struct frame *f, Lisp_Object name, int explicit) | 513 | ns_set_name (struct frame *f, Lisp_Object name, int explicit) |
| 514 | { | 514 | { |
| 515 | NSView *view; | ||
| 516 | NSTRACE (ns_set_name); | 515 | NSTRACE (ns_set_name); |
| 517 | 516 | ||
| 518 | if (ns_in_resize) | 517 | if (ns_in_resize) |
| @@ -641,14 +640,14 @@ ns_set_name_as_filename (struct frame *f) | |||
| 641 | title = FRAME_ICONIFIED_P (f) ? [[[view window] miniwindowTitle] UTF8String] | 640 | title = FRAME_ICONIFIED_P (f) ? [[[view window] miniwindowTitle] UTF8String] |
| 642 | : [[[view window] title] UTF8String]; | 641 | : [[[view window] title] UTF8String]; |
| 643 | 642 | ||
| 644 | if (title && (! strcmp (title, SDATA (encoded_name)))) | 643 | if (title && (! strcmp (title, SSDATA (encoded_name)))) |
| 645 | { | 644 | { |
| 646 | [pool release]; | 645 | [pool release]; |
| 647 | UNBLOCK_INPUT; | 646 | UNBLOCK_INPUT; |
| 648 | return; | 647 | return; |
| 649 | } | 648 | } |
| 650 | 649 | ||
| 651 | str = [NSString stringWithUTF8String: SDATA (encoded_name)]; | 650 | str = [NSString stringWithUTF8String: SSDATA (encoded_name)]; |
| 652 | if (str == nil) str = @"Bad coding"; | 651 | if (str == nil) str = @"Bad coding"; |
| 653 | 652 | ||
| 654 | if (FRAME_ICONIFIED_P (f)) | 653 | if (FRAME_ICONIFIED_P (f)) |
| @@ -663,7 +662,7 @@ ns_set_name_as_filename (struct frame *f) | |||
| 663 | encoded_filename = ENCODE_UTF_8 (filename); | 662 | encoded_filename = ENCODE_UTF_8 (filename); |
| 664 | UNGCPRO; | 663 | UNGCPRO; |
| 665 | 664 | ||
| 666 | fstr = [NSString stringWithUTF8String: SDATA (encoded_filename)]; | 665 | fstr = [NSString stringWithUTF8String: SSDATA (encoded_filename)]; |
| 667 | if (fstr == nil) fstr = @""; | 666 | if (fstr == nil) fstr = @""; |
| 668 | #ifdef NS_IMPL_COCOA | 667 | #ifdef NS_IMPL_COCOA |
| 669 | /* work around a bug observed on 10.3 and later where | 668 | /* work around a bug observed on 10.3 and later where |
| @@ -706,7 +705,6 @@ void | |||
| 706 | x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) | 705 | x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) |
| 707 | { | 706 | { |
| 708 | int nlines; | 707 | int nlines; |
| 709 | int olines = FRAME_MENU_BAR_LINES (f); | ||
| 710 | if (FRAME_MINIBUF_ONLY_P (f)) | 708 | if (FRAME_MINIBUF_ONLY_P (f)) |
| 711 | return; | 709 | return; |
| 712 | 710 | ||
| @@ -737,7 +735,6 @@ void | |||
| 737 | x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) | 735 | x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) |
| 738 | { | 736 | { |
| 739 | int nlines; | 737 | int nlines; |
| 740 | Lisp_Object root_window; | ||
| 741 | 738 | ||
| 742 | if (FRAME_MINIBUF_ONLY_P (f)) | 739 | if (FRAME_MINIBUF_ONLY_P (f)) |
| 743 | return; | 740 | return; |
| @@ -780,7 +777,7 @@ ns_implicitly_set_icon_type (struct frame *f) | |||
| 780 | BLOCK_INPUT; | 777 | BLOCK_INPUT; |
| 781 | pool = [[NSAutoreleasePool alloc] init]; | 778 | pool = [[NSAutoreleasePool alloc] init]; |
| 782 | if (f->output_data.ns->miniimage | 779 | if (f->output_data.ns->miniimage |
| 783 | && [[NSString stringWithUTF8String: SDATA (f->name)] | 780 | && [[NSString stringWithUTF8String: SSDATA (f->name)] |
| 784 | isEqualToString: [(NSImage *)f->output_data.ns->miniimage name]]) | 781 | isEqualToString: [(NSImage *)f->output_data.ns->miniimage name]]) |
| 785 | { | 782 | { |
| 786 | [pool release]; | 783 | [pool release]; |
| @@ -802,10 +799,10 @@ ns_implicitly_set_icon_type (struct frame *f) | |||
| 802 | { | 799 | { |
| 803 | elt = XCAR (chain); | 800 | elt = XCAR (chain); |
| 804 | /* special case: 't' means go by file type */ | 801 | /* special case: 't' means go by file type */ |
| 805 | if (SYMBOLP (elt) && EQ (elt, Qt) && SDATA (f->name)[0] == '/') | 802 | if (SYMBOLP (elt) && EQ (elt, Qt) && SSDATA (f->name)[0] == '/') |
| 806 | { | 803 | { |
| 807 | NSString *str | 804 | NSString *str |
| 808 | = [NSString stringWithUTF8String: SDATA (f->name)]; | 805 | = [NSString stringWithUTF8String: SSDATA (f->name)]; |
| 809 | if ([[NSFileManager defaultManager] fileExistsAtPath: str]) | 806 | if ([[NSFileManager defaultManager] fileExistsAtPath: str]) |
| 810 | image = [[[NSWorkspace sharedWorkspace] iconForFile: str] retain]; | 807 | image = [[[NSWorkspace sharedWorkspace] iconForFile: str] retain]; |
| 811 | } | 808 | } |
| @@ -818,7 +815,7 @@ ns_implicitly_set_icon_type (struct frame *f) | |||
| 818 | if (image == nil) | 815 | if (image == nil) |
| 819 | image = [[NSImage imageNamed: | 816 | image = [[NSImage imageNamed: |
| 820 | [NSString stringWithUTF8String: | 817 | [NSString stringWithUTF8String: |
| 821 | SDATA (XCDR (elt))]] retain]; | 818 | SSDATA (XCDR (elt))]] retain]; |
| 822 | } | 819 | } |
| 823 | } | 820 | } |
| 824 | 821 | ||
| @@ -847,7 +844,7 @@ x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | |||
| 847 | 844 | ||
| 848 | if (!NILP (arg) && SYMBOLP (arg)) | 845 | if (!NILP (arg) && SYMBOLP (arg)) |
| 849 | { | 846 | { |
| 850 | arg =build_string (SDATA (SYMBOL_NAME (arg))); | 847 | arg =build_string (SSDATA (SYMBOL_NAME (arg))); |
| 851 | store_frame_param (f, Qicon_type, arg); | 848 | store_frame_param (f, Qicon_type, arg); |
| 852 | } | 849 | } |
| 853 | 850 | ||
| @@ -863,7 +860,7 @@ x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | |||
| 863 | image = [EmacsImage allocInitFromFile: arg]; | 860 | image = [EmacsImage allocInitFromFile: arg]; |
| 864 | if (image == nil) | 861 | if (image == nil) |
| 865 | image =[NSImage imageNamed: [NSString stringWithUTF8String: | 862 | image =[NSImage imageNamed: [NSString stringWithUTF8String: |
| 866 | SDATA (arg)]]; | 863 | SSDATA (arg)]]; |
| 867 | 864 | ||
| 868 | if (image == nil) | 865 | if (image == nil) |
| 869 | { | 866 | { |
| @@ -892,9 +889,9 @@ ns_lisp_to_cursor_type (Lisp_Object arg) | |||
| 892 | { | 889 | { |
| 893 | char *str; | 890 | char *str; |
| 894 | if (XTYPE (arg) == Lisp_String) | 891 | if (XTYPE (arg) == Lisp_String) |
| 895 | str = SDATA (arg); | 892 | str = SSDATA (arg); |
| 896 | else if (XTYPE (arg) == Lisp_Symbol) | 893 | else if (XTYPE (arg) == Lisp_Symbol) |
| 897 | str = SDATA (SYMBOL_NAME (arg)); | 894 | str = SSDATA (SYMBOL_NAME (arg)); |
| 898 | else return -1; | 895 | else return -1; |
| 899 | if (!strcmp (str, "box")) return FILLED_BOX_CURSOR; | 896 | if (!strcmp (str, "box")) return FILLED_BOX_CURSOR; |
| 900 | if (!strcmp (str, "hollow")) return HOLLOW_BOX_CURSOR; | 897 | if (!strcmp (str, "hollow")) return HOLLOW_BOX_CURSOR; |
| @@ -1493,12 +1490,12 @@ Optional arg INIT, if non-nil, provides a default file name to use. */) | |||
| 1493 | Lisp_Object fname; | 1490 | Lisp_Object fname; |
| 1494 | 1491 | ||
| 1495 | NSString *promptS = NILP (prompt) || !STRINGP (prompt) ? nil : | 1492 | NSString *promptS = NILP (prompt) || !STRINGP (prompt) ? nil : |
| 1496 | [NSString stringWithUTF8String: SDATA (prompt)]; | 1493 | [NSString stringWithUTF8String: SSDATA (prompt)]; |
| 1497 | NSString *dirS = NILP (dir) || !STRINGP (dir) ? | 1494 | NSString *dirS = NILP (dir) || !STRINGP (dir) ? |
| 1498 | [NSString stringWithUTF8String: SDATA (BVAR (current_buffer, directory))] : | 1495 | [NSString stringWithUTF8String: SSDATA (BVAR (current_buffer, directory))] : |
| 1499 | [NSString stringWithUTF8String: SDATA (dir)]; | 1496 | [NSString stringWithUTF8String: SSDATA (dir)]; |
| 1500 | NSString *initS = NILP (init) || !STRINGP (init) ? nil : | 1497 | NSString *initS = NILP (init) || !STRINGP (init) ? nil : |
| 1501 | [NSString stringWithUTF8String: SDATA (init)]; | 1498 | [NSString stringWithUTF8String: SSDATA (init)]; |
| 1502 | 1499 | ||
| 1503 | check_ns (); | 1500 | check_ns (); |
| 1504 | 1501 | ||
| @@ -1568,9 +1565,9 @@ If OWNER is nil, Emacs is assumed. */) | |||
| 1568 | if (NILP (owner)) | 1565 | if (NILP (owner)) |
| 1569 | owner = build_string([ns_app_name UTF8String]); | 1566 | owner = build_string([ns_app_name UTF8String]); |
| 1570 | CHECK_STRING (name); | 1567 | CHECK_STRING (name); |
| 1571 | /*fprintf (stderr, "ns-get-resource checking resource '%s'\n", SDATA (name)); */ | 1568 | /*fprintf (stderr, "ns-get-resource checking resource '%s'\n", SSDATA (name)); */ |
| 1572 | 1569 | ||
| 1573 | value = ns_get_defaults_value (SDATA (name)); | 1570 | value = ns_get_defaults_value (SSDATA (name)); |
| 1574 | 1571 | ||
| 1575 | if (value) | 1572 | if (value) |
| 1576 | return build_string (value); | 1573 | return build_string (value); |
| @@ -1591,15 +1588,15 @@ If VALUE is nil, the default is removed. */) | |||
| 1591 | if (NILP (value)) | 1588 | if (NILP (value)) |
| 1592 | { | 1589 | { |
| 1593 | [[NSUserDefaults standardUserDefaults] removeObjectForKey: | 1590 | [[NSUserDefaults standardUserDefaults] removeObjectForKey: |
| 1594 | [NSString stringWithUTF8String: SDATA (name)]]; | 1591 | [NSString stringWithUTF8String: SSDATA (name)]]; |
| 1595 | } | 1592 | } |
| 1596 | else | 1593 | else |
| 1597 | { | 1594 | { |
| 1598 | CHECK_STRING (value); | 1595 | CHECK_STRING (value); |
| 1599 | [[NSUserDefaults standardUserDefaults] setObject: | 1596 | [[NSUserDefaults standardUserDefaults] setObject: |
| 1600 | [NSString stringWithUTF8String: SDATA (value)] | 1597 | [NSString stringWithUTF8String: SSDATA (value)] |
| 1601 | forKey: [NSString stringWithUTF8String: | 1598 | forKey: [NSString stringWithUTF8String: |
| 1602 | SDATA (name)]]; | 1599 | SSDATA (name)]]; |
| 1603 | } | 1600 | } |
| 1604 | 1601 | ||
| 1605 | return Qnil; | 1602 | return Qnil; |
| @@ -1795,10 +1792,10 @@ terminate Emacs if we can't open the connection. | |||
| 1795 | { | 1792 | { |
| 1796 | if (!NILP (must_succeed)) | 1793 | if (!NILP (must_succeed)) |
| 1797 | fatal ("OpenStep on %s not responding.\n", | 1794 | fatal ("OpenStep on %s not responding.\n", |
| 1798 | SDATA (display)); | 1795 | SSDATA (display)); |
| 1799 | else | 1796 | else |
| 1800 | error ("OpenStep on %s not responding.\n", | 1797 | error ("OpenStep on %s not responding.\n", |
| 1801 | SDATA (display)); | 1798 | SSDATA (display)); |
| 1802 | } | 1799 | } |
| 1803 | 1800 | ||
| 1804 | /* Register our external input/output types, used for determining | 1801 | /* Register our external input/output types, used for determining |
| @@ -1897,14 +1894,14 @@ font descriptor. If string contains `fontset' and not | |||
| 1897 | { | 1894 | { |
| 1898 | char *nm; | 1895 | char *nm; |
| 1899 | CHECK_STRING (name); | 1896 | CHECK_STRING (name); |
| 1900 | nm = SDATA (name); | 1897 | nm = SSDATA (name); |
| 1901 | 1898 | ||
| 1902 | if (nm[0] != '-') | 1899 | if (nm[0] != '-') |
| 1903 | return name; | 1900 | return name; |
| 1904 | if (strstr (nm, "fontset") && !strstr (nm, "fontset-startup")) | 1901 | if (strstr (nm, "fontset") && !strstr (nm, "fontset-startup")) |
| 1905 | return name; | 1902 | return name; |
| 1906 | 1903 | ||
| 1907 | return build_string (ns_xlfd_to_fontname (SDATA (name))); | 1904 | return build_string (ns_xlfd_to_fontname (SSDATA (name))); |
| 1908 | } | 1905 | } |
| 1909 | 1906 | ||
| 1910 | 1907 | ||
| @@ -1927,14 +1924,14 @@ The optional argument FRAME is currently ignored. */) | |||
| 1927 | BLOCK_INPUT; | 1924 | BLOCK_INPUT; |
| 1928 | 1925 | ||
| 1929 | colorlists = [[NSColorList availableColorLists] objectEnumerator]; | 1926 | colorlists = [[NSColorList availableColorLists] objectEnumerator]; |
| 1930 | while (clist = [colorlists nextObject]) | 1927 | while ((clist = [colorlists nextObject])) |
| 1931 | { | 1928 | { |
| 1932 | if ([[clist name] length] < 7 || | 1929 | if ([[clist name] length] < 7 || |
| 1933 | [[clist name] rangeOfString: @"PANTONE"].location == 0) | 1930 | [[clist name] rangeOfString: @"PANTONE"].location == 0) |
| 1934 | { | 1931 | { |
| 1935 | NSEnumerator *cnames = [[clist allKeys] reverseObjectEnumerator]; | 1932 | NSEnumerator *cnames = [[clist allKeys] reverseObjectEnumerator]; |
| 1936 | NSString *cname; | 1933 | NSString *cname; |
| 1937 | while (cname = [cnames nextObject]) | 1934 | while ((cname = [cnames nextObject])) |
| 1938 | list = Fcons (build_string ([cname UTF8String]), list); | 1935 | list = Fcons (build_string ([cname UTF8String]), list); |
| 1939 | /* for (i = [[clist allKeys] count] - 1; i >= 0; i--) | 1936 | /* for (i = [[clist allKeys] count] - 1; i >= 0; i--) |
| 1940 | list = Fcons (build_string ([[[clist allKeys] objectAtIndex: i] | 1937 | list = Fcons (build_string ([[[clist allKeys] objectAtIndex: i] |
| @@ -2014,12 +2011,11 @@ there was no result. */) | |||
| 2014 | id pb; | 2011 | id pb; |
| 2015 | NSString *svcName; | 2012 | NSString *svcName; |
| 2016 | char *utfStr; | 2013 | char *utfStr; |
| 2017 | int len; | ||
| 2018 | 2014 | ||
| 2019 | CHECK_STRING (service); | 2015 | CHECK_STRING (service); |
| 2020 | check_ns (); | 2016 | check_ns (); |
| 2021 | 2017 | ||
| 2022 | utfStr = SDATA (service); | 2018 | utfStr = SSDATA (service); |
| 2023 | svcName = [NSString stringWithUTF8String: utfStr]; | 2019 | svcName = [NSString stringWithUTF8String: utfStr]; |
| 2024 | 2020 | ||
| 2025 | pb =[NSPasteboard pasteboardWithUniqueName]; | 2021 | pb =[NSPasteboard pasteboardWithUniqueName]; |
| @@ -2044,7 +2040,7 @@ DEFUN ("ns-convert-utf8-nfd-to-nfc", Fns_convert_utf8_nfd_to_nfc, | |||
| 2044 | NSString *utfStr; | 2040 | NSString *utfStr; |
| 2045 | 2041 | ||
| 2046 | CHECK_STRING (str); | 2042 | CHECK_STRING (str); |
| 2047 | utfStr = [NSString stringWithUTF8String: SDATA (str)]; | 2043 | utfStr = [NSString stringWithUTF8String: SSDATA (str)]; |
| 2048 | if (![utfStr respondsToSelector: | 2044 | if (![utfStr respondsToSelector: |
| 2049 | @selector (precomposedStringWithCanonicalMapping)]) | 2045 | @selector (precomposedStringWithCanonicalMapping)]) |
| 2050 | { | 2046 | { |
| @@ -2074,7 +2070,7 @@ ns_do_applescript (Lisp_Object script, Lisp_Object *result) | |||
| 2074 | 2070 | ||
| 2075 | NSAppleScript* scriptObject = | 2071 | NSAppleScript* scriptObject = |
| 2076 | [[NSAppleScript alloc] initWithSource: | 2072 | [[NSAppleScript alloc] initWithSource: |
| 2077 | [NSString stringWithUTF8String: SDATA (script)]]; | 2073 | [NSString stringWithUTF8String: SSDATA (script)]]; |
| 2078 | 2074 | ||
| 2079 | returnDescriptor = [scriptObject executeAndReturnError: &errorDict]; | 2075 | returnDescriptor = [scriptObject executeAndReturnError: &errorDict]; |
| 2080 | [scriptObject release]; | 2076 | [scriptObject release]; |
| @@ -2173,7 +2169,7 @@ In case the execution fails, an error is signaled. */) | |||
| 2173 | else if (!STRINGP (result)) | 2169 | else if (!STRINGP (result)) |
| 2174 | error ("AppleScript error %d", status); | 2170 | error ("AppleScript error %d", status); |
| 2175 | else | 2171 | else |
| 2176 | error ("%s", SDATA (result)); | 2172 | error ("%s", SSDATA (result)); |
| 2177 | } | 2173 | } |
| 2178 | #endif | 2174 | #endif |
| 2179 | 2175 | ||
| @@ -2400,7 +2396,6 @@ frame, a display name (a string), or terminal ID. If omitted or nil, | |||
| 2400 | that stands for the selected frame's display. */) | 2396 | that stands for the selected frame's display. */) |
| 2401 | (Lisp_Object display) | 2397 | (Lisp_Object display) |
| 2402 | { | 2398 | { |
| 2403 | int top; | ||
| 2404 | NSScreen *screen; | 2399 | NSScreen *screen; |
| 2405 | NSRect vScreen; | 2400 | NSRect vScreen; |
| 2406 | 2401 | ||
| @@ -2558,7 +2553,7 @@ Text larger than the specified size is clipped. */) | |||
| 2558 | GCPRO4 (string, parms, frame, timeout); | 2553 | GCPRO4 (string, parms, frame, timeout); |
| 2559 | 2554 | ||
| 2560 | CHECK_STRING (string); | 2555 | CHECK_STRING (string); |
| 2561 | str = SDATA (string); | 2556 | str = SSDATA (string); |
| 2562 | f = check_x_frame (frame); | 2557 | f = check_x_frame (frame); |
| 2563 | if (NILP (timeout)) | 2558 | if (NILP (timeout)) |
| 2564 | timeout = make_number (5); | 2559 | timeout = make_number (5); |
| @@ -2692,8 +2687,6 @@ Value is t if tooltip was open, nil otherwise. */) | |||
| 2692 | void | 2687 | void |
| 2693 | syms_of_nsfns (void) | 2688 | syms_of_nsfns (void) |
| 2694 | { | 2689 | { |
| 2695 | int i; | ||
| 2696 | |||
| 2697 | Qfontsize = intern_c_string ("fontsize"); | 2690 | Qfontsize = intern_c_string ("fontsize"); |
| 2698 | staticpro (&Qfontsize); | 2691 | staticpro (&Qfontsize); |
| 2699 | 2692 | ||