comparison src/nsfns.m @ 97584:06f7d5858c5a

* nsfns.m (ns-read-file-name): Add casts to avoid warning. (ns-convert-utf8-nfd-to-nfc): Warn if cannot execute correctly. * nsfont.m (nsfont_draw): Compare indexed colors to 0, not nil. * nsterm.h (EmacsView-unlockFocusNeedsFlush:): Add declaration. (EmacsApp-cursor_blink_handler): Remove declaration. * nsterm.m (ns_draw_glyph_string): Update first conditional body to match 01 Feb 2008 changes in xterm.c. (ns_read_socket): Add cast to avoid warning. (EmacsApp-application:openFiles:): Don't call replyToOpenOrPrint: on GNUstep.
author Adrian Robert <Adrian.B.Robert@gmail.com>
date Thu, 21 Aug 2008 02:48:58 +0000
parents b7e30775f9ce
children 6a64532bbc7b
comparison
equal deleted inserted replaced
97583:2b25a461fcb0 97584:06f7d5858c5a
1438 1438
1439 if ([dirS characterAtIndex: 0] == '~') 1439 if ([dirS characterAtIndex: 0] == '~')
1440 dirS = [dirS stringByExpandingTildeInPath]; 1440 dirS = [dirS stringByExpandingTildeInPath];
1441 1441
1442 panel = NILP (isLoad) ? 1442 panel = NILP (isLoad) ?
1443 [EmacsSavePanel savePanel] : [EmacsOpenPanel openPanel]; 1443 (id)[EmacsSavePanel savePanel] : (id)[EmacsOpenPanel openPanel];
1444 1444
1445 [panel setTitle: promptS]; 1445 [panel setTitle: promptS];
1446 1446
1447 /* Puma (10.1) does not have */ 1447 /* Puma (10.1) does not have */
1448 if ([panel respondsToSelector: @selector (setAllowsOtherFileTypes:)]) 1448 if ([panel respondsToSelector: @selector (setAllowsOtherFileTypes:)])
1986 Sns_convert_utf8_nfd_to_nfc, 1, 1, 0, 1986 Sns_convert_utf8_nfd_to_nfc, 1, 1, 0,
1987 doc: /* Return an NFC string that matches the UTF-8 NFD string STR. */) 1987 doc: /* Return an NFC string that matches the UTF-8 NFD string STR. */)
1988 (str) 1988 (str)
1989 Lisp_Object str; 1989 Lisp_Object str;
1990 { 1990 {
1991 /* TODO: If GNUstep ever implements precomposedStringWithCanonicalMapping,
1992 remove this. */
1991 NSString *utfStr; 1993 NSString *utfStr;
1992 1994
1993 CHECK_STRING (str); 1995 CHECK_STRING (str);
1994 utfStr = [[NSString stringWithUTF8String: SDATA (str)] 1996 utfStr = [NSString stringWithUTF8String: SDATA (str)];
1995 precomposedStringWithCanonicalMapping]; 1997 if (![utfStr respondsToSelector:
1998 @selector (precomposedStringWithCanonicalMapping)])
1999 {
2000 message1
2001 ("Warning: ns-convert-utf8-nfd-to-nfc unsupported under GNUstep.\n");
2002 return Qnil;
2003 }
2004 else
2005 utfStr = [utfStr precomposedStringWithCanonicalMapping];
1996 return build_string ([utfStr UTF8String]); 2006 return build_string ([utfStr UTF8String]);
1997 } 2007 }
1998 2008
1999 2009
2000 #ifdef NS_IMPL_COCOA 2010 #ifdef NS_IMPL_COCOA